Question: This is a test on Assembly Language Programming. You must write 4 sample programs using PIC mid-level enhanced Assembly Language like we have used with

 This is a test on Assembly Language Programming. You must write

This is a test on Assembly Language Programming. You must write 4 sample programs using PIC mid-level enhanced Assembly Language like we have used with MPLAB X and the PIC16F1829 processor. You can make a few small errors, but you must get all 4 problems essentially correct to make a 100, 3=90, 2=80, 1=70, 0=60. This test will count ~10% of your grade. You have 3 variables X,Y and Z stored in the following locations X @ 0x30 in bank 0 and Y @ ox31 also in bank 0 and Z at 0xA0 in bank 1. Earlier in the program X and Y have been loaded with data. That part of the program has already been written and debugged. Now, you have to write a segment of code that will switch X and Y. You may use location Z if you need to without having to save Z. Remember, you must not destroy the data before you move it. You will need to use "MOVF" AND "MOVWF" instructions. Don't forget that you need the 2^nd operand with the MOVF but not with the MOVWF instruction. It might be a good idea to do a block diagram of a flow chart before you write your code. This is a test on Assembly Language Programming. You must write 4 sample programs using PIC mid-level enhanced Assembly Language like we have used with MPLAB X and the PIC16F1829 processor. You can make a few small errors, but you must get all 4 problems essentially correct to make a 100, 3=90, 2=80, 1=70, 0=60. This test will count ~10% of your grade. You have 3 variables X,Y and Z stored in the following locations X @ 0x30 in bank 0 and Y @ ox31 also in bank 0 and Z at 0xA0 in bank 1. Earlier in the program X and Y have been loaded with data. That part of the program has already been written and debugged. Now, you have to write a segment of code that will switch X and Y. You may use location Z if you need to without having to save Z. Remember, you must not destroy the data before you move it. You will need to use "MOVF" AND "MOVWF" instructions. Don't forget that you need the 2^nd operand with the MOVF but not with the MOVWF instruction. It might be a good idea to do a block diagram of a flow chart before you write your code

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!