Micro­power

  

Volume 2 · Number 2 · April 1982

Page 13 of 37
402JR NZ NOTERA; IF NOT, JUMP
403CALL COUNT
404INC DE
405JR ERA1; KEPP GOING
406NOTERALD HL, TEXT14; EPROM NOT ERASED
407LD DE, 090BH
408LD BC, 1AH
409LDIR
410JR ERA4; JUMP TO END OF ROUTINE
411ERA3LD HL, TEXT15; EPROM ERASED
412LD DE, 090BH
413LD BC, 15H
414LDIR
415ERA4CALL RESET1
416DEFB SCAL,TDEL; 2 SECS DELAY
417DEFB SCAL TDEL
418JP RESTRT
419; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
420; ROUTINE TO OUTPUT EPROM TO PRINTER
421; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
422OUTPUTCALL ROMADR; GET NORMAL ADD. OF ROM
423LD DE, 0000H; BYTE COUNT
424BUFFLD IY, LINBUF; POINT TO 16 CHAR. STORE
425OUT1LD A, (ROMFLG)
426CP D; SEE IF ALL DONE
427JR Z, OUT6
428OUT2LD HL, (STOR1); GET OFFSET
429ADD HL, DE; FORM ROM ADDRESS
430LD A, H; AND PRINT IT
431CALL PRTHEX
432LD A, L
433CALL PRTHEX
434CALL GAP; 4 SPACES
435OUT3LD B, 16; 16 BYTES PER LINE
436OUT4CALL ENABLE
437IN A, (ADATA); GET BYTE
438LD (iY), A; SAVE CHARACTER
439PUSH BC
440CALL COUNT; INC. ADD., TURN CHIP OFF
441POP BC
442INC IY
443INC DE
444DJNZ OUT4; LOOP FOR 16 BYTES
445CALL PRTLIN; NOW PRINT LINE
446OUT5JR BUFF; LOOP TILL ALL DONE
447OUT6CALL RESET1
448CALL MESS19; COMPLETED MESSAGE
449JP RESTRT; BACK TO START
450; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
455; ROUTINE TO PRINT ALL 16 CHARS. IN LINE BUFFER
456; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
457PRTLINLD B, 16; NO. OF CHARS IN BUFFER
458LD IY, LINBUF; IY POINTS TO BUFFER START
459PRLIN1LD A, (IY); GET CHARACTER
460CALL PRTHEX; PRINT HEX AS 2 ASCII CHARS.
461LD A, 20H; SPACE BETWEEN BYTES
Page 13 of 37