- May 28, 2007
- 3,999
- 63
- 91
Code:
.MODEL SMALL
.586
.STACK 100h
INCLUDE PCMAC.INC
.DATA
Prompt1 DB 'Enter your name:$'
Prompt2 DB 'Your name is:$'
MAXCHAR EQU 30
GetStruct DB MAXCHAR
GetCnt DB ?
Buffer DB MAXCHAR DUP (?)
.CODE
Display PROC
_Begin
_PutStr Prompt1
_GetStr GetStruct
_putCh 10
_PutStr Prompt2
_Putstr Buffer
Display ENDP
END Display
This is Assembly code, written in Masm 6.15
This generates line after line of trash from the memory (as there is no delimiter initiated). Any way to get the '$' in there so I can putstr and getstr?