Driver for the lc3 assembler (do not modify)
More...
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include "assembler.h"
|
static void | usage (void) |
|
int | main (int argc, char *argv[]) |
|
This file is a driver for the lc3 assembler and contains main(). The basic flow of the function is:
-
validte the program arguments
-
call
asm_init()
-
call
asm_pass_one()
-
report then number of errors found in the first pass. If there were no errors, call
asm_pass_two()
-
report the number of errors found in the second pass
-
call
asm_term()
The program return 0
if no errors were found, non-zero otherwise.
- Author
- Fritz Sieker
force instantiation of LC3AS_VAR variables in this file
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
The entry point of the assembler. The program is invoked using:
[my]lc3as [-hex] [-pass1] assembly_file_name
- Parameters
-
argc | - count of arguments |
argv | - an array of arguments |
static void usage |
( |
void |
| ) |
|
|
static |
print usage statement for program