ML TOD routine help needed

From: Jeff (
Date: 2001-02-06 04:45:16

I am writing a little routine that will input characters and print
them to the screen  (There is more involved than that, but this will
do for now)

Anyway, I want to use a CIA TOD clock to check and see if no keys have
been pressed for xx amount of time.

Here is a code snippet.  I have it set to see if it will idle out at 1

TIMER = $DD08 ; CIA2

             LDA #0                        ; set TOD to all 0's
             STA TIMER+3
             STA TIMER+2
             STA  TIMER+1
             STA TIMER+0

              STA TEMP
             LDA TIMER+2             ; READ IN THE MINUTES
             CMP #$01                     ; SEE IF IT = # OF MINUTES IN BCD
             BEQ +
             LDA TEMP
             BEQ BACK

             JSR $FFD2
             LDA #0
             STA TIMER+2            ; Set minutes to 0 again ??
             JMP BACK

+           INC $D020

temp .by 0

Ok, when I run this program the first time, it seems to work ok.  When
location $DC0A (CIA 1 minutes) = #$01 it will go to the idle routine
which simply changes the border color and exits.

The problem is that if I enter this routine again, it never sets the
TOD clock back to 0 and thus exits right away (providing that location
$DC0A didnt update to #$02)

If anyone can tell me what I am doing wrong I would appreciate it.


This message was sent through the cbm-hackers mailing list.
To unsubscribe: echo unsubscribe | mail

Archive generated by hypermail 2.1.1.