LD (P-FLAG),+01 Set P-FLAG to OVER 1. LD A,+20 A 'space'. CALL 0B65,PO-CHAR Print the character. POP AF Fetch the old value of LD (P-FLAG),A P-FLAG. RET Finished. Note: The programmer has forgotten to exit via PO-STORE. THE 'CARRIAGE RETURN' SUBROUTINE If the printing being handled is going to the printer then a carriage return character leads to the printer buffer being emptied. If the printing is to the screen then a test for 'scroll?' is made before decreasing the line number. 0A4F PO-ENTER BIT 1,(FLAGS) Jump forward if handling JP NZ,0ECD,COPY-BUFF the printer. LD C,+21 Set to lefthand column. CALL 0C55,PO-SCR Scroll if necessary. DEC B Now down aline. JP 0DD9,CL-SET Make an indirect return via CL-SET & PO-STORE. THE 'PRINT COMMA' SUBROUTINE The current column value is manipulated and the A register set to hold +00 (for TAB 0) or +10 (for TAB 16). 0A5F PO-COMMA CALL 0B03,PO-FETCH Why again? LD A,C Current column number. DEC A Move rightwards by two DEC A columns and then test. AND +10 The A register will be +00 or +10. JR 0AC3,PO-FILL Exit via PO-FILL. THE 'PRINT A QUESTION MARK' SUBROUTINE A question mark is printed whenever an attempt is made to print an unprintable code. 0A69 PO-QUEST LD A,+3F The character '?'. JR 0AD9,PO-ABLE Now print this character instead. THE 'CONTROL CHARACTERS WITH OPERANDS' ROUTINE The control characters from INK to OVER require a single operand whereas the control characters AT & TAB are required to be followed by two operands. The present routine leads to the control character code being saved in TVDATA-lo, the first operand in TVDATA-hi or the A register if there is only a single operand required, and the second operand in the A register. 0A6D PO-TV-2 LD DE,+0A87 Save the first operand in LD (TVDATA-hi),A TVDATA-hi and change the JR 0A80,PO-CHANGE address of the 'output' routine to PO-CONT (+0A87). Enter here when handling the characters AT & TAB. 0A75 PO-2-OPER LD DE,+0A6D The character code will be JR 0A7D,PO-TV-1 saved in TVDATA-lo and the address of the 'output' routine changed to PO-TV-2 (+0A6D). Enter here when handling the colour items - INK to OVER. 0A7A PO-1-OPER LD DE,+0A87 The 'output' routine is to be changed to PO-CONT (+0A87). 0A7D PO-TV-1 LD (TVDATA-lo),A Save the control character code. The current 'output' routine address is changed temporarily.