www.retrosoftware.co.uk
http://www.retrosoftware.co.uk/forum/

Compression of program code
http://www.retrosoftware.co.uk/forum/viewtopic.php?f=73&t=42
Page 2 of 2

Author:  AndrewW [ Tue Apr 08, 2008 7:51 pm ]
Post subject:  Re: Compression of program code

Yes but the REM statement is still there. I'll probably try it again in BASIC to see if it will work or is the script file anyway, thanks.

Author:  StuartA [ Tue Oct 14, 2008 6:10 pm ]
Post subject:  Re: Compression of program code

I don't suppose there are any crunchers that compress executable code, not just basic?

(Someth like this)
http://www.swolff.dk/cruncher/

Author:  FrancisL [ Tue Oct 14, 2008 6:26 pm ]
Post subject:  Re: Compression of program code

Not that I am aware of.

I'm currently working on compression algorithms for storing BBC images though, but that's a different kettle of fish from executable files.

Kind regards,

Francis.

Author:  ParasS [ Wed Oct 15, 2008 11:26 am ]
Post subject:  Re: Compression of program code

StuartA wrote:
I don't suppose there are any crunchers that compress executable code, not just basic?

I think it needs to be a bit clearer what you're trying to do. There's saving space for the purposes of moving things around (such as image compression), and then there's optimisation to make code smaller?

I suspect you're looking for the latter, and the answer would be that this could be done along the same lines as you have optimisers in compilers, but they would only be able to work with source code.

Why? Well, code might be self-modifying, relocating, or dependent on executing timing. You can't flag any of these things in the code itself, so you'd need an optimising assembler which could pick up directives aroudn pieces of code.

I can't see that anyone would bother with doing this for the 6502 instruction set.

If I've got the wrong end of the stick, then if you're looking to compress code, then it would have to be a non-lossy algorithm such as what WinZip might use, rather than JPEG. And you'd have to account for adding on new code that decompresses.

Author:  FrancisL [ Wed Oct 15, 2008 11:40 am ]
Post subject:  Re: Compression of program code

I think he's looking for a program to actually compress executable files in a similar manner to e.g. PowerPacker on the Amiga (if you are familiar with that). The compressed files could either have their own decompression routine inbuilt or an external program to decompress and then run the code.

Kind regards,

Francis

Author:  ParasS [ Wed Oct 15, 2008 11:44 am ]
Post subject:  Re: Compression of program code

Hey Francis - exactly what I was adding to my post on just now... yes Powerpacker on the Amiga made sense with the amount of RAM and ability of the OS to page, but on the Beeb, it's really quite pointless (in my opinion anyway!).

Author:  FrancisL [ Wed Oct 15, 2008 2:37 pm ]
Post subject:  Re: Compression of program code

I'm not sure I can see the benefit of it either on the Beeb.

Kind regards,

Francis.

Author:  StuartA [ Fri Oct 17, 2008 2:38 am ]
Post subject:  Re: Compression of program code

FrancisL wrote:
I'm not sure I can see the benefit of it either on the Beeb.

Kind regards,

Francis.


I suppose it's mainly used to make demos where theres a limit on executable size (4k or 64k for instance), but I do see what you mean as there is a floppy drive on the beeb so prob not as much point. Having said that heres one for 6502 code that can target the other 6502 based computers.

http://hem.bredband.net/magli143/exo/


EDIT: Only just realised - the point of compressing the basic (bytecode(?)) is to make more room for basic progs and that general compression of program code doesn't really help too much in this case. (catching up with BBC Micro still)

Page 2 of 2 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/