home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / hamradio / wattcp.zip / OUTS.ASM < prev    next >
Assembly Source File  |  1991-05-08  |  948b  |  67 lines

  1. PAGE    66,132
  2. ;
  3. ;
  4. ;
  5. ;
  6. ;
  7. ;
  8. ;
  9. ;
  10. ;  outs.asm
  11. ;
  12. ;  print a string to stdio
  13. ;
  14. ;
  15. ;  Usage :
  16. ;        outch( ch )
  17. ;
  18. ;  (c) 1990 University of Waterloo,
  19. ;           Faculty of Engineering,
  20. ;           Engineering Microcomputer Network Development Office
  21. ;
  22. ;  version
  23. ;
  24. ;    0.1    7-Nov -1990   E. P. Engelke
  25. ;
  26. ;
  27.     include masmdefs.hsm
  28.     include    model.hsm
  29.  
  30. codedef OUTS
  31. datadef
  32.  
  33.         cextrn  outch
  34.  
  35. cstart  OUTS
  36. cpublic outs
  37.     push    DS
  38.     lds    SI, +@AB [BP]
  39. @1:    lodsb
  40.         or      AL, AL
  41.     jz     @2
  42.  
  43.         cmp     AL, 0dh         ;convert 0d to 0d 0a
  44.         jnz     @3
  45.  
  46.         push    AX
  47.         ccall    outch
  48.         pop     AX
  49. ;        mov     DL, AL
  50. ;        mov     AX, 020ah
  51. ;        int     21h
  52.  
  53. @3:     push    AX
  54.         ccall    outch
  55.         pop     AX
  56.  
  57. ;        mov     DL, AL
  58. ;        mov     AH, 2
  59. ;        int     21h
  60.     jmp    @1
  61.  
  62. @2:    pop    DS
  63. creturn outs
  64. cend    OUTS
  65.         end
  66.  
  67.