×
MY GOAL IS TO PAY BACK MY PARENTS
--Your friends at LectureNotes
Close

Note for Advanced Microprocessor - AMP by COOL Indian

  • Advanced Microprocessor - AMP
  • Note
  • Guwahati University institute of science and technology - GUIST
  • 8 Topics
  • 177 Views
  • 4 Offline Downloads
  • Uploaded 8 months ago
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-1

JUMP, LOOP, AND CALL INSTRUCTIONS

Text from page-2

Looping  Repeating a sequence of instructions a certain number of times is called a loop ◦ Loop action is performed by DJNZ reg, Label  The register is decremented  If it is not zero, it jumps to the target address referred to by the label  Prior to the start of loop the register is loaded with the counter for the number of repetitions  Counter can be R0 – R7 or RAM location  A loop can be repeated a maximum of 256 times 2019/3/5 2

Text from page-3

Looping (cont.) 2019/3/5 3

Text from page-4

Nested Loop  If we want to repeat an action more times than 256, we use a loop inside a loop, which is called nested loop ◦ We use multiple registers to hold the count 2019/3/5 4

Lecture Notes