Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Xchg rax, rax – a x86_64 asm poetry book (xorpd.net)
4 points by SonOfLilit on Dec 12, 2014 | hide | past | favorite | 1 comment


I was lucky enough to review a draft of this amazing book.

Two of my favorite poems:

  ; 0x1
  .loop:
      xadd     rax,rdx
      loop     .loop

  ; 0x13
      mov      rcx,0x40
  .loop:
      mov      rdx,rax
      xor      rax,rbx
      and      rbx,rdx
      shl      rbx,0x1
      loop     .loop

From the book's description on https://www.createspace.com/5067642:

  xchg rax, rax
  Authored by xorpd

  About the author: "Performs a bitwise logical exclusive-OR
  of the two packed double-precision floating-point values
  from the source operand (second operand) and the
  destination operand (first operand), and stores the result
  in the destination operand. The source operand can be an
  XMM register or a 128-bit memory location. The destination
  operand is an XMM register." 
  (Intel(r) 64 and IA-32 Architectures Software Developer's Manual)

  ; 0x40 assembly riddles
  "xchg rax,rax" is a collection of assembly gems and
  riddles I found over many years of reversing and writing
  assembly code. The book contains 0x40 short assembly
  snippets, each built to teach you one concept about
  assembly, math or life in general.

  Be warned - This book is not for beginners. It doesn't
  contain anything besides assembly code, and therefore some
  x86_64 assembly knowledge is required.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: