main Group code,data;          \ code & data become 1 seg, code first.
Assume cs:main,ds:main,ss:main;\ tell assembler what's in the seg regs.
code Segment byte;             \ open code segment.
Org 100h;                      \ all .COM programs start at 100h
data Segment byte;             \ open data segment.
     ' msg ="Hello World$";    \ declare the data.
data EndS;                     \ close data segment.
Start:                         \ program starts here.
     dx = Offset main:msg;     \ dx = offset of msg relative to main.
     ah = 9; !21h;             \ output the message.
     !20h;                     \ terminate program.
code EndS;                     \ close code segment.
End Start;                     \ program begins at start.

submitted by: jim-neil@digital.net