A86: re: homescreen or not?


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

A86: re: homescreen or not?




you can probably tell whether the user is at the homescreen by checking
the stack pointer position.  the homescreen, i think, has a default stack
pointer.  that's so if you get some big error messages, no matter how
many pushes/pops you have on the stack, you can always find your way back
to the homescreen.  asm has _jforcecmd....which does that.  use the new
vti to monitor the stack position when at the homescreen.

i'm assuming your program is an interrupt based one, or else it wouldn't
have to worry about being run while other programs are currently running.
 wait at the homescreen in vti.  stop it on one of the interupt cycles
and hit f7/f8 until you are running code in your program.  check what the
stack position is.  that's what your program's got to check for.  if the
stack isn't at that position, then the user is probably doing something
like running a program or something else.  use _cp_hl_de or something (if
that's on the ti86 rom pages) to compare the stack pointer currently to
what it should be if the interupt was called from the homescreen.  (that
rom call just uses sbc hl,de to get the flags, it saves the registers
before hand too)

this is all theory.  i'm pretty sure this won't work but if you're
determined enough, you'll find something out.  i guess calls in programs
alter the stack too and ti-basic programs do stuff to the stack too.  but
the interupt routine should always get the same stack pointer address
each time it's called i think.

good luck!!

jimi
___________________________________________________________________
Get the Internet just the way you want it.
Free software, free e-mail, and free Internet access for a month!
Try Juno Web: http://dl.www.juno.com/dynoget/tagj.


Follow-Ups: