; Sample playback for Atari XL/XE run start TRIG0 = $d010 COLBK = $d01a AUDC2 = $d203 PORTA = $d300 WSYNC = $d40a org $2000 start MainLoop lda TRIG0 ; load the status of the player 1 button into the accumulator bne MainLoop ; if there is nothing pressed, dont read data lda PORTA and #%00001110 cmp #%00001010 bne MainLoop lda PORTA lsr lsr lsr lsr ora #%00010000 sta AUDC2 ; store the data in the audio volume register of channel 1 sta COLBK sta WSYNC jmp MainLoop ; jump back to main loop and wait for next lot of data