1. Give me TWO separate instructions that will, "multiply the contents of r0 by four." 2. Give me TWO separate instructi
Posted: Tue Jun 07, 2022 9:56 am
computer system
1. Give me TWO separate instructions that will, "multiply the contents of r0 by four." 2. Give me TWO separate instructions that will, "divide the contents of r2 by eight." 3. Using the "TST" instruction (which performs a bitwise AND without saving the result) give me two instructions (i.e., a first and then a second instruction) that will, "branch to the address 'LA'EL' if either bit 0, 3, or 13 in r0 is set." 4. Using the "TEQ" instruction, give me two instructions that will, "branch to the address 'SKIP' if the value in r12 is *not* 0x22." 5. 6. What is the result of asr , ro, # What is the result of 1s1 ro, ro, #6 What is the result of 1sr ro, ro, #6 What is the result of ror r0, r0, #15 ; r0 = 0x0000FFFF ; ro= 0xFFFF2345 ; r0 = 0x8123456 ; r = 0x8123456 7. 9. Write a short program (it doesn't have to be a print-out of uision, but that would help you avoid any errors) that performs the following: "if a number in r0 is positive, XXXX multiply it by 4 (and do it without multiplying'); but if it negative, divide it by two (and again, without 'dividing'); otherwise (which means r0 was #0, but you don't have to test for that) make it # 12. HINT: draw a flow chart first.
1. Give me TWO separate instructions that will, "multiply the contents of r0 by four." 2. Give me TWO separate instructions that will, "divide the contents of r2 by eight." 3. Using the "TST" instruction (which performs a bitwise AND without saving the result) give me two instructions (i.e., a first and then a second instruction) that will, "branch to the address 'LA'EL' if either bit 0, 3, or 13 in r0 is set." 4. Using the "TEQ" instruction, give me two instructions that will, "branch to the address 'SKIP' if the value in r12 is *not* 0x22." 5. 6. What is the result of asr , ro, # What is the result of 1s1 ro, ro, #6 What is the result of 1sr ro, ro, #6 What is the result of ror r0, r0, #15 ; r0 = 0x0000FFFF ; ro= 0xFFFF2345 ; r0 = 0x8123456 ; r = 0x8123456 7. 9. Write a short program (it doesn't have to be a print-out of uision, but that would help you avoid any errors) that performs the following: "if a number in r0 is positive, XXXX multiply it by 4 (and do it without multiplying'); but if it negative, divide it by two (and again, without 'dividing'); otherwise (which means r0 was #0, but you don't have to test for that) make it # 12. HINT: draw a flow chart first.