Re: A86: Hooking interrupt idea


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

Re: A86: Hooking interrupt idea



mja@algonet.se (Jimmy Mårdell) writes:

> > 
>  > ok, so when do interrupts occur?
>  
>  About 195-200 times/second (it depends on battery strength) if IFF1=1
>  (ie,
>  interrupts enabled) _OR_ when you press the ON button. An interrupt
>  occurs
>  when you press the ON button even if interrups are disabled.
>  
>  Interrupt do NOT occur faster on a turboed calc. That's why programs
>  using
>  HALT to delay aren't much faster on turboed calcs.
>  

Ok.  So, you could have code at the address that it jumps to that fixes the
conditions so that it doesn't jump.  You could then also have code that would
exectute at start-up.  But how would you set all the memory locations just
before the calc shuts down?


One more thing....  Are you saying that it jumps to 38H _every_ time ON is
pressed, or just if it's off.  Also, do the interrupts occur 195-200 /s even
when running asm programs?  That would mess up the program that's running,
wouldn't it?

And I just thought of this.  If the interrupts are generated when ON is
pressed, but NOT while running an asm program (meaning that if it jumps to
38H, ON was definitely pressed), you could put in some code (would probably
be extremely hard, tho) at the beginning of your program to set the
conditions (mem locations/IY flags), and then put in the code to break the
program at the location that the interrupt handler calls.

Just a few thoughts...

~Steve


Follow-Ups: