×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Reading numbers 0 - 255 n saving as single byte each

Reading numbers 0 - 255 n saving as single byte each

Reading numbers 0 - 255 n saving as single byte each

(OP)
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.

RE: Reading numbers 0 - 255 n saving as single byte each

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."

RE: Reading numbers 0 - 255 n saving as single byte each

(OP)
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?

RE: Reading numbers 0 - 255 n saving as single byte each

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."

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close