LoginLogin

How do I make a hex file dumper?

Root / Programming Questions / [.]

Forsaken_AstralDev1Created:
How would I code this?

Your questions are too vague to answer helpfully. Please look over Seggie's posting educate post. What are you trying to dump into a hex file?

DAT files

I had the exact same question as you a while back, and someone gave me this script:
S$=""
FOR I=0 TO LEN(ARR)-1
 B0=ARR[I] AND &HFF
 B1=ARR[I]>>8 AND &HFF
 B2=ARR[I]>>16 AND &HFF
 B3=ARR[I]>>24 AND &HFF
 INC S$,CHR$(B0)+CHR$(B1)+CHR$(B2)+CHR$(B3)
NEXT
This will take a 1D array (in this case, the one you loaded from the DAT file) and convert its bytes into ASCII characters in a string. What project are you working on? This script can probably be modified to better fit it.