Computer Architecture Lecture 14 by Engineer A. Lecturer Aymen Hasan AlAwady 14/4/2014 University of Kufa - Information Technology Research and Development.

Slides:



Advertisements
Similar presentations
8085 Architecture & Its Assembly language programming
Advertisements

Microprocessors.
8085 Architecture & Its Assembly language programming
1 Chapter 3 Jump, Loop, and Call Instructions. 2 Sections 3.1 Loop and Jump Instructions 3.2 Call Instructions 3.3 Time Delay Generation and Calculation.
Processor System Architecture
AMIE NBCAFE VIDEO TUTORIAL ON W HAT IS A FLAG OF A M ICROPROCESSOR 8085 AND ROLE OF IT ? Lecture by Subham Dutta See at
The CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches.
Parul Polytechnic Institute Parul Polytechnic Institute Subject Code : Name Of Subject : Microprocessor and assembly language programming Name.
INSTRUCTION SET OF MICROPROCESSOR 8085
The 8051 Microcontroller and Embedded Systems
Computer Architecture Lecture 8 by Engineer A. Lecturer Aymen Hasan AlAwady 30/12/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
Computer Architecture Lecture 13 – part 2 by Engineer A. Lecturer Aymen Hasan AlAwady 7/4/2014 University of Kufa - Information Technology Research and.
Computer Architecture Lecture 9 by Engineer A. Lecturer Aymen Hasan AlAwady 10/2/2014 University of Kufa - Information Technology Research and Development.
Stack Stack Pointer A stack is a means of storing data that works on a ‘Last in first out’ (LIFO) basis. It reverses the order that data arrives and is.
Microprocessor Dr. Rabie A. Ramadan Al-Azhar University Lecture 7.
Computer Architecture Lecture 12 by Engineer A. Lecturer Aymen Hasan AlAwady 25/3/2014 University of Kufa - Information Technology Research and Development.
Computer Architecture Lecture 12 by Engineer A. Lecturer Aymen Hasan AlAwady 17/3/2014 University of Kufa - Information Technology Research and Development.
Computer Architecture Lecture 13 – part 1 by Engineer A. Lecturer Aymen Hasan AlAwady 31/3/2014 University of Kufa - Information Technology Research and.
Microprocessor. Interrupts The processor has 5 interrupts. CALL instruction (3 byte instruction). The processor calls the subroutine, address of which.
The 8051 Microcontroller and Embedded Systems
Computer Architecture Lecture 11 by Engineer A. Lecturer Aymen Hasan AlAwady 10/3/2014 University of Kufa - Information Technology Research and Development.
Lecture Set 4 Programming the 8051.
Ass Prof Dr Masri Ayob TK 2633: Microprocessor & Interfacing Lecture 6: Control Instructions.
Computer Architecture Lecture 5 by Engineer A. Lecturer Aymen Hasan AlAwady 25/11/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
Computer Architecture Lecture 4 by Engineer A. Lecturer Aymen Hasan AlAwady 17/11/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
Assembly Language Programming of 8085 BY Prof. U. V. THETE Dept. of Computer Science YMA.
JUMP, LOOP, AND CALL INSTRUCTIONS
2/22/20161 Assembly Language (continue). 2/22/20162 Assembly Language Format LabelOpcodeOperandComment Start:LXISP,3FF0H;Initialize stack pointer DelimiterPlacement.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
8 085Microprocessor Temp Reg (8) Accumulator (A reg) Flag flip flops(8) Instruction Register (8) Arithmetic Logic Unit ALU Instruction Decoder and Machine.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني 8085 Instruction Set logic group. Branch group. Stack memory and machine control. Addressing modes.
Gunjeet Kaur Dronacharya Group of Institutions COUNTERS AND TIME DELAYS LECTURE 3.
The 8085A is a general-purpose microprocessor with low hardware overhead requirements. Within the 8085A are contained the functions of clock generation,
8085 Microprocessor Architecture
Seminar On 8085 microprocessor
Gursharan Singh Tatla INSTRUCTION SET OF 8085 Gursharan Singh Tatla Gursharan Singh Tatla
Unit 1 Instruction set M.Brindha AP/EIE
PROGRAMMING OF 8085 PROCESSOR
Assembly Language (continue)
Classification of Instruction Set of 8051
Gunjeet Kaur Dronacharya Group of institutions
Assembly Language Programming of 8085
Microprocessor T. Y. B. Sc..
Detailed Review of the 8085 Instruction Set.
3.Instruction Set of 8085 Consists of 74 operation codes, e.g. MOV
Counters & Time Delays.
Serial I/O and Data Communication.
Lecture Set 5 The 8051 Instruction Set.
Introduction to 8085 Instructions
TAO1221 COMPUTER ARCHITECTURE AND ORGANIZATION LAB 3 & 4 Part 2
8085 microprocessor.
The 8085 Microprocessor Architecture
Interfacing of stepper motor
Data Processing Instructions
MICROPROCESSOR AND PERIPHERAL DEVICES
Additional data transfer and 16 bit arithmetic instruction Lecture 1
EMT 245: lecture 4: assembly language
Number Representations and Basic Processor Architecture
Detailed Review of the 8085 Instruction Set.
Prepared by Kenan BOZDAŞ
Chapter 1 Introduction.
INSTRUCTION SET OF 8085.
Conditional Jumps and Time Delays
TK2633: MICROPROCESSOR & INTERFACING
Serial Communications
Conditional Jumps and Time Delays
AGENDA Architecture Microprocessor Communication and Bus Timings
AGENDA Architecture Microprocessor Communication and Bus Timings
Serial Communications
Presentation transcript:

Computer Architecture Lecture 14 by Engineer A. Lecturer Aymen Hasan AlAwady 14/4/2014 University of Kufa - Information Technology Research and Development Center 1 1

1. Review on Rotate Operations Rotate Rotate the contents of the accumulator one position to the left or right. 1.RLC Rotate the accumulator left. Bit 7 goes to bit 0 AND the Carry flag. 2.RAL Rotate the accumulator left through the carry. Bit 7 goes to the carry and carry goes to bit 0. 3.RRC Rotate the accumulator right. Bit 0 goes to bit 7 AND the Carry flag. 4.RAR Rotate the accumulator right through the carry. Bit 0 goes to the carry and carry goes to bit 7. 2

2. Rotate instructions examples MVI A,FAh A = RLC A= after RLC Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0 0 Carry flag 1

2. Rotate instructions examples MVI A,FAh A = RAL A= After RAL Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0 0 Carry flag 1

3. Applications of Rotate Instructions The rotate operations are commonly used for arithmetic multiply and divide operations and for serial data transfer. 1. Arithmetic multiply and divide EX: If A = = 08H 1. By rotating right, A will be (A) = = 04H This means that A is divided by By rotating left, A will be (A)= = 10H This means that A is multiplied by 2. (10H = 16D). Note: These procedure are invalid when logic 1 is rotated left from D7 to D0 or vice versa. Ex: if A= 80H, when rotated left it becomes 01H. 5

3.1 Applications of Rotate Instructions 2. Serial data transfer: the data can be transferred serially through rotating the content of the accumulator left or right. MVI A, B RAR When D7 is rotated into D6, the SOD (Serial Output Data line) line is enabled and the content of carry are placed in D7. Q: Mention the purpose of SID and SOD lines. Ans: SID (Serial input data line): It is an input line through which the microprocessor accepts serial data. SOD (Serial output data line): It is an output line through which the microprocessor sends output serial data. 6

3.2 Applications of Rotate Instructions Q: A set of ten signed numbers stored in memory locations starting at 20AAH. The numbers are expected to be positive. Write a prog. to check where it is positive or negative, reject the negative numbers and store the positive numbers in 2000h. MVI d,10 LXI H,20AAH LXI B,2000h NEXT: MOV A,M RAL JC REJECT RAR STAX b inx b inx h Jz end; jump when the last iteration of d is equal to zero to avoid error in the loop when d is JNZ NEXT further decremented. REJECT: inx h dcr d JNZ NEXT End: hlt 7 The data in 20AAH 28, D8, C2, 21, 24, 30, 2F, 19,F2,9F Note: the D7 of the data is indicating the sign of the signed numbers. So, we will check D7 by rotating it to carry flag.

Program. 8 FACTORIAL OF 8 BIT NUMBER

4. Delay loops Some times we need to know the number of iterations on the program. So, we have to reverse the way of calculating the delay of the loop. If we knew that the frequency of the 8085 is 2 MHz Time Delay = No. of T-States / Frequency The following is an example of a delay loop: MVI C, Num 7 T-States, we need to calculate Num LOOP DCR C 4 T-States JNZ LOOP 10 T-States If we knew that Time Delay = mSec ( Total Delay T Delay = Tstat Delay X 0.5 μSec = mSec) Tstat Delay= / =3574 9

4.1 Delay Loops (Contd.) Using these formulas, we can calculate the time delay for the previous example: Tdelay= TO+ TL TO= 7 T-States Delay of the MVI instruction TL= (14 X Num) -3 = 3567 T-States Tdelay= 14Num – 3+7= 3574 T-State Y = 255 times or FFH Total Delay T Delay = 3574 X 0.5 μSec = mSec µSec (Microsecond)= mSec (Milisecond) =

JMP and Call! Q: Explain the difference between a JMP instruction and CALL instruction. Ans: A JMP instruction permanently changes the program counter. A CALL instruction leaves information of PC on the stack so that the original program execution sequence can be resumed. 11

12 End of lecture 14