Prev: 25514 Up: Map Next: 25677
25569: Play Music
Used by the routine at 26327.
Input
DE Music Data
PlayMusic 25569 LD A,(DE) Fetch the music data byte.
25570 CP 255 Return if the terminator character has been reached.
25572 RET Z
25573 AND %00011111 Keep only bits 0-3.
25575 DEC A Decrease A by one.
25576 SLA A A=A * 2.
25578 LD C,A Create an offset in BC.
25579 LD B,0
25581 LD HL,25613 HL=25613 + offset.
25584 ADD HL,BC
25585 PUSH DE Stash DE on the stack.
25586 LD A,(HL)
25587 INC HL
25588 LD E,(HL)
25589 LD D,0
25591 LD L,A
25592 LD H,0
25594 SLA L
25596 RL H
25598 SLA L
25600 RL H
25602 PUSH IX Stash IX on the stack.
25604 CALL 949 Call BEEPER
25607 POP IX Restore IX and DE from the stack.
25609 POP DE
25610 INC DE Increment DE by one.
25611 JR PlayMusic Loop back round to the beginning (we only end when the terminator is reached).
MusicData 25613 DEFW 25312 Music Data
25615 DEFW 28359
25617 DEFW 31665
25619 DEFW 33703
25621 DEFW 37781
25623 DEFW 42117
25625 DEFW 44925
25627 DEFW 50030
25629 DEFB 1,1,2,2,3,3,4,4
25637 DEFB 5,5,6,6,7,7,8,8
25645 DEFB 4,6,8,6,7,5,3,1
25653 DEFB 4,6,8,6,7,5,3,3
25661 DEFB 4,6,8,6,7,5,3,1
25669 DEFB 4,6,2,3,4,4,4,255
Prev: 25514 Up: Map Next: 25677