



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Information about an assignment for a cs 403 course, where students are required to translate given c++-like code into pseudo-assembly language and analyze the run-time stack frames at specific points. The assignment includes three functions: blah, ugh, and main. Students must write the pseudo-assembly code for each function and draw pictures of the stack frames at specified points.
Typology: Assignments
1 / 5
This page cannot be seen from the preview
Don't miss anything!




Code for blah: S SP+6, 0 S SP+6, SP+ S SP+7, SP+ J FP+
Code for ugh: S SP, FP SR FP, SP SR SP, SP+ S FP+3, 3 S FP+4, 4 S FP+5, 5 S FP+1, HERE+ J Code location for blah SR SP, FP SR FP, *FP S SP, FP SR FP, SP SR SP, SP+ S FP+3, 5 S FP+4, 4 S FP+5, 3 S FP+1, HERE+ J Code location for blah SR SP, FP SR FP, *FP J FP+
Code for bar: S SP, FP SR FP, SP SR SP, SP+ S FP+3, 4 S FP+4, 5 S FP+1, HERE+ J Code location for ugh SR SP, FP SR FP, *FP S SP, FP SR FP, SP SR SP, SP+ S FP+3, 3 S FP+4, 4 S FP+5, 5 S FP+1, HERE+ J Code location for blah SR SP, FP SR FP, *FP J FP+
Code for main: S FP+3, 0 S SP, FP SR FP, SP SR SP, SP+ S FP+3, 2 S FP+4, 3 S FP+1, HERE+ J Code location for bar SR SP, FP SR FP, *FP J FP+