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

Write a PIC18F assembly language program at address 0x200 that will check whether the 16bit signed number in registers [0x31][0x30] is positive or negative. If the number is positive, the program will multiply the 16bit unsigned number (bits 12 through 15 as 0s) in [0x21][0x20] by 16, and provide a 16bit 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 16bit 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!