[A83] Re: shut down the caltc : take care of the screen or not ?


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

[A83] Re: shut down the caltc : take care of the screen or not ?



> 
> You indeed need to pull the batteries when you have disabled interrupts
> or 
> masked them all out and then execute a halt.
> 
> Martin
> 

I don't think that's exactly the case either... When the Z80 doesn't get any 
power, as happens when a battery is pulled, it starts over from $0000, with all 
registers cleared and interrupts disabled. 

Fortunatley TI has put some code in the rom at $0000 that will restore 
important things, like setting the SP and enable the interrutpts again. But I 
don't think it re-enables the interrupt hardware, so if the interrupts are 
masked out using port 3 (I don't remeber, but I think it's port 3...), then it 
will die.

In that case you'll have to take all batteries (also backup battery) out, and 
leave them out for some time, to allow the hardware reset. When the hardware 
accesed by port 3 has been without power for a while it should "forget" how it 
has been set up, and then go to the standard mode, with both timer and on 
interrupts enabled.


But just disabling interrupts, either with di or using port 3, and then doing a 
halt should also cause the calc to freeze, until a battery is pulled so the Z80 
goes to $0000.


/Leif



References: