ECE 2730 Assembly Lab Final || All Questions Answered Correctly.
0 view 0 purchase
Course
ECE 2730 Assembly
Institution
ECE 2730 Assembly
How do you compile assembly code with a C driver file? correct answers gcc -Wall -m32 drvr.c assmbly.s -o progName
Why can learning the fundamentals from assembly help you in general? correct answers 1- Assembly is lower level than C, so it allows us to better understand how computers work/are w...
ECE 2730 Assembly Lab Final || All Questions Answered
Correctly.
How do you compile assembly code with a C driver file? correct answers gcc -Wall -m32 drvr.c
assmbly.s -o progName
Why can learning the fundamentals from assembly help you in general? correct answers 1-
Assembly is lower level than C, so it allows us to better understand how computers work/are
working when programs are being ran
2- Helps you identify potential bottlenecks
3- Allows you to understand the base operations that occur on your system, which in turn allows
you to modify the way you write code in order to optimize for your specific goal.
How do you declare variables in assembly? correct answers .comm globVar, 4
(assuming you want to declare a 4 byte variable called globVar)
How do you do basic arithmetic instruction? correct answers dst +=src => addl src,dst (one must
be register)
b = b-c => subl c,b
a = a*b => movl a,%eax mull b (stored in a register, overflow is stored in d register)
a = a/b => movl a,%eax divl b (should always clear d register first, answer is stored in a,
remainder is stored in d)
How do you do conditional statements using conditional? correct answers jc label - jump if carry
jnc label - jump if not carry
jz label - jump if zero
jnz label - jump if not zero
js label - jump is sign (negative)
jns label - jump if no sign (positive)
jo label - jump if overflow
jno label - jump if not overflow
jpo label - jump is parity is odd
jpe label - jump if parity is even
How do you do conditional statements using unconditional jumps? correct answers je label #
jump if equal
jne label # jump if not equal
jg label # jump if greater than
jng label # jump if not greater than
jl label # jump if less than
jnl label # jump if not less than
jge label # jump if greater or equal
jnge label # jump if not greater or equal
jle label # jump if less or equal
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller FullyFocus. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $9.99. You're not tied to anything after your purchase.