648 | | DEC D | ; REDUCE ENTRY COUNTER |
649 | | JR NZ, SCAN2 | ; JUMP IF NOT FINISHED |
650 | | JR SCAN7 | ; JUMP TO SCAN7WHEN DONE |
651 | SCAN5 | CP "A" | ; IS IT ASCII A – F? |
652 | | JP M, SCAN2 | ; IF NOT, REJECT IT |
653 | | CP "G" | |
654 | | JP P, SCAN2 | |
655 | | LD (HL), A | ; PRINT IT IF O.K. |
656 | | SUB 37H | ; CONVERT TO 10 – 15 |
657 | | LD (IY), A | ; STORE IT |
658 | | INC HL | ; NEXT SCREEN LOCATION |
659 | | INC IY | ; NEXT STORE |
660 | | DEC D | ; REDUCE ENTRY COUNTER |
661 | | JR NZ SCAN2 | ; JUMP IF NOT DONE |
662 | SCAN7 | LD HL, 0A4BH | ; SAVE THIS MESSAGE IN CASE |
663 | | LD DE, STORLN | ; ENTRY IS TO BE CHANGED |
664 | | LD BC, 20H | |
665 | | LDIR | |
666 | | DEFB SCAL, CRLF | ; SCROLL CRT |
667 | | DEFB SCAL, CRLF | ; TWICE |
668 | | LD HL, TXT11A | ; CORRECT –Y/N? |
669 | | LD DE, 0B0BH | |
670 | | LD BC, 14H | |
671 | | LDIR | |
672 | | XOR A | |
673 | SCAN8 | DEFB SCAL, KBD | ; GET ANSWER |
674 | | JR C, SCAN9 | |
675 | | JR SCAN8 | |
676 | SCAN9 | CP "Y" | ; ANSWER "YES"? |
677 | | JR Z SCAN6 | ; IF SO, JUMP TO SCAN6 |
678 | | CP "N" | ; ANSWER "NO"? |
679 | | JR Z SCAN10 | ; IF SO, JUMP TO SCAN10 |
680 | | JR SCAN8 | ; REJECT OTHER REPLIES |
681 | SCAN10 | CALL CLRCRT | ; CLEAR SCREEN |
682 | | LD HL, STORLN | ; RESTORE SAVED MESSAGE |
683 | | LD DE, 0A4BH | |
684 | | LD BC, 20H | |
685 | | LDIR | |
686 | | LD A, (SCNFLG) | ; FIND OUT WHERE TO JUMP |
687 | | CP 00 | |
688 | | JP Z, ROMADR | ; IF ZERO, JUMP TO ROMADR |
689 | | JP RAMADR | ; ELSE WAS FROM RAMADR |
690 | | JP SCANT1 | ; BACK TO GET ADDRESS AGAIN |
691 | SCAN6 | LD IY, STORE | ; POINT TO FIRST ENTRY |
692 | | LD A, (IY) | ; GET FIRST |
693 | | RLCA | ; ROTATE BITS 4 TIMES |
694 | | RLCA | ; TO PUT VALUE INTO |
695 | | RLCA | ; INTO MOST SIGNIFICANT NIBBLE |
696 | | RLCA | |
697 | | ADD A, (IY+1) | ; ADD SECOND VALUE |
698 | | LD H, A | ; SAVE IN H REGISTER |
699 | | LD A, (IY+2) | ; GET 3RD ENTRY |
700 | | RLCA | ; PUT INMOST SIGNIFICANT NIBBLE |
701 | | RLCA | |
702 | | RLCA | |
703 | | RLCA | |