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

  1.         DOSSEG
  2.         .MODEL  SMALL
  3.         .STACK  200h
  4.         .DATA
  5. OutputChar      DB   'B'
  6.         .CODE
  7. ProgramStart:
  8.         mov   dx,@data
  9.         mov   es,dx                  ;set ES to the .DATA segment
  10.         mov   bx,OFFSET OutputChar   ;point BX to the offset of OutputChar
  11.         mov   dl,es:[bx]             ;get the character to output from the
  12.                                      ; segment pointed to by ES
  13.         mov   ah,2                   ;DOS display output function #
  14.         int   21h                    ;invoke DOS to print character
  15.         mov   ah,4ch                 ;DOS terminate program function #
  16.         int   21h                    ;invoke DOS to end program
  17.         END   ProgramStart
  18.