-
Notifications
You must be signed in to change notification settings - Fork 45
Labels
Saurabh Joshi edited this page Jan 26, 2025
·
2 revisions
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 1
andADD One
- Refer to instructions to jump to. For example
Loop, Load X
andJump Loop
- Refer to an array of values. This can be done by using
ADR <label>
. For example,StartOfArray, DEC 42
stores the first element of an array, andArrayPointer, ADR StartOfArray
allows you to store memory address of labelStartOfArray
inArrayPointer
.
MARIE.js Wiki | License
Copyright © 2018 Jason Nguyen, Saurabh Joshi, Eric Jiang, Felix Salim, Guido Tack, Monash University
Copyright © 2018 Jason Nguyen, Saurabh Joshi, Eric Jiang, Felix Salim, Guido Tack, Monash University
Documentation
MARIE Instructions Set with Opcode
Register Transfer Language (RTL)
More Reading
The Essentials of Computer Organization and Architecture-Chapter 4.2
Tutorials
MARIE.js Documentation