Introduction To Microprocessors
Introduction To Microprocessors
Assembly Language
History of Microprocessor
Arithmetic
and Logic
Unit (ALU)
Register
Array
Accumulator
Temp.
Reg
Flag
Reg
Instruction
Reg
Arithmetic and
Logic Unit
Instruction
decoder
Stack Pointer
Program Counter
Incrementer/ Decrementer
Address latch
Data/address Buffer
AD0-AD7
8- bit External
Data bus
Clock
Write
Read
RAM memory
Accumulator 8 bit register which holds the latest result from ALU
Program counter 16 bit register which holds the address of the next
instruction to be executed
Various Flags
Sign Flag:If the result of the latest arithmetic operation is having MSB (mostsignificant byte) 1 (meaning it is a negative number), then the sign flag is set.
Otherwise, it is reset to 0 which means it is a positive number.
Zero flag: If the result of the latest operation is zero, then zero flag will be set;
otherwise it be reset.
Auxiliary Carry Flag: This flag is not accessible to programmer. This flag will
be used by the system during BCD (binary-coded decimal) operations.
Parity Flag: If the result of the latest operation is having even number of 1s,
then this flag will be set. Otherwise this will be reset to 0. This is used for error
checking.
Carry Flag: If the result of the latest operations exceeds 8-bits then this flag will
be set. Otherwise it be reset.
An example assembly
language program
Address Instruction
202A
202C
202E
MVI
MVI
ADD
A, 21
B, 2A
B
202F
STA
41 FF
2032
HLT
Instruction/Data
202A
202B
202C
202D
202E
202F
2030
2031
2032
MVI
21
MVI
2A
ADD
STA
FF
41
HLT
A,
B,
B
Address Instruction
2020
2022
2023
2024
MVI
INR
MOV
SUB
B, 24
B
A, B
B
2025
STA
5F FF
2028
HLT
Reference:
http://www.brighthub.com/engineering/electric
al/articles/51225.aspx
http://www.cpu-world.com/Arch/8085.html
http://www.ehow.com/way_5230222_8085microprocessor-tutorial.html
http://www.brighthub.com/engineering/electric
al/articles/51225.aspx