









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
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The digital system design, is very helpful series of lecture slides, which made programming an easy task. The major points in these laboratory assignment are:Execution of Machine Code, Machine State and Operations, Longer Assembly Example, Symbolic Address, Behavioral Simulation, Architected State, Jump and Link Register, High Level Semantics, Assembly Code
Typology: Slides
1 / 16
This page cannot be seen from the preview
Don't miss anything!
lw 1 0 five load reg1 with 5 (uses symbolic address) lw 2 1 3 load reg2 with -1 (uses numeric address)
start add 1 1 2 decrement reg
beq 0 1 2 goto end of program when reg1 equals 0 beq 0 0 start go back to the beginning of the loop noop
done halt end of program
five .fill 5
neg1 .fill -
stAddr .fill start will contain the address of start (2)
Converting high level semantics to assembly
code
C: printf(“hello world\n”);
Need to pass parameters
Need to save return address
Need to jump to printf
Need to get return value (if used)
Execute instructions for printf()
Saving registers during a call
The call frame is used to store anything required to support function calls
We just wasted our time… (and space)