MASM / TASM 16 Bit COM File


; filename: com.asm

; to assemble:
; MASM.EXE com.asm,,,,
; or:
; TASM com.asm

; then:
; LINK.EXE com.obj,,,,
; EXE2BIN.EXE com.EXE
; REN com.BIN com.COM

program SEGMENT
ASSUME CS:program,DS:program
ORG 100h

start:
MOV dx, OFFSET message
MOV ah,09h ; output string
INT 21h

INT 20h ; exit

message DB “Hello from a COM executable”, 0Dh, 0Ah, “$”

program ENDS
END start

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s