Reference no: EM13935803
ou are to write an assembly language program to simulate paper tape output from user supplied input
The program performs the following functions:
It first reads a number of decimal digits from the keyboard, with a maximum of 8 digits possible (and a minimum of one digit). Non-digits are
ignored, as well as input beyond 8 digits. You should count the number of digits, and also store them in an array for future reference. Examples:
138
53339
66666666
Input terminates when the RETURN character is typed, or when the maximum of 8 input digits has been reached.
The program now generates paper tape output. This format is based on the well known 'Morse Code', which consists of 'dots' and 'dashes'. On paper tape, a 'dash' is represented by a hole in the bottom half of the paper, and a 'dot' by a hole in the top half. The program
simulates the hole by printing the letter 'o'.
The Morse Codes for the digits are as follows:
0 -----
1 .----
2 ..---
3 ...--
4 ....-
5 .....
6 -....
7 --...
8 ---..
9 ----.
The paper tape output for the number 138 would now be:
o ooo oo
oooo ooooo
Here are some hints on how to write the program.
Define the morse code as a series of consecutive dc.b statements. Since all codes have the same length of 5, it will be straightforward to
calculate where the start of each code can be found. For example, the morse code for the digit 2 starts 2*5 = 10 bytes from the start, and
occupies the next 5 bytes. YOU ARE NOT ALLOWED TO USE SEPARATE LABELS FOR THE INDIVIDUAL CODES (this leads to massive code duplication, and it will cost you a lot of marks).
The program is best implemented as two nested FOR loops. You will have to go through the input twice, once to print the dots and once to print the dashes, deciding at each position within each digit, whether an 'o' or a space needs to be printed.
Submission: Submit a SINGLE PDF FILE on Blackboard, containing both the program source code and documentation. DO NOT provide the source code in the form of screen dumps - this is very difficult to read and impossible to annotate properly. Instead, copy and paste the program from a text editor such as Notepad.
How uva ltd can reduce economic exposure to exchange rate
: Its sales to Thai customers are denominated in baht. Explain how UVA Ltd can reduce its economic exposure to exchange rate fluctuations.
|
Why do hcos strive for transformational styles
: Why do high performing HCO's strive for transformational styles? Is this just the current fad or is there another that you would suggest
|
What is intermediate moisture food
: List 20 antimicrobials used in food manufacturing and specify the maximum allowance of each one in food. What are bacteriocins, list 5 of them and provide examples of applications in foods.
|
How alright can reduce economic exposure to exchange rate
: About 10% of Albany's operating expenses are in Australian dollars; all other expenses are in pounds. Explain how Alright can reduce its economic exposure to exchange rate fluctuations.
|
Assembly language program to simulate
: The program now generates paper tape output. This format is based on the well known 'Morse Code', which consists of 'dots' and 'dashes'. On paper tape, a 'dash' is represented by a hole in the bottom half of the paper, and a 'dot' by a hole in the..
|
Aspects traits and attributes of leadership
: Questions: A) What aspects traits and attributes of leadership are evident from analysing the speech? B) Identify and comment on how the speech is being articulated and delivered.
|
Find the discharge for free flow
: A 3-inch diameter orifice cut in a thin orifice plate conveys flow from a deten- tion basin with water level at elevation 472.00 feet. The center of the orifice is at elevation 467.50 feet. Find the discharge for free flow.
|
Explain how a firm can hedge its translation exposure
: Hedging translation exposure. Explain how a firm can hedge its translation exposure. Exchange rate effects on earnings. Explain how an MNC's consolidated earnings are affected when foreign currencies depreciate.
|
Leadership for the sustainability of the health system
: Leadership for the Sustainability of the Health System: Part 1-A Literature Review. Health Workforce Australia.
|