Close...but there are still vectors you missed. Such as L12EF, which holds destination addresses that are pushed onto the stack and then RTS'ed to (because RTS is handling them, the addresses are all -1 from the actual address).
ex:
L12EF: .word LF1388-1
.word LF135C-1
.word LF134F-1
.word LF12F7-1
Hi, thank you for your reply.
Indeed, few lines before you see an explanation of the addresses in table L12EF,
and the commented lines of subroutines (SUB1), (SUB2), etc. take in due account
the actual +1 address (i.e. SUB 7 starting line is at $12F7, but stack address is
$12F6).
Do you suggest to use ".word LF12F7-1" in table to express more clearly the
actual starting addresses of subroutins ?
LDA SoundIndex ;3 if SoundIndex = 0 0 0 0 x x x x ---> save $1387 on stack (SUB4)
AND #$F0 ;2
LSR ;2 if SoundIndex = 0 0 0 1 x x x x ---> save $135B on stack (SUB5)
LSR ;2
LSR ;2 if SoundIndex = 0 0 1 0 x x x x ---> save $134E on stack (SUB6)
TAY ;2
LDA L12F0,Y ;4 if SoundIndex = 0 1 0 0 x x x x ---> save $12F6 on stack (SUB7)
Anyway, I learned a nice way to embed a "ON x GOSUB" instruction in assembler !!!
regards,
A.