.model small .data Mystring db "Hello Class 2 !! $" .stack 100h .code main: call initSegs call PrintHello call exit ; == Procedures == PROC InitSegs ; Sets up half of string pointer push ax mov ax, @DATA ; Put address of DATA segment in AX mov ds,ax ; PUT AX into DataSegment Register mov es,ax pop ax RET ; Return to main section ENDP Initsegs PROC PrintHello push ax dx mov dx, offset MyString mov ah,9 ; FUNCTION 9 Print String ($ Terminated) INT 21H ; INT 21h is an API of many function calls pop dx ax RET ENDP PrintHello PROC exit push ax mov ah,4ch ; Function 4c is EXIT to DOS INT 21H pop ax RET ENDP Exit end main