[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 ?



In my experience, when using interrupt mode 1, all that is required to turn
off a real TI-83 is to send a 1 to port 3, then halt.  I suggest using the
more complex routines only if you need to use im 2.  It is not important to
use lcdinstport to power off the lcd, because writing a zero to a bit in
port 3 causes the same thing.

poweroff.z80:

.org   progstart
 ld    a,1
 out   (3),a
 halt
 res   4,(iy+9) ;prevents err:break ;=res onInterrupt,(iy+onFlags)
 ret
.end            ;Note that this routine does not turn off VTI.

from TI-Ports.txt on ticalc.org:

--------------------------------
 Port 3 : ON Status, LCD Power
--------------------------------
Write
-----
XXX?....
Bit 3 = 1: turn LCD on
        0: turn LCD off
Bit 2 = 1: do not mask timer interrupts (200Hz)
        0: mask timer interrupts
Bit 1 = 1: set bit 1 LCD status (on)
        0: clear bit 1 LCD status (off)
Bit 0 = 1: do not mask ON key interrupts
        0: mask ON key interrupts

Read
----
0000....
Bit 3 = 1: ON not pressed
        0: ON pressed now
Bit 2 = 1: Timer interrupt happened
        0: timer interrupts hasn't happened
Bit 1 = 1: LCD is on
        0: LCD is off
Bit 0 = 1: ON interrupt has happened
        0: ON interrupt hasn't happened


Hope this helps, Jeff

> Hi !
>
> I have a routine that shuts down the calc, but I have seen
> other routines that shut the lcd down before really shutting
> the calc off. Is it really important to do it ?
>
>
> Guillaume
>



Follow-Ups: References: