Computer Science 2208A/B Chapter Notes - Chapter 3,4,6: Memory Management, Exception Handling, Subroutine

156 views7 pages

Document Summary

Bsr proc_a = instruction to call subroutine proc_a. Processor saves address of next instruction to be executed & loads pc with address of 1st instruction in subroutine. Rts = return from subroutine instruction, occurs at end of subroutine & causes the processor to return the point immediately following subroutine call. Bl = branch with link instruction, automatically saves return address & copies pc into r14. At end of subroutine, return by transferring return address in r14 to pc. Bllt = branch with link, execution on condition less than. Implemented in microprocessors by using stack pointer to point to top of stack (tos) in memory. Two design decisions must be made when stack is implemented. Whether stack grows up toward low or down toward high memory addresses as items are pushed. Whether stack pointer points to top item on stack or first free empty space. Risc processors (like arm) require programmer to maintain the stack.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents