首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

CSAPP 读书笔记三

2012-10-15 
CSAPP 读书笔记31. Preprocessor - compiler - assembler - linker*.c - *.s - *.o - *2. Program C

CSAPP 读书笔记3
1. Preprocessor -> compiler -> assembler -> linker
   *.c -> *.s -> *.o -> *
2. Program Counter --> %EIP  --> Indicate the address in memory that the next instruction to be executed.
3. Register
4. condition code registers
5. floating-point registers
6. Program memory contains:
1) executable machine code for the program
2) information required by OS
3) run-time stack
4) memory allocated by user
7. Disassembler -> inspect the content of machine code
   unix> objdump -d code.o
8. Intel & ATT assembly format
  1)Intel format omit the size designation
  2)Intel format omit % in front of register names
  3)Different way describing the locations in memory
  4)Instructions with multipule operands list them in reverse order
9. Operand forms:
  1) Immediate   $0x15
  2) Register    R[Ea]
  3) Abosulte
  4) Indirect
  5) Base + displacement
  6) Indexed
  7) Scaled indexed  -> Imm + R[Eb] + R[Ei]*S
10. Effective address
11. IA32 impose that a move instruction can't have both operands refer to memory locations.
12. MOV -> MOVB, MOVW, MOVL
13. MOVS ->MOVSBW, MOVSBL, MOVSWL  (SIGNED EXTEND)
14. MOVZ ->MOVZBS, MOVZBL, MOVZWL  (ZERO EXTEND)
15. PUSHL, POPL

热点排行