make sure clocktick starts at zero
This commit is contained in:
@@ -19,3 +19,13 @@
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
.constructor initclock, 24
|
||||||
|
|
||||||
|
initclock:
|
||||||
|
lda #0
|
||||||
|
ldx #3
|
||||||
|
@lp: sta tickcount,x
|
||||||
|
dex
|
||||||
|
bpl @lp
|
||||||
|
rts
|
||||||
@@ -88,8 +88,6 @@ start:
|
|||||||
lda #$05
|
lda #$05
|
||||||
sta IRQ_MASK ; IRQ1=on
|
sta IRQ_MASK ; IRQ1=on
|
||||||
|
|
||||||
cli
|
|
||||||
|
|
||||||
; Clear the BSS data
|
; Clear the BSS data
|
||||||
jsr zerobss
|
jsr zerobss
|
||||||
|
|
||||||
@@ -141,6 +139,8 @@ start:
|
|||||||
; Call module constructors
|
; Call module constructors
|
||||||
jsr initlib
|
jsr initlib
|
||||||
|
|
||||||
|
cli ; allow IRQ only after constructors have run
|
||||||
|
|
||||||
; Pass an empty command line
|
; Pass an empty command line
|
||||||
jsr push0 ; argc
|
jsr push0 ; argc
|
||||||
jsr push0 ; argv
|
jsr push0 ; argv
|
||||||
|
|||||||
Reference in New Issue
Block a user