Assembly Exam Flashcards

1
Q

Assembly Language

A

A low-level programming language that uses mnemonic instructions to represent machine code, providing a more human-readable form for programmers. Different processors have different assembly languages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Machine Language

A

The binary language that microprocessors directly understand and execute. It consists of sequences of bits that encode instructions and data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Compiler

A

A program that translates high-level language code (like C) into lower-level languages, including assembly and ultimately machine code. Compilers often perform optimizations to improve the efficiency of the generated code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Assembler

A

A program that translates assembly code into machine code. It converts the mnemonic instructions and labels used in assembly code into the binary representation required by the processor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

x86-64

A

A 64-bit extension of the x86 architecture developed by AMD. It is widely used in modern Intel and AMD processors, featuring a larger register set and memory addressing space compared to its predecessors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

IA32

A

Intel Architecture, 32-bit, refers to the 32-bit x86 architecture commonly used before the advent of x86-64. It has a smaller register set and memory addressing capacity compared to x86-64.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Instruction Pointer (%rip)

A

A special-purpose register that holds the memory address of the next instruction to be executed. It acts as a program counter, guiding the flow of execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

General-Purpose Registers

A

Registers that can be used for a variety of purposes, such as holding data, performing arithmetic operations, and storing memory addresses. x86-64 has 16 general-purpose registers, each 64 bits wide.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

EFLAGS Register

A

A special-purpose register that contains flags or status bits reflecting the outcome of previous instructions. These flags are used for conditional branching and control flow.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

System Call

A

A mechanism for user programs to request services from the operating system. It involves a specific set of instructions and conventions to trap into the OS kernel.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Stack

A

A region of memory used for dynamic memory allocation, storing local variables, function parameters, and return addresses. The stack grows downwards in memory as data is pushed onto it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Stack Pointer (%rsp)

A

A special-purpose register that points to the current top of the stack. It is manipulated using instructions like push and pop to add or remove data from the stack.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Caller-Saved Registers

A

Registers whose values the caller function must save before calling another function if those values are needed after the call. The called function is free to modify these registers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Callee-Saved Registers

A

Registers that the called function must save and restore before returning if it uses them. The caller function can assume these registers will retain their values across the function call.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Addressing Modes

A

Different ways to specify operands in assembly instructions. Examples include immediate addressing (using a constant value), register addressing (using the contents of a register), and indirect addressing (using the contents of a memory location pointed to by a register).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Buffer Overflow

A

A security vulnerability that occurs when data written to a buffer exceeds its allocated size, potentially overwriting adjacent memory locations. This can lead to data corruption, program crashes, or even execution of malicious code.

17
Q

Stack Smashing

A

A type of buffer overflow attack that targets the return address stored on the stack, aiming to redirect execution to attacker-controlled code.

18
Q

Canary Value

A

A secret value placed on the stack near the return address as a security measure. Before returning, the function checks if the canary value has been modified, indicating a potential stack smashing attempt.