Memory contents to ASCII string, little endian format

0

I have to translate the following memory contents to ASCII code, using little endian format:

0x6A636162 0x64726177 0x00002173

I got "jcab draw! s", which is wrong (and of course, is complete nonsense). How are you supposed to do this using little endian format?

memory
ascii
endianness
asked on Stack Overflow Apr 29, 2012 by rfmas3 • edited Oct 18, 2012 by Peter O.

1 Answer

1

It's supposed to be "backwards!" You read the first two rightmost hex values first as one ascii char, and then focus on the pair to the left of that, until you get to the furthest left most hex values.

answered on Stack Overflow Oct 11, 2012 by Robert Bain

User contributions licensed under CC BY-SA 3.0