![]() |
Routines |
| Prev: 54675 | Up: Map | Next: 54776 |
|
Used by the routine at UpdateXXXXXBuffer.
|
||||||||||||||||||||||
| ClearBuffers | 54744 | LD A,3 | A=3 (counter). | |||||||||||||||||||
| ClearBuffers_Loop | 54746 | PUSH AF | Stash the counter on the stack. | |||||||||||||||||||
| 54747 | CALL ClearBuffers_Action | Call ClearBuffers_Action. | ||||||||||||||||||||
| 54750 | POP AF | Restore the counter from the stack. | ||||||||||||||||||||
| 54751 | DEC A | Decrease the counter by one. | ||||||||||||||||||||
| 54752 | JR NZ,ClearBuffers_Loop | Jump to ClearBuffers_Loop until the counter is zero. | ||||||||||||||||||||
| 54754 | CALL ClearBuffers_Action | Call ClearBuffers_Action. | ||||||||||||||||||||
| 54757 | RET | Return. | ||||||||||||||||||||
|
Calculate each buffer address.
|
||||||||||||||||||||||
| ClearBuffers_Action | 54758 | LD H,A | H=A. | |||||||||||||||||||
| 54759 | ADD A,A | A*=3+95. | ||||||||||||||||||||
| 54760 | ADD A,H | |||||||||||||||||||||
| 54761 | ADD A,95 | |||||||||||||||||||||
| 54763 | LD H,A | H=A. | ||||||||||||||||||||
|
DE is the same address + 1.
|
||||||||||||||||||||||
| 54764 | LD D,A | D=A. | ||||||||||||||||||||
| 54765 | LD L,0 | L=0. | ||||||||||||||||||||
| 54767 | LD E,1 | E=1. | ||||||||||||||||||||
| 54769 | LD (HL),L | Write 0 (from L) to *HL. | ||||||||||||||||||||
| 54770 | LD BC,767 | BC=0767. | ||||||||||||||||||||
| 54773 | LDIR | Copy 0767 bytes from HL to DE. | ||||||||||||||||||||
| 54775 | RET | Return. | ||||||||||||||||||||
| Prev: 54675 | Up: Map | Next: 54776 |