; ONEPAGE.ASM
;
; This is a one-page, one-segment Intel assembler program in ".COM" form.
; Copy ONEPAGE.ASM to your disk and then assemble it to produce a
; ONEPAGE.OBJ file.  Then link ONEPAGE.OBJ to produce a ONEPAGE.COM file.
; Use these command lines (note the trailing semicolon on each):
;
;       C:> asm /s onepage ;
;       C:> val /co onepage ;
;
;  - Using a semicolon as an argument suppresses all the prompts
;    for output files and uses the defaults.  (See the documentation.)
;  - The /s option to ASM suppresses unnecessary verbosity.
;  - The /co option to VAL creates a ".COM" file (instead of a ".EXE")
;
; -IAN! idallen@ncf.ca  November 1999
;
OneP	segment
	assume	CS:OneP,DS:OneP
	org	100h		; .COM requires this

start:	mov	dx,offset msg	; offset address of the message text
	mov	ah,09h		; code for "display ASCII$ string"
	int	21h		; Note: don't forget the 'h' on 21h!

	mov	al,0h		; load a successful return status
	mov	ah,4Ch		; code for "terminate program"
	int	21h

msg	db	"This is my first Intel ASM program."
	db	0Dh,0Ah		; CR, LF
	db	"$"		; end of ASCII$ string

OneP	ends
	end start		; "start" is the label on the first instruction
