0% found this document useful (0 votes)
66 views2 pages

Example 1: of Expt: 5

The document provides instructions for modifying assembly language code to run on an MDA 8086 computer. Key points include: 1. Add ORG 1000H to the start of programs and replace HLT with INT 3 at the end for the MDA. 2. Use MASM.exe to create a .OBJ file and LOD186.exe to generate a .ABS file from the .OBJ for loading on the MDA. 3. See the example code which is modified from an earlier experiment by adding ORG statements and replacing HLT with INT 3 to run on the MDA.

Uploaded by

Anik Mazumder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views2 pages

Example 1: of Expt: 5

The document provides instructions for modifying assembly language code to run on an MDA 8086 computer. Key points include: 1. Add ORG 1000H to the start of programs and replace HLT with INT 3 at the end for the MDA. 2. Use MASM.exe to create a .OBJ file and LOD186.exe to generate a .ABS file from the .OBJ for loading on the MDA. 3. See the example code which is modified from an earlier experiment by adding ORG statements and replacing HLT with INT 3 to run on the MDA.

Uploaded by

Anik Mazumder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

MDA 8086

1. Add the following code at the start of each program : ORG 1000H
2. Replace HLT by INT 3 at the end of the code.
3. Baudrate : 9600
4. Flow Controll : None.
5. Double click MASM.exe then give just file with no extension. Then keyboard Enter and Enter. Then
.OBJ file will be created. If not created then there must be an error in the code. Use LOD186.exe to
generate the .ABS extension file. To do that double click LOD186.exe then give just the file name
and Enter and Enter. If the .OBJ file is not created then there must be something wrong with your
code that’s why MASM could not compile that. In that case run MASM from command prompt.
Here compile the .asm file again and you will find that there some severe errors in the description.
You can also find the error description just above that. In that error description the line number
where error occurred is given in bracket. Thus you can find out where error occurred and can guess
why occurred.
6. To come to the Hyperterminal command prompt press the reset button in the KIT.
7. Use Hyperterminal just as before. Here CS : 0000H and IP : 1000H.
8. See the following example to find out the changes in code for MDA.
9. Press L as before to load the .ABS file. Then after loading, the cursor will blink somewhere. Now
press the reset button above the keypad in the KIT. Now the cursor will be back in the command
prompt of hyper terminal.

See the corrected code of Example-1 of experiment-5 for MDA 8086.

Example 1 : of Expt : 5

CODE SEGMENT
ASSUME CS: CODE , DS: CODE Correction
; sets up an array of 10 words , with each initialized by 9 For MDA
; Here we shall copy W to Z and set W[N] = 0 for N = 0 to 9
ORG 1000H ; this correction for MDA
MOV CX , 10
MOV DI , 0 ;N=0
Correction
Zero:
MOV AX , [W + DI] For MDA
MOV [Z + DI] , AX
MOV [W + DI] , 0; W[N] = 0
ADD DI , 2; N=N+1
DEC CX Correction
JNZ Zero
INT 3 ; HLT for MTS .
For MDA

ORG 1100H ; 100H for MTS.


W DW 10 DUP (9) ; Creates an array of 10 words initialized by 9 each
; Note: DUP came for duplicate.
Z DW 10 DUP (?) ; Creates an array of 10 uninitialized words
CODE ENDS
END
Correction
For both MDA and
MTS
In Example 5 of Expt 5:

ENCRYPT DB 65 DUP (' '), 'XQPOGHZBCADEIJUVFMNKLRSTWY' ; one space in the bracket


DB 37 DUP (' ') ; Think ! why the 65 blank spaces placed first.
; ALPHABET 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
DECRYPT DB 65 DUP (' '), 'JHIKLQEFMNTURSDCBVWXOPYAZG'
DB 37 DUP (' ')

There will be a space


inside the colon inside
the bracket.

You might also like