Re: A86: Tamagotchi?


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

Re: A86: Tamagotchi?



Eggplant Farms (TGaArdvark@aol.com) wrote:

>> The Z80 is NOT executing instructions when the calculator 
>> is "off"; it is stopped on a HALT instruction, and the 200-times-per-second
>> interrupts are disabled. (I'm not sure whether the device that generates 
>> the interrupts is disabled or whether the processor is put into a mode in 
>> which it ignores the interrupts without executing instructions).

>No, actually the interrupts are NOT disabled. If they were, the calculator
>would not be coming back on. If you read your Z80 manual, you would
>notice that the only way to terminate HALT is with interrupts. Adding
>a few lines to the interrupt handler would not take up that much current.

Wrong.  The interrupts ARE Disabled (read the Interrupt chapter).  The 
powering off has to do with the fact that there are two types of 
interrupts.  There is the INT interrupt, that is what you are talking 
about, and there is the NMI interrupt (NonMaskable Interrupt).  The NMI 
is hard-wired to port 3, the power manager.  The device on port 3 sends 
signals to this pin whenever the calc should turn on (or off, like low 
batteries.).  This ALWAYS causes an interrupt, which pulls the calc out 
of the HALT.

James Yopp
jyopp@pobox.com
"Time is the fire in which we burn."