Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8082367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:04:19+00:00 2026-06-05T17:04:19+00:00

.386 .model flat, stdcall option casemap:none include windows.inc include kernel32.inc include user32.inc includelib user32.lib

  • 0
.386
.model  flat, stdcall
option  casemap:none

include windows.inc
include kernel32.inc
include user32.inc

includelib user32.lib
includelib kernel32.lib

Main        proto

.data

hOutput dd 0
bReadWritten dd 0
szText1 db "What's your name?",0

hInput dd 0

szInput db 128 dup(0)



.data?

.code
start:

Invoke Main
Invoke ExitProcess,0

Main proc
    invoke GetStdHandle, STD_OUTPUT_HANDLE
    mov hOutput, eax

    invoke GetStdHandle,STD_INPUT_HANDLE
    mov hInput, eax

    invoke lstrlen, addr szText1
    invoke WriteFile, hOutput, addr szText1, eax, ADDR bReadWritten, NULL

    invoke ReadFile, hInput, addr szInput, 128, ADDR bReadWritten,0



    ret
Main endp   


end start

Nothing happened after executing this program. Why the console window didn’t appear?

Postscriptum

Assemble options(winAsm):

/Zi /Zd /c /coff /Cp /nologo

Linker options

/SUBSYSTEM:WINDOWS /DEBUG /DEBUGTYPE:CV /VERSION:4.0 /INCREMENTAL:NO

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T17:04:21+00:00Added an answer on June 5, 2026 at 5:04 pm
    /SUBSYSTEM:WINDOWS
    

    Now it is answerable. That’s the wrong option, that declares that the program is a native Windows program. Which takes care of creating its own windows, using the CreateWindow() api function. Which you can certainly call from an assembly program as well, just not commonly done. You’d at least use a C compiler to go through the rigamarole of creating a window class and properly writing the window procedure. Like Petzold showed us in his seminal “Programming Windows” book.

    If you want Windows to create a console window for you then you have to ask for it:

    /SUBSYSTEM:CONSOLE
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: .386 .model flat, stdcall option casemap :none include \masm32\include\windows.inc include
I'm creating simply masm DLL : ; ######################################################################### .386 .model flat, stdcall option casemap
I have written a simple program in MASM, like: .386 .model flat, stdcall option
Here's the code: .386 ;target for maximum compatibility .model small,stdcall ;model .code main: int
I have the following assembly code .386 .model flat, c .stack 100h printf PROTO
How can I substract 64 bit numbers using 386 assembler?
I'm running the Google App Engine devserver 1.3.3 on Windows 7. Usually, this method
What is the minimum file size of a PE file (exe) on Windows? And
I'm using an enumeration in my domain model, but I get the following error
In 1988, the number of transistors in the Intel 386 SX microprocessor was 275,000.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.