Micro­power

  

Volume 2, Number 1 – February 1982

Page 26 of 37

309:JR Z, PRINTD
310:JP PR27A
311:PRINTD:LD A, D
312:DEFB SCAL, B2HEX; O/P COUNT TO SCREEN
313:DEFB SCAL, CRLF
314:JP PR27A
315:;
316:; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
317:; *           ROUTINE TO COMPARE EPROM/1K BLOCK           *
318:; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
319:CMPARE:LD HL, TEXT8; "COMPARED TO EPROM
320:LD DE, 0A4BH
321:LD BC, 11H
322:LDIR
323:LD A, 0
324:LD (ERRFLG), A; SET ERROR FLAG
325:CALL RAMADR; GET START ADDRESS
326:LD DE, 0; CLEAR BYTE COUNTER
327:VERFY2:LD A, (ROMFLG)
328:CP D; ALL DONE?
329:JR Z, VERFY4; IF SO, JUMP TO VERFY4
330:CALL ENABLE; TRUN ON CHIP
331:IN A, (ADATA); GET BYTE FROM EPROM
332:PUSH AF; SAVE IT
333:CALL COUNT; INCREMENT ADDRESS, CHIP OFF
334:POP AF;; GET BYTE BACK
335:CP (HL); ARE THEY THE SAME?
336:JR NZ, ERROR; IF ERROR, PRINT IT
337:VERFY3:INC HL; NEXT BYTE TO COMPARE
338:INC DE; INCREMENT BYTE COUNTER
339:JR VERFY2
340:ERROR:LD A, 0FFH; ERROR FLAG
341:LD (ERRFLG), A
342:LD A, H; PRINT ERROR ADDRESS
343:DEFB SCAL, B2HEX
344:LD A, L
345:DEFB SCAL, B2HEX
346:;DEFB SCAL, TDEL; OPTIONAL DELAY
347:; IF DELAY REQUIRED, REMOVE FIRST COLON ON ABOVE LINE
348:DEFB SCAL, CRLF; SCROLL DISPLAY
349:JR VERFY3; NEXT BYTE

The remainder of the listing will be published in the next issue. If you don’t wish to wait that long, or you can’t be bothered to type it all in – after all the source code is 18K long – I will provide copies of the source and object codes. Just send me a cassette, or a disc with approximately 26K free, and £1 to cover copying and postage. Source can be supplied in Zeap compatible form or Macro 80 form. Please state which you require. Also please state the disc format required; I can supply single or double density to suit either CP/M or Polydos, for Nascom/​Gemini G805/G809

C. Bowden,       ‘_______’, Stithians, Truro, Cornwall


Page 26 of 37