24 lines
472 B
ArmAsm
24 lines
472 B
ArmAsm
;; Max 1.5s
|
|
.macro time_start
|
|
PHA
|
|
LDA $DC08 ; Bit 0..3: Tenth seconds in BCD-format, others may be 0 or 1
|
|
;;;;Clear all time data and set time =1.
|
|
AND #%11110000
|
|
STA $DC08
|
|
INC $DC08
|
|
LDA $DC08
|
|
;;Time is only at bit 0 ..3
|
|
AND #%00001111
|
|
STA $f1
|
|
PLA
|
|
.endmacro
|
|
|
|
.macro time_stop
|
|
PHA
|
|
LDA $DC08 ; Bit 0..3: Tenth seconds in BCD-format, others may be 0 or 1
|
|
AND #%00001111
|
|
SEC
|
|
SBC $f1
|
|
STA $f1
|
|
PLA
|
|
.endmacro
|