//
// RMAC - Renamed Macro Assembler for all Atari computers
// RMAC.C - Main Application Code
-// Copyright (C) 199x Landon Dyer, 2011-2021 Reboot and Friends
+// Copyright (C) 199x Landon Dyer, 2011-2022 Reboot and Friends
// RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
// Source utilised with the kind permission of Landon Dyer
//
int verb_flag; // Be verbose about what's going on
int m6502; // 1, assembling 6502 code
int glob_flag; // Assume undefined symbols are global
-int lsym_flag; // Include local symbols in object file
+int lsym_flag; // Include local symbols in object file (ALWAYS true)
int optim_warn_flag; // Warn about possible short branches
int prg_flag; // !=0, produce .PRG executable (2=symbols)
int prg_extend; // !=0, output extended .PRG symbols
int activefpu = FPU_NONE; // Active FPU (none by default)
int org68k_active = 0; // .org switch for 68k (only with RAW output format)
uint32_t org68k_address; // .org for 68k
+int correctMathRules; // 1, use C operator precedence in expressions
//
// Convert a string to uppercase
" -v Set verbose mode\n"
" -x Turn on debugging mode\n"
" -y[pagelen] Set page line length (default: 61)\n"
+ " -4 Use C style operator precedence\n"
"\n", cmdlnexec);
}
"| | | | | | | | (_| | (__ \n"
"|_| |_| |_| |_|\\__,_|\\___|\n"
"\nRenamed Macro Assembler\n"
- "Copyright (C) 199x Landon Dyer, 2011-2021 Reboot and Friends\n"
+ "Copyright (C) 199x Landon Dyer, 2011-2022 Reboot and Friends\n"
"V%01i.%01i.%01i %s (%s)\n\n", MAJOR, MINOR, PATCH, __DATE__, PLATFORM);
}
regtab = reg68tab; // Idem
regcheck = reg68check; // Idem
regaccept = reg68accept; // Idem
-
+ correctMathRules = 0; // respect operator precedence
// Initialize modules
InitSymbolTable(); // Symbol table
InitTokenizer(); // Tokenizer
{
switch (argv[argno][1])
{
+ case '4':
+ correctMathRules = 1;
+ break;
case 'd': // Define symbol
case 'D':
for(s=argv[argno]+2; *s!=EOS;)