From 6e2f3fbd06d1c4b997c671602e0df873a0bc2219 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Sat, 28 Jan 2017 23:40:54 +0100 Subject: [PATCH] Add doc about reg --- Readme.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Readme.md b/Readme.md index 60e0a5e..1d89d3c 100644 --- a/Readme.md +++ b/Readme.md @@ -14,6 +14,28 @@ Debug with b *0x7c00 c +== ASM reg == + +=== In 16 bits === +There is 4 main 16bits reg: AX, BX, CX, DX. +You can access the 8 MSB from AX with AH and the 8 LSB with AL.( BH,BL, CH, CL) + +SI and DI are 16bits index register often used for pointer but can contains data. + +SP is stack pointer, BP is base pointer + +AX(AH, AL), BX(BH, BL), CX(CH, CL), DX(DH, DL), SI, DI, SP, BP + +=== In 32bits === +Main register are "Extended" to 32bits but 16bits of 8bits direct access is not possible anymore. + +EAX, EBX, ECX, EDX, ESI, EDI, ESP, EBP + +=== In 64bits === +Prefixed by R +RAX, RBX, RCX, RDX, RSI, RDI, RSP, RBP + + == Bios Memory == 0x0 - 0x03FF ;IVT