T.I.M | ISA Specification
 All Pages
LOADI

Description

Loads a value into the destination register from memory. The address used is made up of the 16 bit immediate plus the value of a register. The immediate is interpreted as a 4-byte aligned unsigned value. The LOADI instruction does not allow byte masking like the LOADR instruction does, hence it will always load an entire word into the destination register.

Register Access

The LOADI instruction can use any of the general purpose registers R0 to R15 as its destination or source operand.

Memory Layout

This is a 4 byte instruction

Opcode | Condition Code | Destination | Source |Immediate
000010 | 00 | DDDD | ssss | IIII IIII IIII IIII

Assembly Code Examples

When an immediate is supplied that does not fit into 16 bits, the lower 16 bits are used and any upper bits are discarded by the assembler.

Immediates that specify fewer than 4 bytes are padded with high order zeros to make them 16 bits long explicitly.

1. | LOAD $R0 $R1 0xFF001
2. | LOAD $R0 $R1 0xAB003
3. | LOAD $R0 $R1 0dF056
See Also
Instructions Quick Reference, LOADR