Re: A83: Interrutps...


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

Re: A83: Interrutps...



>>Would it be possible to leave the calc in IM2 at the end of program
>>execution (calling the regular interupt at the end of the routine) in
>>order to create a kind of TSR?
>
>Yes, you could do that, the problem is in finding a very safe area in 
>which
>to store your routine and interrupt table.  Usually they are stored in 
>some
>part of system ram that could be overwritten during normal calulator
>operation, but is left alone while an asm program is running (provided 
>the
>program does not use it)  This is trouble because if either piece of 
>memory
>is modified in any way after the program is done and control is 
>returned to
>the normal calculator OS, your calculator will crash.  If you were to 
>find
>some safe memory areas that are never used, then this would be 
>possible,
>but I doubt very much the existance of such pieces of memory.
>

Perhaps you could just load the thing into regular spots in the calc's
RAM and mark the space off-limits using the variable table.  An
uneditable program might be a good way to define it, though you should
then probably put a return execution as the first bit of the defined
memory to prevent the user from accidently executing the program.  The
problem here is the calc may "defragment" it's memory if variables are
deleted. The routines would only be save inthe first items in the
variable table.  This would require a lot of ASM code or for the program
to be distributed in a backup file.  Also, if the i register is changed
after IM 2 is executed will the calc crach?  And if so, does the ROM ever
change the i register?


Follow-Ups: References: