•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 402,620 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,275 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: 1965 | Replies: 3
![]() |
•
•
Join Date: Apr 2007
Posts: 1
Reputation:
Rep Power: 0
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.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Assembly Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
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?



Linear Mode