[A83] Re: Selfmodifying code


[Prev][Next][Index][Thread]

[A83] Re: Selfmodifying code




> Van: Sebastiaan Roodenburg <sebastiaan@rimsystems.nl>
> 
> > Then we have 'squished' programs, that seem to be in binary format from
> > the beginning. Does the calc run them directly, and in that case, if I
> > write self-modifying code, will these mods be permanent, so that the
> > next time you start the prg it will be in the state I left it after
> > the last run?
> 
> Depends on what shell you use... 
> 
> ZASMLOAD [..snip..]
> 
> When you use a 'better' shell (ASHELL, SOS, ION, etc.) it runs the
> program in a other way, supporting 'write back'... ASHELL and SOS
> swap the program code with the code at 'progstart' when you execute
> the program, calls 'progstart', and swap it back when it is finished
> (that's why you can't use external files in these programs: VAT is
temperly
> screwed). ION uses a complexer way to execute, which i havn't figured
> out yet, to preserve the VAT.
> With those shells your program can be +/- 21kb (the shell has to run
> too), and when you modify your code during execution it is indeed written
> back in that state when you finish your program.

For Venus (both 82 and 83) the maximum programsize is around 26.4 kb. And,
yes, it has writeback, since your program executes from inside it's
variable. When you use the (graphical) shell the maximum programsize drops
to 26 kb.

btw, I'm still working on Venus-82... (so for that calc things might change
a little)

	Henk Poley <><