0

When I run a Hexdump using the command xxd -b "textile.txt"in OS X, the terminal prints both the binary, and the actual ASCII equivalent in the right-most column, showing the text files contents in english.

If I create a simple C program which does little else then print 'hello world' to the terminal, and i save it as a .exec file, the xxd -b command output contains binary which, when translated, is nowhere to be found in the .exec files original pre-compile source code.

Example:

0002034: 00000101 00000000 00000010 01011111 01101101 01101000  ..._mh
000203a: 01011111 01100101 01111000 01100101 01100011 01110101  _execu
0002040: 01110100 01100101 01011111 01101000 01100101 01100001  te_hea
0002046: 01100100 01100101 01110010 00000000 00100001 01101101  der.!m
000204c: 01100001 01101001 01101110 00000000 00100101 00000010  ain.%.

I am assuming that the compiling process is responsible for this, which leads me to theorise that this output in the right-most column may in fact be Assembly code.

My Question in Summary: What is the nature of the hex dump output for .exec files, specifically: is it assembly code, and if not, then what is it?

Thanks in advance.

0

Not really assembly; but I know it's pretty common to mix assembly and machine code. Assembly is still a language readable by (some) humans and it must be compiled to be edible by machines. What you see here is the machine code.

https://en.wikipedia.org/wiki/Machine_code

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.