Routines |
Prev: E87B | Up: Map | Next: E8F1 |
Used by the routine at Game_Initialisation.
|
|||||
|
|||||
StaticAnimation | E89C | LD B,$4B | B=4B. | ||
StaticAnimation_0 | E89E | PUSH BC | Stash BC on the stack. | ||
E89F | LD B,$04 | B=04. | |||
E8A1 | LD C,$16 | C=16. | |||
StaticAnimation_1 | E8A3 | LD A,R | A=the contents of the Memory Refresh Register. | ||
E8A5 | AND %00001111 | Keep only bits 0-3. | |||
E8A7 | LD D,A | D=A. | |||
E8A8 | LD A,R | E=the contents of the Memory Refresh Register. | |||
E8AA | LD E,A | ||||
E8AB | PUSH BC | Stash BC on the stack. | |||
E8AC | CALL Calculate_ScreenBlockAddress | Call Calculate_ScreenBlockAddress. | |||
E8AF | EX DE,HL | Exchange the DE and HL registers. | |||
E8B0 | LD B,$08 | B=08. | |||
StaticAnimation_2 | E8B2 | PUSH BC | Stash BC and DE on the stack. | ||
E8B3 | PUSH DE | ||||
E8B4 | LD BC,$000A | BC=000A. | |||
E8B7 | LDIR | LDIR. | |||
E8B9 | POP DE | Restore DE from the stack. | |||
E8BA | INC D | Increment D by one. | |||
E8BB | POP BC | Restore BC from the stack. | |||
E8BC | DJNZ StaticAnimation_2 | Decrease counter by one and loop back to StaticAnimation_2 until counter is zero. | |||
E8BE | POP BC | Restore BC from the stack. | |||
E8BF | INC B | Increment B by one. | |||
E8C0 | LD A,$0C | Jump to StaticAnimation_1 if B is not equal to 0C. | |||
E8C2 | CP B | ||||
E8C3 | JR NZ,StaticAnimation_1 | ||||
E8C5 | LD H,$05 | H=05. | |||
E8C7 | LD BC,$012C | BC=012C. | |||
StaticAnimation_3 | E8CA | LD A,(HL) | A=*HL. | ||
E8CB | AND %00011000 | Keep only bits 3-4. | |||
E8CD | OR %00000101 | Set bits 0, 2. | |||
E8CF | OUT ($FE),A | Set border to the colour held by A. | |||
E8D1 | INC HL | Increment HL by one. | |||
E8D2 | DEC BC | Decrease BC by one. | |||
E8D3 | LD A,B | Jump to StaticAnimation_3 until BC is equal to 00. | |||
E8D4 | OR C | ||||
E8D5 | JR NZ,StaticAnimation_3 | ||||
E8D7 | POP BC | Restore BC from the stack. | |||
E8D8 | DJNZ StaticAnimation_0 | Decrease counter by one and loop back to StaticAnimation_0 until counter is zero. | |||
E8DA | LD HL,$5896 | HL=5896 (attribute buffer location). | |||
E8DD | LD DE,$0020 | DE=0020. | |||
E8E0 | LD B,$08 | B=08. | |||
StaticAnimation_4 | E8E2 | PUSH HL | Stash HL and BC on the stack. | ||
E8E3 | PUSH BC | ||||
E8E4 | LD B,$0A | B=0A. | |||
StaticAnimation_5 | E8E6 | LD (HL),$00 | Write 00 to *HL. | ||
E8E8 | INC HL | Increment HL by one. | |||
E8E9 | DJNZ StaticAnimation_5 | Decrease counter by one and loop back to StaticAnimation_5 until counter is zero. | |||
E8EB | POP BC | Restore BC and HL from the stack. | |||
E8EC | POP HL | ||||
E8ED | ADD HL,DE | HL+=DE. | |||
E8EE | DJNZ StaticAnimation_4 | Decrease counter by one and loop back to StaticAnimation_4 until counter is zero. | |||
E8F0 | RET | Return. |
Prev: E87B | Up: Map | Next: E8F1 |