Instructions for setting the cpu error or clearing it in programs #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds two new instructions
STERR (X),(Y) and CLERR
STERR(opcode 150) sets the CPU error output in a similar manner to actual errors, where X is the error code(equivalent to LINT) and Y is the error parameter(equivalent to LADD), but doesn't trigger an interrupt or set LINT/LADD on use, for example:
STERR 1,65536
would display 1.065536 as the error from the CPUCLERR(opcode 151) sets the CPU error to 0 without resetting the actual CPU, but doesn't change the LINT/LADD registers internally(they can be changed via CPUSET anyway)
This is primarily aimed at users who want to display custom error codes, or those who would like to clear the error from the CPU on successfully handled errors/interrupts, like the ones that may frequently occur through hardware signalling with external interrupts.