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