title: Why symbols in assembly language are used before they are defined?
body: <p>As part of our university project we have to write a mini-assembler. It's a two-pass assembler. I was wondering why it is allowed in assembly language to use symbols, in opcodes for example before they're actually declared (later in code)? I assume there must be a reason for this because in most of programming languages that I know first you declare a variable then you use it. Moreover if this were the case in assembly language, two-pass assemblers won't need to exist I guess.</p>