

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


(like conditional operation or looping) are Branching and Subroutine calls. What is the main difference between a branch and a subroutine?
a) Branch always to an address held within a register b) Branch always to a subroutine at an addressed held within a register c) Branch always to an address determined by a label d) Branch always to a subroutine at an addressed determined by a label
a) if not equal b) if signed result is less than c) if positive d) if lower or same
a) Briefly define the Stack of a microcontroller.
b) Does the stack pointer point to (contain the address of) 1) the last byte of data placed on the stack and accessible by POP or 2) the next free memory block on stack to store data with PUSH?
a) load a value from the top of the stack into a register b) place a register value onto the stack at the location indicated by the SP register
an in-class active learning exercise. Create a flowchart for this code that maps its flow. The flowchart does not have to be “linear”; it can branch to non-linear actions.
and a subroutine. Create a new flowchart that defines how the program that executes this flowchart would be implemented within “linear” code, i.e. all actions must flow in a line with unconditional branches added as needed to achieve proper operation. You may assume the subroutine function will appear after the main loop.