Propeller Manual

Table Of Contents
RDLONG – Assembly Language Reference
RDLONG
Instruction: Read long of main memory.
RDLONG Value, # Address
Result: Long is stored in Value.
Value (d-field) is the register to store the long value into.
Address (s-field) is a register or a 9-bit literal whose value is the main memory
address to read from.
Opcode Table:
–INSTR– ZCRI –CON– –DEST– –SRC– Z Result C Result Result Clocks
000010 001i 1111 ddddddddd sssssssss
Result = 0 --- Written 7..22
Concise Truth Table:
In Out
Destination Source Z
C
Effects
Destination
1
Z
2
C
$----_----; - $----_----; - -
-
wz wc long value
0 0
1
Destination Out is always generated since including an NR effect would turn RDLONG into a WRLONG instruction.
2
The Z flag is cleared (0) unless Destination Out equals 0.
Explanation
RDLONG syncs to the Hub, reads the long of main memory at Address, and stores it into the
Value register. Address can point to any byte within the desired long; the address’ lower two
bits will be cleared to zero resulting in an address pointing to a long boundary.
If the
WZ effect is specified, the Z flag will be set (1) if the value read from main memory is
zero. The
NR effect can not be used with RDLONG as that would change it to a WRLONG
instruction.
RDLONG is a hub instruction. Hub instructions require 7 to 22 clock cycles to execute
depending on the relation between the cog’s hub access window and the instruction’s moment
of execution. See Hub on page 24 for more information.
Page 336 · Propeller Manual v1.1