developer's mag
main page
article
part 1
part 2
part 3
part 4
part 5
part 6
part 7
part 8
part 9
|
8 - Data Transfer
Movement of data can be from register to register, or
involve memory. Note that in commands with two entries,
the syntax is in source/destination form; that is,
the first item of the command is the source of the
data, and the second refers to the destination.
ldt
|
mov t,rN; mov rN,t
|
mov usp,t; move t,usp
|
mov sp,t; move t,sp
|
Load the t register with immediate data.
|
Move the value in t into a register, or from a register
into t. The 'rN' is the register identifier -
for example, 'mov t,r0' would move the t register's
contents to register zero in the current bank.
|
Move the USP register to the t register, and from t to the USP.
|
Move the current stack pointer register (USP/SSP) to the t register, and from t to the current stack pointer (lower 16 bits only).
|
mov t,st; mov st,t
|
mov8 (t),rp; mov8 (t),rN
|
mov8 rp,(t); mov8 rN,(t)
|
mov16 (t),rp; mov16 (t),rN
|
Move t to the status register or the status register to t.
|
Move a byte from the memory location pointed to by the t register
to the specified register, either pointed to by RPTR or directly indexed.
|
Move from the lower 8 bits of the specified register to the location pointed to by t.
|
Move two consecutive bytes from the memory location pointed to by the t register to the specified register, either pointed to by RPTR or directly indexed.
|
mov16 rp,(t); mov16 rN,(t)
|
mov32 (t),rp; mov32 (t),rN
|
mov32 rN,(t); mov32 rN,(t)
|
movalt t,rp; movalt rp,t
|
Move from the lower 16 bits of the specified register
to the location pointed to by t.
|
Move four consecutive bytes from the memory location pointed to
by the t register to the specified register.
|
Move all 32 bits of the specified register to the location pointed to
by t.
|
Move the indicated register data to and from a register in an
alternate data bank via the alternate bank bits in the status register.
|
pop rN
|
push rN; push rp
|
swap t
|
upopalt rp
|
Move from stack to register N.
|
Move from specified register to stack.
|
Swap upper and lower words (16 bit values) of the t register.
|
Pull a value from the user stack into a register from an alternate bank.
|
upushalt rp
|
|
|
|
Save a register value from an alternate bank to the user stack.
|
|
|
|
Previous Section
Next Section
|