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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started