|
- ; c64test.inc - report a test result to the repository's headless test runner (ca65).
- ;
- ; `c64 test` watches for the first store to $D7FF and treats the value as the
- ; result: 0 = pass, anything else = failure code. VICE's debug cartridge uses the
- ; same register, so `x64sc -debugcart` also exits with this code. On real hardware
- ; $D7FF is an image of an unused SID register; the store is harmless.
- ;
- ; The runner captures the screen at that moment, so print what you want checked first.
-
- C64TEST_RESULT = $D7FF
-
- ; Report success. Clobbers A.
- .macro TEST_PASS
- lda #0
- sta C64TEST_RESULT
- .endmacro
-
- ; Report failure code (1-255). Clobbers A.
- .macro TEST_FAIL code
- lda #code
- sta C64TEST_RESULT
- .endmacro
|