It’s the fact that the BASIC is so close to the C that would make it easier.
When your PBP program is compiled to assembler, all of your macro commands
like software serout, sound, pause, anything like that is moved to the beginning of code,
and those routines called from another small section of code where you originally wrote the command.
The simpler things like conditional branching and anything logically you do with variables stays where it is.
It also often has to shove lookup tables at the top of the nearest code page, etc.
Converting a BASIC program to C there would be almost none of that.
It’s not something I’m planning to do, but someone could.. it is still a bit of an undertaking,
but for the most part, just simple syntax conversion.
Don’t get me wrong, it’s not all this easy, but for the most part, what is converted could just be stacked in the new file in order.
BASIC
Code:
x var WORD
y var WORD
if (x == y) {x = y + 4;}
C
Code:
WORD x;
WORD y;
if x = y then x = y + 4
Bookmarks