ANESE/roms/tests/apu/blargg_apu_2005.07.30/source/prefix_apu.asm
2017-12-19 16:14:50 -05:00

40 lines
965 B
NASM
Executable file
Vendored

; Prefix included at the beginning of each test. Defines vectors
; and other things for custom devcart loader.
;
; Refer to apu_util.asm for APU test-specific routines:
.include "apu_util.asm"
; Reset vector points to "reset".
; NMI points to "nmi" if defined, otherwise default_nmi.
; IRQ points to "irq" if defined, otherwise default_irq.
default_nmi:
rti
default_irq:
bit $4015
rti
; Delays for almost A milliseconds (A * 0.999009524 msec)
; Preserved: X, Y
delay_msec:
; Delays for almost 'A / 10' milliseconds (A * 0.099453968 msec)
; Preserved: X, Y
delay_01_msec:
; Variable delay. All calls include comment stating number of clocks
; used, including the setup code in the caller.
delay_yaNN:
; Print byte A to console as $hh
; Preserved: A, X, Y
debug_byte:
; Report "result" as number of beeps and code printed to console,
; then jump to forever.
report_final_result:
; Disable IRQ and NMI then loop endlessly.
forever: