I have a simple assembly code file called exit.s that looks like the following:
.text
.globl _start
_start:
xor %eax, %eax
mov %al, 1
xor %ebx, %ebx
I would like to get the hex byte code of this. How would I do this on a linux machine? What commands would I use?
Use
gccto compile it into an executable, then useobjdump -dto print out the code: