From 7994889213352a82c904efd06f5b82bbfdf193e7 Mon Sep 17 00:00:00 2001 From: mvax Date: Fri, 5 May 2023 19:07:14 -0400 Subject: [PATCH] add test - fix again --- test/asm/val/ismnemonic.s | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/test/asm/val/ismnemonic.s b/test/asm/val/ismnemonic.s index 438afed70..4ba74c97f 100644 --- a/test/asm/val/ismnemonic.s +++ b/test/asm/val/ismnemonic.s @@ -13,18 +13,22 @@ ; "65816" ; "sweet16" +; count any errors: +ismnemonic_error .set 0 + +; macro to test an instruction .macro test_Ismnemonic instr .if .ismnemonic(instr) ; do nothing .else - .error .sprintf(".ISMNEMONIC failed for instruction: %s", .string(instr)) + ismnemonic_error .set ismnemonic_error + 1 .endif .endmacro ; there is no instruction table for "none", make sure 'adc' (common to all CPUs) and 'add' (sweet16) doesn't match .setcpu "none" .if .ismnemonic(adc) || .ismnemonic(add) - .error ".ISMNEMONIC with CPU set to 'none' should not match any instructions." + ismnemonic_error .set ismnemonic_error + 1 .endif .setcpu "6502" @@ -806,3 +810,17 @@ test_Ismnemonic st test_Ismnemonic std test_Ismnemonic stp test_Ismnemonic sub + + .setcpu "6502" + + .import _exit + .export _main + +_main: + .if ismnemonic_error + ldx #$01 + .else + ldx #$00 + .endif + txa + jmp _exit