See modret.c. Note that all numbers printed are in hex. Note that (i) d is at zp[0], (ii) zp[1] is presumably the SFP, (iii) the return address pushed by the CALL instruction is at zp[2], (iv) first arg a to modret() is at zp[3], (v) the address of main() is 8048404, (vi) the address of local variable x is also shown, but as we will see this will keep changing, (viii) the address of local variable y is 4 bytes below that of x. Interesting arguments try with the modret program are 0, 9, and 18, whose results are described below. These were discovered by examining the generated code. Other values are illegal, but explaining the resulting behavior (normal looking outut and/or segmentation faults) needs an understanding of CPU instructions. % ./modret 0 0:89abcdef, 1:bf89ac88, 2:8048468, 3:0, 4:234, 5:567, main==8048404, &x==bf89ac80, &y==bf89ac7c; x=66 Above. Ret Address unchanged. So, x == 66 as seen from the typical reading of the code. % ./modret 9 0:89abcdef, 1:bfc29018, 2:8048468, 3:9, 4:234, 5:567, main==8048404, &x==bfc29010, &y==bfc2900c; x=44 Above. Ret Address changed: Incremented by 9, skipping the code for x += 0x22. Resulting x is 44. % ./modret 18 0:89abcdef, 1:bf998d88, 2:8048468, 3:12, 4:234, 5:567, main==8048404, &x==bf998d80, &y==bf998d7c; x=11 Above. Ret Address changed: Incremented by 18, skipping the code for x += 0x22, and x += 0x33. Resulting x is 11.