KEMBAR78
ALP intro assembly language programing.pptx
Subject :
Assembly Language Programming
Subject Type : Practical
Vocational Skill Course(VSC)
8085 Assembly Language Programming
8085 Microprocessor
Credit : 2 Max Marks : 50
Internal Assessment – 20 Marks
Module 1 –
10 Practical – 10 M
Module 2 -
10 Practical – 10 M
External Assessment- Practical Exam -30 Marks
Q1 from Module 1 – 13
M
Q2 from Module 2 – 12
M
Q3 – Viva -5 M
What is assembly Language
Microprocessor Based System
Micro Computer – Micro Processor
• Microcomputer –
A computer with a microprocessor as its CPU. Includes memory, I/O etc.
• Microprocessor –
silicon chip which includes ALU, register circuits & control circuits.
• The microprocessor is a programmable device that takes in numbers,
performs arithmetic or logical operations according to the program
(Instruction sets) stored in memory and then produces other numbers
as a result.
1) Programmable device: The microprocessor can perform different sets of operations on the data it
receives depending on the sequence of instructions supplied in the given program.
• By changing the program, the microprocessor manipulates
• the data in different ways.
2) Instructions: Each microprocessor is designed to execute a specific group of operations.
• This group of operations is called AN INSTRUCTION SET.
• This instruction set defines what the microprocessor can and cannot do.
3) Takes in: The data that the microprocessor manipulates must come from somewhere.
• It comes from what is called “input devices”.
• These are devices that bring data into the system from the outside world.
• These represent devices such as a keyboard, a mouse, switches etc.
4)Numbers: The MicroProcessor understands only binary numbers.
• A binary digit is called a bit (which comes from binary number).
5) Words, Bytes, etc.
–The earliest microprocessor (the Intel 8085 and Motorola’s 6800)
recognized 8-bit words.
–They processed information 8-bits at a time. That’s why they are called
“8-bit processors”.
–They can handle large numbers, but in order to process these numbers,
they broke them into 8-bit pieces and processed each group of 8-bits
separately.
• Later microprocessors (8086 and 68000) were designed with 16-bit words.
– A group of 8-bits were referred to as a “half-word” or “byte”.
– Also, 32 bit groups were given the name “long word”.
• Today, all processors manipulate at least 32 bits at a time and there exists microprocessors that
can process 64, 80, 128 bits
6) Arithmetic and Logic Operations:
• Every microprocessor has arithmetic operations such as add and subtract as part of its instruction set.
– Most microprocessors will have operations such as multiply and divide.
– Some of the newer ones will have complex operations such as square root.
• In addition, microprocessors have logic operations as well. Such as AND, OR, XOR, shift left, shift
right, etc.
• Again, the number and types of operations define the microprocessor’s instruction set and depends on
the specific microprocessor.
7) memory:
• When a program is entered into a computer, it is stored in memory.
• Then as the microprocessor starts to execute the instructions, it brings the
instructions from memory one at a time.
• Memory is also used to hold the data.
– The microprocessor reads (brings in) the data from memory when it needs it and writes
(stores) the results into memory when it is done.
EXECUTION OF A PROGRAM:
• the user enters its instructions in binary format into the memory.
• The microprocessor then reads these instructions and whatever data
is needed from memory, executes the instructions and places the
results either in memory or produces it on an output device.
Four
steps
of the
machin
e cycle
1) Fetch - Retrieve an
instruction from
memory.
2) Decode - Translate
the retrieved
instruction into
computer commands.
3) Execute - Execute the
computer commands.
4) Store - Send and write
the results back in
memory.
Example of a machine cycle
example of a machine cycle performing the steps mentioned
above for a math problem.
1.The computer user enters a math problem that's stored in
memory. The computer fetches that instruction from memory.
2.The control unit decodes that math problem into instructions
the computer understands.
3.The ALU (Arithmetic Logic Unit) executes the instructions to
get the answer to the math problem.
4.The problem's answer is sent to and stored in memory
where it can be accessed and displayed to the user.
8085 MICROPROCESSOR
• The 8085 microprocessor is an 8-bit microprocessor that was introduced by Intel in
1976.
• . The 8085 microprocessor became very popular and widely used in various
applications, including personal computers, embedded systems, industrial control
systems, and more.
Functional Units of 8085 Microprocessor
• The 8085 microprocessor consists of several functional units that work together to
perform various tasks
8085 Microprocessor
8085 Programming Model
• Registers
– General Purpose Registers
• B, C, D, E, H & L (8 bit registers)
• Can be used singly
• Or can be used as 16 bit register pairs
– BC, DE, HL
• H & L can be used as a data pointer (holds memory address)
– Special Purpose Registers
• Accumulator (8 bit register)
– Store 8 bit data
– Store the result of an operation
– – Store 8 bit data during I/O transfer
Accumulator Flags
BC
DE
H L
Program Counter
Stack Pointer
Address 8 Data
16
• Flag Register
– 8 bit register – shows the status of the microprocessor before/after an
operation
– S (sign flag), Z (zero flag), AC (auxillary carry flag), P (parity flag) &
CY (carry flag)
– Sign Flag
• Used for indicating the sign of the data in the accumulator
• The sign flag is set if negative (1 – negative)
• The sign flag is reset if positive (0 –positive)
D7 D6 D5 D4 D3 D2 D1 D0
S Z X AC X P X CY
https://E-next.in
• Carry Flag
–Is set if there is a carry or borrow from arithmetic operation
• Zero Flag
– Is set if result obtained after an operation is 0
– Is set following an increment or decrement operation of that register
10110011
+01001101
100000000
Carry 1 0010 0001
1011 0101 1011 0101
+ 0110 1100 - 1100 1100
Borrow 1 1110 1001
• Auxillary Carry Flag
– Is set if there is a carry out of bit 3
• Parity Flag
– Is set if parity is even
– Is cleared if parity is odd
• The Program Counter (PC)
– This is a register that is used to control the sequencing of the
execution of instructions.
– This register always holds the address of the next instruction.
– Since it holds an address, it must be 16 bits wide.
• The Stack pointer
– The stack pointer is also a 16-bit register that is used
to point into memory.
– The memory this register points to is a special area called
the stack.
– The stack is an area of memory used to hold data that
will be retreived soon.
8085 Instruction
Set
ALP intro assembly language programing.pptx

ALP intro assembly language programing.pptx

  • 1.
    Subject : Assembly LanguageProgramming Subject Type : Practical Vocational Skill Course(VSC) 8085 Assembly Language Programming 8085 Microprocessor Credit : 2 Max Marks : 50 Internal Assessment – 20 Marks Module 1 – 10 Practical – 10 M Module 2 - 10 Practical – 10 M External Assessment- Practical Exam -30 Marks Q1 from Module 1 – 13 M Q2 from Module 2 – 12 M Q3 – Viva -5 M
  • 3.
  • 6.
  • 7.
    Micro Computer –Micro Processor • Microcomputer – A computer with a microprocessor as its CPU. Includes memory, I/O etc. • Microprocessor – silicon chip which includes ALU, register circuits & control circuits. • The microprocessor is a programmable device that takes in numbers, performs arithmetic or logical operations according to the program (Instruction sets) stored in memory and then produces other numbers as a result.
  • 8.
    1) Programmable device:The microprocessor can perform different sets of operations on the data it receives depending on the sequence of instructions supplied in the given program. • By changing the program, the microprocessor manipulates • the data in different ways. 2) Instructions: Each microprocessor is designed to execute a specific group of operations. • This group of operations is called AN INSTRUCTION SET. • This instruction set defines what the microprocessor can and cannot do. 3) Takes in: The data that the microprocessor manipulates must come from somewhere. • It comes from what is called “input devices”. • These are devices that bring data into the system from the outside world. • These represent devices such as a keyboard, a mouse, switches etc. 4)Numbers: The MicroProcessor understands only binary numbers. • A binary digit is called a bit (which comes from binary number).
  • 9.
    5) Words, Bytes,etc. –The earliest microprocessor (the Intel 8085 and Motorola’s 6800) recognized 8-bit words. –They processed information 8-bits at a time. That’s why they are called “8-bit processors”. –They can handle large numbers, but in order to process these numbers, they broke them into 8-bit pieces and processed each group of 8-bits separately. • Later microprocessors (8086 and 68000) were designed with 16-bit words. – A group of 8-bits were referred to as a “half-word” or “byte”. – Also, 32 bit groups were given the name “long word”. • Today, all processors manipulate at least 32 bits at a time and there exists microprocessors that can process 64, 80, 128 bits
  • 10.
    6) Arithmetic andLogic Operations: • Every microprocessor has arithmetic operations such as add and subtract as part of its instruction set. – Most microprocessors will have operations such as multiply and divide. – Some of the newer ones will have complex operations such as square root. • In addition, microprocessors have logic operations as well. Such as AND, OR, XOR, shift left, shift right, etc. • Again, the number and types of operations define the microprocessor’s instruction set and depends on the specific microprocessor. 7) memory: • When a program is entered into a computer, it is stored in memory. • Then as the microprocessor starts to execute the instructions, it brings the instructions from memory one at a time. • Memory is also used to hold the data. – The microprocessor reads (brings in) the data from memory when it needs it and writes (stores) the results into memory when it is done.
  • 11.
    EXECUTION OF APROGRAM: • the user enters its instructions in binary format into the memory. • The microprocessor then reads these instructions and whatever data is needed from memory, executes the instructions and places the results either in memory or produces it on an output device.
  • 12.
    Four steps of the machin e cycle 1)Fetch - Retrieve an instruction from memory. 2) Decode - Translate the retrieved instruction into computer commands. 3) Execute - Execute the computer commands. 4) Store - Send and write the results back in memory.
  • 13.
    Example of amachine cycle example of a machine cycle performing the steps mentioned above for a math problem. 1.The computer user enters a math problem that's stored in memory. The computer fetches that instruction from memory. 2.The control unit decodes that math problem into instructions the computer understands. 3.The ALU (Arithmetic Logic Unit) executes the instructions to get the answer to the math problem. 4.The problem's answer is sent to and stored in memory where it can be accessed and displayed to the user.
  • 14.
    8085 MICROPROCESSOR • The8085 microprocessor is an 8-bit microprocessor that was introduced by Intel in 1976. • . The 8085 microprocessor became very popular and widely used in various applications, including personal computers, embedded systems, industrial control systems, and more. Functional Units of 8085 Microprocessor • The 8085 microprocessor consists of several functional units that work together to perform various tasks
  • 15.
  • 17.
  • 18.
    • Registers – GeneralPurpose Registers • B, C, D, E, H & L (8 bit registers) • Can be used singly • Or can be used as 16 bit register pairs – BC, DE, HL • H & L can be used as a data pointer (holds memory address) – Special Purpose Registers • Accumulator (8 bit register) – Store 8 bit data – Store the result of an operation – – Store 8 bit data during I/O transfer Accumulator Flags BC DE H L Program Counter Stack Pointer Address 8 Data 16
  • 19.
    • Flag Register –8 bit register – shows the status of the microprocessor before/after an operation – S (sign flag), Z (zero flag), AC (auxillary carry flag), P (parity flag) & CY (carry flag) – Sign Flag • Used for indicating the sign of the data in the accumulator • The sign flag is set if negative (1 – negative) • The sign flag is reset if positive (0 –positive) D7 D6 D5 D4 D3 D2 D1 D0 S Z X AC X P X CY https://E-next.in
  • 20.
    • Carry Flag –Isset if there is a carry or borrow from arithmetic operation • Zero Flag – Is set if result obtained after an operation is 0 – Is set following an increment or decrement operation of that register 10110011 +01001101 100000000 Carry 1 0010 0001 1011 0101 1011 0101 + 0110 1100 - 1100 1100 Borrow 1 1110 1001
  • 21.
    • Auxillary CarryFlag – Is set if there is a carry out of bit 3 • Parity Flag – Is set if parity is even – Is cleared if parity is odd
  • 22.
    • The ProgramCounter (PC) – This is a register that is used to control the sequencing of the execution of instructions. – This register always holds the address of the next instruction. – Since it holds an address, it must be 16 bits wide. • The Stack pointer – The stack pointer is also a 16-bit register that is used to point into memory. – The memory this register points to is a special area called the stack. – The stack is an area of memory used to hold data that will be retreived soon.
  • 23.