Open
Conversation
Including opcodes, registers, saving to EEPROM, convert address to value, etc...
Add define (via quote), stack, call, return. Remove Servo/Stepper to simplify debugging
- Check for and initialized EEPROM if first run or invalid data.
- Limit program space in EEPROM for chips with large memory.
- printreg displays the value of the register as well as EEPROM at its address.
- moved existing "?" display code into display_status
- only '.' does a return. cr just ends lines /
- move commands into switch: ')', '@', '!'
- no longer copy p into n if n is 0 and no longer zero out n after every command. Not sure why we did that, other than to keep a pin number from one line to the next. But we can do that in the pin control command?
- Give up on I2C commands to free up ')' and '.' which also simplifies '-' and frees up '(' and '_'. Eventually '(' is for parameters. Maybe use '_' to clear when cr isn't available? Hopefully I2C can be implemented in the actual langauge. Or as a mode change / sub engine.
Digital ONLY pins are now differentiated from analog pins. e.g. on Arduino Uno, 2 to 13 are digital only, 14 to 19 are analog (or digital) but we read them via analog. This allows I and P to be used to read values inside a program, since ? is a conditional branch. e.g. 2I will read pin 2 and set n to 0 or 1. 14I will read pin 14 aka A0 and set n to the analog value read on the pin.
e.g. a"ab""cd.". makes a point to: ab"cd.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Including opcodes, registers, saving to EEPROM via quoting, convert address to value, etc...
The layout of the memory is probably not great. All those additions and subtractions of offsets... Needs a bit of a re-think to avoid the code getting "tricky"