dot-switch.md
June 3, 2026 ยท View on GitHub
Asmc Macro Assembler Reference
.SWITCH
.SWITCH [[ JMP ]] [[ C | PASCAL ]] [[ expression ]]
The switch exists in three variants:
- Structured switch (Pascal): selects exactly one branch; each .CASE directive is a closed branch.
- Unstructured switch (C, default): behaves like a C switch. Each .CASE directive is a label and the .CASE directives are not closed, so execution falls through into the next .CASE until a .ENDC statement.
- Control-table switch (no arguments): the expression of each .CASE directive is evaluated at runtime. Otherwise, similar to the unstructured switch.
The JMP option skips the range-test in the jump code.