Assembly Part 1 Flashcards
The format and behavior of a machine level program is defined by the ________, defining the processor state, the format of the instructions, and the effect these instructions have on the state.
Instruction set architecture
The ______ (commonly referred to as the PC and called %rip) indicate the address of the next instruction to be executed
Program counter
The integer _____ contains 16 name location storing 64-bit values. These registers can hold _____ (corresponding to C pointers) or _____ data
Register file, addresses, integer
The ____ hold status information about the most recently executed arithmetic or logical instruction. These are used to implement conditional changes in control or data flow such as is required to implement if and while statements
Condition code registers
Assembly code suffix for char (1 byte)
B
Assembly code suffix for short (2 bytes)
W
Assembly code suffix for int
L
Assembly code suffix for long
Q
Assembly code suffix for char *
Q
Assmebly code suffix for float
S
Assembly code suffix for double (8 bytes)
L
An x86-64 central processing unit (CPU) contains a set of ____ general purpose registers storing ____ bit values
16, 64
All of the x86 register we can use expect ____ and ____
Rsp and rbp
Rsp and rbp are _____ registers and should not be used for any other purpose
Stack management
Rsp is the address of the _____ of the stack (it points to the last value pushed on the stack)
Top
Rbp is a frame pointer: it points to the _____ of the stack frame of the function which is currently executing
Bottom
The ____ instruction copies a value from one location (operant 1) to another location (operand 2)
Mov
The instruction _____, the size of operand 1 and the size of operand 2 must all match
Suffix
______: constant integer data. Prefixed with _____
Immediate, $
_______: one of the 16 integer ____
Register, registers
____: 8 consecutive bytes of memory at address given by register. ____ means read from the address specified in register. (I.e, use value in register as pointer)
Memory, parentheses
(%rax)
Memory addressing mode 1
Mem[Reg[R]]
Movq(%rcx), %rax =
Register R specifies a memory address
Rax = *rcx
Memory Addressing mode 2
Imm(R) =
Movq 8(%rbp), %rdx =
Mem[Imm+Reg[R]]
Rdx = *(rbp+8)
What is size of memory address of coelinux
8 bytes