Mic Exp868
Mic Exp868
A.1 Aim: Write Assembly program to display string using macro. [Use BIOS/DOS interrupts
to read input and display results.]
A.2 Prerequisite: Basic knowledge of 8086 instruction set, interrupts, procedures and
macros in 8086
A.3 Outcome:
After successful completion of this experiment students will be able to
1. Use appropriate instructions to program microprocessor to perform various
task.
2. Develop the program in assembly/ mixed language for Intel 8086 processor
3. Demonstrate the execution and debugging of assembly/ mixed language program
A.4 Theory:
A macro is an extension to the basic ASSEMBLER language. They provide a
means for generating a commonly used sequence of assembler
instructions/statements. The sequence of instructions/statements will be coded ONE
time within the macro definition.
The Syntax for macro definition −
%macro macro_name number_of_params
<macro body>
%endmacro
Where, number_of_params specifies the number parameters, macro_name specifies
the name of the macro.
The macro is invoked by using the macro name along with the necessary
parameters. When you need to use some sequence of instructions many times in a
program, you can put those instructions in a macro and use it instead of writing the
instructions all the time.
A.5 Algorithm:
1. Start.
2. Initialize data segment and code segment.
3. Start the macro body
4. Write the string to display with macro
eg: msg1 db “message 1 $”
display macro msg1
5. Store the effective address of string in the register
6. End of Macrostring
7. Start the code segment
8. Invoke the macro to display the string
9. End
PART B
(PART B : TO BE COMPLETED BY STUDENTS)
(Students must submit the soft copy as per following segments within two hours of the
practical. The soft copy must be uploaded at the end of the practical)
code segment
assume cs:code, ds:data
start:
; Initialize data segment
mov ax, data
mov ds, ax
code ends
end start
B.4 Conclusion:
After successful completion of this experiment I am able to
Use appropriate instructions to program microprocessor to perform various
task.
1. Develop the program in assembly/ mixed language for Intel 8086 processor
2. Demonstrate the execution and debugging of assembly/ mixed language program