Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

asm is lisp

Name: Anonymous 2011-12-02 13:09

When i look at my gcc -S anus.c produced asm code i see that each method has a ret at the end, even the main.

How does it know to ret to the _main method rather than exit the program?

Name: Anonymous 2011-12-02 13:12

>>2
Aww so everytime it does 'call LABEL' and then a ret it knows that it's only returning back to where it was called from? neat, thanks.

People always made asm out to be some horrible alien but if that's how it works it seems a lot easier than people make it seem to be.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List