Prev: A53A Up: Map Next: A73C
A579: Routine at A579
Used by the routine at A3FF.
A579 LD A,($5E42) A=5E42.
A57C AND %00000011 Keep only bits 0-1.
A57E RET NZ Return if the result is non-zero.
A57F CALL HandlerControls Call HandlerControls.
A582 BIT 4,A
A584 RET NZ
A585 LD HL,$6000 HL=Laser_Param_1.
A588 LD DE,$0018 DE=0018.
A58B LD B,$02 B=02 (counter).
A58D LD A,(HL)
A58E AND A
A58F JR Z,$A595
A591 ADD HL,DE
A592 DJNZ $A58D Decrease counter by one and loop back to A58D until counter is zero.
A594 RET Return.
A595 PUSH HL
A596 CALL $B960
A599 POP HL
A59A LD (HL),$58
A59C INC HL
A59D INC HL
A59E EX DE,HL
A59F LD A,(IX+$00)
A5A2 RLCA
A5A3 RLCA
A5A4 AND $3C
A5A6 LD C,A
A5A7 LD B,$00
A5A9 LD HL,$A68B
A5AC ADD HL,BC
A5AD LD A,(HL)
A5AE LD B,$00
A5B0 AND A
A5B1 JP P,$A5B5
A5B4 DEC B
A5B5 ADD A,(IX+$02)
A5B8 INC HL
A5B9 LD (DE),A
A5BA INC DE
A5BB LD A,(IX+$03)
A5BE ADC A,B
A5BF AND $1F
A5C1 LD (DE),A
A5C2 INC DE
A5C3 LD A,(IX+$04)
A5C6 ADD A,(HL)
A5C7 INC HL
This entry point is used by the routine at A53A.
A5C8 LD (DE),A
A5C9 INC DE
A5CA LD A,(HL)
A5CB INC HL
A5CC LD (DE),A
A5CD INC DE
A5CE LD A,(HL)
A5CF INC HL
A5D0 LD (DE),A
A5D1 INC DE
A5D2 LD A,($5E40)
A5D5 AND $03
A5D7 LD BC,$A5EF
A5DA ADD A,C
A5DB LD C,A
A5DC LD A,B
A5DD ADC A,$00
A5DF LD B,A
A5E0 LD A,(BC)
A5E1 LD (DE),A
A5E2 INC DE
A5E3 LD A,$20
A5E5 LD (DE),A
A5E6 INC DE
A5E7 LD B,$0F
A5E9 XOR A
A5EA LD (DE),A
A5EB INC DE
A5EC DJNZ $A5EA
A5EE RET
A5EF LD B,H
A5F0 LD B,L
A5F1 LD B,(HL)
A5F2 LD B,A
A5F3 ADD A,(IX+$10)
A5F6 LD C,A
A5F7 AND $0F
A5F9 LD (IX+$10),A
A5FC LD A,C
A5FD RRCA
A5FE RRCA
A5FF RRCA
A600 RRCA
A601 AND $0F
A603 LD B,$00
A605 JR $A63E
A607 ADD A,(IX+$11)
A60A LD C,A
A60B AND $0F
A60D LD (IX+$11),A
A610 LD A,C
A611 RRCA
A612 RRCA
A613 RRCA
A614 RRCA
A615 AND $0F
A617 JR $A66A
A619 DEC (IX+$08)
A61C JP Z,$A73C
A61F LD A,(IX+$05)
A622 AND A
A623 JP P,$A5F3
A626 ADD A,(IX+$10)
A629 LD C,A
A62A AND $0F
A62C NEG
A62E LD (IX+$10),A
A631 LD A,C
A632 NEG
A634 RRCA
A635 RRCA
A636 RRCA
A637 RRCA
A638 AND $0F
A63A NEG
A63C LD B,$FF
A63E ADD A,(IX+$02)
A641 LD (IX+$02),A
A644 LD A,(IX+$03)
A647 ADC A,B
A648 AND $1F
A64A LD (IX+$03),A
A64D LD A,(IX+$06)
A650 AND A
A651 JP P,$A607
A654 ADD A,(IX+$11)
A657 LD C,A
A658 AND $0F
A65A NEG
A65C LD (IX+$11),A
A65F LD A,C
A660 NEG
A662 RRCA
A663 RRCA
A664 RRCA
A665 RRCA
A666 AND $0F
A668 NEG
A66A ADD A,(IX+$04)
A66D CP $AF
A66F JP NC,$A73C
A672 CP $30
A674 JP C,$A73C
A677 LD (IX+$04),A
A67A LD A,(IX+$00)
A67D XOR $01
A67F LD (IX+$00),A
A682 CALL $8B73
A685 CALL $8733
A688 JP $A6CB
A68B RET M
A68C CALL M,$00C0
A68F RET M
A690 LD SP,HL
A691 CALL NZ,$F9FA
A694 OR $C7
A696 EX (SP),HL
A697 LD SP,HL
A698 CALL P,$DECA
A69B CALL M,$D3F2
A69E OUT ($FF),A
A6A0 RET P
A6A1 IN A,($CC)
A6A3 LD BC,$E3F0
A6A6 RST $00
A6A7 INC BC
A6A8 XOR $EA
A6AA CALL NZ,$FC10
A6AD LD B,B
A6AE NOP
A6AF DJNZ $A6AA
A6B1 INC A
A6B2 JP M,$F510
A6B5 ADD HL,SP
A6B6 EX (SP),HL
A6B7 RRCA
A6B8 DI
A6B9 LD (HL),$DE
A6BB INC C
A6BC JP P,$D32D
A6BF ADD HL,BC
A6C0 RET P
A6C1 DEC H
A6C2 CALL Z,$EF08
A6C5 DEC E
A6C6 RST $00
A6C7 DEC B
A6C8 DEFB $ED,$16
A6CA CALL NZ,$183E
A6CD LD ($A726),A
A6D0 LD HL,$61B0
A6D3 LD DE,$0018
A6D6 LD B,$06
A6D8 CALL $A6F2
A6DB LD A,$0C
A6DD LD ($A726),A
A6E0 LD HL,$6108
A6E3 LD B,$01
A6E5 CALL $A6F2
A6E8 LD A,$18
A6EA LD ($A726),A
A6ED LD HL,$6138
A6F0 LD B,$01
A6F2 LD A,(HL)
A6F3 AND A
A6F4 PUSH BC
A6F5 PUSH DE
A6F6 PUSH HL
A6F7 CALL NZ,$A701
A6FA POP HL
A6FB POP DE
A6FC POP BC
A6FD ADD HL,DE
A6FE DJNZ $A6F2
A700 RET
A701 INC HL
A702 INC HL
A703 EX DE,HL
A704 LD A,(DE)
A705 INC DE
A706 LD C,A
A707 LD A,(DE)
A708 INC DE
A709 LD B,A
A70A LD HL,$0008
A70D ADD HL,BC
A70E LD C,(IX+$02)
A711 LD B,(IX+$03)
A714 AND A
A715 SBC HL,BC
A717 LD A,H
A718 AND $1F
A71A RET NZ
A71B LD A,L
A71C CP $10
A71E RET NC
A71F LD A,(DE)
A720 ADD A,$04
A722 SUB (IX+$04)
A725 CP $18
A727 RET NC
A728 EX DE,HL
A729 LD BC,$000C
A72C ADD HL,BC
A72D SET 0,(HL)
A72F CALL $8AE8
A732 LD (IX+$00),$00
A736 POP HL
A737 POP HL
A738 POP HL
A739 POP HL
A73A POP HL
A73B RET
Prev: A53A Up: Map Next: A73C