summaryrefslogtreecommitdiff
path: root/main.asm
blob: 1b3f997a5ce9ce96b53958f8691695d876fdae6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<<<<<<< HEAD
global _start

section .text
_start:
	mov ebx, 1  ; start at 1
	mov ecx, 4  ; num iterations
label:
	add ebx, ebx  ; ebx += ebx 
	dec ecx       ; ecx -= 1
	cmp ecx, 0    ; compare ecx with 0 
	jg label      ; jump if greater than label

=======
global main

extern printf

section .data
	msg db "Hello, x86_64 Assembly!", 10, 0

section .text

main:
	sub rsp, 8
	lea rdi, [rel msg]
	call printf wrt ..plt
	mov eax, 0
	add rsp, 8
	ret
>>>>>>> 181d482 (Initial commit (i got too carried away with asm and forgot to commit))