Author Topic: 64 bit Linux assembly step by step  (Read 10547 times)

Gunther

  • Member
  • *****
  • Posts: 4115
  • Forgive your enemies, but never forget their names
64 bit Linux assembly step by step
« on: May 14, 2013, 07:27:43 AM »
Here is the appropriate file for Linux from that thread. The functionality of the program is the same, the files have the same name and there is the same output:
Code: [Select]
That is a C string (zero terminated).
32 bit unsigned integer value =  4294967295
32 bit integer value          = -2147483648
64 bit unsigned integer value =  858993459234567
64 bit integer value          = -858993459234567
REAL4 (float) value           =  178.125000
REAL8 (double) value          =  3.1415926535897931

CPU register dump:
------------------

RAX   = 1122334455667788   RBX   = 2233445566778899   RCX = 33445566778899AA
RDX   = 00007F7D06232AD0   RDI   = 0000000000000000   RSI = 0000000000602042
RBP   = 0000000000000000   R8    = 0000000000602042   R9  = 0000000000000001
R10   = 0000000000000000   R11   = 0000000000000246   R12 = 0000000000400410
R13   = 00007FFF4135BF30   R14   = 0000000000000000   R15 = 445566778899AABB
RSP   = 00007FFF4135BE18   Flags = 0000000000000212

XMM register dump:
------------------

XMM0  = 00000000000000001122334455667788
XMM1  = 22334455667788992233445566778899
XMM2  = 000000000000000033445566778899AA
XMM3  = 445566778899AABB445566778899AABB
XMM4  = 00000000000000005566778899AABBCC
XMM5  = 66778899AABBCCDD66778899AABBCCDD
XMM6  = 0000000000000000778899AABBCCDDEE
XMM7  = 8899AABBCCDDEEFF8899AABBCCDDEEFF
XMM8  = 000000000000000099AABBCCDDEEFF11
XMM9  = AABBCCDDEEFF1122AABBCCDDEEFF1122
XMM10 = 0000000000000000BBCCDDEEFF112233
XMM11 = CCDDEEFF11223344CCDDEEFF11223344
XMM12 = 0000000000000000DDEEFF1122334455
XMM13 = EEFF112233445566EEFF112233445566
XMM14 = 0000000000000000FF11223344556677
XMM15 = 11223344556677881122334455667788

YMM register dump:
------------------

YMM0  = 0000000000000000000000000000000000000000000000001122334455667788
YMM1  = 2233445566778899223344556677889922334455667788992233445566778899
YMM2  = 00000000000000000000000000000000000000000000000033445566778899AA
YMM3  = 445566778899AABB445566778899AABB445566778899AABB445566778899AABB
YMM4  = 0000000000000000000000000000000000000000000000005566778899AABBCC
YMM5  = 66778899AABBCCDD66778899AABBCCDD66778899AABBCCDD66778899AABBCCDD
YMM6  = 000000000000000000000000000000000000000000000000778899AABBCCDDEE
YMM7  = 8899AABBCCDDEEFF8899AABBCCDDEEFF8899AABBCCDDEEFF8899AABBCCDDEEFF
YMM8  = 00000000000000000000000000000000000000000000000099AABBCCDDEEFF11
YMM9  = AABBCCDDEEFF1122AABBCCDDEEFF1122AABBCCDDEEFF1122AABBCCDDEEFF1122
YMM10 = 000000000000000000000000000000000000000000000000BBCCDDEEFF112233
YMM11 = CCDDEEFF11223344CCDDEEFF11223344CCDDEEFF11223344CCDDEEFF11223344
YMM12 = 000000000000000000000000000000000000000000000000DDEEFF1122334455
YMM13 = EEFF112233445566EEFF112233445566EEFF112233445566EEFF112233445566
YMM14 = 000000000000000000000000000000000000000000000000FF11223344556677
YMM15 = 1122334455667788112233445566778811223344556677881122334455667788

It'll follow the appropriate BSD version of the program.

Gunther
« Last Edit: May 15, 2013, 06:33:42 AM by Gunther »
You have to know the facts before you can distort them.

Gunther

  • Member
  • *****
  • Posts: 4115
  • Forgive your enemies, but never forget their names
Re: 64 bit Linux assembly step by step
« Reply #1 on: May 15, 2013, 06:34:07 AM »
I've uodated the Linux version and fixed a little glitch (stack alignment). So the program will be more robust. The current archive is now UnixU1.zip under the first thread post.

Gunther
You have to know the facts before you can distort them.

GoneFishing

  • Member
  • *****
  • Posts: 1071
  • Gone fishing
Re: 64 bit Linux assembly step by step
« Reply #2 on: February 02, 2015, 12:32:17 AM »
Hi Gunther,
Thanks for nice example  :t
I'm often using it as a reference last time . I hope the series is to be continued

Gunther

  • Member
  • *****
  • Posts: 4115
  • Forgive your enemies, but never forget their names
Re: 64 bit Linux assembly step by step
« Reply #3 on: February 02, 2015, 04:25:59 AM »
Thanks for nice example  :t
I'm often using it as a reference last time . I hope the series is to be continued

yes of course, if I find the time to do it.

Gunther
You have to know the facts before you can distort them.

Gunther

  • Member
  • *****
  • Posts: 4115
  • Forgive your enemies, but never forget their names
Re: 64 bit Linux assembly step by step
« Reply #4 on: August 07, 2015, 08:22:49 PM »
Another spam bot. It's a mess.

Gunther
You have to know the facts before you can distort them.