To install and configure DOSBox, MASM, and Debug tool, and simulate x86 architecture for executing 8086 Assembly Language Programs.
DOSBox by clicking the Next button.8086.rar file. Click on the "Download MASM" button to download MASM to your system.D:\TASM).TASM.EXE, TLINK.EXE, and other required files.mount d d:\TASM and switch to the D: drive.Open DOSBox and type:
mount d d:\8086
d:
Create a file named hello.asm in Notepad and save it in D:\8086:
.model
.stack 100h
.data
msg db 'Hello, World!$'
.code
main:
mov ax, @data
mov ds, ax
mov ah, 09h
lea dx, msg
int 21h
mov ah, 4ch
int 21h
end main
Inside DOSBox, compile and run:
masm hello.asm
link hello.obj
hello.exe
Run Debug:
debug hello.exe
Useful Debug commands:
r - View registersu - Unassemble coded - Dump memoryt - Trace step-by-stepg - Run the programYou will see:
AX, BX, CX, DX - Data registersSI, DI - Index registersSP, BP - Stack registersCS, DS, SS, ES - Segment registersIP - Instruction pointerFLAGS - Status flags