Micro­power

  

Volume 2 · Number 1 · February 1982

Page 22 of 37
79:;
80:RESTR2:CALL CLRCRT; CLEAR TYPE NUMBER
81:CLRTYP:LD B, 16; TYPE ADDRESS ON SCREEN
82:LD HL, 0BE8H; SPACE CHARACTER
83:LD A, " "
84:CLRT1:LD (HL), A
85:INC HL
86:DJNZ CLRT1
87:KEYC:LD HL, TEXT3; EPROM HANDLING MESSAGE
88:LD DE, 0A0BH
89:LD BC, 41
90:LDIR
91:LD HL, TEXT4; PROMPT FOR KEY "C"
92:LD DE, 0B0BH
93:LD BC, 19
94:LDIR
95:SCAN:DEFB SCAL, KBD; GET INPUT
96:JR C, SCAN1
97:JR SCAN
98:SCAN1:CP "C"
99:JR NZ, SCAN; LOOP UNTIL "C" IS PRESSED
100:ALLOK:CALL CLRCRT
101:LD HL, TEXT1A; "KEY A---FOR 2708"
102:LD DE, 090BH
103:LD BC, 33
104:LDIR
105:LD HL, TEXT1B; "KEY B--------"
106:LD DE, 0991H
107:LD BC, 27
108:LDIR
109:KEY:DEFB SCAL, KBD; GET INPUT
110:JR C, KEY1
111:JR KEY
112:KEY1:PUSH AF; SAVE KEY
113:CALL CLRCRT; CLEAR SCREEN
114:LD HL, TEXT11; "KEY ?-----Y/N"
115:LD DE, 090BH
116:LD BC, 27
117:LDIR
118:POP AF
119LD HL, 090FH; SCREEN ADDRESS FOR KEY
120:LD (HL),A; PRINT IT
121:EX AF, AF’; SAVE IT AGAIN
122:KEY2:DEFB SCAL, KBD; GET KEY AGAIN
123:JR NC, KEY2
124:CP "Y"
125:JR Z, TYPE
126:CP "N"
127:JR Z, ALLOK
128:JR KEY2; TRY AGAIN IF NOT YOR N
129:;
130:TYPE:EX AF, AF’; GET ORIGINAL ENTRY BACK
131:CP "A"
132:JRZ, TYP1K; 1K EPROM
133:CP "B"
134:JR Z, TYP2K; 2K EPROM
135:CALL CLRCRT
Page 22 of 37