Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 12th, 2012, 11:10 AM   #1
mcoy02
Newbie
 
Join Date: Mar 2012
Posts: 2
Rep Power: 0 mcoy02 is on a distinguished road
arange alphabetical

can someone help me in a program that will ask you to input a group of name and arrange alphabeticaly?

I done it already in java and phyton, i'm not that good using the emu8086
mcoy02 is offline   Reply With Quote
Old Mar 18th, 2012, 6:41 PM   #2
Troncoso
Hobbyist Programmer
 
Join Date: Oct 2011
Posts: 127
Rep Power: 6 Troncoso is on a distinguished road
Re: arange alphabetical

It'd be the same process as Java or python. For each line of code that you wrote for those, work out the instructions needed in assembly to perform the same task. I'm not familiar with regular assembly instructions, but you would load each user input into an address array, then from there just compare the first letter of each as an ASCII character. Compare the following letters if necessary.

I know without using actual example code, that it doesn't help as much, but it's not complicated.
Troncoso is offline   Reply With Quote
Old Mar 21st, 2012, 4:21 PM   #3
GetSet
Hobbyist Programmer
 
Join Date: Feb 2012
Posts: 143
Rep Power: 6 GetSet is on a distinguished road
Re: arange alphabetical

In assembler, it might be uncomplicated if he takes the teacher literally and go by first letter of last (or first) name, but to sort outright, even if it's a bubble sort, things could get sticky.

If i were doing it i would first create a proc that could address an array of variable length strings. Each string itself separated by some predetermined sentinel. Null will suffice.

Then after that was working, i begin on a sort, where the destination was a new array. An insertion sort in this case would be ideal.

Once all that i was working, i'd submit it as is.

If the teacher wanted a more efficient sort, he/she should have stated that.
GetSet is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
replace alphabetical string by a string of dashes manuka Sed and Awk 1 Mar 29th, 2012 6:28 AM
Insight on alphabetical sorting algorithm wolfe.zach Software Design and Algorithms 4 Feb 18th, 2010 6:06 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:37 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC