Micro­power

  

Volume 1, Number 4 – December 1981











Page 13 of 33











4E6FFD2A83120570LD IY, (TEXT); ZERO POINTER
4E73FDE50580IN3PUSH IY; CALCULATE ADDRESS
4E75E10590POP HL
4E76ED4B83120600LD BC, (TEXT); BASE ADDRESS
4E7AB70610OR A; RESET CARRY FLAG
4E7BED420620SBC HL, BC; SUB. BASE ADD.
4E7DDF660630SCAL TBCD3; PRINT ADDRESS
4E7FDF630640IN0SCAL INLIN; INPUT LINE
4E81CDBB4E0650CALL NUM16; GET ADD. IN BC
4E84FD2A83120660LD IY, (TEXT); CALCULATE PROPER
4E88FD090670ADDIY, BC; ADDRESS
4E8A1A0680IN1LD A, (DE); GET CHARACTER
4E8BFE200690CP ' '; A SPACE?
4E8D20030700JR NZ COMND; IF NOT, JUMP
4E8F130710INC DE; TRYNEXT
4E9018F80720JR IN1; CHARACTER
4E92FE2E0730COMNDCP '.'; END OF PROGRAM
4E94284D0740JR Z, END
4E96B70750OR A; END OF LINE?
4E9728DA0760JR Z, IN3; GET NEXT LINE
4E99FE2B0770CP '+'; RELATIVE NUMBER?
4E9B20140780JR NZ, IN2; IF NOT, 8 BIT NO.
0785;
0790; IF YES, THEN INPUT A 16 BIT NUMBER
0800; AND ADD OFFSET TO PROPER ADDRESS
0805;
4E9D2A83120810LD HL, (TEXT); GET BASE ADD.
4EA0130820INC DE; START OF NUMBER
4EA1CDBB4E0830CALL NUM16; OFFSET IN BC
4EA4090840CHKADD HL, BC; CALCULATE ADDRESS
4EA5FD75001010JR NZ, ERROR; IF NOT, ERROR
4ECCC91020RET; RETURN
4ECDDF641030NUM8SCAL NUM; GET 8 BIT NUMBER
4ECF380C1040JR C, ERROR; ERROR DETECTED
4ED1ED4B210C1050LD BC (NUMV); GET NUMBER
4ED53A200C1060LD A, (NUMN); CORRECT LENGTH?
4ED8FE021070CP 2; TWO CHARACTERS
4EDA20011080JR NZ, ERROR; IF NOT, ERROR
4EDCC91090RET; RETURN
4EDDED53290C1100ERRORLD (CURSR), DE; POSITION CURSOR
4EE1189C1110JR IN0; RE-INPUT LINE
4EE3EF1120ENDRST 40; PRINT STRING
4EE4416E6F741130DEFM "ANOTHER COMMAND (Y/N)"
4EFB11001140DEFB CUL, 0
4EFDDF7B1150END0SCAL BLINK; GET ANSWER
4EFFFE591160CP 'Y'; IS IT 'YES'
4F0120081170JR NZ, END1
4F03F71180RST CRT; PRINT IT
4F04FD2283121190LD (TEXT), IY; RESET POINTER
4F08C3004E1200JP LOADR; AND CONTINUE
4F0BFE4E1210END1CP 'N'; ANSWER NO?
4F0D20EE1220JR NZ, END0; INPUT AGAIN
4F0FF71230RST CRT; PRINT N
4F10FDE51240PUSH IY; TRANSFER TO HL
4F12E11250POP HL
4F137D1260LD A, L; IS IT ON A PAGE
4F14B71270OR A; BOUNDARY?











Page 13 of 33