I want to check, that my assembler code works and copy "hello world" program. It compiles and links succesfully, but it doesn't have output. I use NASM, WinGW64
- a.asm code
global _startsection .text_start: mov rax, 1 ; write( mov rdi, 1 ; STDOUT_FILENO, mov rsi, msg ; "Hello, world!\n", mov rdx, msglen ; sizeof("Hello, world!\n") syscall ; ); mov rax, 60 ; exit( mov rdi, 0 ; EXIT_SUCCESS syscall ; );section .rodata msg: db "Hello, world!", 10 msglen: equ $ - msg
- compile using cmd command: "nasm -f win64 a.asm"
- link with "ld a.obj"
- run and no output in cmd