26 lines
563 B
ArmAsm
26 lines
563 B
ArmAsm
;; Max 1.5s eller 0.9s vet ej villken
|
|
;; skriv time_start .. kod .. time_stop
|
|
;; och läs värdet i f1
|
|
.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
|