Skip to content

Commit 7568399

Browse files
committed
Add baby asm
1 parent f62bbe6 commit 7568399

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

baby_asm/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
baby_asm: baby_asm.S
2+
gcc baby_asm.S -s -nostartfiles -nostdlib -no-pie -o baby_asm
3+
4+
clean:
5+
$(RM) baby_asm

baby_asm/baby_asm

4.41 KB
Binary file not shown.

baby_asm/baby_asm.S

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.intel_syntax noprefix
2+
3+
.globl _start
4+
_start:
5+
mov r8, 1
6+
inc r8
7+
add r8, 25
8+
add r8, r8
9+
imul r8, 10
10+
# Ignore below, padding + cleaning up with exit(0) sycall
11+
nop
12+
nop
13+
nop
14+
nop
15+
mov rax, 60
16+
xor rdi, rdi
17+
syscall

0 commit comments

Comments
 (0)