Question

Make this to Assembly 68k IF [D0] == 5 THEN [D1] <- 1 [D2] <- 0 ELSE [D1] <- 0 [D2] <- 1

make this to Assembly 68k

IF [D0] == 5 THEN [D1] <- 1 [D2] <- 0 ELSE [D1] <- 0 [D2] <- 1

0 0
Add a comment Improve this question Transcribed image text
Answer #1

//Your assembly code is here


   CMP #5 , D0    ; if [D0] == 5
   BNE ELSE        ; if D0 is not equal jump to else
IF
   MOVE #0 , D1 ;[D1] <- 0
   MOVE #1 , D2   ;[D2] <-1
   BRA ENDIF         ; To jump at endif so that else not executed
ELSE
   MOVE #1 , D1 ;[D1] <- 1
   MOVE #0 , D2 ;[D2] <- 0
ENDIF

If you have any doubt.Please feel free to ask.

Thanks.

Add a comment
Know the answer?
Add Answer to:
Make this to Assembly 68k IF [D0] == 5 THEN [D1] <- 1 [D2] <- 0 ELSE [D1] <- 0 [D2] <- 1
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
  • ⦁   Parity Checker Design a parity checker circuit: PC(D2, D1, D0, OP). The inputs D2, D1,...

    ⦁   Parity Checker Design a parity checker circuit: PC(D2, D1, D0, OP). The inputs D2, D1, D0, OP represent the bits of the received message. The inputs D2, D1, D0 are the data message and the input OP is the parity bit that was generated by an odd parity generator. If the parity of the received message is correct, the output PC is a zero. If the parity of the received message is not correct, the circuit output PC is...

  • Write a program in 68K assembly code that adds an odd parity to each ASCII character....

    Write a program in 68K assembly code that adds an odd parity to each ASCII character. Your code must satisfy the following specifications: 1. Define the following 64 characters in the SRC address.SRC:DC.B 'Computing and Software Systems, University of Washington Bothell' 2. Define the 64-byte space.DST:DC.B 64 3. Read each of the 64 characters, (i.e., each byte) into D0, check the number of 1s in it, set 1 to the MSB with "ORI.B #$80, D0" to create an odd parity,...

  • 1. (20 pts ) Convert the following 68K assembly language instructions into RTL. Write “invalid” for...

    1. (20 pts ) Convert the following 68K assembly language instructions into RTL. Write “invalid” for incorrect 68k instructions. MOVE 3000, 4000 MOVE #4000, 5000 MOVE #12, (A0) MOVE (A1), (A2) MOVE #4000, D4 MOVE (A0), D3 ADD #13, D4 ADD (A3), 1234 MOVE D3, #4 MOVE (D3), D2

  • Implement the circuits as described below. A priority encoder has four inputs, D0, D1, D2 and...

    Implement the circuits as described below. A priority encoder has four inputs, D0, D1, D2 and D3. D0 has the highest priority and D3 the lowest. The encoder has two outputs X and Y. Implement the priority encoder. Design a one-input, one-output Finite State Machine (FSM) that operates as a serial 2’s complementer. The FSM accepts a string of bits from the input and generates the 2’s complement of each bit at the output. The circuit can be reset asynchronously...

  • left f:A->B and let D1, D2, and D be subsets of B prove or disprove f^-1(D1UD2)=f^-1(D1)Uf^-1(D2)...

    left f:A->B and let D1, D2, and D be subsets of B prove or disprove f^-1(D1UD2)=f^-1(D1)Uf^-1(D2) does the proof change when it says subset of B vs subset of A let f:A->B and let D1, D2, and D be subsets of A. Prove or Disprove F^-1(D1UD2)=F^-1 (D1)UF^-1(D2)

  • 1) double d1 = 2.5; double d2 = 4.5; double res = 0; res = (int)...

    1) double d1 = 2.5; double d2 = 4.5; double res = 0; res = (int) (d1 + d2); What will be stored in res? A. 7 B. 6 C. There will be an error because res is a double number 2) If an array is of size N, then it has positions that range.... A. from 0 to (N-1) B. from 1 to N C. from 0 to N D. from 1 to (N-1) 3) Having more than one...

  • Consider the following method that is intended to determine if the double values d1 and d2...

    Consider the following method that is intended to determine if the double values d1 and d2 are close enough to be considered equal. For example, given a tolerance of 0.001, the values 54.32271 and 54.32294 would be considered equal. /** @return true if d1 and d2 are within the specified tolerance, * false otherwise */ public boolean almostEqual(double d1, double d2, double tolerance) { /* missing code */ } Which of the following should replace /* missing code */ so...

  • Labor Output Price (D1) Price (D2) 0 0 $10.00 $10.00 1 16   10.00     9.50 2 31...

    Labor Output Price (D1) Price (D2) 0 0 $10.00 $10.00 1 16   10.00     9.50 2 31   10.00     9.00 3 45   10.00     8.50 4 58   10.00     7.50 5 69   10.00     6.50 6 78   10.00     5.50 Assume that the labor market is perfectly competitive. Suppose the firm’s product demand is given by the column labeled D1. If the wage rate is $125, the firm will achieve maximum profit by hiring _____ workers. 3 5 4 6

  • Floats.java Use the following calculations for di and d2 in your code: double di = 0;...

    Floats.java Use the following calculations for di and d2 in your code: double di = 0; // add .1 to 0 eleven times d1 += 1; // 1 d1 += .1; // 2 d1 += 1; // 3 d1 += 1; // 4 d1 += 1; // 5 d1 += .1; 1/6 d1 += 1; /17 d1 += .1; 118 d1 += 1; // 9 d1 += 1; // 10 d1 += 1; // 11 double d2 = 1 *...

  • Question 7 (1 point) S3 S1 S2 3 0 5 1 D1 D2 Loanable funds real...

    Question 7 (1 point) S3 S1 S2 3 0 5 1 D1 D2 Loanable funds real interest rate 12 Refer to the figure above. In the 2000 elections George Bush made a proposal to give away the budget surpluses in lower taxes. If the economy started at point 0, then the effect of such a policy would be: to move the economy to point 2 to move the economy to point 4 nothing, the economy would stay at point 0...

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