[A83] Re: Simple program writeback


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

[A83] Re: Simple program writeback




At 06:56 2001-12-02, you wrote:
>Yes, and then you write to (writeback). This won't work in all shells
>though, but I know for sure it works in ION, MirageOS, and TSE.

To be technical, and maybe clear up some confustion. The name "writeback" 
doesn't come from that you write to the variable in the program, it comes 
from how the shell/loader handles the program.
A simple loader just copies the program from where it is stored, to the 
position in ram where it should be executed, which is a fixed position in 
the ti83s. Then when the program is done it does nothing, so all the 
changes in the program is lost.
While running, the program is actually in two places in ram, and if you 
want to save a value, you have to look up where your program is stored and 
change the value in this copy.

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.

So you never have to bother on "how to do writeback", this is handled by 
the shell/loader. Unless you want to write your own shell/loader ofcourse.
Just write your program for the shell or loader that has the feature you need.

///Olle






References: