You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# ----------------------------------------------------------------------------------------
# Writes "Hola, mundo" to the console using a C library. Runs on Linux or any other system
# that does not use underscores for symbols in its C library. To assemble and run:
#
# gcc hola.s && ./a.out
# ----------------------------------------------------------------------------------------
.global main
.text
main:
push %rbx # we have to save this since we use it
inc %rbx # rbx is originally 1
mov $message, %rdi # First integer (or pointer) parameter in %rdi
call puts # puts(message)
pop %rbx # restore rbx before returning
ret # Return to C library code
message:
.asciz "Hola, mundo" # asciz puts a 0 byte at the end
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: