Wilfrid Laurier University Faculty of Science April 2, 2014
Canadian Excellence

CP216: Microprocessor I

About this course ...
Faculty of Science General Regulations [pdf]
© 2002-2014 Nora Znotinas, Wilfrid Laurier University


Programming Language Target System - Handheld Running PalmOS®
  • Palm OS® Programmer’s API Reference [pdf, 2670p, © 1996-2004, PalmSource, Inc. ]
    >> descriptions of all Palm OS function calls and important data structures.
  • M68000 Trap Numbers [CodeWarrior® Development Tools; M68KHwr.h]
    >> M68000 Traps and various constant equates used by PalmOS.
  • Palm OS Core Trap Numbers [CodeWarrior® Development Tools; CoreTraps.h]
    >> PalmOS Traps for various versions of the operating system.
Development Environment
  • EASy68K: we will be running EASy68K V5.12.29 (editor); 5.13.00 (simulator) in the labs
    [ SetupEASy68K.zip   - all files in zip format; same version as in labs]
  • EASy68K Editor / Assembler / Simulator [C. Kelly, Monroe County Community College; distributed under the GNU General Public Use License]
dragon ball image Target Hardware - DragonBall™
[Freescale Semiconductor formerly Motorola, Inc.]
Week of ... Lectures, Readings, and Documentation Deliverables: Assignments, Labs, and Quizzes
January 06 Assignment 0 - do NOT hand in
-> Representation of Numbers [ Solutions ]
  • When is 16 bits not enough?
    Ancient software plus a massive snow storm at the end of December causes too many transactions to fit in a signed 16 bit index when rescheduling airline crews. Comair’s 2004 Disaster, the business viewpoint .

Lab 1 - EASy68K Editor, Assembler and Simulator

Matching Games: [© Nick Reeder, Sinclair Community College]

Cisco Binary Game: here [© 1992-2011 Cisco Systems Inc.]

January 13 Assignment 1 - due Friday January 17 9am
-> Operation and data length

Lab 2 - Debugging Assembly Language Programs

January 20 Assignment 2 - due Friday January 24 9am
-> Simple programs

Lab 3 - Breakpoints

Quiz 1 - given a simple program listing {move, and, or, eor, add, sub} and the corresponding memory dump: locate data in the memory dump, determine the result/output of any line of code, express results in binary, hexadecimal or decimal [ sample1 , sample2 - indicative of current online format ]

January 27 Assignment 3 - due Friday January 31 9am [Q1 example corrected and Q5 clarified Sat. Jan 25]
-> Decision Structures, Loops, and Hardware Devices

Lab 4 - Input / Output

Quiz 2 - given a data area containing DC/DS directives indicate how the data is stored in memory [ sample1 , sample2 ]
- you will be provided with a blank memory map as in the sample2 quiz.
- indicate memory locations reserved with a DS but not initialized with "--"
- indicate memory locations skipped to align word or longword data with an empty cell

February 03 Assignment 4 - due Friday February 07 9am   Saturday February 08
-> I/O, Decisions, and Loops

Lab 5 - Lists, Looping, and Advanced Debugging

Quiz 3 - given a series of assembly language instructions {move, and, or, eor, add, sub}, determine the output and the value of the condition codes [ sample1 , sample2 ; we will use the format shown in sample2]

February 10 Assignment 5 - due Friday February 14 9am
-> Lists and Loops

Lab 6 - File Handling


February 17 READING WEEK  

February 24 Assignment 6 - due Friday Friday February 28 9am
-> BCD and File I/O

  • Newline [Wikipedia]
    ... questions 3 and 4 deal with how lines are terminated/separated. A good review of how operating systems, programming languages, and internet protocol handle EOL and what can go wrong.


Lab 7 - Pixel Level Images and Screen Buffers

Quiz 4 - conditional branches, instructions such as CMP, TST, Bcc, DBcc [ sample 1 , sample 2 - you will see a combination of the two samples; some additional questions to think about]


March 03

March 7th is last day to drop course.
Assignment 7 - due Friday March 07 9am [clarification added March 5]
-> Pixel Level Graphics and Subroutines

Lab 8 - Pixel Level Images

Quiz 5 - looping [ sample1 , sample1 with answers , sample2 ]

March 10

Assignment 8 - due Friday March 14 9am [correction added March 12]
-> Passing Parameters and Look-Up Tables

Lab 9 - Calling C Routines

Quiz 6 - arithmetic [ sample1 , sample2 , sample3 ]

March 17 Assignment 9 - due Friday March 21 9am Saturday March 22
-> Using Stack Frames and the C Calling Convention

Lab 10 - Interrupts

March 24 Assignment 10 - due Friday March 28 9am
-> Interrupts

  • 68000 TRICKS AND TRAPS - Some assembly language programming guidelines   [BYTE magazine, September 1986 by Mike Morton]
    - lots of code examples which you should now be able to understand; some not immediately obvious
    - tricks can teach you a lot and test the depth of your understanding; however, if time or space are not critical, readable code (i.e. obvious) is better as the person maintaining your code may not be as strong a programmer as you
  • Advanced Coding Techniques - some additional coding examples; you should be able to read this code

Lab 11 - Machine Code and Instruction Timing **Bring machine code and execution time handouts to the lab.

Quiz 7 - Palm API, stack [ sample1 , sample2 ]

March 31 Assignment 11 - due Friday April 4 11pm
-> Recursion Plus

No lab -- No quiz

April 9-30

The final exam is 2.5 hours long. The exam is open book and you may bring in any print material (notes, labs, assignments, reference materials, texts) that you want. Electronic devices such as calculators, cell phones, PDAs, and laptops are not allowed.

At minimum, you should bring the following reference material to the exam:

If a Palm API routine is required in the exam, the appropriate pages from the Palm API reference manual will be provided with the exam.

The exam will have two parts:

  1. short answer questions to be answered in the space provided on the exam
  2. two or three programming questions to be answered in the exam booklet

FINAL EXAM:   CP216 April 11, 2014 8:30 AM -- Room N1044

  • Course Recap
  • Sample exam: Winter 2005 final [pdf]
  • Sample exam: annotated version with marking scheme so you know how I mark programming questions on exams.
    Note: The sample exam indicates level of difficulty and format. The exam content is always unique.
  • Sample exam from similar but not identical course
    University of Dublin - note, I'm not a big fan of "explain" questions unless there is a specific example that must be analyzed

© 2002-2014 Nora Znotinas, Wilfrid Laurier University