Question

Find the contents of register WREG after each of the following instructions: a. MOVLW 0x65 XORLW...

Find the contents of register WREG after each of the following instructions:

a. MOVLW 0x65

XORLW 0xAB

b. MOVLW 0x2E

ANDLW 0x56

Assume that MYREG = 27H.Indicate the value in MYREG after the execution of the sequence of instructions in each of the following cases:

a. MOVLW 0x5E

CPFSLT MYREG

INCF MYREG, F

ADDLW 0x5

b. MOVLW 0x84

CPFSGT MYREG

INCF MYREG, F

ADDLW 0x5

Homework Answers

Answer #1

PLEASE COMMENT IN CASE OF DOUBTS

Know the answer?
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
Similar Questions
I. What value will be in register r2 after execution of the following instructions? Show your...
I. What value will be in register r2 after execution of the following instructions? Show your work with the register values after executing each instruction. MOV r2, #0x0 LDR r1, =0xCF MOVS r1, r1, LSR #1 ADC r2, r2, #0 MOVS r1, r1, LSR #1 ADC r2, r2, #0 II. Assume a 32 bit register holds a data of four bytes as B3B2B1B0. Write a sequence of ARM instruction that takes this data as input and swaps the bytes 0...
III. After execution of the following instructions what value will be in register r0? LDR                ...
III. After execution of the following instructions what value will be in register r0? LDR                 r12, =0xA4000000 LDR                 r0, =0x75 LDR                 r1, =0xD2 LDR                 r2, =0x9C LDR                 r5, =0xC STMDB           r12!, {r0-r2, r5} LDR                 r0, [r12, #8] SUB                 r0, #0x77 IV. Assume that the variables f, g, h, i, and j are assigned to registers r0, r1, r2, r3, and r4, respectively. Assume that the base address of the arrays A and...
Assume that MYREG = 27H. Indicate the value in MYREG after the execution of the sequence...
Assume that MYREG = 27H. Indicate the value in MYREG after the execution of the sequence of instructions in each of the following cases: a MOVLW CPFSLT INCF ADDLW 0x5E MYREG MYREG,F 0x5 b MOVLW CPFSGT INCF ADDLW 0x84 MYREG MYREG, F 0x5
VII. After execution of the following instructions what value will be in register r2? Trace the...
VII. After execution of the following instructions what value will be in register r2? Trace the program and write the value of the registers at each line to receive full credit. LDR r12, =0xA4000000 LDR r0, =0x2D STR r0, [r12, #-4]! LDR r0, =0x5E STR r0, [r12, #-4]! LDR r0, =0xD5 STR r0, [r12, #-4]! LDMIA r12!, {r0-r2} SUB r2, #0x68 VIII. Write a simple ARM assembly program to divide a 32 bit positive number stored in r0 by a...
. Write a sequence of instructions to compute the following arithmetic expression and store the result...
. Write a sequence of instructions to compute the following arithmetic expression and store the result in register DX: 7 + (-20) * 14 - (-10) * 8– 9 Trace the contents of registers, assume initial contents are 0000 Instruction AX BX CX DX Remark initial 0000 0000 0000 0000
Example the Pep/9 system contains the following four hexadecimal values register A: 25B6 register X: AE20...
Example the Pep/9 system contains the following four hexadecimal values register A: 25B6 register X: AE20 Mem[091D]: 0FF0 Mem[0A71]: 301D If these are the values before each of the following instructions executes, indicate which of these values is changed when each statement is executed, and show the new value. If a register or a memory location shown above is unchanged by the instruction, don't show its contents; only show the item that changed and what the new 16-bit value of...
Find the shortest sequence of LEGv8 instructions that extracts bits 16 down to 11 from register...
Find the shortest sequence of LEGv8 instructions that extracts bits 16 down to 11 from register X10 and uses the value of this field to replace bits 31 down to 26 in register X11 without changing the other bits of registers X10 or X11. (Be sure to test your code using X10 = 0 and X11 = 0xffffffffffffffff. Doing so may reveal a common oversight.) thank you :->
Assignment-I Write the output for the following instructions MOV B , A             Before instruction execution, the...
Assignment-I Write the output for the following instructions MOV B , A             Before instruction execution, the contents of registers B and A are                                  Rd= B= XBH                         Rs= A = 1FH              After the execution of instruction.                                 Rd= B = ?                         Rs= A = ? ADD B If A= E 3H   B=  0 4H then after the  execution of the above instruction the content of A = ? SUI 03H If the value of A = 15Hthen after the execution of the above instruction...
4) If variable A=0x05 & register B=0x10, and you compare the variables with the instruction (a>=b),...
4) If variable A=0x05 & register B=0x10, and you compare the variables with the instruction (a>=b), what's the contents of A, B after the comparison: a) 05, 10 b) 15, 05 c) F1, 00 d) F1, 10 e) 15, 00 5) In the instruction above, what's the value of the N, Z conditions after the execution: a) 0,0 b) 1,0 c) 0,1 d) 1,1 e) 0,0 6) If A = 0xAB, and you execute a shift right instruction A=A>, what...
1. Enter the integer value of the $v0 register after executing  the following intstruction, given the register...
1. Enter the integer value of the $v0 register after executing  the following intstruction, given the register values $zero = 0, $t7 = 109 : sll $v0, $t7,3 2. Enter the integer value of the $v0 register after executing the following instruction, given the register values $t2 = 30 : addiu $v0, $t2, 14648