Documente Academic
Documente Profesional
Documente Cultură
These are six general purpose registers namely B, C, D, E, H, L all 8 bit in size. They are used in
general to store 8 bit data temporarily. Sometimes during calculations to store the intermediate
value, sometimes to store the result of any calculations etc. These six registers can also be used to
store 16 bit data by using them in pairs as BC, DE, HL. When used in pairs they are also used to
store addresses of memory locations which are 16 bits.
Accumulator is also an 8 bit register which is used to store temporary data. But it has also
other tasks. It is the most important register of a microprocessor and every microprocessor
consists of an accumulator. It is used by the ALU (arithmetic logic unit), during addition or
subtraction operation the result is stored in the accumulator. After which we store it anywhere we
want. Eg. ADD B instruction will add the content of register B (where temporary data is stored)
and accumulator and store the result in the accumulator itself.
This is an 8 bit temporary register which is not used by the user but only used by the
microprocessor itself to store temporary data.
Flag register is normally used to reflect the result of some operations or to control some
operations. Out of the 8 bits only 5 bits are used. Each bit is called as a flag which reflects the
result of some operation or controls some operations.
There are two registers which actually act as pointers. Program counter points to the next
memory address while current instruction is in execution stage.
Eg. 2000H: MOV A,B
2001H: MVI B,32H
When the instruction at the address 2000H is being executed the program counter points to
the next memory address i.e. 2001H. Stack pointer is also a 16 bit pointer which points to the
stack memory.
i. The 8085 is an 8-bit microprocessor hence it can perform operation only on two 8-bit
numbers.
ii. The 8085 has 16 bit address lines and 8-bit data lines.
vi. The 8085 cannot perform subtraction, multiplication and division of BCD number.
vii. The 8085 cannot transfer the data directly from one memory to another memory.
Carry Flag:
During an addition operation if a carry is generated from the MSB or during a subtraction
operation a borrow is generated carry flag sets indicating a carry or borrow respectively.
Therefore when
CF = 1; carry is generated
CF = 0; carry not generated
Auxiliary carry flag:
During an addition operation if a carry is generated from the lower nibble to the higher nibble,
then AC flag sets.
Parity flag:
When an addition, subtraction, multiplication, division or any logical operation takes place
then depending on the result the parity flag gets affected.
If the number of ones in the 8 LSBs are 0/2/4/6/8 then the parity flag sets i.e. PF = 1
indicating even parity
If the number of ones in the 8 LSBs are 1/3/5/7 then the parity flag resets i.e. PF = 0
indicating odd parity
Zero flag:
Whenever any arithmetic or logical operation takes place and the result is 0 then zero flag sets
to indicate that the result is 0 i.e. ZF = 1.
B = 80H
SUB B instruction is executed. The result obtained is 00H in A register. When p checks this
it has to reflect it somewhere that the result is zero, so it reflects in bit 7 which is reserved for
zero flag by setting its value to 1 i.e. ZF = 1
Sign flag:
Whenever the result of any arithmetic operation is negative the sign flag sets i.e. SF = 1
8086
16 bit Microprocessor
Accumulator size is 16 bits
Size of ALU is 16 bits
Size of data bus is 16 bits
Size of address bus is 20 bits
Memory accessible is 1 Mb
Architecture is divided into 2 units
Pipelining concept introduced
6 byte queue register available in the BIU
Memory is divided into segments as: CS, DS,
ES, SS