[A83] Re: Turning calc off
[Prev][Next][Index][Thread]
[A83] Re: Turning calc off
ld a, 1 / out ($03),a disables timed interrupts. You don't need to
worry about re-enabling them.
Also, note that ld a, 3 / out ($10),a turns on the display. 2 would
only turn it off again. Also, I think you may need to set the contrast
on the display to its lowest setting (output C0h to port $10) to get it
to look like the calculator does when it turns itself off. Be sure to
set it back to normal after its turned back on, or you won't see
anything. Also be sure to do some sort of delay (Like "LCDBusy")
between turning off the display and setting the contrast down and
turning on the display and setting the contrast up, or it won't get the
second command.
I think that's about all you should need to know.
On Thursday, January 16, 2003, at 05:09 PM, Jeff wrote:
> I know this seems like a dumb question, but how do you use assembly to
> turn
> off the calculator, wait for the ON key, then turn it back on? This
> is what
> I do know:
>
> - The tutorial for power off in re does not work. It seems obvious
> that it couldn't.
> - Examples of power off that I've seen use "ld a,1 / out ($03),a".
> What
> does this do?
> - "ld a,2 / out ($10),a" turns off the LCD and "ld a,2 / out
> ($10),a" turns it on.
> - HALT stops the processor until an interrupt occurs. How do I disable
> timer interrupts, though, and only interrupt with the ON key?!!?
>
> jeff
>
Follow-Ups:
References: