home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / progjour / 1991 / 03 / puts.asm < prev    next >
Assembly Source File  |  1990-04-26  |  454b  |  40 lines

  1.     title    puts
  2.     include    asm.inc
  3.  
  4.     .code
  5.     public    puts,put_string
  6.     extn    putchar
  7.  
  8. ;;    put string
  9. ;
  10. ;    entry    DS:SI    asciiz string
  11. ;    uses    AX
  12. ;
  13. put_string proc
  14.     push    si
  15.     jmp    put2
  16. put1:    call    putchar
  17. put2:    lodsb
  18.     cmp    al,NULL_CHAR
  19.     jne    put1
  20.     pop    si
  21.     ret
  22. put_string endp
  23.  
  24.  
  25. ;;    puts
  26. ;
  27. ;    entry    DS:SI    asciiz string
  28. ;    uses    AX
  29. ;
  30. puts    proc
  31.     call    put_string
  32.     mov    al,CR_CHAR
  33.     call    putchar
  34.     mov    al,LF_CHAR
  35.     call    putchar
  36.     ret
  37. puts    endp
  38.  
  39.     end
  40.