previous | start | next

Chapter 3: Pointer parameters

Practice Problem 3.5

 void decode1(int *xp, int *yp, int *zp);
   
     1 movl 8(%ebp),%edi
     2 movl 12(%ebp),%ebx
     3 movl 16(%ebp),%esi      
     4 movl (%edi),%eax
     5 movl (%ebx),%edx
     6 movl (%esi),%ecx
     7 movl %eax,(%ebx)
     8 movl %edx,(%esi)
     9 movl %ecx,(%edi)
   

Write equivalent C code.



previous | start | next