Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More machine code generating words for ISR programming #383

Closed
TG9541 opened this issue Dec 1, 2020 · 0 comments
Closed

More machine code generating words for ISR programming #383

TG9541 opened this issue Dec 1, 2020 · 0 comments
Assignees

Comments

@TG9541
Copy link
Owner

TG9541 commented Dec 1, 2020

#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant