;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; Use .stack,.data,.code directivs to define segment types ; ; Also use .medium to define code model ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .model medium .stack 100h ; reserve 256 bytes of stack space .data dos_print EQU 9 ;define a constant strng DB 'Hello World',13,10,'$' ;Define the character string .code START: mov ax, SEG strng ;ax <-- data segment start address mov ds, ax ;ds <-- initialize data segment register mov ah, dos_print ;ah <-- 9 DOS 21h string function mov dx,OFFSET strng ;dx <-- beginning of string int 21h ;DOS service interrupt mov ax, 4c00h ;ax <-- 4c DOS 21h program halt function int 21h ;DOS service interrupt END START