Close

Labels

A project log for Assembly Language for ECM-16/TTL homebrew CPU

Sub-project where the assembly language is described; the assembler program progress updates are posted here

pavelPavel 11/24/2022 at 10:290 Comments

Labels are symbolic representations of particular addresses in memory that can have either instructions to jump to, or variables to be fetched or stored by some memory access instruction.

In assembly program label is indicated by colon ':' at the end of the first word (contiguous sequence of non-whitespace characters) in the line.

example_label:
    <some code>       

Label can either precede the labeled instruction or variable, or be on the same line.


During first pass of the assembler, all labels are added to look-up table, which is used on second pass to inline actual values for instruction arguments instead of their symbolic representations.

Discussions