Hi,
I've been trying to convert Telengard from Commodore BASIC to Sinclair BASIC - originally targetting a 32K expanded ZX81 for fun
I quickly discovered that although porting the cut-down Vic-20 version of Telengard that I made some years ago (around 26K) into Sinclair BASIC meant that all those wonderful LET and GOTOs had to be included, in addition to carving up each command onto it's own separate line. In addition to that I had to deal with multiple variable clashes (no two-letter string names, no arrays starting from 0, etc). These set-backs in turn pushed the size of the program well above the original 32K in the text file, so the result I achieved so far was hard won - and to be honest it's a little incomplete in some areas and unfinished. I just wanted to see that I had *something* that would work for now.
ZX81 text to program converters were telling me that the program was just too big.
I turned to BASIC compilation. If I can't get this to run on a ZX81, let's try the 48K speccy.
This might have been a good idea, assuming the compiled program may well be smaller than the original BASIC listing, but it would appear that the tape file created is around 48K in size. Upon loading the compiled program into the emulator, crashes are occurring - despite having completed successful compilation of the code. The crashes seem to differ every time I remove/add lines etc - which makes me think that I've found the 48K Speccy's upper limit of memory. Doesn't even work on a 128K speccy though, so I dunno....
Attached is the text file I have been working from. It compiles OK with the command:
.\zxbc -taB --sinclair teleng.txt
...but the output won't start in the emulator (I'm using FUSE if that makes a difference)
Is the resulting program just too big to ever work? If so, short of hacking the program down further, is there any way to compress it from the compiler options?
If there's any bugs in the compiler (or I have the wrong options), then I suspect you'll find them thanks to this listing.
I've been trying to convert Telengard from Commodore BASIC to Sinclair BASIC - originally targetting a 32K expanded ZX81 for fun
I quickly discovered that although porting the cut-down Vic-20 version of Telengard that I made some years ago (around 26K) into Sinclair BASIC meant that all those wonderful LET and GOTOs had to be included, in addition to carving up each command onto it's own separate line. In addition to that I had to deal with multiple variable clashes (no two-letter string names, no arrays starting from 0, etc). These set-backs in turn pushed the size of the program well above the original 32K in the text file, so the result I achieved so far was hard won - and to be honest it's a little incomplete in some areas and unfinished. I just wanted to see that I had *something* that would work for now.
ZX81 text to program converters were telling me that the program was just too big.
I turned to BASIC compilation. If I can't get this to run on a ZX81, let's try the 48K speccy.
This might have been a good idea, assuming the compiled program may well be smaller than the original BASIC listing, but it would appear that the tape file created is around 48K in size. Upon loading the compiled program into the emulator, crashes are occurring - despite having completed successful compilation of the code. The crashes seem to differ every time I remove/add lines etc - which makes me think that I've found the 48K Speccy's upper limit of memory. Doesn't even work on a 128K speccy though, so I dunno....
Attached is the text file I have been working from. It compiles OK with the command:
.\zxbc -taB --sinclair teleng.txt
...but the output won't start in the emulator (I'm using FUSE if that makes a difference)
Is the resulting program just too big to ever work? If so, short of hacking the program down further, is there any way to compress it from the compiler options?
If there's any bugs in the compiler (or I have the wrong options), then I suspect you'll find them thanks to this listing.