I tried to make hello world in nasm, but it's not printing Hello world and I'm currently using window 11 64 bits.
The picture shows it's not printing: https://i.stack.imgur.com/an8jl.png
here's my compile command:
nasm -f win64 main.asm
ld -o main.exe main.obj
here's my asm code:
section .data
msg db 'Hello, world!', 0xa ; string to be printed
len equ $ - msg ; length of the string
section .text
global _start
_start:
mov rax, 1 ; system call number (sys_write)
mov rdi, 1 ; file descriptor (stdout)
mov rsi, msg ; message to write
mov rdx, len ; message length
syscall ; call kernel
mov rax, 60 ; system call number (sys_exit)
xor rdi, rdi ; exit code 0
syscall ; call kernel
I want it to print hello world :V