Question: Write a PIC18F assembly language program at address 0x200 that will check whether the 16-bit signed number in registers [Ox31]0x30] is positive or negative. If

Write a PIC18F assembly language program at address 0x200 that will check whether the 16-bit signed number in registers [Ox31]0x30] is positive or negative. If the number is positive, the program will multiply the 16-bit unsigned number (bits 12 through 15 as 0's) in [0x21][0x20] by 16, and provide a 16-bit result; otherwise, the program will set the byte in register 0x40 to all ones. Use only data movement, shift, bit manipulation, and program control instructions. Assume the 16-bit signed and unsigned numbers are already loaded into the data register. Use MPlab to check the correctness of your code, submit screen shot of your MPLAB code and the registers holding the input and the output Write a PIC18F assembly language program at address 0x200 that will check whether the 16-bit signed number in registers [Ox31]0x30] is positive or negative. If the number is positive, the program will multiply the 16-bit unsigned number (bits 12 through 15 as 0's) in [0x21][0x20] by 16, and provide a 16-bit result; otherwise, the program will set the byte in register 0x40 to all ones. Use only data movement, shift, bit manipulation, and program control instructions. Assume the 16-bit signed and unsigned numbers are already loaded into the data register. Use MPlab to check the correctness of your code, submit screen shot of your MPLAB code and the registers holding the input and the output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
