![]() |
Routines |
| Prev: 72C0 | Up: Map | Next: 72FE |
|
Used by the routine at SetOrigin.
Copies attribute rows from SourceOrigin into DestinationOrigin until *DestinationOrigin_Height equals the stop patched by SetOrigin. SetOrigin and ResetOrigin also patch the width copied on each row.
|
||||
| CopyOrigin_Attributes | 72D5 | LD BC,($7337) | Fetch *SourceOrigin. | |
| 72D9 | CALL AttributeRow | Call AttributeRow. | ||
| 72DC | PUSH HL | Stash the source pointer on the stack. | ||
| 72DD | LD BC,($7339) | Fetch *DestinationOrigin. | ||
| 72E1 | CALL AttributeRow | Call AttributeRow. | ||
| 72E4 | POP DE | Copy the source pointer into DE (using the stack). | ||
|
The width immediate is self-modified by SetOrigin and ResetOrigin.
|
||||
| 72E5 | LD BC,$0000 | Load that width. | ||
| 72E8 | EX DE,HL | Point HL at the source and DE at the destination. | ||
| 72E9 | LDIR | Copy one attribute row. | ||
|
Step to the next row.
|
||||
| 72EB | LD A,($7338) | Increment *SourceOrigin_Row. | ||
| 72EE | INC A | |||
| 72EF | LD ($7338),A | |||
| 72F2 | LD A,($733A) | Decrement *DestinationOrigin_Height. | ||
| 72F5 | DEC A | |||
| 72F6 | LD ($733A),A | |||
|
The stop immediate is self-modified by SetOrigin_Copy.
|
||||
| 72F9 | CP $00 | Jump to CopyOrigin_Attributes until *DestinationOrigin_Height equals that stop. | ||
| 72FB | JR NZ,CopyOrigin_Attributes | |||
| 72FD | RET | Return. | ||
| Prev: 72C0 | Up: Map | Next: 72FE |