Procedure For Masm Debuger
Procedure For Masm Debuger
Procedure For Masm Debuger
Step 2: type the following mount c c:\8086 and press enter then dos box will be mounted to the local
directory.
Step 3: type c: and press enter You will be getting the screen as: c:\
Step4: Now Type debug ,and press enter Now you are going to get hyphen symbol
Step5: Type a ,and press enter Type your program as shown in the attachment.
Step6: Type R IP ,and press enter The instruction pointer should point to the starting address of the
program. If not , type the starting address of the program.For Example, 0100
For single step execution: type t as shown in the attachment. Till in the end of the program we need to
repeat.
Download all these files in a folder. Name the folder as 8086. Copy the 8086 folder in c drive. After
copying, close the window.
https://drive.google.com/file/d/0B001eXddyriFbFBhclB5QmVvaVE/view
https://drive.google.com/file/d/1kVNLtKqjkgpPk3nf1keHvnHaGaTxiFrO/view
Dosbox:
https://www.dosbox.com/
Addition
.MODEL SMALL
.STACK
.DATA
IN1 DB 45H
IN2 DB 23H
.CODE
MOV AX,@DATA
MOV DS,AX
MOV AL,IN1
MOV BL,IN2
ADD AL,BL
MOV RES,AL
INT 21H
END
Subtraction
.MODEL SMALL
.STACK
.DATA
IN1 DB 25H
IN2 DB 15H
.CODE
MOV AX,@DATA
MOV DS,AX
MOV AL,IN1
MOV BL,IN2
SUB AL,BL
MOV RES,AL
INT 21H
END
Multiplication
.MODEL SMALL
.STACK
.DATA
IN1 DB 05H
IN2 DB 04H
.CODE
MOV AX,@DATA
MOV DS,AX
MOV AL,IN1
MOV BL,IN2
MOV AH,00H
MUL BL
MOV RES,AX
INT 21H
END
Division
.MODEL SMALL
.STACK
.DATA
IN1 DB 20H
IN2 DB 05H
.CODE
MOV AX,@DATA
MOV DS,AX
MOV AL,IN1
MOV BL,IN2
MOV AH,00H
DIV BL
MOV RES,AX
INT 21H
END