P ROGRAMMING T ECHNIQUES : L OOPING, C OUNTING AND I NDEXING L ECTURE 7 Gunjeet Kaur Dronacharya group of Institutions.

Slides:



Advertisements
Similar presentations
Lesson 5-1 Example Example 1 Draw an array to model the expression 12 ÷ 4. 1.Identify the divisor (the second number). This represents the number.
Advertisements

Flow of Control Instruction/Control structure Looping structure Looping structure Branching structure Branching structure For assembly language program.
PROGRAMMING WITH 8085 BTCS-404 (MALP) B.Tech 4th SEM. IT
8085 Architecture & Its Assembly language programming
Parul Polytechnic Institute Parul Polytechnic Institute Subject Code : Name Of Subject : Microprocessor and assembly language programming Name.
8085 Architecture & Its Assembly language programming
ALGORITHMS & FLOWCHARTING II
Learning how to use the Little man computer
The CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches.
TK2633: MICROPROCESSOR & INTERFACING
Flow Control Instructions
DEEPAK.P MICROPROCESSORS AND APPLICATIONS Mr. DEEPAK P. Associate Professor ECE Department SNGCE 1.
Dale & Lewis Chapter 5 Computing components. Let’s design a computer Generic CPU with registers −Program counter (PC) – 5 bits (size of addresses) −Instruction.
Branching on Zero A Worked Example. Branching on Zero Countdown from 99 to 1, then stop Cell Code Description 00LDA Load from … 0110 … cell 10 02OUT Output.
8085 Addressing Modes.  The number & Different kind of ways the programmer can refer to data stored in the memory  The different ways that a microprocessor.
1 CS Programming Languages Random Access Machines Jeremy R. Johnson.
INSTRUCTION SET OF MICROPROCESSOR 8085
UNDERSTANDING ASSEMBLY LANGUAGE.
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 12 by Engineer A. Lecturer Aymen Hasan AlAwady 25/3/2014 University of Kufa - Information Technology Research and Development.
Model Computer CPU Arithmetic Logic Unit Control Unit Memory Unit
Computer Architecture Lecture 12 by Engineer A. Lecturer Aymen Hasan AlAwady 17/3/2014 University of Kufa - Information Technology Research and Development.
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 5 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Intro to Programming Web Design ½ Shade Adetoro. Programming Slangs IDE - Integrated Development Environment – the software in which you develop an application.
Assembly Language Friday, Week 5 Monday, Week 6. Assembly Language  Set of mnemonic names for the instructions in a particular computer's machine language.
Assembly Language. Symbol Table Variables.DATA var DW 0 sum DD 0 array TIMES 10 DW 0 message DB ’ Welcome ’,0 char1 DB ? Symbol Table Name Offset var.
Interfacing Data Converters. D/A converters Design an O/P port with the address FFh to interface the 1408 D/A converter that is calibrated for 0 to 10V.
Assembly Language Programming of 8085 BY Prof. U. V. THETE Dept. of Computer Science YMA.
Computer Architecture Lecture 14 by Engineer A. Lecturer Aymen Hasan AlAwady 14/4/2014 University of Kufa - Information Technology Research and Development.
2/22/20161 Assembly Language (continue). 2/22/20162 Assembly Language Format LabelOpcodeOperandComment Start:LXISP,3FF0H;Initialize stack pointer DelimiterPlacement.
This is where you can reset and run your program. If your program has an “INP” (input) command, you will type it in this box here. Using the LMC These.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني 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.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني 8085 Instruction Set Instruction types. data transfer group. Arithmetic group.
Addressing Modes of 8085 μP PRESENTED BY:- KRISHNA BALLABH GUPTA
One area where in which microprocessor and microcomputers have a major impact is industrial processor control systems. Process control involves first.
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
Interfacing Keyboard and Seven Segment Display Lecture 2
Assembly Language (continue)
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
1. Introduction A microprocessor executes instructions given by the user Instructions should be in a language known to the microprocessor Microprocessor.
Counters & Time Delays.
Introduction to 8085 Instructions
Presented by: Chi Yan Hung
Dividing Decimals.
Interfacing of stepper motor
Additional data transfer and 16 bit arithmetic instruction Lecture 1
EMT 245: lecture 4: assembly language
R.RAJKUMAR DEPARTMENT OF CSE
Systems Architecture I (CS ) Lecture 1: Random Access Machines
Detailed Review of the 8085 Instruction Set.
Prepared by Kenan BOZDAŞ
INSTRUCTION SET OF 8085.
Dividing Decimals.
الفصل الثاني الخوارزمية
TK2633: MICROPROCESSOR & INTERFACING
Programming Examples.
ICT Programming Lesson 3:
Serial Communications
Systems Architecture I (CS ) Lecture 1: Random Access Machines
Addressing Modes of 8085.
Learning how to use the Little man computer
Little Man Computer.
Presentation transcript:

P ROGRAMMING T ECHNIQUES : L OOPING, C OUNTING AND I NDEXING L ECTURE 7 Gunjeet Kaur Dronacharya group of Institutions

L OOPING, COUNTING AND I NDEXING Continuous loop-repeat task continuously Conditional loop-repeats a task until certain data conditions are met. Flowchart of continuous loop

L OOPING, COUNTING AND I NDEXING Looping-In this technique, the program is instructed to execute certain set of instructions repeatedly to execute a particular task number of times. Counting-This technique allows programmer to count how many times the instruction/set of instructions are executed. Indexing-This technique allows programmer to point or refer the data stored in sequential memory location one by one.

Start Initialization Data Acquisition Data Processing Temporary storage of partial results Getting ready for next operation Decision Making. Are all operations complete? Output Stop Yes Generalized programming flowchart

D IVISION OF TWO 8-B IT N UMBERS LDA 2000H ;divisor MOV B,A LDA 2001H ;dividend MVI C, 00H LOOP: CMP B JC BRANCH SUB B INR C JMP LOOP BRANCH: STA 3000H ;reminder MOV A,C STA 3001H ;quotient HLT

ARRANGE DATA ARRAY IN ASCENDING ORDER LXI H,2000 MOV C,M DCR C REPEAT: MOV D,C LXI H,2001 LOOP: MOV A,M INX H CMP M JC SKIP MOV B,M MOV M,A DCX H MOV M,B INX H SKIP: DCR D JNZ LOOP DCR C JNZ REPEAT HLT