Re: A83: Re: Re: Some question about ASM 83


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

Re: A83: Re: Re: Some question about ASM 83




I also forgot to mention that the halt instruction is used when the 
calculator is turned "off" to detect an on keypress.  The keyboard is wired 
such that pressing on will trigger an interrupt.  Since the hardware is setup 
so that you can disable timer interrupts and turn off the screen but leave on 
enabled, the processor will use minimum battery power while waiting for an 
(on) interrupt to occur.


In a message dated 9/18/00 9:37:32 PM Eastern Daylight Time, 
ComAsYuAre@aol.com writes:

> Halt stops the processor until an interrupt occurs.  If you have interrupts 
>  disabled, then the only thing that can get you out of a halt is a 
>  non-maskable interrupt, which the calcs don't have.  Assuming they're 
>  enabled, it will generally wait for the next timer interrupt; 200 of these 
>  occur each second so the time delay will be a maximum of 1/200th of a 
second 
> 
>  and a minimum of no time at all.  Unlike nops, a halt will save battery 
>  power, and this can be observed in the slight increase in contrast level 
in 
>  programs which heavily use the halt instruction.  It's VERY good for 
>  batteries.



----
Jonah Cohen
<ComAsYuAre@aol.com>
http://jonah.ticalc.org