본문 바로가기

해킹, 보안/리버싱

레지스터의 종류와 개념

범용 레지스터 (General Purpose Registrer)

AX (Accumulator register) - 산술 연산에 사용

CX (Counter register) - 시프트/회전 연산과 루프에서 사용

DX (Data register) - 산술 연산과 I/O 명령에서 사용

BX (Base Register) - 데이터의 주소를 가리키는 포인터로 사용

SP (Stack Pointer register) - 스택의 최상단을 가리키는 포인터로 사용

BP (Stack Base pointer register) - 스택의 베이스를 가리키는 포인터로 사용

SI (Source Index register) - 스트림 명령에서 소스를 가리키는 포인터로 사용

DI  (Destination Index register) - 스트림 명령에서 도착점을 가리키는 포인터로 사용

 

x86

EAX

ECX

EDX

EBX

ESP

EBP

ESI

EDI

 

x64

RAX

RCX

RDX

RBX

RSP

RBP

RSI

RDI

 

 Program Status and Control Register

EFLAGS

https://en.wikipedia.org/wiki/FLAGS_register

 

FLAGS register - Wikipedia

The FLAGS register is the status register in Intel x86 microprocessors that contains the current state of the processor. This register is 16 bits wide. Its successors, the EFLAGS and RFLAGS registers, are 32 bits and 64 bits wide, respectively. The wide

en.wikipedia.org

 

명령 포인터 레지스터 (Instruction Pointer)

명령어의 위치를 보관하는 레지스터

 

x86

EIP

 

x64

RIP

 

세그먼트 레지스터

CS - Code Segment

DS - Data Segment

SS - Stack Segment

ES - Extra Segment

FS - Extra Segment

GS - Extra Segment

 

https://quequero.org/2007/01/x64-assembly/

 

X64 Assembly - UIC Academy

Links and References Introduction Essay Links And References AMD64 documentation Introduction This article is extracted from “Moving to Windows x64” by Daniel Pistelli (Ntoskrnl) Essay Now I’ll try to explain the basics of x64 assembly. I assume the

quequero.org

 

x86 Registers