View Single Post
 
Old 06-23-2014, 06:35 AM
CoolBlue's Avatar
CoolBlue CoolBlue is offline Windows 7 64bit Office 2013
Advanced Beginner
 
Join Date: Jun 2014
Location: Australia
Posts: 40
CoolBlue is on a distinguished road
Default

I am attaching a better version for handling the endian-ness...
This version is actually endian-agnostic: I let VBA figure it out and we always get the correct answer.
The routine is called Mem_ReadHex_Words. It also allows for 4, 8 or 16 bit words which are required by some data structures.
I use the idea of loading the memory image, one word at a time, into a LongPtr Type and then convert the LongPtr to hex. All the underlying byte swapping is taken care of by VBA automatically.
Attached Files
File Type: xlsm ReadingsOfMemory20140623A.xlsm (41.4 KB, 13 views)
Reply With Quote