You are on page 1of 2

Sự giống và khác nhau giữa vi xử lý 8086 và CPU của vi xử lý ARM Cortex M

Similarities:
 Both of them use registers to transfer data
 Registers:
- ARM: R13 (Stack Pointer –> SP in 8086)
- ARM: R15, Program Counter (PC) -> points to the next instruction to
be fetched from memory (like the IP (Instruction Pointer) register of
8086)
- ARM and 8086 have registers to show status (Flag registers in 8086
and Status registers in ARM)
 Use stack structure and little endian

Differences:

8086 microprocessors ARM Cortex-M CPUs


- Memory Segmentation: - No memory segmentation structure
 4 segments, each segment has 64
KB memory
 Using 20 bit address (= 1MB
address)
 2 units: Bus Interface Unit and
Execution Unit

- Registers: (16 bit) - Registers: (32 bit)


 4 general-purpose registers: AX,  R0 -> R12: General-purpose
BX, CX, DX (all pertain to the EU registers (13 registers)
block)  R13: Stack Pointer (SP) divided
 CS (Code Segment), DS (Data into Main Stack Pointer (MSP – for
Segment), SS (Stack Segment), ES OS software) and Process Stack
(Extra Segment) (pertain to the Pointer (PSP – for user software).
BIU) Only 1 register active at a time
 SI (Source Index), DI (Destination (The software considering is in a
Index), BS (Base Pointer) high-reliability OS)
 R14: Link Register (LR) -> Store
return location for functions
 R15: Program Counter (PC) ->
points to the next
- Physical Address: (20 bit) - Aliased-address using bit-banding
 Physical address = Segment formula:
address (16 bit) * 10h + Offset  To access bit b of the byte in RAM:
address (16 bit) 0x2200.0000 + 32*n + 4*b
n means address 0x2000.0000 + n
 To access bit b of the byte in I/O
space: 0x4200.0000 + 32*n + 4*b
n means address 0x4000.0000 + n

- Data: - Data:
 A word = 16 bit data  A halfword = 16 bit data
 A word = 32 bit data

- Instructions: - Instructions:
 Depend on each instruction  All are halfword aligned (16 bit)

- Flag Registers: - Status Registers:


 6 status flags: CF (Carry Flag), PF  3 status registers: APSR
(Parity Flag), AF (Auxiliary Flag), (Application Program Status
ZF (Zero Flag), SF (Sign Flag), OF Register), IPSR (Interrupts
(Overflow Flag) Program Status Register), EPSR
 3 control flags: TF (Trap Flag), IF (Execution Program Status
(Interrupt Flag), DF (Direction Register)
Flag)  Special bits: N (Negative?), Z (the
result is zero?), C (carry is set on
an unsigned overflow), V (signed
overflow), Q (saturation flag), T
(always be 1)

- Stack: - Stack:
 Only 1 stack  Divided into 2 stacks: The Main
Stack and The Process Stack

You might also like