MemRev()

MemRev() sorts the Bytes of a memory block in descending order. Syntax: MemRev( sAdr as word, numBytes as word )

  • sAdr: Starting address of the memory block (SRAM).
  • numBytes: Number of Byte to sort in descending order.

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;"MemRev() example"
dim i,a as byte
dim m as MemoryBlock
m.New(10)
m.PString(0)="76519."
print "before: ";34;m.PString(0);34
MemRev(m.Ptr+1,m.ByteValue(0))
print "after: ";34;m.PString(0);34 'output: "    .15679"
print
print "ready"
do
loop