I really should have been adding error checking, would make debugging a lot easier.
The method I've now adopted for error checking involves the device blinking the binary number for the program position it is at when the error occurred. This seems to work well.
Todays progress includes:
- EEPROM saving and loading completed. Single byte eeprom addresses at space at end of eeprom are accessable for storing data.
- New BB keyword added for blinking out an entire byte (register, number, or retrieved eeprom byte.
- Made some changes to math operations. Math is still simple. And it nust be done in order. There is no order of operations, it is calculated in a linear fashion.
- More code cleanup.
This code does nothing just demonstrating usage. I will write instructions for using TGRK once it's complete.
E1S, 56 E2S, R7, ADD, 5 BB, E2R R1, ADD, 1, BB, R1 R1, 7, MUL, E3R, DIV, 2 R1, SUB, 4
The entire sketch is just under 6KB right now (about 70% of attiny85 flash). I pretty much just have some more work to do on pin functions then its complete. So I think it will all fit.
Global variables use 190 bytes out if 512. This includes the 127 bytes used for the prog[int8_t] array, 8 registers, 8 function address bytes, 8 function return bytes.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.