Write an ASP to display a string

data_segment segment  'data'
     string1 db 'Jatin Kumar','$'
data_segment ends

code_segment segment  'code'
            assume ds:data_segment cs:code_segment
Main:    mov ax,data_segment
            mov ds,ax
           ;load the offset address of string
            mov dx,offset string1
           ;output of a string at DS:DX. String must be terminated by '$'
           mov ah,09h
           int 21h
           ;return control to the operating system (stop program).
           mov ah,4Ch
           int 21h
code_segment ends
end Main

No comments: