Skip to navigation


Sound: BDRO9

[Commodore 64 version]

Name: BDRO9 [Show more] Type: Subroutine Category: Sound Summary: Process music command <#9> to restart the current tune
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * BDJMPTBH calls BDRO9 * BDJMPTBL calls BDRO9 * BDRO11 calls BDRO9
.BDRO9 LDA #0 ; Clear the current music data byte, which discards the STA BDBUFF ; next nibble if there is one (so this flushes any data ; from the current pipeline) LDA BDdataptr3 ; Set BDdataptr1(1 0) = BDdataptr3(1 0) STA BDdataptr1 ; LDA BDdataptr4 ; So this sets the data pointer in BDdataptr1(1 0) back STA BDdataptr2 ; to the original value that we gave it at the start of ; the BDENTRY routine when we started playing this tune, ; which we stored in BDdataptr3(1 0) ; ; In other words, this restarts the current tune JMP BDskip1 ; Jump to BDskip1 to process the next nibble of music ; data