



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!




CMSC 212 โ F05 (lect 20)^1
CMSC 212 โ F05 (lect 20)^2
CMSC 212 โ F05 (lect 20)^3
foo: Branch R3 R0 bar Branch R4 R0 other Halt bar: Load R10 # Branch R0 R3 0 other: Load R10 # Branch R3 R0 bar Output R Branch R0 R4 0
CMSC 212 โ F05 (lect 20)^4
CMSC 212 โ F05 (lect 20)^7
CMSC 212 โ F05 (lect 20)^8
Stack
var
var
var
old Stack Pointer
Stack Pointer
Return address of current function
CMSC 212 โ F05 (lect 20)^9
0: Load R15 # 1: Branch R14 R0 3 2: Halt 3: Store R14 R15 0 4: Load R2 # 5: Negate R 6: Add R15 R2 R 7: Load R5 # 8: Store R5 R15 1 9: Load R6 # 10: Store R6 R15 2 11: Add R5 R6 R 12: Store R7 R15 3 13: Output R 14: Load R2 # 15: Add R15 R2 R 16: Load R14 R15 0 17: Branch R0 R14 0
CMSC 212 โ F05 (lect 20)^10