Prev: E775 Up: Map Next: E800
E782: Move the laser bolt one frame
Used by the routine at E6F6.
Input
IY Current room data
E782 LD A,($C87F)
E785 BIT 7,A
E787 RET NZ
E788 LD A,(IY+$01)
E78B AND $1F
E78D DEC A
E78E LD B,A
E78F LD A,($E6DA)
E792 AND $3F
E794 ADD A,B
E795 LD L,A
E796 LD A,($C873)
E799 LD H,A
E79A CP L
E79B JR Z,$E7D7
E79D LD A,B
E79E DEC A
E79F CP H
E7A0 JR NC,$E7D7
E7A2 LD A,L
E7A3 CP H
E7A4 JR C,$E7D7
E7A6 LD A,C
E7A7 CP H
E7A8 JR Z,$E7D7
E7AA LD A,(IY+$02)
E7AD AND $03
E7AF RRCA
E7B0 RRCA
E7B1 LD B,A
E7B2 LD A,(IY+$01)
E7B5 AND $E0
E7B7 RRCA
E7B8 RRCA
E7B9 ADD A,B
E7BA LD B,A
E7BB LD A,($C872)
E7BE ADD A,$1A
E7C0 CP B
E7C1 JR C,$E7D7
E7C3 SUB $20
E7C5 CP B
E7C6 JR NC,$E7D7
E7C8 LD HL,$C874 Get the flags. (C874)
E7CB BIT 5,(HL) Is bit 5 (Dan safe) set?
E7CD JR NZ,$E7D7 Jump forward if it is.
E7CF CALL $CD8A Otherwise lose a life.
E7D2 LD HL,$E6DA
E7D5 SET 7,(HL)
Pause for a short interval. This entry point is also used by the routine at E6DC.
E7D7 LD A,C
E7D8 AND A
E7D9 RET Z
E7DA LD B,$1F
E7DC DJNZ $E7DC
E7DE DEC C
E7DF JR NZ,$E7D7
E7E1 RET
Prev: E775 Up: Map Next: E800