[A83] Re: Simple program writeback
[Prev][Next][Index][Thread]
[A83] Re: Simple program writeback
> Van: Olle Hedman <alh@home.se>
>
> The more advanced actually moves the program to this new position to
> save ram, since programs on the ti83 actually is stored in ram, but not
> at the right position when not running. Then when the program is done,
> it is moved back, this is the "writeback", wich as a side-effect has the
> result that all variables defined by .db:s you changed in your program,
> is saved.
There are even more advanced shells that execute the program from within
it's variable. They just move the entier (sizebytes+data) program variable
to the beginning of the user RAM. This approach is handy because your
program can do many 'wierd' things that aren't possible with shells that
only move the datapart, like Ion. For example using error-handlers from
within an Ion program is a Bad Idea(TM), which isn't the case with a
'variable-moving' shell.
I know this is somewhat like a commercial for Venus :-P
There are off coarse also things that can't be done 'the Venus way'. If
think hard enough (and know how Venus works) you'll get it. (Tip, try
'porting' it to the Ti83+)
Another thing, not related to any *shell-war*, if you just want to store
one single variable (instead of an array or string) you might want to take
this approach:
ld (address),hl
ld (writeback),a
[..]
adress = $ + 1
ld hl,$0000
writeback = $ + 1
ld a,$00
That saves you some (valuable) bytes.
Henk Poley <><
Follow-Ups: