Skip to content

Commit c193115

Browse files
committed
tasks 0-1 completed & task 2-8 submitted
1 parent 5a6d1f7 commit c193115

11 files changed

Lines changed: 53 additions & 14 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*~
2+
*'
3+
*#

0x00-hello_world/0-preprocessor

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
11
#!/bin/bash
2-
c_file="$CFILE"
3-
4-
output_file="c"
5-
6-
gcc -E "c_file" -0 "output_file"
7-
2+
gcc -E $CFILE

0x00-hello_world/1-compiler

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,2 @@
11
#!/bin/bash
2-
c_file="$CFILE"
3-
4-
file_name="${c_file%.*}"
5-
6-
output_file="main.o"
7-
8-
9-
gcc -c "$c_file" -o "output_file"
2+
gcc -c $CFILE

0x00-hello_world/100-intel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
gcc -S -masm=intel $CFILE

0x00-hello_world/100-intel.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#include <stdio.h>
2+
3+
int main(void)
4+
{
5+

0x00-hello_world/101-quote.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#include <stdio.h>
2+
#include <unistd.h>
3+
4+
int main(void)
5+
{
6+
write(2,
7+
"and that piece of art is useful\" - Dora Korpar, 2015-10-19\n",59);
8+
return 1;
9+
}

0x00-hello_world/2-assembler

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
gcc -s $CFILE

0x00-hello_world/3-name

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
gcc -c $CFILE -o cisfun

0x00-hello_world/4-puts.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include <stdio.h>
2+
3+
int main(void)
4+
{
5+
puts("Programming is like building a multilingual puzzle\n");
6+
7+
return 0;
8+
}

0x00-hello_world/5-printf.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include <stdio.h>
2+
3+
int main(void)
4+
{
5+
printf("with proper grammar, but the outcome is a piece of art\n");
6+
7+
return 0;
8+
}

0 commit comments

Comments
 (0)