howto-2buttons
(C)stachan 08.02.2024
YASP :: How to activate 2 buttons
ENABLE 6
mov b0,0
main:
inc b0
DEBUG b0 ; send current value of b0 to debugger
PAUSE 30000 ; wait for ~450ms
JMP main
redb:
TOGGLE 3 ; toggle red LED
ECHO rot ; send string "rot" to debugger
RETI ; return to main program
greyb:
TOGGLE 4 ; toggle red LED
ECHO grau ; send string "gelb" to debugger
RETI ; return to main program
rot:
STRING "rot"
grau:
STRING "gelb"
; ---- interrupt table
ORG 0x102
DA greyb ; red button
ORG 0x104
DA redb ; grey button
END