Re: A92: TSR with auto-int 1
[Prev][Next][Index][Thread]
Re: A92: TSR with auto-int 1
>
> Very top of the stack? Does that mean the first value stored on the stack?
Where
> does the stack actually start in RAM [like what number]? Remember, the stack
> runs from high memory to low memory. I can see how you can make a TSR
> by inserting a program onto the stack before the high boundary of the stack,
> and therefore make it protected.
>
> David?, where in memory is the first value of the stack placed? And how come
> Fargo and TIOS don't relocate the stack to other points of RAM?
>
'Top of the Stack' here means at the lowest address of the stack space. For
instance, a stack starting at $4440 (supervisor stack on TI-92 1.x) the
'bottom' of the stack is the first value pushed on (address = 443C for if the
virst value was 32 bits). The top of the stack is up at $120 in memory. In
this case, the program is not protected, and would get deleted if the stack
grew too far.
In answer to your second question (er, third actually), they don't move the
stack because there's no need to.. In fact the stack is in a very good position
where it is. If a user program overruns it's stack, the value would overrun at
address $120, which BTW is exactly where the Auto Int 7 interrupt protects
memory at. So overrunning the stack causes the Auto Int 7 interrupt and the
system can recover.
--Bryan
bcturner@eos.ncsu.edu
References: