
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
The solutions to quiz 3 of the ece 332 microprocessors course at boise state university. It explains how to handle return addresses when calling subroutines and provides assembly code examples for performing arithmetic operations and storing results.
Typology: Quizzes
1 / 1
This page cannot be seen from the preview
Don't miss anything!

1 of 1
.text
.global _start _start:
movia r5,VCOUNT ldw r3,0(r5)
movia r7,VALUES address of VCOUNT in r address of VALUES in r movi r2, movi r4,
loop: beq r2,r3,loop_end ldw r6,0(r7) add r4,r4,r
br loop if you have r4 = 1+2+3+4 you are okay or
loop_end: r4 = r 4 = mem ( i ) i = 0
3
movia r7,SUM stw r4,0(r7) .data
VCOUNT: .word 4 VALUES: .word 1,2,3,4,
.end 10