v86

分析一下 v86 第一版的代码

$ git clone https://github.com/copy/v86.git
$ git log --reverse
$ git checkout 8180d49f24833fc6cc05a90253a1f57f9045a4f5

i386 程序编译

参考 交叉编译

i386 registers

31 ... 15 ... 07 ... 00 (bit position)
Main registers (8/16/32 bits)
EAX AX AL Accumulator register
ECX CX CL Count register
EDX DX DL Data register
EBX BX BL Base register
Index registers (16/32 bits)
ESP SP Stack Pointer
EBP BP Base Pointer
ESI SI Source Index
EDI DI Destination Index
Program counter (16/32 bits)
EIP IP Instruction Pointer
Segment selectors (16 bits)
  CS Code Segment
  DS Data Segment
  ES Extra Segment
  FS F Segment
  GS G Segment
  SS Stack Segment

References