Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Assembly lnguage using 68000
Can anyone help me with my project? I haven't a clue even where to start!!
I am to write an assembly language program to generate a histogram from
user supplied input.
The program performs the following functions:
It first reads a 4-digit decimal number from the keyboard. This number may
start with zeroes. Non-decimal digits and other characters are ignored. The
number must be echoed to the screen. I should store them in an array for
future reference. Examples:
It is a good idea to perform code conversion on the characters before they
are stored, so you have a series of integers available. Characters must also
be echoed to the screen.
I should now generate a histogram, in which each column has a length
proportional to the digits that were entered. The columns should be evenly
spaced (with no more than 5 spaces between them). There should be a
left margin and a bottom margin.
For example, the input 3325 could produce the following histogram:
| * * *
| * * * *
| * * * *
The program is best implemented as a number of nested FOR loops. The outer
loop goes through the lines of the histogram, starting from the top. The
inner loops print the contents of each line, deciding at each print position
whether a 'space' or a 'star' has to be printed.