Routines |
Prev: 54730 | Up: Map | Next: 54778 |
Used by the routines at Draw_Character, Draw_Playfield, TwoTone_Attributes_Buffer, Life_Images, 52379, Draw_Number, Draw_CharacterInDoorway and Draw_DoorFrame1.
|
||||||||||||||
This routine copies bytes from DE TO HL and uses the BC register to track the number of bytes and the number of lines.
|
||||||||||||||
Copy_Routine | 54758 | PUSH BC | Stashes BC (the counter) and HL (screen buffer address) on the stack. | |||||||||||
54759 | PUSH HL | |||||||||||||
54760 | LD B,0 | Copies bytes from DE TO HL x C number of times. | ||||||||||||
54762 | EX DE,HL | |||||||||||||
54763 | LDIR | |||||||||||||
54765 | EX DE,HL | Restores HL with the original screen buffer location. | ||||||||||||
54766 | POP HL | |||||||||||||
54767 | INC H | Move to the next line down. | ||||||||||||
54768 | LD A,H | |||||||||||||
54769 | AND %00000111 | Keep only bits 0-2. | ||||||||||||
54771 | CALL Z,Calc_Attribute | If this crosses a screen boundary then call Calc_Attribute. | ||||||||||||
54774 | POP BC | Grabs B and decreases it by one. Loop back round to Copy_Routine if B is not zero. | ||||||||||||
54775 | DJNZ Copy_Routine | |||||||||||||
54777 | RET | Return. |
Prev: 54730 | Up: Map | Next: 54778 |