// File: cfunc3.c // // Example of C function calls disassembled // Return values with more than 4 bytes // #include typedef struct { int part1, part2 ; } stype ; // a silly function // stype foo(stype r) { r.part1 += 4; r.part2 += 3 ; return r ; } int main () { stype r1, r2, r3 ; int n ; n = 17 ; r1.part1 = 74 ; r1.part2 = 75 ; r2.part1 = 84 ; r2.part2 = 85 ; r3.part1 = 93 ; r3.part2 = 99 ; r2 = foo(r1) ; printf ("r2.part1 = %d, r2.part2 = %d\n", r1.part1, r2.part2 ) ; n = foo(r3).part2 ; }