522 | | RET | |
523 | ADD37A | ADD A, 37H | ; CONVERT TO ASCII A – F |
524 | | JP PRTH1 | |
525 | ADD37B | ADD A, 37H | |
526 | | JP PRTH2 | |
527 | ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
528 | ; GENERAL SUBROUTINES |
532 | ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
533 | ENABLE | LD A, 00 | ; ENABLE CHIP |
534 | | OUT (BDATA), A | ; CONTROL PORT B |
535 | | LD A, 20H | |
536 | STABLE | DEC A | ; WAIT FOR CHIP |
537 | | JR NZ STABLE | |
538 | | RET | |
539 | ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
542 | ; SCROLL TO CLEAR CRT, CURSOR TO BOTTOM |
543 | ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
544 | CLRCRT | LD B, 0FH | ; SCROLL 15 TIMES |
545 | CLR1 | DEFB SCAL, CRLF | ; TO CLEAR SCREEN AND |
546 | | DJNZ CLR1 | ; LEAVE TOP LINE INTACT |
547 | | RET | |
548 | ; | | |
549 | RESET | LD A, 2AH | ; 12V, RESET, WE, OE BITS SET |
550 | | JR RESET2 | |
551 | RESET1 | LD A, 0AH | ; RESET, WE, OE BITS SET |
552 | RESET2 | OUT (BDATA), A | |
553 | | LD B, 10H | |
554 | WAIT6 | DJNZ WAIT6 | |
555 | | RES 3, A | ; END OF RESET |
556 | | OUT (BDATA), A | |
557 | | RET | |
558 | ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
559 | ; O/P SHORT PULSE TO INC. ADDR. COUNTER |
560 | ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
561 | COUNT | LD A, 6 | ; COUNT PULSE ON |
562 | | OUT (BDATA), A | |
563 | | LD B, 10H | |
564 | WASIT7 | DJNZ WAIT7 | |
565 | | LD A, 2 | |
566 | | OUT (BDATA), A | ; TURN COUNT PULSE OFF |
567 | | RET | |
568 | ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
569 | ; SET PIO PORT A – INPUT, B – OUTPUT |
570 | ; BOTH PORTS TO MODE 3 |
571 | ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
572 | STPIO1 | LD A, 0FFH | |
573 | | OUT (BCTRL), A | ; MODE 3 |
574 | | LD A, 00 | |
575 | | OUT (BCTRL), A | ; OUTPUT |
576 | STPIO2 | LD A, 0FFH | |
577 | | OUT (ACTRL), A | ; MODE 3 |
578 | | OUT (ACTRL), A | ; INPUT |
579 | | RET | |
580 | ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
582 | ; SET PIO PORT A TO MODE 3, OUTPUT |
583 | ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
584 | STPIO3 | LD A, 0FFH | |
585 | | OUT (ACTRL), A | ; MODE 3 |