String input program with stdin.
This is also a short program that reads a string from the DOS window.
Here is the code:
; StringRead Assembly file
; Author tatai.laszlo@mail.com
TITLE StringRead ; a program neve
.386 ; The code already runs on 80386 processor.
.model flat,stdcall ;
include \masm32\include\masm32rt.inc
.stack 100H ; 256 byte stack segment.
.data
; Adatok :
buffer db 110 dup (0)
.code
ORG 100H ; the code starts at offset 100H
start:
push 100 ; set the maximum input character
push offset buffer ; put in to stack the effective address of input storage
call StdIn
ret
END start
Copy this program into Notepad++ and save it.
Compile and run:
Link : How to compile our console assebmly file, using MASM32.
When running, the cursor appears in the DOS window, and you can enter the input text here.