Prev: 05606 Up: Map Next: 05633
05615: THE 'MAIN PRINTING' SUBROUTINE
Used by the routines at MAIN_EXEC, OUT_SP_2, OUT_NUM_1 and PRINT_FP.
Input
A Value from 0 to 9 (for digits) or 17 to 34 (for the letters A-R)
OUT_CODE 05615 LD E,48 Increase the value in the A register by 48.
05617 ADD A,E
This entry point is used by the routine at PRINT_A_1 with A holding the code of the character to be printed.
PRINT_A_2 05618 EXX Save the registers.
05619 PUSH HL
05620 LD HL,(23633) Fetch the base address for the current channel (CURCHL). This will point to an output address.
This entry point is used by the routine at INPUT_AD with A holding the code of the character to be printed.
Now call the actual subroutine. HL points to the output or the input address as directed.
CALL_SUB 05623 LD E,(HL) Fetch the low byte.
05624 INC HL Fetch the high byte.
05625 LD D,(HL)
05626 EX DE,HL Move the address to the HL register pair.
05627 CALL CALL_JUMP Call the actual subroutine.
05630 POP HL Restore the registers.
05631 EXX
05632 RET Return will be from here unless an error occurred.
Prev: 05606 Up: Map Next: 05633