x86 Assembly Language - Part 1 Flashcards

1
Q

Name the 3 aspects of computer design

A

Instruction Set Architecture (ISA), Computer Organization, and Computer Hardware

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

Define Instruction Set Architecture (ISA)

A

ISA refers to the actual machine interface visible to a programmer, such as the instruction set, registers, memory organization, and exception (interrupt) handling.

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

2 types of Instruction Set Architecture

A

Reduced Instruction Set Computer (RISC) architecture and Complex Instruction Set Computer (CISC) architecture and

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

Features of RISC ISA

A
  • Fixed length encoding (ALL instructions are the SAME length)
  • Addressing modes are typically bases and displacements.
  • Arithmetic & logical operations (ALU) can be performed on registers.
  • The only instructions that can affect memory are load and store instructions.
  • No condition registers
  • RISC processors use less power and generate less energy (heat).
  • Large number of registers (32, 64, or 128 usually)
  • Register-intensive procedural linkage: registers used for procedure arguments, return values, and addresses.
  • All processors in smartphones and tablets are of RISC architecture.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define load instruction

A

Move data from memory to a register

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

Define store instruction

A

Move data from a register to memory

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

Define load-store architecture

A

Move data from memory to a register (load) or to memory from a register (store).

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

Features of CISC ISA

A
  • Variable length encoding (instruction length varies)
  • More addressing modes, such as base, displacement, index, registers, sclae factors, etc.
  • Arithmetic & logical operations (ALU) can be performed on registers OR directly on memory.
  • Condition codes hold the side effects of instructions.
  • CISC processors use more power and generate more energy (heat).
  • Large number of registers (32, 64, or 128 usually)
  • Stack-intensive procedural linkage: stacks used for procedural arguments, return values, and addresses.
  • Intel IA-32 processors and other 64-bit versions of the ISA are of CISC architecture; found in over 90% of desktops and laptops computers.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the 64-bit (8-byte) integer registers in x86-64?

A

%rax, %rbx, %rcx, %rdx, %rsi, %rdi, %rbp, %rsp, %rN, where 8 <= N <= 15

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

What are the 32-bit (4-byte) integer registers in x86-64?

A

%eax, %ebx, %ecx, %edx, %esi, %edi, %ebp, %esp, %rNd, where 8 <= N <= 15

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

What are the 16-bit (2-byte) integer registers in x86-64?

A

%ax, %bx, %cx, %dx, %si, %di, %bp, %sp, %rNw, where 8 <= N <= 15

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

What are the 8-bit (1-byte) integer registers in x86-64?

A

%al, %bl, %cl, %dl, %sil, %dil, %bpl, %spl, %rNb, where 8 <= N <= 15

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

What are the general-purpose 64/32/16/8-bit registers? What are they used for?

A

%rax/eax/ax/al, %rbx/ebx/bx/bl, %rcx/ecx/cx/cl, %rdx/edx/dx/dl, %rsi/esi/si/sil, %rdi/edi/di/dil, %rN/rNd/rNw/rNb, where 8 <= N <= 15. General-purpose registers are used to store integer data types and addresses.

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

What are the stack management registers?

A

They are rsp and rbp - %rsp is the address of the top of the stack; it points to the last value pushed onto the stack. %rbp is a frame pointer; it points to the bottom of the stack frame of the function currently being executed.

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

Define the mov instruction

A

The mov instruction copies N number of bytes from a source operand to a destination operand, where the size of the source and destination determines N.

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