It seems that the new .switch directive implementation, is requiring a 32 bit CPU, no matter if we are forcing .8086, which seems to be a bug.
Take a look at the following example:
.8086
mov ax, word ptr ds:[82h]
.switch ax
.case 'h-'
call ShowHelp
.break
.case 'r-'
lea dx, acReset
call PrintText
call DoReset
.break
.default
call DoIt
.break
.endswitch
UASM will report the following:
SAMPLE.ASM(14) : Warning A4130: Incompatible with segment alignment: 8
SAMPLE.ASM(14) : Warning A4130: Incompatible with segment alignment: 8
SAMPLE.ASM(14) : Error A2030: Instruction or register not accepted in current CPU mode
SAMPLE.ASM(14) : Error A2030: Instruction or register not accepted in current CPU mode
It's by design, for 32- and 64-bit only. But you don't need .switch, just use .if x ... .elseif y ... .endif. Or code your own switch macro.
As I said before ASMC support 16 bit switch
UASM is not build for a nostalgia but for advanced programming;)
Thank. .switch is working fine on ASMC.
If you are curious, take a look: http://nikkhokkho.sourceforge.net/static.php?page=UPTIME