I am busy implementing the stack on a project, and I got stuck. The goal is for it to display the message in MessageboxA, but not by using any variables, but by only pushing and popping from the stack.
This is the basic idea, but when this is compiled and run the output box is blank without a title. I used the variables title and message just to clear things up, but my goal is to be able to just push and pop the literal string and not to need a variable.
default rel
global WinMain
extern ExitProcess
extern MessageBoxA
section .data
title: db 'Melang64', 0
msg: db 'hello world', 0
section .text
WinMain:
push title
push msg
sub rsp, 28h
mov rcx, 0
pop rdx
pop r8
mov r9d, 0
call MessageBoxA
mov ecx,eax
call ExitProcess
I do not really know if it is possible to do it in such way, but as one very wise man once said, "The more you $@#% around, the more you'll find out."
If someone could please explain to me what my errors were, as well as guide me on the right track, it would be greatly appreciated.