home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 181.img / TASM-101.ZIP / CHAPXMPL.ARC / HELLOPRN.ASM < prev    next >
Assembly Source File  |  1989-05-02  |  691b  |  18 lines

  1.    DOSSEG
  2.    .MODEL SMALL
  3.    .STACK 100h
  4.    .DATA
  5. HelloMessage DB 'Hello, world',13,10,12
  6. HELLO_MESSAGE_LENGTH EQU $ - HelloMessage
  7.    .CODE
  8.    mov  ax,@data
  9.    mov  ds,ax                        ;set DS to point to the data segment
  10.    mov  ah,40h                       ;DOS write to device function #
  11.    mov  bx,4                         ;printer handle
  12.    mov  cx,HELLO_MESSAGE_LENGTH      ;number of characters to print
  13.    mov  dx,OFFSET HelloMessage       ;string to print
  14.    int  21h                          ;print "Hello, world"
  15.    mov  ah,4ch                       ;DOS terminate program function #
  16.    int  21h                          ;terminate the program
  17.    END
  18.