assmswapB.c - #include <stdio.h> void swap(long*xp long*yp asm movq%rdi%rax\\n\\t movq%rsi%rdx\\n\\t add $21%rdx\\n\\t movq%rdx%rdi\\n\\t movq%rax%rsi\\n\\t int

assmswapB.c - #include <stdio.h> void swap(long*xp long*yp...

This preview shows page 1 out of 1 page.

#include <stdio.h> void swap (long *xp, long *yp) { asm(" movq (%rdi), %rax \n\t" " movq (%rsi), %rdx \n\t" " add $21,%rdx \n\t" " movq %rdx, (%rdi) \n\t"
Image of page 1

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture