32-Bit Linux Assembly: Ep.2 – New Sections and File Manipulation Flashcards
What are the three main types of operands?
Register operand
Memory operand
Immediate operand
What does [eax] mean?
Square brackets indicate “the value located at”, so [eax] would mean “the value contained in eax”
value = 0x00408000
0x00408000 contains “0x54”
If the instruction “mov ebx, [value]” is issued, what will the value entered into the ebx register be?
0x54.
What does 70q mean in assembly?
70 in “Octal” notation.
What does 20o mean in assembly?
20 in “Octal” notation.
What does 0b10011000 mean in assembly?
10011000 in binary notation.
What is .bss short for?
Block Started by Symbol (BSS).
What is stored in the .bss section?
Uninitialised variables.
What permissions should the .bss section have?
Writeable but not executable.
What permissions should the .data section have?
Writeable but not executable.
What does the .bss section in an object file contain?
The .bss section stores the length of the units of data that are to be stored there.
What happens to the .bss section when the executable is loaded into memory?
The operating system allocates the amount of memory dictated by the .bss section, to store the uninitialised variables in.
What does resw 2, in assembly mean?
“Reserve” 2 words: 2x 16-bit variables worth of space.
How would you reserve 2 bytes of memory using assembly?
resb 2
How would you reserve 3x32-bits of memory using assembly?
resd 3