I’m running some MASM32 examples (from http://www.masm32.com) and I notice that the console output is blank in my command line box (program compiles, links and runs but no output.
.486 ; create 32 bit code
.model flat, stdcall ; 32 bit memory model
option casemap :none ; case sensitive
include \masm32\include\windows.inc ; always first
include \masm32\macros\macros.asm ; MASM support macros
include \masm32\include\masm32.inc
include \masm32\include\gdi32.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\masm32.lib
includelib \masm32\lib\gdi32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
.code ; Tell MASM where the code starts
start: ; The CODE entry point to the program
print chr$("Hey, this actually works.",13,10)
exit
end start ; Tell MASM where the program ends
When you link a PE program for Win32, you can mark the required subsystem as either “GUI” or “Console”. If you have linked this as a GUI mode program, then when you run the EXE from a command prompt Windows will not attach the console to the window you are typing into. This sounds like the symptoms you have described.
Make sure that you link your executable with the “console” subsystem flag.