MI Exam Notesnew
MI Exam Notesnew
The various flags in the flag register are set or cleared based
on the result of arithmetic, logic, and other instructions
executed by the processor
Physical address
genration
The segment registers are used to hold 16-bit of the starting
address of four memory segments.
The address associated with any instruction or data byte is only 16-
bit called as effective address or ofiset or displacement.
Fig shows how 8086 calculates physical address from the effective
address
Memory segmentation
Segmentation is the process in which the main memory of the
computer is logically divided into different segments and each
segment has its own base address. It is basically used to
enhance the speed of execution of the computer system, so
that the processor is able to fetch and execute the data from
the memory easily and fast.
Advantages of Pipelining:
h
assembly langaugae tools
like debugger,editor,
linker, assember,, loader
Assembler :
An assembler program is used to translate assembly language mnemonics to the correct
binary code for each instruction. The assembler will read the source file or your program
from the disk where you saved it after editing. An assembler usually reads your source file
more than once. On the first pass through the source program, the assembler finds everything.
It determines the displacement of named data items and the offset of labels, and puts this
information in symbol table. On a second pass through the source program, the assembler
produces the binary code for each instruction and assigns address to each.
The assembler generates two files on the floppy or hard disk. The first file is called object
file. The object file contains the binary codes for the instructions and the information about
the addresses of the instructions.
This file contains the information that will eventually be loaded into memory and executed.
The second file generated by the assembler is called the assembler list file This Me contains
the assembly language statements. the binary codes for each instruction. and the offset for
each instruction
Linker :
A linker a program to join together several object files into one large object file s.%en wnt;ng
large programs It is usually much more efficient to divide the large program 'n to smaller
modules Each module can be Individually written, tested, and debugged. When all of the
modules work they can be linked together to form a large functioning program Also, the
object modules for useful programs, a square root program, for example. can be kept tn a
library file and linked into other program as needed.
The tinker produces a link file which contains the binary codes for all combined modules.
The linker also produces a link map file which contains the address information about the
linked files.
Debugger :
A debugger is a program which allows you to load your object code program
into system
memory. execute the program, and troubleshoot or debug it. The debugger
allows you to look
at the contents of the registers and memory locations after your program runs
It allows you to
change the contents of the registers and the memory locations and rerun the
program. Some
debuggers allow you stop execution after each instruction so you can check or
alter memory
and register contents A debugger also allows you to set a break point at any
point in your
program. When you run the program the system WI!' execute instructions up to
this break
point and stop. You can the examine registers and memory contents to see if
the results are
correct at that point. If results are correct, you can move the break point to a
later point in the
program. If the results are not correct, you can check the program up to that
point to find out
why they are not correct.
Editor :
An editor is a program which, when run on a system lets you type in the
assembly language
statements for your program. The main function of an editor is to help you
construct your
assembty» language program in just the right format so that the assembler will
translate it
correctly to machine language. The file created by the editor is in ASCII codes
and called as
source file.
.