I am starting out with MASM32 again and forgot how to make the code output stay on the screen. It comes and goes quickly without notice.
Thanks.
Hi Pokanoket,
It sounds like you are either running a console app or a 16bit DOS executable. In either case start the command shell using command or cmd depending on your OS. You can use either one with XP but you should use cmd if it is a console app. If your application is sending DOS commands to the console, you, also, have the option to send a pause command to hold the window open, that is what we will usually do with the batch file used to assemble an executable. I hope this answers your question.
Paul
If you are using the MASM32 Editor ( QEDITOR.EXE ) that comes with MASM32 and
you wrote a 32 bit console program but assembled it by
Project -> Assemble & Link
it wont show up
OR
if the console program is very short and assembled correctly
Project -> Console Assemble & Link
it will show up very briefly.
If using StdIn and StdOut from the masm32.lib
then
.data
szInputMsg db "Enter your favorite name : ", 0
szInputBuffer db 161 dup (0)
.code
invoke StdOut,ADDR szInputMsg
invoke StdIn,ADDR szInputBuffer,160 ; will wait until input or at least Enter
If you include macros.asm (include \masm32\macros\macros.asm), you can use:
mov eax,input(13,10,"Press enter to exit...")
exit
to pause before terminating.
I usually use a message box that pops up at the end so I can view the console window, then click ok when done to close the app.