home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / dos_ency / 19 / hello.asm
Encoding:
Assembly Source File  |  1988-08-11  |  859 b   |  34 lines

  1.         NAME    HELLO
  2.  
  3. _TEXT   SEGMENT byte public 'CODE'
  4.  
  5.         ASSUME  cs:_TEXT,ds:_DATA
  6.  
  7. start:                                  ;program entry point
  8.         mov     ax,seg msg
  9.         mov     ds,ax
  10.         mov     dx,offset msg           ;DS:DX -> msg
  11.         mov     ah,09h
  12.         int     21h                     ;perform int 21H function 09H
  13.                                         ;(Output character string)
  14.         mov     ax,4C00h
  15.         int     21h                     ;perform int 21H function 4CH
  16.                                         ;(Terminate with return code)
  17. _TEXT   ENDS
  18.  
  19.  
  20. _DATA   SEGMENT word public 'DATA'
  21.  
  22. msg     DB      'Hello, world',0Dh,0Ah,'$'
  23.  
  24. _DATA   ENDS
  25.  
  26.  
  27. _STACK  SEGMENT stack 'STACK'
  28.  
  29.         DW      80h dup(?)              ;stack depth = 128 words
  30.  
  31. _STACK  ENDS
  32.  
  33.         END     start
  34.