Open Jonnycake opened 8 years ago
So with the push and pop operations a problem occurs when using the single byte registers where the pop ends up overwriting registers and the push ends up pushing extra data. Trying to work out how exactly we should fix that while keeping the convenience of just translating registers to memory locations.
A possible solution to the aforementioned problem is to define a new structure for registers that includes the memory address and the size of the register.
Issue with having the one byte registers, however, is the risk of losing data upon the pop, this, however, is something to be considered by the developer of the script that we're running.
I think I'm going to open up a tech debt issue for the push/pop issue and just consider those operators to be done.
So I think the problem I'm having now with user defined functions is that the memory that stores the code is actually being reused as the function name when go to make the call. I'm thinking the best way to handle it is to have a section of memory set aside specifically for user defined functions and then just store the offset from said memory address to get to the correct function. They would have to be separated by null bytes that way we know when it's done.... yeah... that makes sense... okay... I'll take a look at that either on my lunch time or after work
Can be split up as needed for organizational purposes.
Operators Shortcuts
Structures Conditionals
Jumps
Functions
Includes