diff options
author | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-04-05 22:23:17 +1000 |
---|---|---|
committer | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-04-05 22:23:17 +1000 |
commit | 98c242def30ae70f327323d65485b41bdbd151b4 (patch) | |
tree | 4128d42992b197b99d48f471b8bf6d55bc1a7593 /assembler.c | |
parent | 92e5aaf275785bfb6e7ec3d98df910af9bf9b65f (diff) |
reworking instructions, added assembler.c
Diffstat (limited to 'assembler.c')
-rw-r--r-- | assembler.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/assembler.c b/assembler.c new file mode 100644 index 0000000..5112dc5 --- /dev/null +++ b/assembler.c @@ -0,0 +1,41 @@ +#include"stdio.h" +//syscall library + + +//Will probably need to make a special case which will prevent EOF +//from being written. + +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 != '\0') +c = getchar; +if(c == '#') c = '\n'; +in[i] = c; + + +} + + + |