mirror of
https://github.com/daniel5151/ANESE.git
synced 2025-04-02 10:32:00 -04:00
40 lines
588 B
Text
Vendored
40 lines
588 B
Text
Vendored
.include "validation.a"
|
|
|
|
nmi_count = 10
|
|
|
|
nmi: inc <nmi_count
|
|
rti
|
|
|
|
init_tests:
|
|
sei
|
|
lda #0
|
|
sta $2000
|
|
sta $2001
|
|
jsr wait_vbl
|
|
jsr wait_vbl
|
|
lda #$80 ; enable nmi
|
|
sta $2000
|
|
rts
|
|
.code
|
|
|
|
begin_test:
|
|
sta <result
|
|
|
|
; synchronize with nmi and clear
|
|
lda #-1
|
|
sta <nmi_count
|
|
: cmp <nmi_count
|
|
beq -
|
|
|
|
rts
|
|
.code
|
|
|
|
end_test:
|
|
lda <nmi_count
|
|
jsr error_if_ne ; too soon
|
|
inc <result
|
|
lda <nmi_count
|
|
jsr error_if_eq ; too late
|
|
rts
|
|
.code
|
|
|