mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-05-19 11:51:17 +03:00
34 lines
1.3 KiB
CSV
34 lines
1.3 KiB
CSV
# NEG instruction tests
|
|
# Format: RawBytes;Instructions
|
|
RawBytes;Instructions
|
|
|
|
# NEG r/m8 (opcode F6 /3)
|
|
F6D8;[{ "Type": "Neg", "Operands": ["al"] }]
|
|
F6DB;[{ "Type": "Neg", "Operands": ["bl"] }]
|
|
F6D9;[{ "Type": "Neg", "Operands": ["cl"] }]
|
|
F6DA;[{ "Type": "Neg", "Operands": ["dl"] }]
|
|
|
|
# NEG r/m32 (opcode F7 /3)
|
|
F7D8;[{ "Type": "Neg", "Operands": ["eax"] }]
|
|
F7DB;[{ "Type": "Neg", "Operands": ["ebx"] }]
|
|
F7D9;[{ "Type": "Neg", "Operands": ["ecx"] }]
|
|
F7DA;[{ "Type": "Neg", "Operands": ["edx"] }]
|
|
F7DC;[{ "Type": "Neg", "Operands": ["esp"] }]
|
|
F7DD;[{ "Type": "Neg", "Operands": ["ebp"] }]
|
|
F7DE;[{ "Type": "Neg", "Operands": ["esi"] }]
|
|
F7DF;[{ "Type": "Neg", "Operands": ["edi"] }]
|
|
|
|
# NEG with memory operands
|
|
|
|
# SPECIAL CASE: When using SIB byte with Base=101 (EBP) and Mod=00, it requires a 32-bit displacement
|
|
# The correct encoding for "NEG byte ptr [eax]" would be F618 (with Mod=00, R/M=0 for EAX)
|
|
# F61C25;[{ "Type": "Neg", "Operands": ["byte ptr [eax]"] }]
|
|
F618;[{ "Type": "Neg", "Operands": ["byte ptr [eax]"] }]
|
|
|
|
# The correct encoding for "NEG dword ptr [eax]" would be F718 (with Mod=00, R/M=0 for EAX)
|
|
# F71C25;[{ "Type": "Neg", "Operands": ["dword ptr [eax]"] }]
|
|
F718;[{ "Type": "Neg", "Operands": ["dword ptr [eax]"] }]
|
|
|
|
# This test case is correct, as it includes the required displacement
|
|
F71C2510000000;[{ "Type": "Neg", "Operands": ["dword ptr [0x10]"] }]
|