SLAE32 Flashcards
32 bit assembly
Assembly to Machine
Assembler, linker and loader
C language to executable
Hello.c -> preprocessor -> hello.i -> compiler -> hello.s[assembly code] -> assembler -> hello.o[object file] -> linker{shared libraries} -> hello.exe -> loader{run time objects/libraries} -> execute code
CPU information
Lscpu or cat /proc/cpuinfo
System organization basics
CPU , memory and I/o devices connected via system bus
Control unit
Retrieve/decode instructions, retrieve/ store data in memory
Execution unit
Actual exec. Of instructions happens here
Registers and flags
Used as temp storage for execution unit
General purpose registers
Eax, ebx, ecx,edx each 32 bits long
Esp, ebp, esi,edi
Segment registers
Cs - code segment, Ds - data segment,ss - stack segment, es,fs,gs 15 bits long
Usage depends on flat or segmented memory model
Floating point unit x87 data registers
R0 to R7 are data registers
Size is 80 bits
These data registers behave like stack
Msb hold sign
Next 8 bits hold exponent
The rest hold the significand
Other x87 registers
16 bit long
Control register
Status register
Tag register
48 bit long
Last instruction pointer
Last data pointer
11 bits long
Opcode
Simd
Single instruction multiple data
Examples of simd
Mmx see sse2 sse3
These use mmx and xmm registers
What is mmx
Mmx is made up of st0-7 registers
The last 64 bits of total 80 bits is mm0 to mm7
Xmm?
Xmm0 to xmm7 and are 128 bits long