Yes, thought it would be better to start with the basics.
global _start section .text _start: mov rdi,1 mov rsi,hello_world mov rdx,hello_world_size mov rax,1 syscall mov rdi,0 mov rax,60 syscall
hello_world: db "Hello, world!",10 hello_world_size EQU $ - hello_world
How about one for Windows 64?
extrn ExitProcess: PROC extrn MessageBoxA: PROC
.data caption db 'Windows 64-bit hello!', 0 message db 'Hello, world!', 0
.code
Start PROC sub rsp,28h mov rcx, 0 lea rdx, message lea r8, caption mov r9d, 0 call MessageBoxA mov ecx, eax call ExitProcess Start ENDP End
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yes, thought it would be better to start with the basics.
global _start
section .text
_start:
mov rdi,1
mov rsi,hello_world
mov rdx,hello_world_size
mov rax,1
syscall
mov rdi,0
mov rax,60
syscall
hello_world: db "Hello, world!",10
hello_world_size EQU $ - hello_world
How about one for Windows 64?
extrn ExitProcess: PROC
extrn MessageBoxA: PROC
.data
caption db 'Windows 64-bit hello!', 0
message db 'Hello, world!', 0
.code
Start PROC
sub rsp,28h
mov rcx, 0
lea rdx, message
lea r8, caption
mov r9d, 0
call MessageBoxA
mov ecx, eax
call ExitProcess
Start ENDP
End