Prev: A1AE Up: Map Next: A1C1
A1B2: Play Music Until Key Pressed
Used by the routine at ShowTitleMenu.
Plays a piece of music, until it ends or a key is pressed.
Input
DE The address of the music
PlayMusic_WaitKey A1B2 XOR A Select all of the keyboard rows.
A1B3 CALL ReadKeyboard Read the keyboard.
A1B6 RET NZ Return if a key is being pressed.
A1B7 LD A,(DE) Fetch the next byte of the music.
A1B8 CP $FF Jump to PlayMusic_Return if the music has ended.
A1BA JR Z,PlayMusic_Return
A1BC CALL PlayNote Play the note.
A1BF JR PlayMusic_WaitKey Jump back for the next note.
View the equivalent code in;
Prev: A1AE Up: Map Next: A1C1