section .data
msg db "Hello World", 10 ; Define the message with a newline character
len equ $ - msg ; Calculate the length of the message
section .text
global _start
_start:
; sys_write (write to stdout)
mov rax, 1 ; System call number for sys_write
mov rdi, 1 ; File descriptor (1 = stdout)
mov rsi, msg ; Pointer to the message
mov rdx, len ; Length of the message
syscall
; Invoke the
system call
; sys_exit
(exit the program
) mov rax, 60 ; System call number for sys_exit
mov rdi, 0 ; Exit code (0 = success)
syscall
; Invoke the
system call
c2VjdGlvbiAuZGF0YQogICAgbXNnIGRiICJIZWxsbyBXb3JsZCIsIDEwICAgIDsgRGVmaW5lIHRoZSBtZXNzYWdlIHdpdGggYSBuZXdsaW5lIGNoYXJhY3RlcgogICAgbGVuIGVxdSAkIC0gbXNnICAgICAgICAgICAgIDsgQ2FsY3VsYXRlIHRoZSBsZW5ndGggb2YgdGhlIG1lc3NhZ2UKCnNlY3Rpb24gLnRleHQKICAgIGdsb2JhbCBfc3RhcnQKCl9zdGFydDoKICAgIDsgc3lzX3dyaXRlICh3cml0ZSB0byBzdGRvdXQpCiAgICBtb3YgcmF4LCAxICAgICAgICAgIDsgU3lzdGVtIGNhbGwgbnVtYmVyIGZvciBzeXNfd3JpdGUKICAgIG1vdiByZGksIDEgICAgICAgICAgOyBGaWxlIGRlc2NyaXB0b3IgKDEgPSBzdGRvdXQpCiAgICBtb3YgcnNpLCBtc2cgICAgICAgIDsgUG9pbnRlciB0byB0aGUgbWVzc2FnZQogICAgbW92IHJkeCwgbGVuICAgICAgICA7IExlbmd0aCBvZiB0aGUgbWVzc2FnZQogICAgc3lzY2FsbCAgICAgICAgICAgICA7IEludm9rZSB0aGUgc3lzdGVtIGNhbGwKCiAgICA7IHN5c19leGl0IChleGl0IHRoZSBwcm9ncmFtKQogICAgbW92IHJheCwgNjAgICAgICAgICA7IFN5c3RlbSBjYWxsIG51bWJlciBmb3Igc3lzX2V4aXQKICAgIG1vdiByZGksIDAgICAgICAgICAgOyBFeGl0IGNvZGUgKDAgPSBzdWNjZXNzKQogICAgc3lzY2FsbCAgICAgICAgICAgICA7IEludm9rZSB0aGUgc3lzdGVtIGNhbGwK