MemSort()
Die Funktion MemSort() sortiert alle Bytes eines Speicherbereichs im Arbeitsspeicher aufwärts.
Syntax: MemSort( sAdr as word, numBytes as word )
- sAdr: Anfangsadresse des Speicherbereichs im Arbeitsspeicher (SRAM).
- numBytes: Die Anzahl Bytes die sortiert werden sollen.
Beispiel
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;"MemSort() Example" dim i,a as byte dim m as MemoryBlock m.New(80) m.PString(0)="Horst rast über völlig verwahrloste Straßen quer durch Bützow." print "vorher: ";34;m.PString(0);34 MemSort(m.Ptr+1,m.ByteValue(0)) print "nachher: ";34;m.PString(0);34 'Ausgabe: " .BHSaaabcdeeeeeghhilllnoooqrrrrrrrrssstttttuuvvwwzßöüü" print print "ready" do loop