Specifications
System Macros Invoked by Drivers
CASE
CASE
Generates a CASE instruction and its associated table.
Format
CASE src ,displist [,type=W] [,limit=#0] [,nmode=S^#]
Parameters
src
Source of the index value to be used with the CASE instruction.
displist
List of destinations to which control is to be dispatched, depending on the value
of the index.
[type=W]
Data type of src (B, W, or L).
[limit=#0]
Lower limit of the value of src.
[nmode=S^#]
Addressing mode used to reference the case-table entries; the default, short-literal
mode, is good for up to 63 entries.
Example
10$: CASE -
src=ITEMC,
displist=<FIRST,SECOND,THIRD,FOURTH>
This invocation of the CASE macro expands to the following code:
CASEW ITEMC,#0,S^#<<30001$-30000$>/2>-1
30000$:
.SIGNED_WORD FIRST-30000$
.SIGNED_WORD SECOND-30000$
.SIGNED_WORD THIRD-30000$
.SIGNED_WORD FOURTH-30000$
30001$:
2–6