summaryrefslogtreecommitdiff
path: root/assembler.c
blob: b20d13b6eb17cbf6c6818aed3dc130ce08d467c3 (plain)
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
34
35
36
37
38
39
40
41
42
//	assembler.c
//	A minimalistic assembler for creating binary files.

#include"stdio.h"
//syscall library


int main(int argc; char* argv[]){
	int output = 0;
	switch(argc){
		case 0:	// Arguments are required
			printf("%s: Input file not given.\n", argv[0]);
			return -1;
		case 1:	// Input file
			break;
		case 2:	//	Input and Output file
			output = 1;
			break;
		default:
			printf("%s: Too many arguments.\n", argv[0]);
			break;
	}

	//test file existence


//call open file

// DRAFTING PROG LOGIC
/*
char c = 0;
char in[10];
while((c != '\n') && (c != EOF)
c = getchar;
if(c == '#') c = '\n';
in[i] = c;
*/

}