Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech> Reviewed-on: https://git.avroid.tech/Conan/conan_build/pulls/8
16 lines
741 B
NASM
16 lines
741 B
NASM
; Print "Hello, Conan"
|
|
|
|
global _start
|
|
|
|
section .text
|
|
_start: mov rax, 1 ; system call for write
|
|
mov rdi, 1 ; file handle 1 is stdout
|
|
mov rsi, message ; address of string to output
|
|
mov rdx, 13 ; number of bytes
|
|
syscall ; invoke operating system to do the write
|
|
mov rax, 60 ; system call for exit
|
|
xor rdi, rdi ; exit code 0
|
|
syscall ; invoke operating system to exit
|
|
|
|
section .data
|
|
message: db "Hello, Conan", 10 ; note the newline at the end |