06-04-2012, 04:12 PM
8086 Programming and System Connections
Unit-2 8086 programming & system timing.ppt (Size: 1.92 MB / Downloads: 44)
EDITOR
An Editor is a program which allows you to create an ALP program.
The Editor stores the ASCII codes for letters and numbers in successive RAM locations.
After you type the program, save the file with extension “.asm”. Ex: add.asm
This file is called source file.
Next the source file is processed with assembler
like TASM.
ASSEMBLER
Assembler Translates ALP into binary Codes.
The Processing of the Assembler is as follows:
Determines the displacements of named data items, offset of labels, and puts this information in symbol table.
Assembler produces binary code for each instruction and inserts the offset during the first process.
The Assembler generates two output files.
The first one is Object file which has extension “.obj ”
This file contains binary codes and information
about the address of instructions.
The Contents of this file will be loaded in memory
and run.
Linker and Locator
Linker is a program which joins several object files into one large object file.
Linker Produces Link File and Link Map file.
Locator is a program which is used to assign the specific addresses of where the segments of object code are to be loaded in memory.
PUSH and POP Operation
Stack Segment register (SS) initializes the stack segment.
Stack Pointer (SP) will point to the top of the stack.
If you push the values onto the stack, CPU stores them into successively lower memory locations.
PUSH will decrease the stack pointer (SP) by 2 and then places the data word in the stack.
CALL Instruction
CALL Instruction is used to call a procedure from the main program.
The CALL instructions take the same forms as the JMP instructions.
There are two types of CALL Instructions.
i) Near CALL :- Procedure in same Code Segment
Pushes the 16-bit offset of the next instruction following the call onto the stack.
Copies the 16-bit effective address of procedure into the IP register.
Execution continues at the first instruction of the procedure
INTR Interrupts
INTR allows some external signal to interrupt execution of a program.
This INTR Interrupt is masked interrupt, which can be disabled by clearing IF (Interrupt Flag) using CLI (Clear Interrupt) instruction.
The INTR input can be enabled by setting IF using STI (Set Interrupt) instruction.
8086 responds differently to an INTR Interrupt.
The interrupt type is sent to 8086 from an external device such as 8259A (Priority Interrupt Controller).