File Structure & GlobalsEvery Riscrithm file must declare its target section and entrypoint at the very top.
Load/Move: load foo = 100, move bar = fooload foo = 100, move bar = foo Math: foo += 5, bar *= baz, foo <<= 2foo += 5, bar *= baz, foo <<= 2 Increments: foo ++ (addi foo, foo, 1), bar -- (addi bar, bar, -1)The ^^ Shorthand: Want to clear a register fast?
foo ^^ translates to xor foo, foo, foo, immediately zeroing out the register.
The swap command uses a non-destructive triple-XOR sequence:foo swap barTranslates to:xor foo, foo, bar xor bar, foo, bar xor foo, foo, bar7.
foo = bar * 2 translates to slli foo, bar, 1 (Shift Left Logical).