|
-
Mar 31st, 2003, 10:45 AM
#1
Thread Starter
Hyperactive Member
Sorting an array of strings in asm
Does anyone know how to sort an array of strings in asm? I have an array of 10 strings the strings can range any where from 0 to 20 char long. For example the array may contain:
one
two
three
four
five
six
seven
eight
nine
ten
and that needs to be sorted. Can someone please help thank you for your time.
-
Jun 20th, 2003, 07:17 PM
#2
Fanatic Member
If these are in an array in which the space reserved for each of the strings are of a constant length, then I would use a Temp variable of that length. At each swap, load in each character into temp and the second into its rightful spot. Next load temp into its swapped position. Continue through the array until completed.
Note that I am using a bubble sort because it will take a few lines of code already.
-
Jun 20th, 2003, 08:56 PM
#3
Thread Starter
Hyperactive Member
yeah this was for my project in school, that class is over w/ thank god. But thank you for your help and i did use a bubble sort. (had the c++ code and just converted it)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|