Skip to main content
Advice
0 votes
6 replies
208 views

I need to layout a structure in two different ways depending on the endianness of the target platform. Currently I'm using an additional pre-compile phase to run a program to test the endianness, and ...
Alnitak's user avatar
  • 341k
6 votes
2 answers
288 views

All the existing threads I can find for this type of problem only refer to reversing endianness on byte-multiple bit sizes (i.e, 8, 16, 32, etc), but not non-byte-multiple (i.e, 5, 13, 20, etc), so ...
Nasir's user avatar
  • 91
1 vote
1 answer
75 views

I'm trying to assemble some basic testing code for an embedded device I'm reverse-engineering, which runs little-endian xtensa threadx. From googling the only assembler that seems to support xtensa in ...
perniciousquery's user avatar
7 votes
0 answers
213 views

I'm trying to make a union with a representation of an IEEE 32-bit floating point number. So far, I have this: #include <cstdint> struct FloatRepresentation{ union { float value; ...
8bitPixel's user avatar
0 votes
3 answers
257 views

I was asked to write a macro that checks whether the system is little-endian or big-endian, without using a variable, and for C89. C89 means lot of solutions requiring more recent versions of C cannot ...
Nir3001's user avatar
  • 11
-6 votes
1 answer
105 views

I have been told that when it comes to GPU APIs like Vulkan and DirectX and the host is for example little-endian and the GPU is big-endian that you can read for example a 32-bit integer and the ...
Zebrafish's user avatar
  • 16.4k
0 votes
1 answer
211 views

I was given sample data by the mainframe engineer, for which the COPYBOOK looks like below: 01 CCS001-DETAIL-RECORD. 05 CCS001-REC-TYPE PIC X(01). Should be '1' 05 CCS001-...
dijeah's user avatar
  • 323
2 votes
0 answers
125 views

I have the following three values in a CSV file: 1683199814 2087175640 1348771152 I need to write them into a flat file using a python program, which will be loaded into Mainframe DB2 using a COBOL ...
dijeah's user avatar
  • 323
0 votes
0 answers
101 views

I was looking at the data in the detailed map of my Magellan Roadmate using the hex reader extension in VS Code when I saw some bytes in ASCII format. VS Code's hex editor has an option to display ...
jacob malu's user avatar
0 votes
1 answer
99 views

So I am trying to decode Jupiter V6 instruction data just like websites like solscan.io do, to see the input token amount, output token amount, mints and such. I've tried to reverse engineer it, every ...
Sloppy's user avatar
  • 1
1 vote
1 answer
140 views

While reading the ChaCha20 cipher's source code, I noticed something unusual. The algorithm's constants (like 0x61707865) aren't converted for endianness, yet this doesn't cause issues across ...
S-N's user avatar
  • 402
5 votes
3 answers
191 views

With GCC on Intel x86 , and similarly with NVCC (Cuda), #include <stdio.h> #include <stdint.h> #include <stdbool.h> int main() { uint32_t v = 'abcd'; uint32_t w = ...
Basj's user avatar
  • 47.6k
2 votes
4 answers
138 views

When calling htons() on 1 and inspecting the bytes of the output, my (naive) inspection method below appears to show that the output takes the form 0x0100. I am confident that htons() is doing what it ...
Tat's user avatar
  • 30
1 vote
3 answers
238 views

I'm trying to read a binary file. When I try to read the file at offset 0, it reads in big endian. The file is in little endian, and that's what I am trying to read it as. Keep in mind I'm trying to ...
Ambition's user avatar
1 vote
1 answer
167 views

This MIPS assembly program shown below is meant to count the number of characters in a string. This program was written using the MARS MIPS simulator (available from https://dpetersanderson.github.io/...
smilingbuddha's user avatar

15 30 50 per page
1
2 3 4 5
146