]> Shamusworld >> Repos - rmac/blobdiff - rmac.c
Minor fix to kill unnecessary field YPOS in gpuobj in the OP assembler.
[rmac] / rmac.c
diff --git a/rmac.c b/rmac.c
index 782f97c7435826f57d033bcfe60c880335f3e402..9259d4196aef9b14edf026614d26d38ee0bfeaec 100644 (file)
--- a/rmac.c
+++ b/rmac.c
@@ -1,7 +1,7 @@
 //
 // 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
 //
@@ -30,7 +30,7 @@ int list_pag = 1;                             // Enable listing pagination by default
 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
@@ -43,9 +43,12 @@ int rgpu, rdsp;                                      // Assembling Jaguar GPU or DSP code
 int robjproc;                                  // Assembling Jaguar Object Processor code
 int dsp56001;                                  // Assembling DSP 56001 code
 int list_fd;                                   // File to write listing to
-int regbank;                                   // RISC register bank
 int segpadsize;                                        // Segment padding size
 int endian;                                            // Host processor endianess (0 = LE, 1 = BE)
+int *regbase;                                  // Points to current DFA register table (base)
+int *regtab;                                   // Points to current DFA register table (tab)
+int *regcheck;                                 // Points to current DFA register table (check)
+int *regaccept;                                        // Points to current DFA register table (accept)
 char * objfname;                               // Object filename pointer
 char * firstfname;                             // First source filename
 char * cmdlnexec;                              // Executable name, pointer to ARGV[0]
@@ -218,7 +221,7 @@ void DisplayVersion(void)
                "| |  | | | | | | (_| | (__ \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);
 }
 
@@ -285,6 +288,11 @@ int ParseOptimization(char * optstring)
        return OK;
 }
 
+extern int reg68base[53];
+extern int reg68tab[222];
+extern int reg68check[222];
+extern int reg68accept[222];
+
 //
 // Process command line arguments and do an assembly
 //
@@ -316,13 +324,16 @@ int Process(int argc, char ** argv)
        rdsp = 0;                                               // Initialize DSP assembly flag
        robjproc = 0;                                   // Initialize OP assembly flag
        lsym_flag = 1;                                  // Include local symbols in object file
-       regbank = BANK_N;                               // No RISC register bank specified
        orgactive = 0;                                  // Not in RISC org section
        orgwarning = 0;                                 // No ORG warning issued
        segpadsize = 2;                                 // Initialize segment padding size
     dsp_orgmap[0].start = 0;           // Initialize 56001 org initial address
     dsp_orgmap[0].memtype = ORG_P;     // Initialize 56001 org start segment
        m6502 = 0;                                              // 6502 mode off by default
+       regbase = reg68base;                    // Initialise DFA register tables
+       regtab = reg68tab;                              // Idem
+       regcheck = reg68check;                  // Idem
+       regaccept = reg68accept;                // Idem
 
        // Initialize modules
        InitSymbolTable();                              // Symbol table