MemCpy()
MemCpy() does a high speed copy between two memory blocks (SRAM). Syntax: MemCpy( srcAddr as word, dstAddr as word, numBytes as word )
- srcAddr: Starting address of the source memory block (SRAM).
- dstAddr: Starting address of the target memory block (SRAM).
- numBytes: Number of Bytes to copy.
Example
const F_CPU = 20000000 avr.device = atmega328p avr.clock = F_CPU avr.stack = 32 uart.baud = 19200 uart.send.enable uart.recv.enable print 12;"MemCpy() example" dim i,a as byte dim m1,m2 as memoryblock m1.New(30) m2.New(30) m1.CString(0)="Hello World" memCpy(m1.Ptr,m2.Ptr,11) 'copies the string including Nullbyte to the 2. memory block print "m2.CString(0) = ";34;m2.CString(0);34 'output from 2. memory block print print "ready" do loop