Routines |
Prev: $212A | Up: Map | Next: $2156 |
|
||||||||||
$213B | LDA $9D | Pick up the width (in character cells) of the target message box from $9D and multiply by 8 to get the width in pixels. | ||||||||
$213D | ASL A | |||||||||
$213E | ASL A | |||||||||
$213F | ASL A | |||||||||
$2140 | SEC | Subtract the number of pixel columns that have been inserted into the text graphic buffer. | ||||||||
$2141 | SBC $A2 | |||||||||
$2143 | BMI $2155 | Return if the buffer is already full (no centring required). | ||||||||
$2145 | CMP #$02 | Are there fewer than two free pixel columns remaining? | ||||||||
$2147 | BCC $2155 | Return if so (no centring required). | ||||||||
$2149 | LSR A | Divide A by 2 and store the result at $57. This is the number of pixel columns by which the message will be shifted in order to centre it. | ||||||||
$214A | STA $57 | |||||||||
$214C | LDA #$00 | Insert a blank pixel column into the text graphic buffer at $4500. | ||||||||
$214E | JSR $20F5 | |||||||||
$2151 | DEC $57 | Is the message centred yet? | ||||||||
$2153 | BNE $214C | Branch back if not. | ||||||||
$2155 | RTS |
Prev: $212A | Up: Map | Next: $2156 |