;section .data
; Aqui declaramos variables y constantes

;section .text
;    global _start

;_start:
;    mov rax, 20
;    mov rbx, 5
;    add rax, rbx
;    sub rax, rbx
;    mul rbx
;    div rbx
;    mov rdi, rax
;    mov rax, 60
;    syscall

section .data
    mensaje db "Hola Mundo", 10
    mensaje2 db "desde ensamblador", 10

section .text
    global _start

_start:
    mov rax, 1 ;sys_write
    mov rdi, 1 ;salida en pantalla
    mov rsi, mensaje ;lo que quiero imprimir
    mov rdx, 11 ; longitud en bytes de la impresion
    syscall ;llamada al sistema

    mov rax, 1 ;sys_write
    mov rdi, 1 ;salida en pantalla
    mov rsi, mensaje2 ;lo que quiero imprimir
    mov rdx, 18 ; longitud en bytes de la impresion
    syscall ;llamada al sistema

    mov rax, 60 ;sys_exit
    mov rdi, 0 ;sin errores
    syscall

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: