Run your first program in assembly language using emu 8086

Assembly Language Programming Tutorial

To run your first program in assembly language using emu 8086 follow the steps below:

First of all download emu 8086 zip folder.
Unzip this folder and install it.

1. Create new file and save it as Hello World.asm

Coding for beginners, Programming for beginners, Learn programming, Learn Coding, Tutorial, Coding tutorial, Programming Tutorial, Computer Science

2. Copy the following code into that file.

.model tiny                              ;code, data & program in 1 64K segment

.code                                       ;code segment

MAIN PROC
                         
    MOV AH, 09h                    ;function to display a string
    MOV DX, offset message  ;offset of Message string terminated with $
 
    int 21h                                 ;DOS interrupt
    MOV AH, 4ch                    ;funtion to terminate
    int 21h                                 ;DOS interrupt
 
ENDP
message db "Hello World $"   ;Message to be displayed terminated with $(indicates end of string)

END MAIN

3. Now compile the program and save the HelloWorld.com file.

Coding for beginners, Programming for beginners, Learn programming, Learn Coding, Tutorial, Coding tutorial, Programming Tutorial, Computer Science

4. Run it.

5. You can see the output on the screen.

Coding for beginners, Programming for beginners, Learn programming, Learn Coding, Tutorial, Coding tutorial, Programming Tutorial, Computer Science

Let me know in the comment section if you have any question.

Previous Post:
Run your first program in assembly language using MASM