.PrintVduCharacter CMP #25 \ If the character in A = 25, jump to prin2 to print a BEQ prin2 \ six-byte command in the form VDU 25, n, x; y; \ \ We print the VDU 25 commands in its own loop because \ the 16-bit arguments to the command (x and y) might \ contain &FF, and we don't want this to be \ misidentified as the end of the text token JMP PrintCharacter \ Otherwise jump to PrintCharacter to print the single- \ byte VDU command or character in A, returning from the \ subroutine using a tail call .prin1 INY \ Increment the offset of the character being printed to \ move on to the next character in the token LDA tokenBase,Y \ Set A to the next character to print .prin2 JSR OSWRCH \ Print the next character in the VDU 25 command (we \ jump here from above with A = 25, which starts off \ the six-byte VDU sequence) DEC vduCounter \ Decrement the byte counter in vduCounter, which is \ always 6 when we jump into this loop BNE prin1 \ Loop back to print the next character until we have \ printed the whole VDU 25 command LDA #6 \ Reset the byte counter in vduCounter to 6, ready for STA vduCounter \ the next time we perform a VDU 25 command RTS \ Return from the subroutineName: PrintVduCharacter [Show more] Type: Subroutine Category: Text Summary: Print a one-byte character from a text token or a multi-byte VDU 25 commandContext: See this subroutine in context in the source code References: This subroutine is called as follows: * ProcessCharacter calls PrintVduCharacter
Arguments: A The character to be printed Y The offset of the current character within the text token being printed
[X]
Configuration variable OSWRCH = &FFEE
The address for the OSWRCH routine
[X]
Subroutine PrintCharacter (category: Text)
Print a single-byte VDU command or character from a text token, optionally printing a drop shadow if the character is alphanumeric
[X]
Label prin1 is local to this routine
[X]
Label prin2 is local to this routine
[X]
Label tokenBase in variable tokenOffset
[X]
Variable vduCounter (category: Text)
The number of bytes in a VDU 25, n, x; y; command