Prev: 59515 Up: Map Next: 59633
59548: Static Animation
Used by the routine at Game_Initialisation.
demo-static
StaticAnimation 59548 LD B,75 B=75.
StaticAnimation_0 59550 PUSH BC Stash BC on the stack.
59551 LD B,4 B=4.
59553 LD C,22 C=22.
StaticAnimation_1 59555 LD A,R A=the contents of the Memory Refresh Register.
59557 AND %00001111 Keep only bits 0-3.
59559 LD D,A D=A.
59560 LD A,R E=the contents of the Memory Refresh Register.
59562 LD E,A
59563 PUSH BC Stash BC on the stack.
59564 CALL Calculate_ScreenBlockAddress Call Calculate_ScreenBlockAddress.
59567 EX DE,HL Exchange the DE and HL registers.
59568 LD B,8 B=8.
StaticAnimation_2 59570 PUSH BC Stash BC and DE on the stack.
59571 PUSH DE
59572 LD BC,10 BC=0010.
59575 LDIR LDIR.
59577 POP DE Restore DE from the stack.
59578 INC D Increment D by one.
59579 POP BC Restore BC from the stack.
59580 DJNZ StaticAnimation_2 Decrease counter by one and loop back to StaticAnimation_2 until counter is zero.
59582 POP BC Restore BC from the stack.
59583 INC B Increment B by one.
59584 LD A,12 Jump to StaticAnimation_1 if B is not equal to 12.
59586 CP B
59587 JR NZ,StaticAnimation_1
59589 LD H,5 H=5.
59591 LD BC,300 BC=0300.
StaticAnimation_3 59594 LD A,(HL) A=*HL.
59595 AND %00011000 Keep only bits 3-4.
59597 OR %00000101 Set bits 0, 2.
59599 OUT (254),A Set border to the colour held by A.
59601 INC HL Increment HL by one.
59602 DEC BC Decrease BC by one.
59603 LD A,B Jump to StaticAnimation_3 until BC is equal to 0.
59604 OR C
59605 JR NZ,StaticAnimation_3
59607 POP BC Restore BC from the stack.
59608 DJNZ StaticAnimation_0 Decrease counter by one and loop back to StaticAnimation_0 until counter is zero.
59610 LD HL,22678 HL=22678 (attribute buffer location).
59613 LD DE,32 DE=0032.
59616 LD B,8 B=8.
StaticAnimation_4 59618 PUSH HL Stash HL and BC on the stack.
59619 PUSH BC
59620 LD B,10 B=10.
StaticAnimation_5 59622 LD (HL),0 Write 0 to *HL.
59624 INC HL Increment HL by one.
59625 DJNZ StaticAnimation_5 Decrease counter by one and loop back to StaticAnimation_5 until counter is zero.
59627 POP BC Restore BC and HL from the stack.
59628 POP HL
59629 ADD HL,DE HL+=DE.
59630 DJNZ StaticAnimation_4 Decrease counter by one and loop back to StaticAnimation_4 until counter is zero.
59632 RET Return.
Prev: 59515 Up: Map Next: 59633