Gen
DragOpTable:
PUBLIC PROC
RETURNS[name: DragonIFU.DragOpTable] =
TRUSTED {
iFace: AMTypes.Type = AMMiniModel.AcquireIRType["DragOpsCross.bcd"];
instX: NAT ← AMTypes.NameToIndex[iFace, "Inst"];
eVal: AMTypes.TV ← AMTypes.IndexToDefaultInitialValue[iFace, instX];
eType: AMTypes.Type ← AMTypes.UnderType[AMTypes.TVToType[eVal]];
name ← NEW[DragonIFU.DragOpTableArray ← ALL[NIL]];
FOR each: AMTypes.
TV ← AMTypes.First[eType], AMTypes.Next[each]
WHILE each #
NIL
DO
card: CARDINAL ← AMBridge.TVToCardinal[each];
dhb: Dragon.HexByte ← card MOD 256;
IF dhb # card THEN ERROR;
name[dhb] ← NIL;
name[dhb] ← AMTypes.TVToName[each ! AMTypes.Error => CONTINUE];
IF name[dhb] = NIL THEN name[dhb] ← IO.PutFR["dxop%02h", [cardinal[dhb]]];
name[dhb] ← Rope.Substr[name[dhb],1];
ENDLOOP;
};