Routines |
Prev: D33F | Up: Map | Next: D3A6 |
|
||||||||
Identical clone of PrintColourCharacter.
Compare against the non-colour version at PrintUDG.
|
||||||||
GoldfishGame_PrintColourUDG | D353 | EXX | Switch to the shadow registers. | |||||
D354 | LD E,A | DE'=A*08. | ||||||
D355 | LD D,$00 | |||||||
D357 | SLA E | |||||||
D359 | RL D | |||||||
D35B | SLA E | |||||||
D35D | RL D | |||||||
D35F | SLA E | |||||||
D361 | RL D | |||||||
D363 | LD HL,($5C36) | HL'=*CHARS+DE'. | ||||||
D366 | ADD HL,DE | |||||||
D367 | LD DE,($5C84) | Increment *DF_CC by one. | ||||||
D36B | INC DE | |||||||
D36C | LD ($5C84),DE | |||||||
D370 | DEC DE | Decrease DE' by one. | ||||||
All character blocks are 1 x 8 bytes.
Copy the data from the current character set to the screen buffer.
|
||||||||
D371 | LD B,$08 | B'=08 (byte counter). | ||||||
PrintColourUDG_Loop | D373 | LD A,(HL) | A=*HL'. | |||||
D374 | LD (DE),A | Write A to *DE'. | ||||||
D375 | INC HL | Increment HL' by one. | ||||||
D376 | INC D | Increment D' by one. | ||||||
D377 | DJNZ PrintColourUDG_Loop | Decrease counter by one and loop back to PrintColourUDG_Loop until counter is zero. | ||||||
Calculate the attribute buffer position.
|
||||||||
D379 | LD BC,($5C88) | BC'=*S_POSN. | ||||||
D37D | LD HL,$5800 | HL'=5800 (attribute buffer location). | ||||||
D380 | DEC C | Decrease C' by one. | ||||||
D381 | LD ($5C88),BC | Write BC' to *S_POSN. | ||||||
D385 | INC C | Increment C' by one. | ||||||
D386 | LD A,$21 | E'=21-C'. | ||||||
D388 | SUB C | |||||||
D389 | LD E,A | |||||||
D38A | LD D,$00 | D'=00. | ||||||
D38C | ADD HL,DE | HL'+=DE'. | ||||||
D38D | LD A,$18 | E'=18-B'. | ||||||
D38F | SUB B | |||||||
D390 | LD E,A | |||||||
D391 | SLA E | Shift E' left four positions (with carry). | ||||||
D393 | SLA E | |||||||
D395 | SLA E | |||||||
D397 | SLA E | |||||||
D399 | RL D | Rotate D' left. | ||||||
D39B | SLA E | Shift E' left (with carry). | ||||||
D39D | RL D | Rotate D' left. | ||||||
D39F | ADD HL,DE | HL'+=DE'. | ||||||
D3A0 | LD A,($5C8F) | A=*ATTR_T. | ||||||
D3A3 | LD (HL),A | Write A to *HL'. | ||||||
D3A4 | EXX | Switch back to the normal registers. | ||||||
D3A5 | RET | Return. |
Prev: D33F | Up: Map | Next: D3A6 |