-
Notifications
You must be signed in to change notification settings - Fork 5
/
TODO.txt
84 lines (80 loc) · 3.3 KB
/
TODO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Data Movement Instructions: - ✅
MOV: Move data between registers or between memory and registers. - ✅
LEA: Load effective address. - ✅
Arithmetic and Logic Instructions:
ADD, SUB, MUL, DIV: Basic arithmetic operations. - ✅
AND, OR, XOR, NOT: Logical operations. - ✅
INC, DEC: Increment and decrement. - ✅
Control Flow Instructions:
JMP: Unconditional jump. - ✅
JE, JNE, JZ, JNZ: Conditional jumps. - ✅
CALL, RET: Subroutine call and return. - ✅
CMP: Compare values (used with conditional jumps).
Stack Instructions:
PUSH, POP: Push onto and pop from the stack. - ✅
Input/Output Instructions:
IN, OUT: Input/output operations.
Flag Control Instructions:
CLC, STC, CLI, STI: Control flags. - ✅
Miscellaneous Instructions:
NOP: No operation. - ✅
HLT: Halt the processor. - ✅
INT: Software interrupt. - ✅
Extra:
SYSCALL: for long mode interrupts. - ✅
MOVZX: Move with zero-extension (padding). - ✅
https://docs.google.com/document/d/1bm9lxVyAk2qogOF9ujERyRcSwXkpKxLW8IWVU8FuMyE/edit?usp=sharing
More instructions:
Data Movement Instructions
XCHG: Exchange data between registers or memory.
MOVSX/MOVZX: Move with sign/zero extension. - ✅
BSWAP: Byte swap (useful for endian conversion).
CMOVcc: Conditional move based on flags (e.g., CMOVZ, CMOVNZ).
Arithmetic and Logic Instructions
ADC, SBB: Add/subtract with carry/borrow.
IMUL, IDIV: Signed multiplication and division.
SHL, SHR, SAR, ROL, ROR: Shift and rotate operations.
NEG: Two’s complement negation.
TEST: Perform bitwise AND and set flags without storing the result.
Control Flow Instructions
LOOP, LOOPE, LOOPNE: Loop with optional condition checking.
JC, JNC: Jump on carry/no carry.
JA, JAE, JB, JBE: Unsigned comparisons for jumps.
JG, JGE, JL, JLE: Signed comparisons for jumps.
Stack Instructions
ENTER, LEAVE: Set up and tear down stack frames for procedures.
POPF, PUSHF: Push/pop flags register.
String Manipulation Instructions
REP, REPE, REPNE: Repeat prefix for string operations.
MOVS, MOVSB, MOVSW, MOVSD: Move strings (byte, word, doubleword).
LODS, LODSB, LODSW, LODSD: Load strings.
STOS, STOSB, STOSW, STOSD: Store strings.
SCAS, SCASB, SCASW, SCASD: Scan strings.
CMPS, CMPSB, CMPSW, CMPSD: Compare strings.
Bit Manipulation Instructions
BT, BTS, BTR, BTC: Bit test and set/reset/clear/flip.
BSF, BSR: Bit scan forward/reverse.
ROL, ROR, RCL, RCR: Rotate bits (logical or through carry).
Floating-Point Instructions
FLD, FST, FSTP: Load/store floating-point values.
FADD, FSUB, FMUL, FDIV: Basic floating-point arithmetic.
FCOM, FCOMP: Compare floating-point values.
FSIN, FCOS, FSQRT, FABS: Floating-point trigonometric and other math operations.
Input/Output Instructions
INS, OUTS: String input/output operations.
Flag Control Instructions
LAHF, SAHF: Load/store lower part of flags register.
SETcc: Set a register based on flags (e.g., SETZ, SETNZ).
Miscellaneous Instructions
CPUID: Query CPU information.
RDTSC: Read time-stamp counter.
HLT: Halt the processor (already done).
WAIT/FWAIT: Wait for floating-point operation to complete.
XLAT: Translate byte in AL using a table.
System-Level Instructions
LGDT, SGDT: Load/store global descriptor table.
LIDT, SIDT: Load/store interrupt descriptor table.
LTR, STR: Load/store task register.
INVLPG: Invalidate a page in the TLB.
RDMSR, WRMSR: Read/write model-specific registers.
CLFLUSH: Cache line flush.