I fixed the operator precedence issue, so that * and / have equal precedence. I also changed to using an LCG pseudo-random number generator because it was shorter. A consequence is that the RND function only uses the high order byte of the RNG state, because the low order bits have a small period. So RND should not be given a parameter larger than 256.
I fixed an issue with the expression evaluator where an incomplete expression would cause it to try to RET without a return address on the stack.
I’ve listed the meaning of all error codes in errorcodes.txt
The current version passes all tests and runs all example programs. If no other errors are found it will become version 1.0
I’ve also found a way of simulating keyboard input in Stefan Tramm’s emulator using a short JavaScript program that sends key events to the emulator - I’ll make this available when it’s finished. This will be a good way of scripting tests cases that test error handling and error codes.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.