Microprocessors: From Assembly Language to C Using thePIC18Fxx2

| 1. | Write an assembly language program for the number sequencing computer that outputs the four digit sequence 0, 2, 5, 7 if LOC = 0, else output the sequence 1, 3, 6, 8. After a sequence is finished, loop back to program start. Convert your assembly language program to machine code starting at location 0. |
| ||||||||||||||||||||||||
| 2. | Write the assembly language for the NSC machine code program seen in Table 2.8.
|
| ||||||||||||||||||||||||
| 3. | For the NSC, assume that the LOC input is tied to the least significant bit of the DOUT bus. For the program in Table 2.9, give the location executed and the DOUT value for the first 10 clock cycles.
|
| ||||||||||||||||||||||||
| 4. | Repeat problem #3, except change the instruction at location #1 to OUT 4. |
| ||||||||||||||||||||||||
| 5. | Assume the number definition is changed to 1-X 1X 2X 3-Y 1Y 2Y 3-Z 1Z 2Z 3Z 4, with the local number as Y 1Y 2Y 3-Z 1Z 2Z 3Z 4. How many instructions are required for the... |