Routines |
Prev: B84B | Up: Map | Next: B8ED |
|
||||||||||||||
B8C4 | LD A,(HL) | Get the current byte. | ||||||||||||
B8C5 | INC HL | Point HL to the next one. | ||||||||||||
B8C6 | CP $80 | Is the current byte less than 80? | ||||||||||||
B8C8 | JR C,$B8E7 | Jump forward if so. | ||||||||||||
B8CA | CP $FF | Is the current byte an end marker? (FF) | ||||||||||||
B8CC | RET Z | Return if it is, it's the end of the string. | ||||||||||||
Process a special character.
|
||||||||||||||
B8CD | CP $FE | Is the current byte an attribute marker? (FE) | ||||||||||||
B8CF | JR NZ,$B8D5 | Jump forward if it isn't. | ||||||||||||
B8D1 | LD C,(HL) | Otherwise put the next byte as an attribute in C. | ||||||||||||
Process an attribute character.
|
||||||||||||||
B8D2 | INC HL | Point HL to the next place in the buffer. | ||||||||||||
B8D3 | JR $B8C4 | Jump back to draw some more. | ||||||||||||
Process more special characters.
|
||||||||||||||
B8D5 | CP $A8 | If the current byte isn't between A8 and E8 then it's an unrecognised character, so ignore it. | ||||||||||||
B8D7 | JR C,$B8E7 | |||||||||||||
B8D9 | CP $E8 | |||||||||||||
B8DB | JR NC,$B8E7 | |||||||||||||
Process position / movement characters.
|
||||||||||||||
B8DD | SUB $C8 | Subtract C8 to get the actual offset (which may be negative). | ||||||||||||
B8DF | ADD A,E | Add this to the x co-ordinate. | ||||||||||||
B8E0 | LD E,A | |||||||||||||
B8E1 | LD A,D | Use the next byte as an offset for the y co-ordinate. | ||||||||||||
B8E2 | ADD A,(HL) | |||||||||||||
B8E3 | LD D,A | |||||||||||||
B8E4 | INC HL | Point HL to the next place in the buffer. | ||||||||||||
B8E5 | JR $B8C4 | Jump back to draw some more. | ||||||||||||
This is a simple ASCII character.
|
||||||||||||||
B8E7 | CALL $B715 | Print the graphic. | ||||||||||||
B8EA | INC E | Move forward one column. | ||||||||||||
B8EB | JR $B8C4 | Jump back to draw some more. |
Prev: B84B | Up: Map | Next: B8ED |