6.
828 Lecture Notes: x86 and PC
architecture
Outline
• PC architecture
• x86 instruction set
• gcc calling conventions
• PC emulation
PC architecture
• A full PC has:
o an x86 CPU with registers, execution unit, and memory management
o CPU chip pins...
More
6.
828 Lecture Notes: x86 and PC
architecture
Outline
• PC architecture
• x86 instruction set
• gcc calling conventions
• PC emulation
PC architecture
• A full PC has:
o an x86 CPU with registers, execution unit, and memory management
o CPU chip pins include address and data signals
o memory
o disk
o keyboard
o display
o other resources: BIOS ROM, clock, .
.
.
• We will start with the original 16-bit 8086 CPU (1978)
• CPU runs instructions:
• for(;;){
• run next instruction
• }
• Needs work space: registers
o four 16-bit data registers: AX, CX, DX, BX
o each in two 8-bit halves, e.
g.
AH and AL
o very fast, very few
• More work space: memory
o CPU sends out address on address lines (wires, one bit per wire)
o Data comes back on data lines
o or data is written to data lines
• Add address registers: pointers into memory
o SP - stack pointer
o BP - frame base pointer
o SI - source index
o DI - destination index
• Instructions are in memory too!
o IP - instruction pointer (PC on PDP-11,
Less