;===========================================================
;A test .COM file.  If you have never made one, look
;at this example.  It's quite simple. 
;This is supposed to be Compiled into a .COM file!
;============================================================
TITLE   File Creation Test Program
.MODEL TINY                            ; Use a tiny memory model
				       ; Code and Data are in one 64k segment 
.8086                                  ; Use crusty 8086 code

.CODE
.STARTUP                               ;Add necessary STARTUP command, etc
				       ;This is basically an ORG 100h
				       ;command which tells the assembler
				       ;where the program will begin.
START:                                 ;The start of the program. 
	MOV     AH,09h                 ;We want to print a string.
	MOV     DX,OFFSET MESSAGE      ;DX contains address of 'MESSAGE'
	INT     21h                    ;Execute.
	MOV     AX,4C00h         ; Send exit code to dos
	INT     21h             ; Send command to DOS
MESSAGE         DB      "This is a .COM file!!!",0ah,0dh,24h
			;The message is placed IMMEDIATELY after the CODE
			;Unlike EXE's data is in the CODE segment and
			;can go anywhere, even in the middle of code!
			;ie
			;MOV    AX,0FFFFh
			;JMP    CONTINUE
			;MESSAGE        DB      "Message",24h
			;INT    11h
			;Just make sure to jump over data, or else
			;your system will try to execute it!
END                     ; Tell the assembler that this is the END
