package main

// TODO -- these are Level 2.   TODO: Level 1.

// HINT -- ~/coco-shelf/nitros9/level2/coco3/modules$ g 'Symbol: E[$]' ioman.map | awk '{print "0x" $5 ": `" $2 "`," }' | sort > ~/coco-shelf/tfr9/v2/os9api/os9err.go

var Os9ApiErrorNames = map[byte]string{
	0x000A: `E$UnkSym`,
	0x000B: `E$ExcVrb`,
	0x000C: `E$IllStC`,
	0x000D: `E$ICOvf`,
	0x000E: `E$IChRef`,
	0x000F: `E$IllMod`,
	0x0010: `E$IllNum`,
	0x0011: `E$IllPrf`,
	0x0012: `E$IllOpd`,
	0x0013: `E$IllOpr`,
	0x0014: `E$IllRFN`,
	0x0015: `E$IllDim`,
	0x0016: `E$IllLit`,
	0x0017: `E$IllRet`,
	0x0018: `E$IllSfx`,
	0x0019: `E$DimLrg`,
	0x001A: `E$LinLrg`,
	0x001B: `E$NoAssg`,
	0x001C: `E$NoPath`,
	0x001D: `E$NoComa`,
	0x001E: `E$NoDim`,
	0x001F: `E$NoDO`,
	0x0020: `E$MFull`,
	0x0021: `E$NoGoto`,
	0x0022: `E$NoLPar`,
	0x0023: `E$NoLRef`,
	0x0024: `E$NoOprd`,
	0x0025: `E$NoRPar`,
	0x0026: `E$NoTHEN`,
	0x0027: `E$NoTO`,
	0x0028: `E$NoVRef`,
	0x0029: `E$EndQou`,
	0x002A: `E$SubLrg`,
	0x002B: `E$UnkPrc`,
	0x002C: `E$MulPrc`,
	0x002D: `E$DivZer`,
	0x002E: `E$TypMis`,
	0x002F: `E$StrOvf`,
	0x0030: `E$NoRout`,
	0x0031: `E$UndVar`,
	0x0032: `E$FltOvf`,
	0x0033: `E$LnComp`,
	0x0034: `E$ValRng`,
	0x0035: `E$SubOvf`,
	0x0036: `E$SubUnd`,
	0x0037: `E$SubRng`,
	0x0038: `E$ParmEr`,
	0x0039: `E$SysOvf`,
	0x003A: `E$IOMism`,
	0x003B: `E$IONum`,
	0x003C: `E$IOConv`,
	0x003D: `E$IllInp`,
	0x003E: `E$IOFRpt`,
	0x003F: `E$IOFSyn`,
	0x0040: `E$IllPNm`,
	0x0041: `E$WrSub`,
	0x0042: `E$NonRcO`,
	0x0043: `E$IllA`,
	0x0044: `E$IllCnt`,
	0x0045: `E$UnmCnt`,
	0x0046: `E$IllFOR`,
	0x0047: `E$IllExp`,
	0x0048: `E$IllDec`,
	0x0049: `E$ArrOvf`,
	0x004A: `E$UndLin`,
	0x004B: `E$MltLin`,
	0x004C: `E$MltVar`,
	0x004D: `E$IllIVr`,
	0x004E: `E$SeekRg`,
	0x004F: `E$NoData`,
	0x00B7: `E$IWTyp`,
	0x00B8: `E$WADef`,
	0x00B9: `E$NFont`,
	0x00BA: `E$StkOvf`,
	0x00BB: `E$IllArg`,
	0x00BD: `E$ICoord`,
	0x00BE: `E$Bug`,
	0x00BF: `E$BufSiz`,
	0x00C0: `E$IllCmd`,
	0x00C1: `E$TblFul`,
	0x00C2: `E$BadBuf`,
	0x00C3: `E$IWDef`,
	0x00C4: `E$WUndef`,
	0x00C5: `E$Up`,
	0x00C6: `E$Dn`,
	0x00C7: `E$Alias`,
	0x00C8: `E$PthFul`,
	0x00C9: `E$BPNum`,
	0x00CA: `E$Poll`,
	0x00CB: `E$BMode`,
	0x00CC: `E$DevOvf`,
	0x00CD: `E$BMID`,
	0x00CE: `E$DirFul`,
	0x00CF: `E$MemFul`,
	0x00D0: `E$UnkSvc`,
	0x00D1: `E$ModBsy`,
	0x00D2: `E$BPAddr`,
	0x00D3: `E$EOF`,
	0x00D5: `E$NES`,
	0x00D6: `E$FNA`,
	0x00D7: `E$BPNam`,
	0x00D8: `E$PNNF`,
	0x00D9: `E$SLF`,
	0x00DA: `E$CEF`,
	0x00DB: `E$IBA`,
	0x00DC: `E$HangUp`,
	0x00DD: `E$MNF`,
	0x00DF: `E$DelSP`,
	0x00E0: `E$xPrcID`,
	0x00E2: `E$NoChld`,
	0x00E3: `E$ISWI`,
	0x00E4: `E$PrcAbt`,
	0x00E5: `E$PrcFul`,
	0x00E6: `E$IForkP`,
	0x00E7: `E$KwnMod`,
	0x00E8: `E$BMCRC`,
	0x00E9: `E$USigP`,
	0x00EA: `E$NEMod`,
	0x00EB: `E$BNam`,
	0x00EC: `E$BMHP`,
	0x00ED: `E$NoRAM`,
	0x00EE: `E$DNE`,
	0x00EF: `E$NoTask`,
	0x00F0: `E$Unit`,
	0x00F1: `E$Sect`,
	0x00F2: `E$WP`,
	0x00F3: `E$CRC`,
	0x00F4: `E$Read`,
	0x00F5: `E$Write`,
	0x00F6: `E$NotRdy`,
	0x00F7: `E$Seek`,
	0x00F8: `E$Full`,
	0x00F9: `E$BTyp`,
	0x00FA: `E$DevBsy`,
	0x00FB: `E$DIDC`,
	0x00FC: `E$Lock`,
	0x00FD: `E$Share`,
	0x00FE: `E$DeadLk`,
}

// HINT: awk '/^[0-9]/ { n=$1; shift; shift; shift; printf "%d: \"%s\",\n", n, $0 }' <  /usr/local/bin/error
var Os9ApiErrorDescription = map[byte]string{
	10:  "   Unknown symbol",
	11:  "   Excessive verbage",
	12:  "   Illegal statement construction",
	13:  "   I-code overflow",
	14:  "   Illegal channel reference",
	15:  "   Illegal mode",
	16:  "   Illegal number",
	17:  "   Illegal prefix",
	18:  "   Illegal operand",
	19:  "   Illegal operator",
	20:  "   Illegal record field name",
	21:  "   Illegal dimension",
	22:  "   Illegal literal",
	23:  "   Illegal relational",
	24:  "   Illegal type suffix",
	25:  "   Dimension too large",
	26:  "   Line number too large",
	27:  "   Missing assignment statement",
	28:  "   Missing path number",
	29:  "   Missing coma",
	30:  "   Missing dimension",
	31:  "   Missing DO statement",
	32:  "   Memory full",
	33:  "   Missing GOTO",
	34:  "   Missing left parenthesis",
	35:  "   Missing line reference",
	36:  "   Missing operand",
	37:  "   Missing right parenthesis",
	38:  "   Missing THEN statement",
	39:  "   Missing TO statement",
	40:  "   Missing variable reference",
	41:  "   Missing end quote",
	42:  "   Too many subscripts",
	43:  "   Unknown procedure",
	44:  "   Multiply defined procedure",
	45:  "   Divice by zero",
	46:  "   Operand type mismatch",
	47:  "   String stack overflow",
	48:  "   Unimplemented routine",
	49:  "   Undefined variable",
	50:  "   Floating Overflow",
	51:  "   Line with compiler error",
	52:  "   Value out of range for destination",
	53:  "   Subroutine stack overflow",
	54:  "   Subroutine stack underflow",
	55:  "   Subscript out of range",
	56:  "   Paraemter error",
	57:  "   System stack overflow",
	58:  "   I/O type mismatch",
	59:  "   I/O numeric input format bad",
	60:  "   I/O conversion: number out of range",
	61:  "   Illegal input format",
	62:  "   I/O format repeat error",
	63:  "   I/O format syntax error",
	64:  "   Illegal path number",
	65:  "   Wrong number of subscripts",
	66:  "   Non-record type operand",
	67:  "   Illegal argument",
	68:  "   Illegal control structure",
	69:  "   Unmatched control structure",
	70:  "   Illegal FOR variable",
	71:  "   Illegal expression type",
	72:  "   Illegal declarative statement",
	73:  "   Array size overflow",
	74:  "   Undefined line number",
	75:  "   Multiply defined line number",
	76:  "   Multiply defined variable",
	77:  "   Illegal input variable",
	78:  "   Seek out of range",
	79:  "   Missing data statement",
	183: "    Illegal window type",
	184: "    Window already defined",
	185: "    Font not found",
	186: "    Stack overflow",
	187: "    Illegal argument",
	189: "    Illegal coordinates",
	190: "    Bug (should never be returned)",
	191: "    Buffer size is too small",
	192: "    Illegal command",
	193: "    Screen or window table is full",
	194: "    Bad/Undefined buffer number",
	195: "    Illegal window definition",
	196: "    Window undefined",
	197: "    Up arrow pressed on SCF I$ReadLn with PD.UP enabled",
	198: "    Down arrow pressed on SCF I$ReadLn with PD.DOWN enabled",
	199: "    Alias?",
	200: "    Path Table full",
	201: "    Bad Path Number",
	202: "    Polling Table Full",
	203: "    Bad Mode",
	204: "    Device Table Overflow",
	205: "    Bad Module ID",
	206: "    Module Directory Full",
	207: "    Process Memory Full",
	208: "    Unknown Service Code",
	209: "    Module Busy",
	210: "    Bad Page Address",
	211: "    End of File",
	213: "    Non-Existing Segment",
	214: "    File Not Accesible",
	215: "    Bad Path Name",
	216: "    Path Name Not Found",
	217: "    Segment List Full",
	218: "    Creating Existing File",
	219: "    Illegal Block Address",
	220: "    Carrier Detect Lost",
	221: "    Module Not Found",
	223: "    Deleting Stack Pointer memory",
	224: "    Illegal Process ID",
	226: "    No Children",
	227: "    Illegal SWI code",
	228: "    Process Aborted",
	229: "    Process Table Full",
	230: "    Illegal Fork Parameter",
	231: "    Known Module",
	232: "    Bad Module CRC",
	233: "    Unprocessed Signal Pending",
	234: "    Non Existing Module",
	235: "    Bad Name",
	236: "    (bad module header parity)",
	237: "    No (System) RAM Available",
	238: "    Directory not empty",
	239: "    No available Task number",
	240: "    Illegal Unit (drive)",
	241: "    Bad Sector number",
	242: "    Write Protect",
	243: "    Bad Check Sum",
	244: "    Read Error",
	245: "    Write Error",
	246: "    Device Not Ready",
	247: "    Seek Error",
	248: "    Media Full",
	249: "    Bad Type (incompatable) media",
	250: "    Device Busy",
	251: "    Disk ID Change",
	252: "    Record is busy (locked out)",
	253: "    Non-sharable file busy",
	254: "    I/O Deadlock error",
}
