•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 456,494 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,690 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Assembly advertiser: Programming Forums
Views: 2292 | Replies: 7
![]() |
| |
•
•
Join Date: Sep 2007
Posts: 12
Reputation:
Rep Power: 2
Solved Threads: 0
Okay so say I have an array which is like this:
and I want to print it as
-17
16
153
How do I do this?? If it is stored in a 4 byte of integer then it would be very easy to do, but not it's stored as a 2-byte integer.
In a 4 -byte integer I just quadruple starting from the first array address and then print the array, but how about this one?? Can someone help me??
.data
values:
.half -17
.half 16
.half 153
and I want to print it as
-17
16
153
How do I do this?? If it is stored in a 4 byte of integer then it would be very easy to do, but not it's stored as a 2-byte integer.
In a 4 -byte integer I just quadruple starting from the first array address and then print the array, but how about this one?? Can someone help me??
Last edited by -EquinoX- : Sep 22nd, 2007 at 11:29 am.
•
•
Join Date: Sep 2007
Posts: 12
Reputation:
Rep Power: 2
Solved Threads: 0
•
•
•
•
> Say that I have a number 65, how do I get an A from that?
I thought you wanted to turn 17 into "17"
> What do you mean divide by 10 and modulo 10 in a loop?
As in if you have 123, then /10 gives you 12 and %10 gives you 3
Then you do the same thing with 12
And you stop when you get to 0
OK so how do I print the ASCII characters then?? how do I turn 65 to an A?? I still don't get what you mean by divide and modulo, say that I finish that step.. what am I suppose to do? Print the remainder or what??
> how do I turn 65 to an A?
Well if you imagine some character output function, then
outch 65 and outch 'A' will do the same thing where the system uses the ASCII character set.
> Print the remainder or what??
Yes, print the remainder.
Of course, you'll then notice that the number is printed out in reverse, but let's get the first step sorted out OK.
Well if you imagine some character output function, then
outch 65 and outch 'A' will do the same thing where the system uses the ASCII character set.
> Print the remainder or what??
Yes, print the remainder.
Of course, you'll then notice that the number is printed out in reverse, but let's get the first step sorted out OK.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Assembly Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Problems with Epson 600 Stylus Printer (Windows 9x / Me)
- MIPS Help (Assembly)
- MIPS - convert integer to floating point?? (Assembly)
- multiplication in assembly mips (Assembly)
- Parsing a .asn file (Community Introductions)
- The Gregorian Calendar (C++)
- FPU + external C file - how to return double (Assembly)
- C++ BASICS ==> Pointers, Call by Reference/Value, Inheritance, Functions & Arrays (C++)
- Reversing Integer, Magic Squares, and LCM problems (Java)
Other Threads in the Assembly Forum
- Previous Thread: Mouse Manipulation Questions
- Next Thread: JK Flip-flop problem



Hybrid Mode