Routines |
Prev: $2004 | Up: Map | Next: $2043 |
|
||||||||
$2005 | JSR $212A | Clear the text graphic buffer at $4500. | ||||||
$2008 | LDY #$00 | Initialise the message character index to 0. | ||||||
$200A | LDA ($D6),Y | Collect a character code from the message to be written and store it at $57. | ||||||
$200C | STA $57 | |||||||
$200E | BEQ $2042 | Return if the message is finished. | ||||||
$2010 | CMP #$20 | Is the character printable? | ||||||
$2012 | BCS $2037 | Branch if so. | ||||||
$2014 | LDA #$47 | Store $4780 (ERIC) at $D6 | ||||||
$2016 | STA $D7 | |||||||
$2018 | LDA #$80 | |||||||
$201A | STA $D6 | |||||||
$201C | LDA $57 | Pick up the unprintable character code from $57. | ||||||
$201E | AND #$EF | Reset bit 4. Now 1 <= A <= 15. | ||||||
$2020 | ASL A | Multiply A by 14. | ||||||
$2021 | STA $57 | |||||||
$2023 | ASL A | |||||||
$2024 | STA $56 | |||||||
$2026 | ASL A | |||||||
$2027 | CLC | |||||||
$2028 | ADC $56 | |||||||
$202A | CLC | |||||||
$202B | ADC $57 | |||||||
$202D | CLC | Add this value to the address stored at $D6, giving the address of the name of one of the boys or teachers. | ||||||
$202E | ADC $D6 | |||||||
$2030 | STA $D6 | |||||||
$2032 | LDY #$00 | Initialise the message character index to 0. | ||||||
$2034 | JMP $200A | Jump back to deal with the new message. | ||||||
$2037 | INY | Increment the message character index in Y and save it temporarily. | ||||||
$2038 | TYA | |||||||
$2039 | PHA | |||||||
$203A | JSR $2156 | Insert the appropriate font character bitmap into the text graphic buffer at $4500. | ||||||
$203D | PLA | Restore the message character index to Y. | ||||||
$203E | TAY | |||||||
$203F | JMP $200A | Jump back to deal with the next character in the message. | ||||||
$2042 | RTS |
Prev: $2004 | Up: Map | Next: $2043 |