The MASM Forum

General => The Workshop => Topic started by: ulrick on November 04, 2019, 10:04:35 AM

Title: How to make my first MASM program under VS Code
Post by: ulrick on November 04, 2019, 10:04:35 AM
Dear all,
I am new here.
I installed MASM from masm32 web site and VS Code from MS website.
Before I make any program I guess I have to link VS Code and MASM, no?
I wrote the following

.code
main    proc
        mov rax, 123
        ret
main    endp
end

which I save as a masm file. VS Code attaches the .inc extension to it.
I select the code with select all then run the selected text option in the Terminal menu.
But, it does not work.
Any help?
Thank you.
(//)
Title: Re: How to make my first MASM program under VS Code
Post by: jj2007 on November 04, 2019, 10:39:22 AM
VS Code might be an overkill. Try something simpler:
- open \Masm32\qeditor.exe
- paste the code below
- save as test.asm
- use menu Project/build+run

If that works, you are ready for more ambitious tasks :smiley:

Welcome to the Forum :thup:

include \masm32\include\masm32rt.inc ; contains 90% of all requisites for Win32 programming

.code
AppName db "Masm32:", 0

start: MsgBox 0, "Hello World, how are you?", addr AppName, MB_OK
exit

end start
Title: Re: How to make my first MASM program under VS Code
Post by: ulrick on November 04, 2019, 08:23:01 PM
Thanks a lot jj2007, this works!
Have a good day.
ulrick