166k views
0 votes
List the MARIE hexadecimal code for the following program: (17 Points)

ORG 000
0000 Input
0001 Store C
0010 Loop. Clear
0011 Load C
0100 Subt B
0101 Output
0110 Store C
0111 Subt A
1000 Skipcond 400
1001 Jump Loop
1010 Halt
1011 A. Dec 32
1100 B. Dec 1
1101 C. Dec 0
Note: The numbers all the way to the left, that is 0000 to 1101, are in binary and are just the address in memory where the progam’s statements are stored.

User Dave Amit
by
7.7k points

1 Answer

2 votes

Final answer:

The MARIE hexadecimal code for the given program is provided.

Step-by-step explanation:

The MARIE hexadecimal code for the given program is as follows:

  1. Address 0000: 8642-10
  2. Address 0001: 8
  3. Address 0010: 642-1300
  4. Address 0011: 12
  5. Address 0100: 10
  6. Address 0101: 8
  7. Address 0110: 642-12
  8. Address 0111: 10
  9. Address 1000: 8
  10. Address 1001: 6
  11. Address 1010: 4
  12. Address 1011: 2
  13. Address 1100: 1357
  14. Address 1101: B

User Dere Sagar
by
7.9k points