-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathum.c
33 lines (29 loc) · 758 Bytes
/
um.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* um.c
*
* Authors : Emiton Alves and Cameron LaFreniere
*
* Description: This file is the starting point for our program. It will load
* a binary file into an instruction set. It will then execute the
* instruction set. Everything is initiated from this point.
* */
#include <stdio.h>
#include "program_loader.h"
#include "execute.h"
/**
* This function drives the entire program
* @params: argc - number of arguments from command line
* argv - command line arguments
* */
int main(int argc, char *argv[])
{
if(argc == 2)
{
struct segment *program = load(argv[1]);
runProgram(program);
}
else
{
fprintf(stderr, "usgae: ./um program \n");
}
}