Hi,

I'm really new to assembly language and trying to write an assembly program that includes some arithmetic and I would like to know how to do two things:

1- I want the input entered by the user to be between 0 and 9, meaning a digit not anything else. (Input is taken as an ASCII so if I input '0' it will be stored as a 30 in the accumulator. ('1' -> 31, '2' -> 32, etc...).

2- I want to make sure that the input entered is more than one digit long but not more than 9 digits long.

I'm using a custom assembler for certain specifications:
1- I'm using a 1-address instruction set computer, in other words it includes an accumulator that will be required to modify and manipulate values. (e.g. ADD number \\ This will add whatever value available in the accumulator to the number and store the result in the accumulator, thus overwriting each time).
2- the accumulator is 32 bits long.
3- input is 8 bits long.
4- the word is 32 bites long.

Any help?

Hi!!
How can i input a name in an assembly language?
Could you help me?

Arigatu guzaimasu

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.