Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Q1. Suppose we have a correctly working user program. Part of the program reads

ID: 3752434 • Letter: Q

Question

Q1. Suppose we have a correctly working user program. Part of the program reads as: /*The statement below computes the difference (value of R1)- (value of R2). Here R1 and R2 are two general purpose registers. Condition codes are set in PSW As usual. The two registers remain unchanged. CMP R1, R2 //Jump to location L if the condition code N is set to 1. JMPN L Nowuppose we repkace the above tatement 'CMP RL,R2r bythe folowing satement SYSCMP The SYSCMP above is a system call instruction Below is a pseudo code for its service routine. Pseudo code of the service routine for SYSCMP CMP R1, R2 RTI Questions: Will the new user code necessarily work correctly? Write "Yes" or "No" and give an explanation in less than 50 words.

Explanation / Answer

ANS:

THIS CODE IS NOT WORKED CORRECTLY

NO IS THE ANSWER

New user code not necessarily work correctly, because in law register we use CMP (compare register or memmom with accumulator) for the contents of the operand register are R compare with the content of accumaleter. Both content are preserved the result of the comparaion is shown by setting the flag of the PSW. so we can not use syscmp instructions in that code.

IF YOU WANT ANY EXTRA INFORMATION FROM ME FEEL FREE TO ASK

THANK YOU

RATE THUMBSUP PLZZZZZZZZZZZZZZZZZZZZ