Micro­power

  

Volume 2 · Number 1 · February 1982

Page 24 of 37
195:CP "Y"
196:JR Z,WH2
197:CP "N"
198:JR NZ,WH1; TRTY AGAIN IF NOT Y OR
199:JR PROMPT; REPROMPT IF "N"
200:WH2:CALL CLRCRT; CLEAR SCREEN
201:EX AF, AF'
202:CP "P"; WAS IT A "P"?
203:JR Z, PROGRM; IF SO, GO TO PROGRAM
204:CP "C"; WAS IT A "C"?
205:JR Z, CMPARE; IF SO, GO TO COMPARE
206:CP "T"; WAS IT A "T"?
207:JR Z, TRNFER; IF SO, GO TO TRANSFER
208:CP "E"; WAS IT AN "E"?
209:JR Z, ERASED; IF SO, TEST FOR ERASURE
210:CP "D"; WAS IT A "D"?
211:JR Z, OUTPUT; IF SO, GO TO DUMP ROUTINE
212:JR OPTION; INVALID ENTRY, TRY AGAIN
213:; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
214:; *           ROUTINE TO PROGRAM EPROM           *
215:; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
216:PROGRM:LD HL, TEXT17; "COPIED INTO EPROM"
217:LD DE, 0A4BH
218:LD BC, 11H
219:LDIR
220:CALL RAMADR; GET START ADDRESS
221:SETPIO:CALL STPIO3; PORT A LINES TO O/P
222:LD A, (ROMFLG); 1K OR 2K EPROM?
223:CP 8
224:JR Z, PR2716; JUMP IF 2716
225:LD B, 68H; NUMBER OF CYCLES TO COUNT
226:PROGR1:PUSH BC; SAVE CYCLES COUNT
227:CALL RESET; RESET COUNTER, SET 12V AND WE
228:LD DE, 0; CLEAR COUNTER
229:LD HL, (STOR1); GET START ADDRESS
230:PROGR2:LD A, (ROMFLG); FLAG EQUALS 4 FOR 2708
231:CP D; IS D 4?
232:JR Z, PROGR3; IF SO, JUMP TO PROGR3
233:LD A, (HL); ELSE GET BYTE AND
234:OUT (ADATA), A; SEND IT TO THE EPROM
235:LD B, 10H; SHORT DELAY TO ALLOW
236:HOLD:DJNZ HOLD; DATA TO STABILISE
237:LD A, 23H; OUTPUT CONTROLS TO PUT
238:OUT (BDATA), A; 12V AND 26V ON EPROM
239:LD B, 0EH
240:DELAY1:NOP; KEEP 26V ON FOR 1 mS
241:DJNZ DELAY1
242:LD A, 22H; NOWSWITCH 26v OFF
243:OUT (BDATA), A; BUT KEEP 12V ON
244:LD B, 10H; SHORT DELAY
245:HOLD1:DJNZ HOLD1
246:LD A, 26H; HOLD 12V AND INCREMENT
247:OUT (BDATA), A; ADDRESS COUNTER
248:LD B, 10H; SHORT DELAY
249:HOLD2:DJNZ HOLD2
250:LD A, 22H; 12V ONLY
251:OUT (BDATA), A
Page 24 of 37