Skip to navigation


Text: TT45

[NES version, Bank 2]

Name: TT45 [Show more] Type: Subroutine Category: Text Summary: Print a letter in lower case
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * TT41 calls TT45

This routine prints a letter in lower case. Specifically: * If QQ17 = 255, abort printing this character as printing is disabled * If this is a letter then print in lower case * Otherwise this is punctuation, so clear bit 6 in QQ17 and print
Arguments: A The character to be printed. Can be one of the following: * 7 (beep) * 10-13 (line feeds and carriage returns) * 32-95 (ASCII capital letters, numbers and punctuation) X Contains the current value of QQ17 QQ17 Bits 6 and 7 are set
.TT45 ; If we get here, then QQ17 has bit 6 and 7 set, so we ; are in Sentence Case and we need to print the next ; letter in lower case CPX #255 ; If QQ17 = 255 then printing is disabled, so if it BNE TT42 ; isn't disabled, jump to TT42 to print the character RTS ; Printing is disables, so return from the subroutine