CPCWiki forum

General Category => Programming => Topic started by: SRS on 20:54, 31 May 16

Title: Save Space in BASIC programms with just a simple poke
Post by: SRS on 20:54, 31 May 16
For those of you that did not know this - I just found it today and got an adventure from 32 to 30k with just one POKE. Incredible !

Source -> http://tj.gpa.free.fr/html/coding/cpc_ram.htm (http://tj.gpa.free.fr/html/coding/cpc_ram.htm)

Load your BASIC program. (Example : "prog.bas")


save"prog",A
POKE &AC00,&FF
load"prog"
save"prog.bas"


and READY !

Title: Re: Save Space in BASIC programms with just a simple poke
Post by: TFM on 21:27, 31 May 16
Well, an program saves as ascii is always longer than save in BASIC format, because BASIC is precompiled. What does the poke do?

Title: Re: Save Space in BASIC programms with just a simple poke
Post by: TotO on 21:47, 31 May 16
This POKE allow to remove the useless spaces from a loaded ASCII file.
Title: Re: Save Space in BASIC programms with just a simple poke
Post by: TFM on 19:17, 01 June 16
Quote from: TotO on 21:47, 31 May 16
This POKE allow to remove the useless spaces from a loaded ASCII file.


Well, nobody should put them in, in the first place.  8)
Title: Re: Save Space in BASIC programms with just a simple poke
Post by: SRS on 11:51, 25 December 16
There may be sources out there that have those spaces - so why should I remove the spaces manually while converting the games if a simple poke does the work for me :)
As an engineer I tend to be lazy and try to use automated solutions for manual work ;)
Powered by SMFPacks Menu Editor Mod