Re: A86: asm clock?
[Prev][Next][Index][Thread]
Re: A86: asm clock?
Here is what Matt Johnson says happens:
And when we are writing to Port 3 we appear to be writing either 1 byte at a
time, or 2 bytes at a time. Some bytes and there functions are listed below:
$00 $01 - This lovely 2 bytes which are sent to the calc seem to shut off
everything in a state of metaphysical suspended animation. Ok, enough jokes!
It seems to be used in the reset routine where, right when the batteries are
put in the calc, some asm code is executed and $00 $01 is written to the
calculator. This shuts of the LCD and masks the timer interrupts and uses a
EI and HALT to detect the existance of a different interrupt - an ON key
interrupt. Once the ON key is pressed it goes back to $38 and senses that
the ON key was pressed. It then jumps to another routine that handles the ON
key interrupt. The calc_off routine is similar, although it only writes $01
to Port 3. But is also uses the EI and HALT combo to wait for an ON
interrupt.
-- $01 - This byte is written to Port 3 in the Calc_off routine, which then
ends in a EI and HALT combo, waiting for the ON key
$09 $0B - This or $0A $0B is sent to Port 3 before the interrupt handler
ends. $09 $0B signals to the TI-Hardware that assume normal operation (LCD
on, etc) and that the ON key has NOT been pressed
$0A $0B - This or $09 $0B is sent to Port 3 before the interrupt handler
ends. $0A $0B signals to the TI-Hardware that assume normal operation (LCD
on, etc) and that the ON key has BEEN pressed
-- $0B - This byte is written to Port 3 to signal no change or normal
operation I think. I remember replacing all this $09 $0B B.S. with just
sending $0B and it speeded up the interrupt handler... as for ON key
handling..hmm.. not sure
I hope this is right.
--------------
Jbrett
tbarwick@esn.net
http://ww2.esn.net/~tbarwick
I just added a TI-86 page, Check it out!!!
-----Original Message-----
From: David Phillips <electrum@tfs.net>
To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
Date: Sunday, September 13, 1998 4:25 PM
Subject: Re: A86: asm clock?
>I tried to do this a while back. I've attached the source code for what I
>had. I started it late one night and Matt Johnson gave me a little help in
>getting the interrupt routine to work. We figured out that the interrupt
>was called 174 times a second, which seemed to work for both of our
>calculators. Maybe our batteries were at the exact same level, I don't
>know. But I remember I timed it with my digital watch and it kept accurate
>time to the second for at least 10 minutes, as long as I made sure it
>didn't APD (which pauses the clock).
>
>The program displays a clock in the upper left corner of the screen in the
>small font. If I remember correctly even the hours work, but I never
>tested it that far. I'm about positive it won't roll over when it hits 12
>or 24 hours either. Also, there is no way to set the time--it starts at
>00:00:00 whenever you (re)run it. And, there is no way to uninstall it.
>Maybe the kill-hook, I never messed with it.
>
>This is my first and only interrupt program, so if it crashes your calc or
>causes other problems, remember I warned you first.
>
>At 11:21 AM 9/13/98 EDT, you wrote:
>>
>>even if it isn't accurate, what would be the commands for a clock in asm?
>>Just curious
>>
>>
>>-Cliff
>>