Let's design our memory area now, and see how we can implement the 2 first insructions over 8, left and right.
Our new memory map can be : 0, 0, 0, instructions, 0, instruction pointer, 0, 0, inactive flag, direction flag, memory pointer, some free space 0, memory
Note that we need 2 cells after instruction pointer to
Inactive and direction flags have been quickly introduced at the very first step of this playground, though they have not benn implemented yet.
Memory access will be performed like instructions : with a pointer on an array. This will introduce the same "255 max" limitation, but this will be addressed later.
Now, let's implement < and > instructions
The #1 tech hiring platform