home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / TASMSWAN.ZIP / ECHOSTR.ASM < prev    next >
Assembly Source File  |  1989-07-10  |  631b  |  46 lines

  1. %TITLE  "String Read test"
  2.  
  3.     IDEAL
  4.     DOSSEG
  5.     MODEL    small
  6.     STACK    256
  7.  
  8. ;----- Equates
  9. MaxLen        EQU    128
  10. cr        EQU    13
  11. lf        EQU    10
  12.  
  13.  
  14.     DATASEG
  15.  
  16. exitCode    db    0
  17. welcome        db    'Welcome to Echo-String',cr,lf
  18.         db    'Type any string and press Enter',cr,lf,lf,0
  19. testString    db    MaxLen DUP (0), 0
  20.  
  21.     CODESEG
  22.  
  23. ;-----  From: STRIO.OBJ:
  24.  
  25.     EXTRN    StrRead:proc, StrWrite:proc, NewLine:proc
  26. Start:
  27.     mov    ax,@data
  28.     mov    ds,ax
  29.     mov    es,ax
  30.  
  31.     mov    di,OFFSET welcome
  32.     call    StrWrite
  33.  
  34.     mov    di,OFFSET testString
  35.     mov    cx,MaxLen
  36.     call    StrRead
  37.     call    NewLine
  38.     call    StrWrite
  39.  
  40. Exit:
  41.     mov    ah,04Ch
  42.     mov    al,[exitCode]
  43.     int    21h
  44.  
  45.     END    Start
  46.