![]() |
Routines |
Prev: A432 | Up: Map | Next: A510 |
|
||||||||||
A487 | PUSH BC | Save BC | ||||||||
A488 | CALL $A4AF | Print a line of text | ||||||||
A48B | INC IX | Point IX to the address of the first byte of the next line | ||||||||
A48D | POP BC | Save BC | ||||||||
A48E | DJNZ $A487 | Jump back while there are lines left to print | ||||||||
A490 | RET | |||||||||
Compute the address at the lookup table of the display file and the address of the graphic data for the character to display
|
||||||||||
A491 | LD A,($A230) | Set HL to the vertical position of the text | ||||||||
A494 | LD L,A | |||||||||
A495 | LD H,$00 | |||||||||
A497 | ADD HL,HL | Vertical position is in bit 7-3 so it's only necessari multiply by two | ||||||||
A498 | LD DE,$AC9A | Point HL to the display file lookup table | ||||||||
A49B | ADD HL,DE | |||||||||
A49C | PUSH HL | Save HL | ||||||||
A49D | LD L,(IX+$00) | Set HL to the character to display | ||||||||
A4A0 | LD H,$00 | |||||||||
A4A2 | ADD HL,HL | Computes the address of the graphic data of the character into the charset data tabla at $6206 | ||||||||
A4A3 | ADD HL,HL | |||||||||
A4A4 | ADD HL,HL | |||||||||
A4A5 | LD DE,$6206 | |||||||||
A4A8 | ADD HL,DE | |||||||||
A4A9 | EX DE,HL | Exchange DE and HL | ||||||||
A4AA | POP IY | Restore IY | ||||||||
A4AC | LD B,$08 | Set B=8 | ||||||||
A4AE | RET | |||||||||
Prints a line of text
|
||||||||||
A4AF | LD A,(IX+$00) | Save color attribute of text at A22C | ||||||||
A4B2 | LD ($A22C),A | |||||||||
A4B5 | LD A,(IX+$01) | Save horizontal position of text at A22E | ||||||||
A4B8 | LD ($A22E),A | |||||||||
A4BB | LD A,(IX+$02) | Save vertical position of text at A230 | ||||||||
A4BE | LD ($A230),A | |||||||||
A4C1 | LD DE,$0003 | Point IX to the first character | ||||||||
A4C4 | ADD IX,DE | |||||||||
A4C6 | CALL $A491 | Computes addres into lookup table and address of the graphics data for the character | ||||||||
Prints a character
|
||||||||||
A4C9 | LD L,(IY+$00) | Point at HL the address into the display file from the lookup table | ||||||||
A4CC | LD H,(IY+$01) | |||||||||
A4CF | PUSH DE | Save DE | ||||||||
A4D0 | LD A,($A22E) | Save the horizontal position of text at DE | ||||||||
A4D3 | LD E,A | |||||||||
A4D4 | LD D,$00 | |||||||||
A4D6 | ADD HL,DE | Adds the horizontal position to the address into the display file | ||||||||
A4D7 | POP DE | Restore DE | ||||||||
A4D8 | LD A,(DE) | Read the next byte of the graphic data for the character | ||||||||
A4D9 | LD (HL),A | Puts the byte in to the display file | ||||||||
A4DA | INC DE | Points to the next byte of the graphic data for the character | ||||||||
A4DB | INC IY | Points to the next address of the display file lookup table | ||||||||
A4DD | INC IY | |||||||||
A4DF | DJNZ $A4C9 | Jump back until displayed all of the eight bytes of the character | ||||||||
A4E1 | LD A,(IX+$00) | The character is an space ($20)? | ||||||||
A4E4 | CP $20 | |||||||||
A4E6 | JR Z,$A501 | Jump if so | ||||||||
Set the color attribute for the character if is not an SPACE ($20)
|
||||||||||
A4E8 | LD A,($A230) | Set HL to the vertical position of the text (only bits 7-3) | ||||||||
A4EB | AND $F8 | |||||||||
A4ED | LD L,A | |||||||||
A4EE | LD H,$00 | |||||||||
A4F0 | ADD HL,HL | And computes the patial offset to the attribute file | ||||||||
A4F1 | ADD HL,HL | |||||||||
A4F2 | LD A,($A22E) | Set DE to the horizontal position | ||||||||
A4F5 | LD E,A | |||||||||
A4F6 | LD D,$00 | |||||||||
A4F8 | ADD HL,DE | And computes the offset to the attribute file | ||||||||
A4F9 | LD DE,$5800 | Add the offset to the base address of the attribute file | ||||||||
A4FC | ADD HL,DE | |||||||||
A4FD | LD A,($A22C) | Pick up the color attribute for the text | ||||||||
A500 | LD (HL),A | And put this color attribute into the attribute file | ||||||||
Prepares to print the next character until the end of marker (character $00)
|
||||||||||
A501 | INC IX | Point IX to the next character | ||||||||
A503 | LD HL,$A22E | Increment the horizontal position for the next character | ||||||||
A506 | INC (HL) | |||||||||
A507 | LD A,(IX+$00) | Pick up the next character | ||||||||
A50A | OR A | is an end of marker ($00)? | ||||||||
A50B | JR Z,$A50F | Jump if so | ||||||||
A50D | JR $A4C6 | Jump back and repeat for the next character | ||||||||
A50F | RET |
Prev: A432 | Up: Map | Next: A510 |