Hacker News new | ask | show | jobs
by alrlroipsp 1323 days ago
Most if not all ANCIENT assembers did a 1-pass translation of input source and thus would not recognize tokens that was referenced but not yet declared.

Hence you declare your variables at the start of the program and jump past them.

1 comments

Any "real" assembler has to support forward references, otherwise you couldn't even jump past the initial data section, except by using an absolute address!

Minimizing the number of forward references may make the assembly run faster or use less memory, but usually it's just a convention to make the source code more neatly organized.