chitselb / pettil

6502 Forth-83 dialect for the Commodore PET 2001
http://pettil.tumblr.com
34 stars 3 forks source link

Improved toggle ? #83

Open barrym95838 opened 3 years ago

barrym95838 commented 3 years ago

Charlie, are we allowed to trick stackh into holding the full address temporarily to save six bytes?

toggle
    lda stackl,x
    sta stackh-1,x
    lda (stackh-1,x)
    eor tos
    sta (stackh-1,x)
    jmp twodrop

It seems to me that as long as you don't execute FORTH inside your interrupt handlers, you could get away with it.