- 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)
- Compilers and Interpreters
- Justify a particular installation or upgrade. I have instal...
- Designing a data system for a vintage clothes business.
- Computer Addiction
- Plan an installation and an upgrade - Requirements in prepar...
- 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
""Asmaa, UAE. GCSE Student. Biology, Physics, Chemistry, Maths and English.
""Chris Mckellar. Media Studies, IT, English. A Level Student.