Re: A86: _ALT_ON_EXEC


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

Re: A86: _ALT_ON_EXEC




In a message dated 11/6/98 9:29:57 AM Eastern Standard Time,
croop@oregontrail.net writes:

> Ok... I need to know several things:
>  
>  1. 	_alt_on_exec is the user 'on' routine that executes each time the
>  calc is turned on, right?

yes.  if bit 3,(iy+$23) is set and the checksum matches, it will be called
every time the calc turns on

>  
>  How do I use it?  Just like the user int routine?  I need to know:
>  
>  Where is it?  How long is it?  Does it require a flag to be set/reset? 
>  Does it use a checkskum system like the user interrupt uses?       

_alt_on_chksum		equ		$d48f
_alt_on_exec		equ		$d490

set 3,(iy+$23)		;enable
res 3,(iy+$23)		;disable

the checksum is the sum of the 1st, 40th, 80th, 120th, 160th, and 200th byte.
it is the byte right before _alt_on_exec

>  
>  2.	Is there any danger in running an assembly program right off of its
>  original copy in storage mem?  I mean without transferring it to
>  _asm_exec_ram, or using _exec_assembly, but just calling the program in
>  storage.  Can you do that?

you could except all addresses would be wrong.  the ".org _asm_exec_ram" means
that all addresses are calculated with $d748 as an offset. if you run it from
its original position (which would be hard to do anyway), then it would most
likely crash the first time it encountered a call or jp. there's no advantage
to doing it anyway.

>  
>  3.	Also, I can use _textShadow as scratch space, right?  What flag do I
>  set/reset to keep this space from being written to by the calc while I
>  am using it?  And, this area will only contain printable ascii codes,
>  right?  I need to make sure that there is nothing that can already be in
>  _textShadow by chance that matches a value my program is going to place
>  there and look for.

res 1,(iy+$0d)
you must load data into it first before there will be anything usable there.
also, you can't use _clrScrn if you're using the _textShadow (use _clrLCD
instead).  otherwise, there shouldn't be any other data that gets stored there
except what you put there.


Follow-Ups: