Prev: 60473 Up: Map Next: 60591
60506: Static Animation
Used by the routine at Game_Initialisation.
static
StaticAnimation 60506 LD B,75 B=75.
StaticAnimation_0 60508 PUSH BC Stash BC on the stack.
60509 LD B,4 B=4.
60511 LD C,22 C=22.
StaticAnimation_1 60513 LD A,R A=the contents of the Memory Refresh Register.
60515 AND %00001111 Keep only bits 0-3.
60517 LD D,A D=A.
60518 LD A,R E=the contents of the Memory Refresh Register.
60520 LD E,A
60521 PUSH BC Stash BC on the stack.
60522 CALL Calculate_ScreenBlockAddress Call Calculate_ScreenBlockAddress.
60525 EX DE,HL Exchange the DE and HL registers.
60526 LD B,8 B=8.
StaticAnimation_2 60528 PUSH BC Stash BC and DE on the stack.
60529 PUSH DE
60530 LD BC,10 BC=0010.
60533 LDIR LDIR.
60535 POP DE Restore DE from the stack.
60536 INC D Increment D by one.
60537 POP BC Restore BC from the stack.
60538 DJNZ StaticAnimation_2 Decrease counter by one and loop back to StaticAnimation_2 until counter is zero.
60540 POP BC Restore BC from the stack.
60541 INC B Increment B by one.
60542 LD A,12 Jump to StaticAnimation_1 if B is not equal to 12.
60544 CP B
60545 JR NZ,StaticAnimation_1
60547 LD H,5 H=5.
60549 LD BC,300 BC=300.
StaticAnimation_3 60552 LD A,(HL) A=*HL.
60553 AND %00011000 Keep only bits 3-4.
60555 OR %00000101 Set bits 0, 2.
60557 OUT (254),A Set border to the colour held by A.
60559 INC HL Increment HL by one.
60560 DEC BC Decrease BC by one.
60561 LD A,B Jump to StaticAnimation_3 if BC is not zero.
60562 OR C
60563 JR NZ,StaticAnimation_3
60565 POP BC Restore BC from the stack.
60566 DJNZ StaticAnimation_0 Decrease counter by one and loop back to StaticAnimation_0 until counter is zero.
Now clear the display.
60568 LD HL,22678 HL=22678 (attribute buffer location).
60571 LD DE,32 DE=0032.
60574 LD B,8 B=8.
StaticAnimation_4 60576 PUSH HL Stash HL and BC on the stack.
60577 PUSH BC
60578 LD B,10 B=10.
StaticAnimation_5 60580 LD (HL),0 Write 0 to *HL.
60582 INC HL Increment HL by one.
60583 DJNZ StaticAnimation_5 Decrease counter by one and loop back to StaticAnimation_5 until counter is zero.
60585 POP BC Restore BC and HL from the stack.
60586 POP HL
60587 ADD HL,DE HL+=DE.
60588 DJNZ StaticAnimation_4 Decrease counter by one and loop back to StaticAnimation_4 until counter is zero.
60590 RET Return.
Prev: 60473 Up: Map Next: 60591