bobbimanners / EightBall

The Eight Bit Algorithmic Language for Apple II, Commodore 64 and VIC20
GNU General Public License v3.0
19 stars 3 forks source link

Relocatable bytecode #16

Open bobbimanners opened 6 years ago

bobbimanners commented 6 years ago

At present bytecode uses absolute addresses for branches / jumps and is not relocatable. It may be better to use relative branches / jumps so code can be readily relocated within VM memory. Advantages:

Drawbacks:

To implement this, we need to add new VM instructions and modify the compiler to use them.

bobbimanners commented 6 years ago

At present, for code to be compatible, both RTPCSTART and RTCALLSTACKTOP must have the same values (in eightballvm.h).