Re: TIB: Multitasking


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

Re: TIB: Multitasking




What you are describing here sounds very much like what I did.
Read on for my explanations...

One of two messages replying to criticism of my Windows-like program.

JMG

On Thu, 19 Feb 1998, Rene Kragh Pedersen wrote:
> 
> Jody wrote:
> > 
> > Rene Kragh Pedersen wrote:
> [...]
> 
> > > You can't really make a general "save" mechanism like that without
> > > slowing your calc severaly.
> > > But you could make save function in the game. That would be easy.
> > >
> > > --
> > >           Rene Kragh Pedersen
> > > ------------------------------------------------------------------

> > 
> > That's not entirely true. On the 83 most of the variables are made up
> > of the letters A->Z and @. It is a small loop that can save all of
> > those variables into a special list. Another loop to get them back.
> > Would be much harder to try to save all the other possible special
> > variables (statistic variables and all that). I don't think that this
> > is the same type of situation on the 85, though.
> 
> Well, the problem, as I see it, is that you have no idea of knowing
> which variables your currently running program are using. That means
> you'll have to back up all possibilities. This will be both memory and
> time consuming. It _IS_ possible to do it, and when you're finished I'd
> like to see you start program #3 while #1 and #2 are still in interrupt
> mode (can you spell 'costly recursivity'? :-)
> 
My programs do not need their variables to be backed up. When they
receive an interrupt, they save their critical variables and then exit.
This keeps programs from being stacked up on each other and filling
memory.

> One possible way would be for each 'interrupt-compatible' program to
> have a data file where the names of all used variables are.
> This data file must be done by hand, only once, but will _also_ take up
> memory. If you want to support multiple interrupts you'll have to have
> data files that keep track of all the renamed/backup'ed variables'
> names. Again, memory consuming.
There is no need in my programs to create backups of variables.

> Finally, this program - given the renaming of variables - will severely
> mess up your calculator if terminated aprubtly.
When that happens to my programs, there are only three or four permanent
variables left, as the temporary ones such as number of lines in a window 
are local.

> Of course, all you have to do is retrieve the data files that say which
> varibles have been renamed to what. This would make an excellent
> sub-program. When your interrupt program stops, it will run the sub,
> thus restoring the variables properly. If terminated incorrectly, there
> is a good deal of chance that you can recover the losses yourself by
> running the sub-program independently of the other.
My programs fix their own two or three permanent variables when they are
run.

> 
> It's a cool idea with few significant limitations, namely high memory
> usage and a tricky implementation.
All my programs fit on my calc and I have never run out of memory, even
with extra 4K data files and backups of the programs on it.

> But of course...with a TI-92+ ... :->
> 
> -- 
>           Rene Kragh Pedersen
> ------------------------------------------------------------------
> Apparently my clothes are defective.
>  - Dilbert.
> 


Follow-Ups: References: