Question: show generated object file assuming there are no errors Insymbol Section ( 1 entry ) result 1 0 Outsymbol Section ( 2 entries ) get
show generated object file assuming there are no errors
Insymbol Section entry
result
Outsymbol Section entries
get
get
Object Code words
export answer
jmp mainx
answer:
word
lock:
word
main :
Idimm r
Idimm r # loop counter
Idimm r #loop counter increment
Idimm r # upper bound
doitagain:
# busy wait on the lock
Idimm # want to set the lock to
tryAgain:
Idimm r # need to wait until lock is
cmpxchg lock # if lock is then lock it
beq tryAgain # else will be set to and if so repeat
load ro answer # now have exclusive control
addi # so safe to add in the local answer
store answer
Idimm # unlock
store lock
addi
blt doitagain
# all done!
halt
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
