Question: 1 0 . ( 5 0 pts ) . Build an assembly language subroutine named ExportR 1 Bits that copy bits from R 1 into
pts Build an assembly language subroutine named ExportRBits that copy bits from R
into other registers. Your subroutine will copy bits and of R into R and will copy bits
and of R into R and will copy bits and of R into R The bits found in R must occupy the
same places in the destination register as they did in R A diagram of where each bit in R must go is
shown below:
R R R R R R R R R
For example, suppose that R contains the value and that R R and R all contain
when your function is called. When your function finishes, R will contain R will
contain and R will contain As another example, suppose that R contains the
value and that R R and R all contain when your function is called. When your
function finishes R will contain the value R will contain the value and R
will contain the value Your subroutine must use only instructions that are contained in the
CS AVR instruction subset. The next page is blank if you need more space to work. Note: Only these instructions should be used ADD, ADC, CP CPI, NEG, COM, AND, ANDI, EOR, OR ORI, LSR ASR, BRBC BRBS JMP RJMP CALL, RCALL, RET, RETI, MOV, IN OUT, LDI, LDS PUSH, POP, NOP, STS
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
