Prev: 47440 Up: Map Next: 47570
47548: Queue Tune
Copy a bit-7-terminated tune from DE into the sound buffer, working downwards from Tune_Buffer_End.
Input
DE Tune data
Copy a bit-7-terminated tune from DE into the buffer.
QueueTune 47548 DI Disable interrupts.
47549 LD HL,65361 HL=Tune_Buffer_End.
Copy bytes until bit 7 marks the terminator.
QueueTune_Copy 47552 LD A,(DE) A=*DE.
47553 INC DE Increment DE by one.
47554 BIT 7,A Jump to QueueTune_Terminator if bit 7 of A is set.
47556 JR NZ,QueueTune_Terminator
47558 LD (HL),A Write A to *HL.
47559 DEC HL Decrease HL by one.
47560 JR QueueTune_Copy Jump to QueueTune_Copy.
Store the terminator byte with bit 7 cleared.
QueueTune_Terminator 47562 AND %01111111 Keep only bits 0-6.
47564 LD (HL),A Write A to *HL.
Save the buffer pointer and enable interrupts.
47565 LD (65364),HL Write HL to Tune_Pointer.
47568 EI Enable interrupts.
47569 RET Return.
Prev: 47440 Up: Map Next: 47570