Why not the PIC24
The textbook uses the PIC24 architecture. (Though I do think the next version may use the PIC32.) Here are my reasons for using the PIC32 this term.
- The PIC32 uses a unified address space for programming. The PIC24 uses the Harvard memory model, where there is one address space for instructions and another for data. This simplifies the discussion of pp. 56-59.
- The PIC32 has only one addressing mode. The PIC24 has about seven, as explained in pp. 61-78. Mastery of PIC24 addressing modes has often been a problem for CSCI 255 students and instructors.
- The PIC32 does not have condition codes. This makes it easier to implement conditional and iterative code, the topic of Chapter 4.
- The PIC32 is a 32-bit machine. The PIC24 is a 16-bit machine. This avoids the need for special sequences of instructions to implement 32-bit operations, the topic of Chapter 5.
- The PIC32 uses the MIPS32 instruction set. This is a simpler instruction set than the PIC24 instruction set described in Appendix A.
- The MIPS instruction set is used in CSCI 320, so you’ll only need to learn one machine language at UNC Asheville.
- The President of Stanford University designed the original MIPS architecture.
How to follow the textbook
We will largely follow the presentation order of Chapters 3 to 5, but we will use PIC32 examples. I do suggest you read Chapters 3 to 5, but don’t worry about the details.
In Chapter 6, we’ll be studying pointers using C. This will show you how courses like CSCI 181, 182 and 202 were taught before object-orient programming became the rage.
Lecture strategy — Getting started
Generally, the approach will be to illustrate how assembly language can be used to implement the code you have been writing in Java and C. We’re going to start our study of MIPS32 by looking at two sources: (1) a 31-slide MIPS Assembly Tutorial used in EEL 5764 at the University of Florida and (2) a collection of example of expressions and control structures implemented in MIPS used in CSE 378 at the University of Washington.
Stuff to read soon
- Scan Chapters 3 to 5 of the textbook.
- Read Sections 6.1 to 6.5 of Digital Design and Computer Architecture which is available on-line from the UNC Asheville library
- Appreciate Daniel Ellard’s MIPS Assembly Language Programming CS50 Discussing and Project Book
- Examine Programmed Introduction to MIPS Assembly Language
- Examine MIPS Instruction Reference
There is quite a bit (thousands of pages) of detailed documentation available for the PIC32 and MIPS32 at the following web sites: