TG9541/stm8ef

More machine code generating words for ISR programming

Closed this issue · 0 comments

#382 adds words for relative addressing in IF .. ELSE .. THEN structures. This issue adds the following machine code generating words for coding ISR routines (since ISR programming works on the µC peripheral registers level and portability is a non-issue):

Word example code comment
]B@IF [ a b# ]B@IF BTJF addr,#b,rel test bit and execute IF clause if set
]C@IF [ a ]C@IF LD A,a JREQ rel load a and and execute IF clause if not zero
]A<IF [ c ]A<IF CP A,#c JRPL rel compare A with literal c, execute IF clause if A<c
]Y<IF [ n ]Y<IF CPW Y,#n JRPL rel compare Y with literal n, execute IF clause if Y<n
]@ [ a ]@ - read value from literal address a