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 ; A kód 80386 processzoron már fut.
.model flat,stdcall ;
include \masm32\include\masm32rt.inc
.stack 100H ; 256 byte-os veremszegmens
.data
; Adatok :
buffer db 110 dup (0)
.code
ORG 100H ; a kód 100H offszeten kezdődik
start:
push 100 ; set the maximum input character
push offset buffer ; put in to stack the effective addr 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.