Skip to content
Snippets Groups Projects
Commit f2377d3f authored by Xun Yang's avatar Xun Yang
Browse files

assemble .s files in the output folder and run the ./main program and prints exit code to stdout

parent f8be747a
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# assemble and link
for filename in ./output/*.s; do
/u/cs444/bin/nasm -O1 -f elf -g -F dwarf $filename
done
ld -melf_i386 -o main output/*.o
# run main
./main
# echo the exit code
echo $?
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment