Question

(2+2+1 5 points) Problem 10.1: simple cpu machine code = The following program has been written for the simple central proces

0 0
Add a comment Improve this question Transcribed image text
Answer #1
# MACHINE CODE ASSEMBLY CODE DESCRIPTION
0 00110001 31 LXI SP- This instruction initializes the top of the stack,and initializes the stack pointer.
1 01001111 4F MOV C,A - Moves data in A register to C register.
2 00110000 30 SIM- Set Interrupt mask- It reads the status of interrupts.
3 10110100 B4 ORA H- Logical bitwise operation of register H with Accumalator data.
4 11010110 D6 SUI DATA- Subtract imidiately data given in instruction from the accumalator.
5 11110000 F0 RP- Sequencing of program is transferred to a 16 bit address
6 00100011 23 INX H- Increments value in HL pair by 1.
7 10010001 91 SUB C- Subtracts the value in c register from the accumalator
8 01000011 43 MOV B,E- Moves data in C register to B register
9 00101111 2F CMA- Complements the data in register A
10 01101111 6F MOV L,A -Move data in register A to register L.
11 01001111 4F MOV C,A -Move data in register A to register C
12 11010010 D2 JNC Label- Jump to a new specified address if the carry flag is not set.
13 00000000 LSB part of jump address.
14 00000000 MSB part of jump address.
15 00000000
Add a comment
Know the answer?
Add Answer to:
(2+2+1 5 points) Problem 10.1: simple cpu machine code = The following program has been written...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please answer the questions correctly ASAP. It's multiple choice. 1) 2) 3) Which of the following...

    Please answer the questions correctly ASAP. It's multiple choice. 1) 2) 3) Which of the following values of the Condition Code (N Z P) could occur in the LC-3 to indicate that the value written to the register file is less than or equal to zero? [You must check all that apply to get credit.] 000 001 011 100 101 110 111 Which of the following instructions overwrite the Condition Code? [You must check all that apply to get credit.]...

  • DO 2 AND 3. Question #1 Convert the following assembly program into machine code. LDAA WSA1 STAA $1000 INCA LDAB $10...

    DO 2 AND 3. Question #1 Convert the following assembly program into machine code. LDAA WSA1 STAA $1000 INCA LDAB $1000 DECB ABA Here: Bra Here Question # 2 (a) in Question # 1, determine the values of PC, A, B, N, Z, V, C after each instruction (b) Verify your answers by using CodeWarrior Question # 3 Assume that the program in Question 1 is saved in memory starting at location $COOA. Drawa memory diagram showing the contents (in...

  • C++ code... Need help asap QUESTION 2 (20 MARKS) The following program shows a simple example...

    C++ code... Need help asap QUESTION 2 (20 MARKS) The following program shows a simple example to calculate average of three marks. Explain how the program is working as well as data management in your memory. You can illustrates this by using table or drawing. The sample output is illustrated in Figure Q2. 1 #include <iostream> 2 using namespace std 3 float calculateAverage (int* marks) int sum=0; float average, for (int İzd ;ia;i++) sumesum+( (marks+i)12 10 11 average float (sum)...

  • Problem 5 (15pts): Describe what the following program is doing (Do not need to explain each line of instruction....

    Problem 5 (15pts): Describe what the following program is doing (Do not need to explain each line of instruction. Just show me the purpose of this code). .equ LEDS, Ox100000 10 # define LEDS Ox10000010 .text global start #base address of LEDS on DEO-Nano start: movia r2, LEDS movi r3, 0b00000001 movi r4, OX7FFF slli r4, r4, 3 add r4, r4, r4 load: movi r5, 0b10000000 loop: stw rs, o(r2) mov r6, ro count: addi r6, r6, 1 bne r6,...

  • Question 1) Suppose a program has the following code: const int X = 2, Y =...

    Question 1) Suppose a program has the following code: const int X = 2, Y = 3; int sum; int values[X][Y] = {{1, 2, 3},                                  {4, 5, 6}}; for(int i=0; i<X; i++) {      sum=0;      for(int j=0; j<Y; j++)         sum+=values[i][j];    cout<<sum<<endl; } What is this program getting the sum of? Group of answer choices D-) The columns of the 2D array C-) The rows of the 2D array A-) All of the elements of the 2D...

  • Program Description: A bus has 28 seats, arranged in 7 rows and 4 columns: This seating...

    Program Description: A bus has 28 seats, arranged in 7 rows and 4 columns: This seating arrangement is mapped, row-wise, to a 1D-array of size 28: 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 0 1 2 3 21 22 23 24 25 Implement a well-structured Java program to enable a user to make and cancel seat reservations for the bus. The program uses Array to store the reservation information: 0...

  • i need help making this program the skeleton of the code is below: //Include the following #include <iostream> #...

    i need help making this program the skeleton of the code is below: //Include the following #include <iostream> #include <string> #include <fstream> //you must include this library if you wish to do file i/o using namespace std; /********************************************************* //Following is the declaration of a order record **********************************************************/ class order_record { public: string cell_number; string item_number; double quantity; double price; int processing_plant; double tax_rate; double order_tax; double net_cost; double total_cost; }; //Prototypes for your functions: input, output, and process will go...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT