===UASM=== option casemap:none if @Platform eq 1 option dllimport: ExitProcess proto :dword option dllimport:none exit equ ExitProcess endif printf proto :qword, :vararg exit proto :dword .code main proc invoke printf, CSTR("Goodbye, World!",10) invoke exit, 0 ret main endp end ===AT&T syntax (Gas)=== // No "main" used // compile with `gcc -nostdlib` #define SYS_WRITE $1 #define STDOUT $1 #define SYS_EXIT $60 #define MSGLEN $14 .global _start .text _start: movq $message, %rsi // char * movq SYS_WRITE, %rax movq STDOUT, %rdi movq MSGLEN, %rdx syscall // sys_write(message, stdout, 0x14); movq SYS_EXIT, %rax xorq %rdi, %rdi // The exit code. syscall // exit(0) .data message: .ascii "Hello, world!\n"