Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 22 pages
Exam (elaborations)

CSCI3130 FINAL EXAM 2025/2026 QUESTIONS AND ANSWERS 100% PASS

Document preview thumbnail
Preview 3 out of 22 pages

CSCI3130 FINAL EXAM 2025/2026 QUESTIONS AND ANSWERS 100% PASS

Content preview

CSCI3130 FINAL EXAM 2025/2026
QUESTIONS AND ANSWERS 100% PASS




Why do you need to make register rax 0 before calling C inbuilt function: printf? - ANS printf
uses a variable number of arguments and rax specifies how many SSE registers (for floating-
points) are used for the arguments. In our case we don't use any.



Major difference between high-level language vs low-level languages? - ANS High level
languages have a high level of abstraction from the hardware.



Explain the term abstraction in regards to programming languages? - ANS Making a sandwich
-- High level of abstraction: push a button to make a sandwich. No need to know any details of
how to make sandwich
-- Low level of abstraction: need to know how to place the components of the sandwich, where
should the bread go, where should the cheese go and so on.
-- No level of abstraction can be should be able to make bread, cheese and other components.



What are the advantages of learning assembly language? - ANS • Some architectures don't
have C compilers...
-- Instead, they have embedded systems and/or micro-controllers
• Writing compilers
• Real speedups
• Develop a better understanding of how the processor/compiler/language functions

1 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED

,How many general-purpose registers are there in x86_64 processor? - ANS 16



Why do you need to make register rdx 0 before division? - ANS Any non- zero number will
make the dividend {rdx,rax} a very large number.



What happens to rdx and rax after the mul instruction? - ANS -Leftmost 64 bits of the result
are stored in rdx
-Rightmost 64 bits of the results are stored in rax



How do we recognize comments in assembly code? - ANS Semicolon (;)



What does "global" assembler directive do? - ANS Allows assembly functions and labels to be
accessible to code in other object files (.o)



System calls are performed using which instruction? - ANS syscall


What instruction is used to call assembly functions, as well as external (C, C++, Fortran)
functions? - ANS call



Distinguish between section .text and section .data. - ANS Executable assembly instructions
are typically placed in the .text section and static data/variable declarations are placed in the
.data section



Syscall argument order: - ANS rdi, rsi, rdx, r10, r8, r9



Function argument order: - ANS rdi, rsi, rdx, rcx, r8, r9




2 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED

, Distinguish between db, dw, dd, and dq. - ANS •db = 1 byte or 8 bits
•dw = 2 bytes (word) or 16 bits
•dd = 4 bytes (double word) or 32 bit
•dq = 8 bytes (quadword) or 64 bits


f register rsi = 10 and rdx = 16, what would be the value of rax after the following instruction?

lea rax, [rdx+rsi*8] - ANS 96


Let's assume the following array "Array" with 16 64-bit integers:
Array: dq 3, 5, 9, 81, 13, 2, 6, 24, 33, 21, 19, 40, 93, 48, 91, 78
Using the array "Array" answer what value is moved to the %rax register based on the following
instructions:


mov rdi, 5

mov rax, Array[rdi*8] - ANS 2


The value of the following registers are preserved by convention (all other registers are NOT
guaranteed to retain their prior values after a function call): - ANS RSP, RBP, RBX, R12, R13,
R14, R15


Let's assume rcx = 0x1F5 and rax= 0xC3F.
What's in rax after the following operation:

OR rax, rcx - ANS 0xDFF


Let's assume rcx = 1F5 and rax= C3F (Hexadecimal representation). What is the value in rcx after
the following instruction:

OR rcx, rax - ANS DFF



3 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED

Document information

Uploaded on
November 4, 2025
Number of pages
22
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$12.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Fyndlay
3.6
(76)
Sold
422
Followers
81
Items
20241
Last sold
2 days ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions