home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / dos_ency / 5 / fxn04h.asm < prev    next >
Encoding:
Assembly Source File  |  1988-08-11  |  594 b   |  15 lines

  1. msg     db      'This is a test message'
  2. msg_len equ     $-msg
  3.         .
  4.         .
  5.         .
  6.         mov     bx,seg msg      ; set DS:BX = address of message
  7.         mov     ds,bx
  8.         mov     bx,offset msg
  9.         mov     cx,msg_len      ; set CX = length of message
  10. L1:     mov     dl,[bx]         ; get next character into DL
  11.         mov     ah,04H          ; function 04H = auxiliary output
  12.         int     21h             ; transfer to MS-DOS
  13.         inc     bx              ; bump pointer to output string
  14.         loop    L1              ; and loop until all chars. sent
  15.