MemCmp()

MemCmp() compares to areas in memory (SRAM). Syntax: result = MemCmp( s1Adr as word, s2Adr as word, numBytes as word )

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;"MemCmp() example"
dim i,a as byte
dim m as memoryblock
m.New(60)
m.CString(0)="Hello"
m.CString(20)="Hello"
print "MemCmp(): ";str(memCmp(m.Ptr+0,m.Ptr+20,5))  'output: 0 (gleich)
print
print "ready"
do
loop