Question: Write an LMC assembly language program to read two numbers, X and Y, and compute Z = 2X 3Y. Step 1. Read in two numbers
Write an LMC assembly language program to read two numbers, X and Y, and compute Z = 2X 3Y.
Step 1. Read in two numbers and store them in mailboxes (memory locations)
Step 2. Compute Z = 2X 3Y
Step 3. Output the result Z. Note that Z does NOT need to be stored in memory.
| Address | Instructions (Mnemonic) |
| 05 | IN |
| 06 |
|
| 07 |
|
| 08 |
|
| 09 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
