Assembly Language Programming Tutorial
Run your first program in assembly language using MASM and DosBox by follwoing the steps below:
First of all download
- MASM
- DosBox
from drive and follow the following steps:
1. Install DosBox directly into your C Drive.
2. Extract files from MASM folder, it will contains multiple exe files. Place this folder into your C drive and rename it to 8086.
3. Run DosBox and write the following:
2. Extract files from MASM folder, it will contains multiple exe files. Place this folder into your C drive and rename it to 8086.
3. Run DosBox and write the following:
mount c c:\8086
4. Create a file with .asm extension e.g. hello.asm using notepad in 8086 folder.
5. Copy the following code into that file and save that file.
dosseg
.MODEL SMALL
.STACK 100H
.DATA
MSG DB 'HELLO!$'
.CODE
MAIN PROC
MOV AX, @DATA
MOV DS, AX
LEA DX, MSG
MOV AH,9
INT 21h
MOV AH,4CH
INT 21h
MAIN ENDP
END MAIN
.MODEL SMALL
.STACK 100H
.DATA
MSG DB 'HELLO!$'
.CODE
MAIN PROC
MOV AX, @DATA
MOV DS, AX
LEA DX, MSG
MOV AH,9
INT 21h
MOV AH,4CH
INT 21h
MAIN ENDP
END MAIN
6. Now in the running DosBox, run the following commands:
masm hello.asm
link hello
hello.exe
and you can see the output.
Let me know in the comment section if you have any question.
Previous Post:
Run your first program with asp.net C#
Let me know in the comment section if you have any question.
Previous Post:
Run your first program with asp.net C#