Hi, I’d like to have 1 button only to rotate the bankstick selection on each press, here is my pseudocode so far:
;array defined somewhere on the .inc files, not sure in which one ???
bankSticks=[0x00, 0x01 ,0x02 ,0x03 ,0x04 ,0x05 ,0x06 ,0x08]; <– is this even possible on asm?
selectedBankstick=0; or whichever was selected on startup
;;when the change bank button gets pressed
CS_MENU_BUTTON_SELECT_BANKSTICK
;as you can add banksticks on the fly, we need to check the # of banksticks each time the button is pressed
amountOfBanksticks=n ;is there a function to check this number?
nextBankstick=selectedBankstick+1;
if (nextBankstick > amountOfBanksticks){
nextBankstick=0;
}
;;then we change the bankstick
movlw bankSticks[nextBankstick]; <– again, is this possible on asm?
movwf SID_BANK
goto CS_MENU_MS_NotifyBankChange
anyone can help me to translate this to real and usable code? I learn quick following examples ![]()
thanks!