Title: 8086 Assembly Language Program – ALP to print string Hello World

Description:

This 8086 Assembly Language program takes a string saved on the .DATA STRING DB. String here is “HELLO WORLD $”, ‘$’ denotes the end of the string.

.CODE starts the code section

To save data to data segment in 8086 ALP, first DATA is moved to AX register pair, and then content to AX is moved to DS data segment.

LEA loads effective address of STRING into DX register pair to as to display the STRING.

MOV AH, 09H sends the request to print the string, and INT 21H make dos interrupt function. MOV AX, 4C00 ends that request and thus program is ended.

 

8086 ALP to print string HELLO WORLD

.MODEL SMALL

.STACK

.DATA

STRING DB 10, 13, ‘HELLO WORLD $’                  ; declaring string

.CODE

MAIN PROC                                          ; main procedure

MOV AX, @DATA                                      ; initialize the data segment

MOV DS, AX

LEA DX, STRING                                     ; loading the effective address

MOV AH, 09H                                        ; for string display

INT 21H                                            ; dos interrupt function

MOV AX, 4C00H                                      ; end request

INT 21H

MAIN ENDP                                          ; end procedure

END MAIN                                           ; end program