Micro­power

  

Volume 1 · Number 3 · November 1981

Page 15 of 33
1680; NO MATCH, SO CONVERT TO REM AND DISPLAY
1690; ADDRESS, LINE NUMBER (DECIMAL) AND CODE
1700;
0D5FF11710NOTMPOP AF
0D60E11720POP HL; DISPLAY ON SCREEN
0D61E51730PUSH HL; DETAILS OF EACH
0D62DF661740SCAL £66; DISPLAY HL IN HEX
0D64621750LD H, D
0D656B1760LD H, E
0D66CD890D1770CALL HEXDEC; CONVERT HEX. TO DEC.
0D69DF691780SCAL £69; OUTPUT ONE SPACE
0D6BE11810POP HL
0D6C7E1820LD A, (HL)
0D6DDF681830SCAL £68; PRINT ACC. IN HEX
0D6FDF7E1840SCAL £7E; OUTPUT TWO SPACES
0D71DF691850SCAL £69; OUTPUT ONE SPACE
0D733E8E1890LD A, £8E; LOAD CODE FOR REM
0D75771900LD (HL), A; REWRITE AS REM
0D763A2A0C1910LD A, (£0C2A); SCREEN FULL?
0D79FE0B1920CP £0B; CURSOR POSITION
0D7B200B1930JR NZ, NOTFUL; PASS UNLESS
0D7D3A290C1940LD A, (C29); NEXT OUTPUT SCROLLS
0D80FEAA1950CP £AA
0D8220041960JR NZ, NOTFUL
0D84CF1970RST 8; WAIT FOR KEY PRESS
0D853E0C1980LD A, £0C; CLEAR SCREEN CODE
0D87F71990RST £30; NAS-SYS OUTPUT
0D88C92000NOTFULRET; RETURN
2010;
2020; SUBROUTINE TO CONVERT HEX LINE NUMBER
2030; TO DECIMAL (NUMBER IN HL REGS.)
2040;
0D890E042050HEXDECLD C, A; MAX. LEADING SPACES
0D8B06002060LD B, 0
0D8DD52070PUSH DE
0D8E110A002080LD DE, 10
0D91D52090PUSH DE
0D92C52100PUSH BC
0D93CDBC0D2110DODIVCALL DIVIDE; DIVIDE SUB ROUTINE
0D96782120LD A, B
0D97B12130OR C; IF ZERO, FINISHED
0D98CAA30D2140JP Z, DIVEND
0D9BE32150EX (SP), HL; ANOTHER DIV LOOP
0D9C2D2160DEC L
0D9DE52170PUSH HL
0D9E602180LD H, B; PUT VALUE IN HL
0D9F692190LD L, C
0DA0C3930D2200JP DODIV
0DA3C12210DIVENDPOP BC
0DA40D2220LEADSPDEC C; DEC. LEADING SPACES
0DA5792230LD A, C
0DA6B72240OR A; CHECK SPACES LEFT
0DA7FAB00D2250JP M, DONESP; IF MINUS, DONE
0DAA3E202260LD A, £20; ASCII SPACE CODE
0DACF72270RST £30 OUPUT ROUTINE
0DADC3A40D2280JP LEADSP
Page 15 of 33