X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=rmac.c;h=9afb10a7cec5fe4714ce55e054cc30a062b16ced;hp=56ff27f014c685f6bb1a4d82d8ec10ce5013786a;hb=94655b0579354d34d57a743eaeef6ad8d988a787;hpb=49cce96fba11282e4244187f15be418d5ae5bb8d diff --git a/rmac.c b/rmac.c index 56ff27f..9afb10a 100644 --- a/rmac.c +++ b/rmac.c @@ -37,7 +37,6 @@ int rgpu, rdsp; // Assembling Jaguar GPU or DSP code int list_fd; // File to write listing to int regbank; // RISC register bank int segpadsize; // Segment padding size -int in_main; // In main memory flag for GPUMAIN int endian; // Host processor endianess char * objfname; // Object filename pointer char * firstfname; // First source filename @@ -560,20 +559,19 @@ int process(int argc, char ** argv) orgwarning = 0; // No ORG warning issued a_amount = 0; segpadsize = 2; // Initialise segment padding size - in_main = 0; // Initialise modules - init_sym(); // Symbol table + InitSymbolTable(); // Symbol table init_token(); // Tokenizer init_procln(); // Line processor init_expr(); // Expression analyzer init_sect(); // Section manager / code generator init_mark(); // Mark tape-recorder - init_macro(); // Macro processor + InitMacro(); // Macro processor init_list(); // Listing generator // Process command line arguments and assemble source files - for(argno = 0; argno < argc; ++argno) + for(argno=0; argnosvalue = 0; } @@ -628,7 +626,7 @@ int process(int argc, char ** argv) break; default: printf("-f: unknown object format specified\n"); - ++errcnt; + errcnt++; return errcnt; } break; @@ -645,7 +643,7 @@ int process(int argc, char ** argv) list_fname = argv[argno] + 2; listing = 1; list_flag = 1; - ++lnsave; + lnsave++; break; case 'o': // Direct object file output case 'O': @@ -656,7 +654,7 @@ int process(int argc, char ** argv) if (++argno >= argc) { printf("Missing argument to -o"); - ++errcnt; + errcnt++; return errcnt; } objfname = argv[argno]; @@ -713,20 +711,20 @@ int process(int argc, char ** argv) firstfname = defname; include(0, "(stdin)"); - assemble(); + Assemble(); break; case 'h': // Display command line usage case 'H': case '?': display_version(); display_help(); - ++errcnt; + errcnt++; break; default: display_version(); printf("Unknown switch: %s\n\n", argv[argno]); display_help(); - ++errcnt; + errcnt++; break; } } @@ -743,12 +741,12 @@ int process(int argc, char ** argv) if (fd < 0) { printf("Cannot open: %s\n", fnbuf); - ++errcnt; + errcnt++; continue; } include(fd, fnbuf); - assemble(); + Assemble(); } } @@ -793,8 +791,8 @@ int process(int argc, char ** argv) // (`lo68' format, extended (postfix) format....) // (2) generate the output file image and symbol table; // (3) generate relocation information from left-over fixups. - fixups(); // Do all fixups - stopmark(); // Stop mark tape-recorder + ResolveAllFixups(); // Do all fixups + stopmark(); // Stop mark tape-recorder if (errcnt == 0) {