Labels - MARIE-js/MARIE.js GitHub Wiki
Labels allow you to reference memory cells. They consist of an alphabet followed by a sequence of zero to many alphanumerical characters. For example, One is a valid name for a label, whereas 6loop is not a valid label. Labels are case-sensitive, so One and ONE are different labels.
There are three purposes for labels:
- Refer to a single value. For example,
One, DEC 1andADD One - Refer to instructions to jump to. For example
Loop, Load XandJump Loop - Refer to an array of values. This can be done by using
ADR <label>. For example,StartOfArray, DEC 42stores the first element of an array, andArrayPointer, ADR StartOfArrayallows you to store memory address of labelStartOfArrayinArrayPointer.