Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading numbers 0 - 255 n saving as single byte each

Status
Not open for further replies.

nooruls143

Programmer
Mar 21, 2002
2
GB
Hi, I need some help!

1. I need to read numbers 0 - 255, numbers, and save them as a single byte to perform bubble sorting. I have a macro which enables me to get single character input. But, I donno how to input multichar input. How do I do that?

2. How can I output a word or a long word on to the screen?

P.S.- I am using the GNU assembler, the OPCODE source,Dest
style of programming.
 
You can build your own multichar input routine from your single char input macro. 'Course that's difficult. Better know what OS you're using, presumably DOS or DOS emulating but still need to know since DOS gives a rather nice string input function.

As for outputting words and bytes on screen... in what manner? As a decimal string, hex, octal, binary, maybe ASCII? "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
 
Well, thanks for the help. I have done through the inputting part. Lets say, I have a byte in register AL, whose decimal equivalent is '122'.I need to show onto the screen as '122'. How do I do that?
 
How do you think?

Do you know what a string is?

Do you think 122 is shown as a string?

Do you think you can generate a string based on a number?

"Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top