Assembly x86 (NASM): static linking and final call/ret module adjustments
This installment continues a series on modularizing x86 assembly, moving away from %include toward routines connected via call and ret. Object files assembled in the previous stage are the basis here, with focus on symbol visibility using global and extern, and on entry points for routines. The main module exports data and routines such as k, var, space, leitura, and ovrflw alongside _start so other modules can reference them. A stack-offset fix in argument reading (invo) changes the displacement from 8 to 12 to account for the return address pushed by call. The video concludes with static linking, resolving symbols across modules to produce the final binary.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in