Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4539952
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:01:08+00:00 2026-05-21T15:01:08+00:00

I am in a fix. I need to input numbers from the user and

  • 0

I am in a fix. I need to input numbers from the user and then perform arithmetic calculations on the input. I’m just a beginner now and till now I’ve not used any IO, except in a program which asks the user for a name and prints an output, using WriteConsoleA and ReadConsoleA. I couldn’t find any help on google, on how to convert ascii characters to decimals for input and how to convert decimals to ascii for output. I’d prefer to do this manually before using any of the library functions. I can’t figure how to convert a single character into a string and vice versa. How is this done?
And yeah, if you write code in the answers, if, possible, use masm syntax as i am not familiar with the other assemblers’ syntax.
Thanks!!
Devjeet

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T15:01:09+00:00Added an answer on May 21, 2026 at 3:01 pm

    If you have a decimal like 31h on al, you can just add 30h to each one to convert them to ASCII characters, like (AL = 31h):

    mov cl,al
    shr al, 4 // now al = 03
    add al,30h // now al = 33h, which if you output is the ASCII character '3'
    

    Now, you can restore al and shift left by 4 to get the next ‘1’ and again add 30h. I hope this illustrates the point 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a very quick fix in a mod_rewrite expression for drupal we have
How do I fix a broken debugger, one that just won't start, in EclipseME
How do I fix that error once and for all? I just want to
There was a registry fix for Visual Studio 2005 to prevent it from checking
I need to send information input into a text box in one form to
I need to write a function whose input argument should be file name, and
<input id=myID onClick=CheckAll('A','B'); /> In the project,the above code need to be put into
I need to execute a .exe file from a function in one of the
I have a CSV file with records that need to be sorted and then
I'm trying to fix some JavaScript bugs. Firebug makes debugging these issues a lot

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.