;
;
; DEC-BIN
;
; -- (c) Lars B|rje Cid --
;
;
          ORG    -1736
          LD     A,D
          CP     0
          JR     Z,REGE
          PUSH   DE
;
     BIN: BIT    7,A
          CALL   Z,ETT
          CALL   NZ,NOLL
          BIT    6,A
          CALL   Z,ETT
          CALL   NZ,NOLL
          BIT    5,A
          CALL   Z,ETT
          CALL   NZ,NOLL
          BIT    4,A
          CALL   Z,ETT
          CALL   NZ,NOLL
          BIT    3,A
          CALL   Z,ETT
          CALL   NZ,NOLL
          BIT    2,A
          CALL   Z,ETT
          CALL   NZ, NOLL
          BIT    1,A
          CALL   Z,ETT
          CALL   NZ,NOLL
          BIT    0,A
          CALL   Z,ETT
          CALL   NZ,NOLL
;
;
          LD     HL,SPACE
          LD     BC,1
          CALL   424
          POP    DE
;
   REGE:  LD     A,E
          BIT    7,A
          CALL   Z,ETT
          CALL   NZ,NOLL
          BIT    6,A
          CALL   Z,ETT
          CALL   NZ,NOLL
          BIT    5,A
          CALL   Z,ETT
          CALL   NZ,NOLL
          BIT    4,A
          CALL   Z,ETT
          CALL   NZ,NOLL
          BIT    3,A
          CALL   Z,ETT
          CALL   NZ,NOLL
          BIT    2,A
          CALL   Z,ETT
          CALL   NZ,NOLL
          BIT    1,A
          CALL   Z,ETT
          CALL   NZ,NOLL
          BIT    0,A
          JR     Z,ETT
;
;
    NOLL: EX     AF,AF'
          LD     HL,TEXT0
          LD     BC,1
          CALL   424
          EX     AF,AF'
          RET
;
     ETT: EX     AF,AF'
          LD     HL,TEXT1
          LD     BC,1
          CALL   424
          EX     AF,AF'
          RET
;
  TEXT1:  DEFM  '0'
  TEXT0:  DEFM  '1'
  SPACE:  DEFM  ' '
