beautypg.com

Echelon Neuron User Manual

Page 44

background image

instruction pointer IP. Some instructions that use relative addressing support

signed distances (that is, support branching in both directions), while other

instructions support relative addressing for positive distances only (only jump

forward).
Unlike absolute addresses, which always require a 16-bit value, relative

addresses support shorter branch distances with the benefit of more compact

machine code, which benefits both the memory footprint and execution time.
Example:

loop ...

brz loop ;

The brz instruction branches to the relative address provided in its operand if

the instruction’s argument, the value in TOS, is zero. If TOS is not zero, this

conditional branch does not occur, and execution continues with the next

instruction that follows brz.




34

Neuron Architecture for Neuron Assembly Programming