Sprint compiling...the next frontier?

Hardware Hacking, Programming and Game Solutions/Cheats
Post Reply
Cloete
Posts: 35
Joined: Mon Jan 16, 2012 6:49 am
Location: Pretoria, Gauteng Province, South Africa

Sprint compiling...the next frontier?

Post by Cloete »

Hi. Can I Sprint compile a [Basic program that alters its lines while it is running]?
My Sprint compilations are working nicely. But the Basic programs & copiled programs were quite long.
Then I shortened the (NON-compiled) Basic programs the same way as in Advanced Sound & Graphics (BEYOND BASIC chapter) poking the end of my Basic programs – this helps to drastically shorten my programs’ length and save memory [10 EN=PEEK(27)*256+PEEK(28) ... 30 POKE EN-9,68.... etc].
Compiling & shortening Basic programs works beautifully individually. So obviously I then tried to create a ‘super’ little fast Basic compiled program....... I am having problems when I try to Sprint compile a Basic program that I have shortened with the [10 EN=PEEK(27)*256+PEEK(28) ... 30 POKE EN-9,68.... etc] system.
The shortened-compiled program does EXECute, but only the parts the Basic program that were NOT part of the [10 EN=PEEK(27)*256+PEEK(28) ... 30 POKE EN-9,68.... etc] set-up works. The rest just create a bunch of dots on the screen.
Does this mean that shortening a Basic program [BEYOND BASIC style] and then Sprint compiling that shortened program is not an EXECutable mix?
Rink
Posts: 236
Joined: Mon Sep 05, 2011 7:01 pm

Re: Sprint compiling...the next frontier?

Post by Rink »

I wouldn't think it could work. I'm not familiar with how the 'shortening' technique works but if you're modifying BASIC code on the fly then the compiled version is going to try and do exactly the same thing i.e. modifying BASIC code... but you're not using BASIC anymore. The locations you're modifying probably aren't the same bits of code they used to be in the BASIC version, and if you're POKEing in BASIC instructions then you have the added issue of there not being anything running to interpret it when you execute the compiled machine code version.

Even if you could get it working, I'd be a little surprised if it was any faster than the compiled (but non-self-modifying) version.
Post Reply