Use movq instead of just mov.

This commit is contained in:
Nicolás A. Ortega 2016-09-21 10:36:46 +02:00
parent d058ad9d31
commit 93f6e81f8d
No known key found for this signature in database
GPG Key ID: 2A5A4F4171C6373C

View File

@ -8,12 +8,12 @@ hello_end:
.global _start .global _start
_start: _start:
mov $1, %rax # Define write syscall movq $1, %rax # Define write syscall
mov $1, %rdi # Define stdout movq $1, %rdi # Define stdout
mov $hello, %rsi # Give string movq $hello, %rsi # Give string
mov $hello_len, %rdx # Give size of the string movq $hello_len, %rdx # Give size of the string
syscall # Call the kernel to do work for us syscall # Call the kernel to do work for us
mov $60, %rax # Define exit syscall movq $60, %rax # Define exit syscall
mov $0, %rdi # Give return value movq $0, %rdi # Give return value
syscall # Call the kernel to do work for us syscall # Call the kernel to do work for us