Merge branch 'master' into c_sp
This commit is contained in:
@@ -172,6 +172,7 @@ static const struct {
|
||||
/* CAUTION: table must be sorted for bsearch */
|
||||
sizeof (InsTab6502.Ins) / sizeof (InsTab6502.Ins[0]),
|
||||
{
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "ADC", 0x080A26C, 0x60, 0, PutAll },
|
||||
{ "AND", 0x080A26C, 0x20, 0, PutAll },
|
||||
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
||||
@@ -228,6 +229,7 @@ static const struct {
|
||||
{ "TXA", 0x0000001, 0x8a, 0, PutAll },
|
||||
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
||||
{ "TYA", 0x0000001, 0x98, 0, PutAll }
|
||||
/* END SORTED.SH */
|
||||
}
|
||||
};
|
||||
|
||||
@@ -239,6 +241,7 @@ static const struct {
|
||||
/* CAUTION: table must be sorted for bsearch */
|
||||
sizeof (InsTab6502X.Ins) / sizeof (InsTab6502X.Ins[0]),
|
||||
{
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "ADC", 0x080A26C, 0x60, 0, PutAll },
|
||||
{ "ALR", 0x0800000, 0x4B, 0, PutAll }, /* X */
|
||||
{ "ANC", 0x0800000, 0x0B, 0, PutAll }, /* X */
|
||||
@@ -314,6 +317,7 @@ static const struct {
|
||||
{ "TXA", 0x0000001, 0x8a, 0, PutAll },
|
||||
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
||||
{ "TYA", 0x0000001, 0x98, 0, PutAll }
|
||||
/* END SORTED.SH */
|
||||
}
|
||||
};
|
||||
|
||||
@@ -329,6 +333,7 @@ static const struct {
|
||||
/* CAUTION: table must be sorted for bsearch */
|
||||
sizeof (InsTab6502DTV.Ins) / sizeof (InsTab6502DTV.Ins[0]),
|
||||
{
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "ADC", 0x080A26C, 0x60, 0, PutAll },
|
||||
{ "ALR", 0x0800000, 0x4B, 0, PutAll }, /* X */
|
||||
{ "ANC", 0x0800000, 0x0B, 0, PutAll }, /* X */
|
||||
@@ -400,6 +405,7 @@ static const struct {
|
||||
{ "TXA", 0x0000001, 0x8a, 0, PutAll },
|
||||
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
||||
{ "TYA", 0x0000001, 0x98, 0, PutAll }
|
||||
/* END SORTED.SH */
|
||||
}
|
||||
};
|
||||
|
||||
@@ -411,6 +417,7 @@ static const struct {
|
||||
/* CAUTION: table must be sorted for bsearch */
|
||||
sizeof (InsTab65SC02.Ins) / sizeof (InsTab65SC02.Ins[0]),
|
||||
{
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "ADC", 0x080A66C, 0x60, 0, PutAll },
|
||||
{ "AND", 0x080A66C, 0x20, 0, PutAll },
|
||||
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
||||
@@ -477,6 +484,7 @@ static const struct {
|
||||
{ "TXA", 0x0000001, 0x8a, 0, PutAll },
|
||||
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
||||
{ "TYA", 0x0000001, 0x98, 0, PutAll }
|
||||
/* END SORTED.SH */
|
||||
}
|
||||
};
|
||||
|
||||
@@ -488,6 +496,7 @@ static const struct {
|
||||
/* CAUTION: table must be sorted for bsearch */
|
||||
sizeof (InsTab65C02.Ins) / sizeof (InsTab65C02.Ins[0]),
|
||||
{
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "ADC", 0x080A66C, 0x60, 0, PutAll },
|
||||
{ "AND", 0x080A66C, 0x20, 0, PutAll },
|
||||
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
||||
@@ -588,6 +597,7 @@ static const struct {
|
||||
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
||||
{ "TYA", 0x0000001, 0x98, 0, PutAll },
|
||||
{ "WAI", 0x0000001, 0xcb, 0, PutAll }
|
||||
/* END SORTED.SH */
|
||||
}
|
||||
};
|
||||
|
||||
@@ -599,6 +609,7 @@ static const struct {
|
||||
/* CAUTION: table must be sorted for bsearch */
|
||||
sizeof (InsTab4510.Ins) / sizeof (InsTab4510.Ins[0]),
|
||||
{
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "ADC", 0x080A66C, 0x60, 0, PutAll },
|
||||
{ "AND", 0x080A66C, 0x20, 0, PutAll },
|
||||
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
||||
@@ -732,6 +743,7 @@ static const struct {
|
||||
{ "TYA", 0x0000001, 0x98, 0, PutAll },
|
||||
{ "TYS", 0x0000001, 0x2b, 0, PutAll },
|
||||
{ "TZA", 0x0000001, 0x6b, 0, PutAll },
|
||||
/* END SORTED.SH */
|
||||
}
|
||||
};
|
||||
|
||||
@@ -743,6 +755,7 @@ static const struct {
|
||||
/* CAUTION: table must be sorted for bsearch */
|
||||
sizeof (InsTab65816.Ins) / sizeof (InsTab65816.Ins[0]),
|
||||
{
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "ADC", 0x0b8f6fc, 0x60, 0, PutAll },
|
||||
{ "AND", 0x0b8f6fc, 0x20, 0, PutAll },
|
||||
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
||||
@@ -843,6 +856,7 @@ static const struct {
|
||||
{ "WDM", 0x0800004, 0x42, 6, PutAll },
|
||||
{ "XBA", 0x0000001, 0xeb, 0, PutAll },
|
||||
{ "XCE", 0x0000001, 0xfb, 0, PutAll }
|
||||
/* END SORTED.SH */
|
||||
}
|
||||
};
|
||||
|
||||
@@ -854,6 +868,7 @@ static const struct {
|
||||
/* CAUTION: table must be sorted for bsearch */
|
||||
sizeof (InsTabSweet16.Ins) / sizeof (InsTabSweet16.Ins[0]),
|
||||
{
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "ADD", AMSW16_REG, 0xA0, 0, PutSweet16 },
|
||||
{ "BC", AMSW16_BRA, 0x03, 0, PutSweet16Branch },
|
||||
{ "BK", AMSW16_IMP, 0x0A, 0, PutSweet16 },
|
||||
@@ -880,6 +895,7 @@ static const struct {
|
||||
{ "STD", AMSW16_IND, 0x70, 0, PutSweet16 },
|
||||
{ "STP", AMSW16_IND, 0x90, 0, PutSweet16 },
|
||||
{ "SUB", AMSW16_REG, 0xB0, 0, PutSweet16 },
|
||||
/* END SORTED.SH */
|
||||
}
|
||||
};
|
||||
|
||||
@@ -891,6 +907,7 @@ static const struct {
|
||||
/* CAUTION: table must be sorted for bsearch */
|
||||
sizeof (InsTabHuC6280.Ins) / sizeof (InsTabHuC6280.Ins[0]),
|
||||
{
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "ADC", 0x080A66C, 0x60, 0, PutAll },
|
||||
{ "AND", 0x080A66C, 0x20, 0, PutAll },
|
||||
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
||||
@@ -1026,6 +1043,7 @@ static const struct {
|
||||
{ "TXA", 0x0000001, 0x8a, 0, PutAll },
|
||||
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
||||
{ "TYA", 0x0000001, 0x98, 0, PutAll }
|
||||
/* END SORTED.SH */
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -350,6 +350,10 @@ static void SetSys (const char* Sys)
|
||||
NewSymbol ("__RP6502__", 1);
|
||||
break;
|
||||
|
||||
case TGT_AGAT:
|
||||
NewSymbol ("__AGAT__", 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
AbEnd ("Invalid target name: '%s'", Sys);
|
||||
|
||||
|
||||
@@ -136,6 +136,7 @@ struct DotKeyword {
|
||||
const char* Key; /* MUST be first field */
|
||||
token_t Tok;
|
||||
} DotKeywords [] = {
|
||||
/* BEGIN SORTED.SH */
|
||||
{ ".A16", TOK_A16 },
|
||||
{ ".A8", TOK_A8 },
|
||||
{ ".ADDR", TOK_ADDR },
|
||||
@@ -307,6 +308,7 @@ struct DotKeyword {
|
||||
{ ".XMATCH", TOK_XMATCH },
|
||||
{ ".XOR", TOK_BOOLXOR },
|
||||
{ ".ZEROPAGE", TOK_ZEROPAGE },
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -92,6 +92,7 @@ struct FuncInfo {
|
||||
*/
|
||||
/* CAUTION: table must be sorted for bsearch */
|
||||
static const FuncInfo FuncInfoTable[] = {
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "addeq0sp", SLV_TOP | REG_AX, PSTATE_ALL | REG_AXY },
|
||||
{ "addeqysp", SLV_IND | REG_AXY, PSTATE_ALL | REG_AXY },
|
||||
{ "addysp", REG_SP | REG_Y, PSTATE_ALL | REG_SP },
|
||||
@@ -377,12 +378,14 @@ static const FuncInfo FuncInfoTable[] = {
|
||||
{ "tosxoreax", SLV_TOP | REG_EAX, PSTATE_ALL | REG_SP | REG_EAXY | REG_TMP1 },
|
||||
{ "tsteax", REG_EAX, PSTATE_ALL | REG_Y },
|
||||
{ "utsteax", REG_EAX, PSTATE_ALL | REG_Y },
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
#define FuncInfoCount (sizeof(FuncInfoTable) / sizeof(FuncInfoTable[0]))
|
||||
|
||||
/* Table with names of zero page locations used by the compiler */
|
||||
/* CAUTION: table must be sorted for bsearch */
|
||||
static const ZPInfo ZPInfoTable[] = {
|
||||
/* BEGIN SORTED.SH */
|
||||
{ 0, "c_sp", 2, REG_SP_LO, REG_SP },
|
||||
{ 0, "c_sp+1", 1, REG_SP_HI, REG_SP },
|
||||
{ 0, "ptr1", 2, REG_PTR1_LO, REG_PTR1 },
|
||||
@@ -400,6 +403,7 @@ static const ZPInfo ZPInfoTable[] = {
|
||||
{ 0, "tmp2", 1, REG_NONE, REG_NONE },
|
||||
{ 0, "tmp3", 1, REG_NONE, REG_NONE },
|
||||
{ 0, "tmp4", 1, REG_NONE, REG_NONE },
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
#define ZPInfoCount (sizeof(ZPInfoTable) / sizeof(ZPInfoTable[0]))
|
||||
|
||||
|
||||
@@ -103,6 +103,7 @@ struct OptFunc {
|
||||
|
||||
/* A list of all the function descriptions */
|
||||
/* CAUTION: should be sorted by "name" */
|
||||
/* BEGIN DECL SORTED_CODEOPT.SH */
|
||||
static OptFunc DOpt65C02BitOps = { Opt65C02BitOps, "Opt65C02BitOps", 66, 0, 0, 0, 0, 0 };
|
||||
static OptFunc DOpt65C02Ind = { Opt65C02Ind, "Opt65C02Ind", 100, 0, 0, 0, 0, 0 };
|
||||
static OptFunc DOpt65C02Stores = { Opt65C02Stores, "Opt65C02Stores", 100, 0, 0, 0, 0, 0 };
|
||||
@@ -215,11 +216,13 @@ static OptFunc DOptTransfers3 = { OptTransfers3, "OptTransfers3", 65, 0,
|
||||
static OptFunc DOptTransfers4 = { OptTransfers4, "OptTransfers4", 65, 0, 0, 0, 0, 0 };
|
||||
static OptFunc DOptUnusedLoads = { OptUnusedLoads, "OptUnusedLoads", 0, 0, 0, 0, 0, 0 };
|
||||
static OptFunc DOptUnusedStores = { OptUnusedStores, "OptUnusedStores", 0, 0, 0, 0, 0, 0 };
|
||||
/* END DECL SORTED_CODEOPT.SH */
|
||||
|
||||
|
||||
/* Table containing all the steps in alphabetical order */
|
||||
/* CAUTION: table must be sorted for bsearch */
|
||||
static OptFunc* OptFuncs[] = {
|
||||
/* BEGIN SORTED_CODEOPT.SH */
|
||||
&DOpt65C02BitOps,
|
||||
&DOpt65C02Ind,
|
||||
&DOpt65C02Stores,
|
||||
@@ -332,6 +335,7 @@ static OptFunc* OptFuncs[] = {
|
||||
&DOptTransfers4,
|
||||
&DOptUnusedLoads,
|
||||
&DOptUnusedStores,
|
||||
/* END SORTED_CODEOPT.SH */
|
||||
};
|
||||
#define OPTFUNC_COUNT (sizeof(OptFuncs) / sizeof(OptFuncs[0]))
|
||||
|
||||
|
||||
@@ -1227,7 +1227,9 @@ static int CmpHarmless (const void* Key, const void* Entry)
|
||||
|
||||
/* CAUTION: table must be sorted for bsearch */
|
||||
static const char* const Tab[] = {
|
||||
/* BEGIN SORTED.SH */
|
||||
"_abs",
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
|
||||
int HarmlessCall (const CodeEntry* E, int PushedBytes)
|
||||
|
||||
@@ -1466,6 +1466,7 @@ static unsigned Opt_a_tosxor (StackOpData* D)
|
||||
|
||||
/* CAUTION: table must be sorted for bsearch */
|
||||
static const OptFuncDesc FuncTable[] = {
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "___bzero", Opt___bzero, REG_NONE, OP_X_ZERO | OP_A_KNOWN },
|
||||
{ "staspidx", Opt_staspidx, REG_NONE, OP_NONE },
|
||||
{ "staxspidx", Opt_staxspidx, REG_AX, OP_NONE },
|
||||
@@ -1486,10 +1487,12 @@ static const OptFuncDesc FuncTable[] = {
|
||||
{ "tosuleax", Opt_tosuleax, REG_NONE, OP_RHS_REMOVE_DIRECT | OP_RHS_LOAD_DIRECT },
|
||||
{ "tosultax", Opt_tosultax, REG_NONE, OP_RHS_REMOVE_DIRECT | OP_RHS_LOAD_DIRECT },
|
||||
{ "tosxorax", Opt_tosxorax, REG_NONE, OP_NONE },
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
|
||||
/* CAUTION: table must be sorted for bsearch */
|
||||
static const OptFuncDesc FuncRegATable[] = {
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "tosandax", Opt_a_tosand, REG_NONE, OP_RHS_REMOVE_DIRECT | OP_RHS_LOAD_DIRECT },
|
||||
{ "toseqax", Opt_a_toseq, REG_NONE, OP_NONE },
|
||||
{ "tosgeax", Opt_a_tosuge, REG_NONE, OP_NONE },
|
||||
@@ -1505,6 +1508,7 @@ static const OptFuncDesc FuncRegATable[] = {
|
||||
{ "tosuleax", Opt_a_tosule, REG_NONE, OP_NONE },
|
||||
{ "tosultax", Opt_a_tosult, REG_NONE, OP_NONE },
|
||||
{ "tosxorax", Opt_a_tosxor, REG_NONE, OP_RHS_REMOVE_DIRECT | OP_RHS_LOAD_DIRECT },
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
|
||||
#define FUNC_COUNT(Table) (sizeof(Table) / sizeof(Table[0]))
|
||||
|
||||
@@ -307,6 +307,10 @@ static void SetSys (const char* Sys)
|
||||
DefineNumericMacro ("__RP6502__", 1);
|
||||
break;
|
||||
|
||||
case TGT_AGAT:
|
||||
DefineNumericMacro ("__AGAT__", 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
AbEnd ("Unknown target system '%s'", Sys);
|
||||
}
|
||||
|
||||
@@ -59,6 +59,8 @@
|
||||
const OPCDesc OPCTable[OP65_COUNT] = {
|
||||
|
||||
/* 65XX opcodes */
|
||||
|
||||
/* BEGIN SORTED_OPCODES.SH */
|
||||
{ OP65_ADC, /* opcode */
|
||||
"adc", /* mnemonic */
|
||||
0, /* size */
|
||||
@@ -587,6 +589,7 @@ const OPCDesc OPCTable[OP65_COUNT] = {
|
||||
REG_Y, /* use */
|
||||
REG_A | PSTATE_ZN /* chg */
|
||||
},
|
||||
/* END SORTED_OPCODES.SH */
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -94,6 +94,7 @@ static const struct Pragma {
|
||||
const char* Key; /* Keyword */
|
||||
pragma_t Tok; /* Token */
|
||||
} Pragmas[] = {
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "align", PRAGMA_ALIGN },
|
||||
{ "allow-eager-inline", PRAGMA_ALLOW_EAGER_INLINE },
|
||||
{ "allow_eager_inline", PRAGMA_ALLOW_EAGER_INLINE },
|
||||
@@ -128,6 +129,7 @@ static const struct Pragma {
|
||||
{ "writable-strings", PRAGMA_WRITABLE_STRINGS },
|
||||
{ "writable_strings", PRAGMA_WRITABLE_STRINGS },
|
||||
{ "zpsym", PRAGMA_ZPSYM },
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
#define PRAGMA_COUNT (sizeof (Pragmas) / sizeof (Pragmas[0]))
|
||||
|
||||
|
||||
@@ -221,6 +221,7 @@ static const struct PPDType {
|
||||
const char* Tok; /* Token */
|
||||
ppdirective_t Type; /* Type */
|
||||
} PPDTypes[] = {
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "define", PPD_DEFINE },
|
||||
{ "elif", PPD_ELIF },
|
||||
{ "else", PPD_ELSE },
|
||||
@@ -234,6 +235,7 @@ static const struct PPDType {
|
||||
{ "pragma", PPD_PRAGMA },
|
||||
{ "undef", PPD_UNDEF },
|
||||
{ "warning", PPD_WARNING },
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
|
||||
/* Number of preprocessor directive types */
|
||||
|
||||
@@ -93,6 +93,7 @@ static const struct Keyword {
|
||||
unsigned char Tok; /* The token */
|
||||
unsigned char Std; /* Token supported in which standards? */
|
||||
} Keywords [] = {
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "_Pragma", TOK_PRAGMA, TT_C89 | TT_C99 | TT_CC65 }, /* !! */
|
||||
{ "_Static_assert", TOK_STATIC_ASSERT, TT_CC65 }, /* C11 */
|
||||
{ "__AX__", TOK_AX, TT_C89 | TT_C99 | TT_CC65 },
|
||||
@@ -146,6 +147,7 @@ static const struct Keyword {
|
||||
{ "void", TOK_VOID, TT_C89 | TT_C99 | TT_CC65 },
|
||||
{ "volatile", TOK_VOLATILE, TT_C89 | TT_C99 | TT_CC65 },
|
||||
{ "while", TOK_WHILE, TT_C89 | TT_C99 | TT_CC65 },
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
#define KEY_COUNT (sizeof (Keywords) / sizeof (Keywords [0]))
|
||||
|
||||
|
||||
@@ -85,11 +85,13 @@ static struct StdFuncDesc {
|
||||
const char* Name;
|
||||
void (*Handler) (FuncDesc*, ExprDesc*);
|
||||
} StdFuncs[] = {
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "memcpy", StdFunc_memcpy },
|
||||
{ "memset", StdFunc_memset },
|
||||
{ "strcmp", StdFunc_strcmp },
|
||||
{ "strcpy", StdFunc_strcpy },
|
||||
{ "strlen", StdFunc_strlen },
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
#define FUNC_COUNT (sizeof (StdFuncs) / sizeof (StdFuncs[0]))
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
/* CAUTION: table must be sorted for bsearch */
|
||||
static const FileId TypeTable[] = {
|
||||
/* Upper case stuff for obsolete operating systems */
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "A", FILETYPE_LIB },
|
||||
{ "A65", FILETYPE_ASM },
|
||||
{ "ASM", FILETYPE_ASM },
|
||||
@@ -66,7 +67,6 @@ static const FileId TypeTable[] = {
|
||||
{ "S", FILETYPE_ASM },
|
||||
{ "SER", FILETYPE_O65 },
|
||||
{ "TGI", FILETYPE_O65 },
|
||||
|
||||
{ "a", FILETYPE_LIB },
|
||||
{ "a65", FILETYPE_ASM },
|
||||
{ "asm", FILETYPE_ASM },
|
||||
@@ -82,6 +82,7 @@ static const FileId TypeTable[] = {
|
||||
{ "s", FILETYPE_ASM },
|
||||
{ "ser", FILETYPE_O65 },
|
||||
{ "tgi", FILETYPE_O65 },
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
|
||||
#define FILETYPE_COUNT (sizeof (TypeTable) / sizeof (TypeTable[0]))
|
||||
|
||||
@@ -156,15 +156,22 @@ char* MakeTmpFilename (const char *Directory, const char *Origin, const char* Ex
|
||||
{
|
||||
char* Out;
|
||||
size_t Len = 0;
|
||||
static unsigned int Counter = 0;
|
||||
|
||||
/* Allocate template */
|
||||
/* Allocate enough for the directory, ... */
|
||||
if (Directory != NULL) {
|
||||
Len = strlen (Directory);
|
||||
}
|
||||
Len += strlen (Origin) + strlen (".2147483648") + strlen (Ext) + 1;
|
||||
|
||||
/* ... plus the the original name, the maximum length of the PID, the
|
||||
* maximum length of the counter, the extension, and the terminator.
|
||||
*/
|
||||
Len += strlen (Origin) + (strlen (".2147483648") * 2) + strlen (Ext) + 1;
|
||||
Out = xmalloc (Len);
|
||||
|
||||
snprintf (Out, Len, "%s%s.%u%s", (Directory != NULL ? Directory : ""),
|
||||
FindName(Origin), getpid(), Ext);
|
||||
snprintf (Out, Len, "%s%s.%u%u%s", (Directory != NULL ? Directory : ""),
|
||||
FindName(Origin), getpid(), Counter, Ext);
|
||||
Counter++;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -129,7 +129,25 @@ static const unsigned char CTPET[256] = {
|
||||
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,
|
||||
};
|
||||
|
||||
|
||||
/* Translation table KOI8-R -> Agat-9 */
|
||||
static unsigned char CTAgat[256] = {
|
||||
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
|
||||
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
|
||||
0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
|
||||
0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
|
||||
0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
|
||||
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
|
||||
0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
|
||||
0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0xA0,
|
||||
0x1B,0x5C,0x10,0x12,0x1D,0x1F,0x13,0x1C,0x11,0x1E,0x14,0xA0,0x02,0x5F,0xA0,0xA0,
|
||||
0xA0,0xA0,0xA0,0xA0,0xA0,0x9E,0x04,0xA0,0x3C,0x3E,0xA0,0xA0,0x30,0x32,0xA0,0x2F,
|
||||
0xA0,0xA0,0xA0,0x0F,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
|
||||
0xA0,0xA0,0xA0,0x9F,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
|
||||
0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
|
||||
0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
|
||||
0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
|
||||
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,
|
||||
};
|
||||
|
||||
/* One entry in the target map */
|
||||
typedef struct TargetEntry TargetEntry;
|
||||
@@ -143,6 +161,8 @@ struct TargetEntry {
|
||||
** CAUTION: must be alphabetically for bsearch().
|
||||
*/
|
||||
static const TargetEntry TargetMap[] = {
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "agat", TGT_AGAT },
|
||||
{ "apple2", TGT_APPLE2 },
|
||||
{ "apple2enh", TGT_APPLE2ENH },
|
||||
{ "atari", TGT_ATARI },
|
||||
@@ -181,6 +201,7 @@ static const TargetEntry TargetMap[] = {
|
||||
{ "sym1", TGT_SYM1 },
|
||||
{ "telestrat", TGT_TELESTRAT },
|
||||
{ "vic20", TGT_VIC20 },
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
#define MAP_ENTRY_COUNT (sizeof (TargetMap) / sizeof (TargetMap[0]))
|
||||
|
||||
@@ -224,6 +245,7 @@ static const TargetProperties PropertyTable[TGT_COUNT] = {
|
||||
{ "sym1", CPU_6502, BINFMT_BINARY, CTNone },
|
||||
{ "kim1", CPU_6502, BINFMT_BINARY, CTNone },
|
||||
{ "rp6502", CPU_65C02, BINFMT_BINARY, CTNone },
|
||||
{ "agat", CPU_6502, BINFMT_BINARY, CTAgat },
|
||||
};
|
||||
|
||||
/* Target system */
|
||||
|
||||
@@ -89,6 +89,7 @@ typedef enum {
|
||||
TGT_SYM1,
|
||||
TGT_KIM1,
|
||||
TGT_RP6502,
|
||||
TGT_AGAT,
|
||||
TGT_COUNT /* Number of target systems */
|
||||
} target_t;
|
||||
|
||||
|
||||
@@ -2531,6 +2531,7 @@ static void NextToken (InputData* D)
|
||||
const char Keyword[12];
|
||||
Token Tok;
|
||||
} KeywordTable[] = {
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "abs", TOK_ABSOLUTE },
|
||||
{ "addrsize", TOK_ADDRSIZE },
|
||||
{ "auto", TOK_AUTO },
|
||||
@@ -2579,6 +2580,7 @@ static void NextToken (InputData* D)
|
||||
{ "var", TOK_VAR },
|
||||
{ "version", TOK_VERSION },
|
||||
{ "zp", TOK_ZEROPAGE },
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -64,12 +64,14 @@ struct ConverterMapEntry {
|
||||
/* Converter table */
|
||||
/* CAUTION: table must be alphabetically sorted for bsearch */
|
||||
static const ConverterMapEntry ConverterMap[] = {
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "geos-bitmap", GenGeosBitmap },
|
||||
{ "geos-icon", GenGeosIcon },
|
||||
{ "koala", GenKoala },
|
||||
{ "lynx-sprite", GenLynxSprite },
|
||||
{ "raw", GenRaw },
|
||||
{ "vic2-sprite", GenVic2Sprite },
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -73,9 +73,10 @@ static InputFormatDesc InputFormatTable[ifCount] = {
|
||||
/* CAUTION: table must be alphabetically sorted for bsearch */
|
||||
static const FileId FormatTable[] = {
|
||||
/* Upper case stuff for obsolete operating systems */
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "PCX", ifPCX },
|
||||
|
||||
{ "pcx", ifPCX },
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -82,19 +82,20 @@ static OutputFormatDesc OutputFormatTable[ofCount] = {
|
||||
/* CAUTION: table must be alphabetically sorted for bsearch */
|
||||
static const FileId FormatTable[] = {
|
||||
/* Upper case stuff for obsolete operating systems */
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "A", ofAsm },
|
||||
{ "ASM", ofAsm },
|
||||
{ "BIN", ofBin },
|
||||
{ "C", ofC },
|
||||
{ "INC", ofAsm },
|
||||
{ "S", ofAsm },
|
||||
|
||||
{ "a", ofAsm },
|
||||
{ "asm", ofAsm },
|
||||
{ "bin", ofBin },
|
||||
{ "c", ofC },
|
||||
{ "inc", ofAsm },
|
||||
{ "s", ofAsm },
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -59,7 +59,9 @@ struct PaletteMapEntry {
|
||||
/* Converter table */
|
||||
/* CAUTION: table must be alphabetically sorted for bsearch */
|
||||
static const PaletteMapEntry PaletteMap[] = {
|
||||
/* BEGIN SORTED.SH */
|
||||
{ "lynx-palette", GenLynxPalette },
|
||||
/* END SORTED.SH */
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user