Added comments.
This commit is contained in:
parent
30ea53452e
commit
05b7131310
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Ignore binaries
|
||||||
|
*.o
|
||||||
|
helloworld
|
@ -1,17 +1,17 @@
|
|||||||
.section .data
|
.section .data
|
||||||
hello:
|
hello:
|
||||||
.ascii "Hello, World.\n"
|
.ascii "Hello, World.\n" # the string
|
||||||
|
|
||||||
.section .text
|
.section .text
|
||||||
.global _start
|
.global _start
|
||||||
|
|
||||||
_start:
|
_start:
|
||||||
mov $1, %rax
|
mov $1, %rax # Define write syscall
|
||||||
mov $1, %rdi
|
mov $1, %rdi # Define stdout
|
||||||
mov $hello, %rsi
|
mov $hello, %rsi # Give string
|
||||||
mov $14, %rdx
|
mov $14, %rdx # Give size of the string
|
||||||
syscall
|
syscall # Call the kernel to do work for us
|
||||||
|
|
||||||
mov $60, %rax
|
mov $60, %rax # Define exit syscall
|
||||||
xor %rdi, %rdi
|
xor %rdi, %rdi # Give return value
|
||||||
syscall
|
syscall # Call the kernel to do work for us
|
||||||
|
Loading…
Reference in New Issue
Block a user