Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For any question which requires you to write assembly language code, you must adhere to the following a. The command name should be given in
For any question which requires you to write assembly language code, you must adhere to the following a. The command name should be given in all capital lesters b. There should be cxactly onc space between the command and an operand c. There should be no additional spaces anywhere in your command d. Memory addresses should be given in hexadecimal and should end with a capital H to indicate they are in hexadecimal c. Memory addresses should consist of exactly 4 hexadecimal digits (because 4 hex digits represents 16 binary bits and the memory addresses in our computer are expressed using 16 bits) f. Hex digits A-F should be expressed using capital letters All of the questions in this assignment are in reference to the Relatively Simple CPU, which was discussed in class, and is outlined in chapter 3 of your book. The instruction set for this computer can be found o page 123. Translate the following assembly language commands into machine language 10. NOT 11. JPNZ 22FAH 12. JUMP 8BC8FH 13. XOR 14. STAC 81C6H Table 3-1.gif Instruction set for a Relatively Simple CPU Instruction 0000 0000No operation LDAC 10000 0001) | AC-Miri STAC 0000 0010T MI-AC MVAC 0000 0011RAC MOVR | 0000 0100 | AC R JUMP 1 0000 01 01 | GOTO JPNZ e | 0000 01 1 1 r | IF (Z=0) THEN GOTO ADD * |00001000 | AC-AC + R. If (AC + R-O) Then Z-1 Else Z = 0 SUB * |0000 1001 |AC=AC-R. If (AC-R-0) Then Z = 1 Else Z-0 INAC | 00001010 | AC-AC+1.If(AC + 1 0) Then Z-1 Else Z-0 CLAC 0000 10 AC 0, Z 1 AND 0000 1100 AC- ACA R, IF (ACAR-0) Then Z- 1 Else Z- NOT | AC-AC, if (AC,-0) Then Z-1 Else Z-0 0000 1 1 1 1 For any question which requires you to write assembly language code, you must adhere to the following a. The command name should be given in all capital lesters b. There should be cxactly onc space between the command and an operand c. There should be no additional spaces anywhere in your command d. Memory addresses should be given in hexadecimal and should end with a capital H to indicate they are in hexadecimal c. Memory addresses should consist of exactly 4 hexadecimal digits (because 4 hex digits represents 16 binary bits and the memory addresses in our computer are expressed using 16 bits) f. Hex digits A-F should be expressed using capital letters All of the questions in this assignment are in reference to the Relatively Simple CPU, which was discussed in class, and is outlined in chapter 3 of your book. The instruction set for this computer can be found o page 123. Translate the following assembly language commands into machine language 10. NOT 11. JPNZ 22FAH 12. JUMP 8BC8FH 13. XOR 14. STAC 81C6H Table 3-1.gif Instruction set for a Relatively Simple CPU Instruction 0000 0000No operation LDAC 10000 0001) | AC-Miri STAC 0000 0010T MI-AC MVAC 0000 0011RAC MOVR | 0000 0100 | AC R JUMP 1 0000 01 01 | GOTO JPNZ e | 0000 01 1 1 r | IF (Z=0) THEN GOTO ADD * |00001000 | AC-AC + R. If (AC + R-O) Then Z-1 Else Z = 0 SUB * |0000 1001 |AC=AC-R. If (AC-R-0) Then Z = 1 Else Z-0 INAC | 00001010 | AC-AC+1.If(AC + 1 0) Then Z-1 Else Z-0 CLAC 0000 10 AC 0, Z 1 AND 0000 1100 AC- ACA R, IF (ACAR-0) Then Z- 1 Else Z- NOT | AC-AC, if (AC,-0) Then Z-1 Else Z-0 0000 1 1 1 1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started