Jonnycake / Brainycake

Repository for a Brainfuck derivative
GNU General Public License v3.0
0 stars 0 forks source link

Currently Unimplemented Operators and Structures #7

Open Jonnycake opened 8 years ago

Jonnycake commented 8 years ago

Can be split up as needed for organizational purposes.

Operators Shortcuts

; Read string onto stack stopping at newline and placing null delimeter (and clear newline from input buffer)
& output the null delimited string at stack ponter

Structures Conditionals

Jumps

Register based jumps
Pointer based jumps

Functions

Includes

Jonnycake commented 7 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.

Jonnycake commented 7 years ago

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.

Jonnycake commented 7 years ago

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.

Jonnycake commented 6 years ago

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