From 378c49989cce4d80ceaf5ca8c2378489bcfc0296 Mon Sep 17 00:00:00 2001 From: Emmanuel AYME Date: Sat, 10 Jan 2026 10:43:19 +0100 Subject: [PATCH] Add function to get memory address from opcode --- Memory/Memory.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Memory/Memory.hpp b/Memory/Memory.hpp index db20ef4..801aab7 100644 --- a/Memory/Memory.hpp +++ b/Memory/Memory.hpp @@ -87,6 +87,15 @@ class Memory */ static uint8_t* GetOffsetFromOpcode(uint8_t* opcode, int extraOffset = 0); + /** + * Get Address from opcode. + * + * @param opcode : The opcode pointer targeted. + * @param dispOffset : The offset to target disp (4 bytes) in opcode. + * @param instructionLen : The total opcode length in bytes. + */ + static uint8_t* GetAddressFromOpcode(uint8_t* opcode, uint32_t dispOffset, uint32_t instructionLen); + /** * Converts flkoat 32 bits into a char*. *