home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / progjour / 1991 / 06 / alib / puts.asm < prev    next >
Assembly Source File  |  1991-08-21  |  448b  |  40 lines

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