Linking and Relocation - Stacks - Procedures - Macros
This document summarizes key concepts about procedures, macros, linking and relocation, and stacks in 8086 microprocessor architecture. It defines that a procedure is a group of instructions stored separately in memory and called using CALL and RET instructions, occupying less memory than duplicated code. Macros are single instructions that expand to a set of instructions, requiring more memory than procedures. Linking and relocation link object files and ensure labels are properly interpreted across modules. Stacks use LIFO data structure to push and pop data elements.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
205 views
Linking and Relocation - Stacks - Procedures - Macros
This document summarizes key concepts about procedures, macros, linking and relocation, and stacks in 8086 microprocessor architecture. It defines that a procedure is a group of instructions stored separately in memory and called using CALL and RET instructions, occupying less memory than duplicated code. Macros are single instructions that expand to a set of instructions, requiring more memory than procedures. Linking and relocation link object files and ensure labels are properly interpreted across modules. Stacks use LIFO data structure to push and pop data elements.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 11
NEHRU INSTITUTE OF ENGINEERING AND TECHNOLOGY
“Nehru Gardens” T. M. PALAYAM, COIMBATORE-105
(Approved by AICTE and Affiliated to Anna University, Chennai) (Accredited by NAAC, Recognized by UGC with 2(f) and 12(B)) NBA Accredited UG Courses: AERO, CSE, MECH DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
EC8691 – MICROPROCESSORS AND
MICRO CONTROLLERS Prepared by G.Jeevanantham, AP/CSE, NIET. UNIT I THE 8086 MICROPROCESSOR
Introduction to 8086 – Microprocessor
architecture – Addressing modes - Instruction set and assembler directives – Assembly language programming – Modular Programming - Linking and Relocation - Stacks - Procedures – Macros – Interrupts and interrupt service routines – Byte and String Manipulation. Procedure • Procedure is a group of instruction stored at a separate program in memory and it is called from main program whenever it required. • To use the Procedure CALL & RET instruction is used. • It occupies Less Memory. • Stack is used in Procedure. • To mark end of the procedure type ENDP. • Overtime is required to call the procedure and return to the calling program. Syntax: proc_name: procedure body ... ret Macro • A Single instruction that expands automatically in to a set instructions of to perform a particular task. •To use Macro just type Macro. •It requires more memory. •Stack is not used in Macro. •To end of Macro type ENDM. •No overtime is required during execution. •Syntax: Macro definition Name MACO[Parameters…] <Statements> ENDM Linking and Relocation • Linking links the library and header file. • Most critical function of the linker is to ensure that labels in all modules are properly interrupted. • In constructing a program some program modules may be put in the same source module and assembled together. • Other may be in different source module and assembled separately. Linking and Relocation • If they are assembled separately, then the main module which has the first instruction to be executed, must be terminated by END statement with the entry specified and each of the other module must be terminated by an END statement with no operand. • Find the object modules to be linked • Construct the load module by assiging the positions of all of the segments in all of the object modules being linked. Linking and Relocation • Fill in all offsets that could not be determined by the assembler. • Fill in all segment address. • Load the program for execution. Linking and Relocation Stack • Stack is a dynamic data structure in which data can be placed and retrieved in LIFO(Last In First Out). • Data elements are added to the stack by pushing them on to the stack are retrieved by popping them. Stack Thank You