Done C part
This commit is contained in:
parent
20bcf7bea0
commit
fc776ca9e6
6 changed files with 14 additions and 9 deletions
10
README.md
10
README.md
|
@ -22,11 +22,11 @@ Please complete this checklist (turn [ ] into [X]) before you submit:
|
|||
- [x] I completed java/compile.sh
|
||||
- [x] I completed java/run.sh
|
||||
- [x] I completed java/disassemble.sh
|
||||
- [ ] I solved the C part:
|
||||
- [ ] I implemented the C code
|
||||
- [ ] I completed c/compile.sh
|
||||
- [ ] I completed c/run.sh
|
||||
- [ ] I completed c/disassemble.sh
|
||||
- [x] I solved the C part:
|
||||
- [x] I implemented the C code
|
||||
- [x] I completed c/compile.sh
|
||||
- [x] I completed c/run.sh
|
||||
- [x] I completed c/disassemble.sh
|
||||
- [ ] I wrote the source code myself and did not look at the source code of my classmates
|
||||
- [ ] I ran test/test.sh and verified that it produces the expected output
|
||||
- [ ] I verified that the disassembled instructions appear (not just the function names)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
# TODO Command to compile main.c with gcc
|
||||
gcc -o main ./main.c
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
# TODO Command to disassemble the compiled C program with otool
|
||||
otool -xv ./main
|
BIN
c/main
Executable file
BIN
c/main
Executable file
Binary file not shown.
7
c/main.c
7
c/main.c
|
@ -1 +1,6 @@
|
|||
// TODO Write C code
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main() {
|
||||
puts(getenv("USER"));
|
||||
}
|
2
c/run.sh
2
c/run.sh
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
# TODO Command to run the compiled C program
|
||||
./main
|
Reference in a new issue