Propeller Manual

Table Of Contents
BYTEMOVE – Spin Language Reference
Page 58 · Propeller Manual v1.1
BYTEMOVE
Command: Copy bytes from one region to another in main memory.
((PUB PRI))
BYTEMOVE (DestAddress, SrcAddress, Count )
DestAddress is an expression specifying the main memory location to copy the first
byte of source to.
SrcAddress is an expression specifying the main memory location of the first byte of
source to copy.
Count is an expression indicating the number of bytes of the source to copy to the
destination.
Explanation
BYTEMOVE is one of three commands (BYTEMOVE, WORDMOVE, and LONGMOVE) used to copy blocks
of main memory from one area to another.
BYTEMOVE copies Count bytes of main memory
starting from SrcAddress to main memory starting at DestAddress.
Using BYTEMOVE
BYTEMOVE is a great way to copy large blocks of byte-sized memory. For example:
VAR
byte Buff1[100]
byte Buff2[100]
PUB Main
bytemove(@Buff2, @Buff1, 100) 'Copy Buff1 to Buff2
The first line of the Main method, above, copies the entire 100-byte Buff1 array to the Buff2
array.
BYTEMOVE is faster at this task than a dedicated REPEAT loop. T