Use MACHID to check for realtime clock.
There's no need to do guesswork to know if a realtime clock is present/active.
This commit is contained in:
@@ -27,10 +27,10 @@ _clock_getres:
|
||||
ldx #<day_res
|
||||
ldy #>day_res
|
||||
|
||||
; Check for existing minutes or hours
|
||||
lda TIMELO
|
||||
ora TIMELO+1
|
||||
beq :+
|
||||
; Check for realtme clock
|
||||
lda MACHID
|
||||
lsr a
|
||||
bcc :+
|
||||
|
||||
; Switch to minute resolution
|
||||
ldx #<min_res
|
||||
|
||||
@@ -21,11 +21,11 @@ _clock_settime:
|
||||
ldy __dos_type
|
||||
beq enosys
|
||||
|
||||
; Check for existing minutes or hours
|
||||
; Check for realtme clock
|
||||
tay ; Save A
|
||||
lda TIMELO
|
||||
ora TIMELO+1
|
||||
bne erange
|
||||
lda MACHID
|
||||
lsr a
|
||||
bcs erange
|
||||
tya ; Restore A
|
||||
|
||||
; Get tm
|
||||
|
||||
Reference in New Issue
Block a user