home *** CD-ROM | disk | FTP | other *** search
- %TITLE "String Read test"
-
- IDEAL
- DOSSEG
- MODEL small
- STACK 256
-
- ;----- Equates
- MaxLen EQU 128
- cr EQU 13
- lf EQU 10
-
-
- DATASEG
-
- exitCode db 0
- welcome db 'Welcome to Echo-String',cr,lf
- db 'Type any string and press Enter',cr,lf,lf,0
- testString db MaxLen DUP (0), 0
-
- CODESEG
-
- ;----- From: STRIO.OBJ:
-
- EXTRN StrRead:proc, StrWrite:proc, NewLine:proc
- Start:
- mov ax,@data
- mov ds,ax
- mov es,ax
-
- mov di,OFFSET welcome
- call StrWrite
-
- mov di,OFFSET testString
- mov cx,MaxLen
- call StrRead
- call NewLine
- call StrWrite
-
- Exit:
- mov ah,04Ch
- mov al,[exitCode]
- int 21h
-
- END Start