| | |
multidigit binary to ascii
![]() |
•
•
Join Date: Apr 2007
Posts: 1
Reputation:
Solved Threads: 0
Hello,
I'm fairly new to programming, with little knowledge of assembly languages. I had a quick question on a program I am working on. I have to use LC3 to make a simple calculator. I have everything down, I just can't for the life of me figure out how to convert the number from binary to ascii to output it. I have tried going place by place, subtracting 10,000 with a counter, then 1,000, then 100, 10, 1 etc. I keep running into problems this way. There has to be an easier way. Any advice?
I'm fairly new to programming, with little knowledge of assembly languages. I had a quick question on a program I am working on. I have to use LC3 to make a simple calculator. I have everything down, I just can't for the life of me figure out how to convert the number from binary to ascii to output it. I have tried going place by place, subtracting 10,000 with a counter, then 1,000, then 100, 10, 1 etc. I keep running into problems this way. There has to be an easier way. Any advice?
Well you could post what you tried in a new thread, rather than hijacking an old thread with "it doesn't work".
IIRC, DAA mean you turn say a numeric value of say 0x42 (aka 66 decimal) into 0x66. You still need to extract each nibble and add '0' to it to get something printable, but it does save you from having to do /10 and %10 to extract each digit.
IIRC, DAA mean you turn say a numeric value of say 0x42 (aka 66 decimal) into 0x66. You still need to extract each nibble and add '0' to it to get something printable, but it does save you from having to do /10 and %10 to extract each digit.
![]() |
Similar Threads
- 500 Internal Server Error - with a twist (Perl)
- input to binary (C)
- Conversion (VB.NET)
- Is there any more Documenation that I need? (C++)
- suitability of .net for tcp/ip server (ASP.NET)
Other Threads in the Assembly Forum
- Previous Thread: i need an assembly code program
- Next Thread: segment register?
| Thread Tools | Search this Thread |






