- Join over 1.2 million students every month
- Accelerate your learning by 29%
- Unlimited access from just £6.99 per month
Write a TOM program that reads a number from the keyboard, subtracts 1 and displays the result.
The first 200 words of this essay...
1. Write a TOM program that reads a number from the keyboard, subtracts 1 and displays the
To improve legibility the comments are displayed to the right of every TOM line of code, and not in the standard style.
read keyin Reads data inputted by keyboard and stores in the store location keyin
load keyin Loads data from the store location keyin in to the accumulator
sub minus Subtracts the store location minus from the accumulator
store display Stores value in accumulator in the store location display
print display Displays contents of the store location display on the screen
stop Stops program execution
minus data 1 Initialises a store location minus with the value 1 in it
keyin data 0 Initialises a store location keyin with the value 0 in it
display data 0 Initialises a store location display with the value 0 in it
2. Write a TOM program that reads a number from the keyboard, multiplies it by 2, reads another number b from the keyboard, multiplies it
Found what you're looking for?
- Start learning 29% faster today
- Over 150,000 essays available
- Just £6.99 a month
Not the one? We have 100's more
Computer Science (view all)
- Business & IT Department BTEC. Organisational System Sec...
- Explain the component parts of a computer system - Include b...
- Why its important to have protocols and standards on a netwo...
- Introduction to Computerized Accounting.
- An introduction to Identity Theft
- BTEC National in IT Organisational systems security - Polici...
- BTEC National in IT Organisational systems security - Softwa...
- Future Developments in ICT
- Computing project - testing my library system
- Application Letter. My passion for Computer Science
""Yvette Agars. Senior History Teacher. Saint John's College. Whyalla S.A.
""Joanne Barratt. Nursing. University Student.