Assembly Language Programming for Engineers (ECE238): Course Syllabus
Spring '08
http://cratel.wichita.edu/cratel/ECE238Spr08/
Mondays and Wednesdays from 4:15 to 5:25 in McKinley 102
Instructor:John Harrison
Associate Professor of Violin
Director: CRATEL
email: john.harrison@wichita.edu
phone: x6572, x6817
Office Hours: "Build Day:" 4:30 to 6:30 in Duerksen Fine Arts Center C6 "The Cratel Lab" or by appointment
General Description
Assembly Language Programming for Engineers uses the Z80 microprocessor and the GameBoy platform to introduce general concepts of computer architecture, machine and assembly language programming. The course is a mix of theory and application: students will learn general ideas of how assembly language code is constructed, independent of the microprocessor. They will practice these ideas and concepts with programming projects on the GameBoy.
Teaching Philosophy
Most classes taught at major universities follow a model of teaching in which the teacher imparts information to the students and then tests the students to see how well they have retained the information presented to them. This pedagogical approach, called Instructionism, focuses on the teacher as the giver of information. In contrast, Constructionism is a learner and community-based model. As the wikipedia puts it, "Constructionist learning involves students drawing their own conclusions through creative experimentation and the making of social objects. The constructionist teacher takes on a mediational role rather than adopting an instructionist position. Front of class teaching 'at' students is replaced by assisting them to understand—and help one another to understand—problems in a hands-on way."
While it is not practical for Assembly Language Programming for Engineers to be designed from the Constructionist model, I am inspired by the ideas of Constructionist educators such as Seymour Papert, Mitchel Resnick, and David Cavallo. I try to borrow from the Constructionist model as I can:
- students will rarely find their assignments completely spelled out. Intentionally, there will be room for personal exploration.
- emphasis will be placed on the class as a community which communicates and supports itself within the context of the material presented.
- discussion and conversation is emphasized on all levels between and among teachers and students
- the standard hierarchical model of teacher and student is loosened:
- students can and should expect to learn from each other as much as from the teachers
- teachers can and should expect to learn from students and other teachers
- conversations between and among teachers and students is open and indeed part of the learning that occurs in the course.
- the course material is treated as continually changing, developing, and influenced by the class community, rather than as fixed facts to be presented within a formal structure.
Assembly Language Programming for Engineers, in exploring how to enhance the framework of Instructionism, is an experiment to better understand what teaching models can work within the University now and in the future. We welcome your feedback on this experiment throughout and at the end of the course.
Topics Covered
CPU Architecture
- stored program
- fetch-execute loop
- timing (T states, M cycles)
- three bus architecture
processor types
- single/parallel
- CISC/RISC
- DSP
- microprocessor/microcontroller
Assembly Language
- registers, flags
- addressing modes: direct, register, immediate, indirect, relative, indexed
Instruction groups: load, exchange, stack, arithmetic, jumps, logic, but, rotate & shift, input/output
- Interrupts
Gameboy Architecture
- Processor
- Memory architecture
- I/O and carts
- boot sequence
- modes: low power, stop, halt
- video: tiles, background, window, sprites
- sound
- interrupts
- timer, I/O registers
Goals
At the end of the course, students will have:
- a solid understanding of low-level programming for microprocessors, allowing them to pick up assembly languages for other microprocessors fairly easily.
- a demonstrated ability to write nontrivial code in a specific assembly language and computing platform
Assignments, Midterm, and Term Project
For their term project, students in the course will write an interactive application appropriate for youth. This might be a game, a drawing program, a construction kit for story telling, or anything you can imagine that is practical within the time limits of the course. Toward the end of the semester, we will show our term projects to pre-teenagers, have them try out our software, and maybe tell them a bit about how we wrote it, if they are interested.
Throughout the semester, students will submit assignments helping them learn the skills they need to write their term project. There will be one midterm which will be "old school:" in-class, open-book, pencil and paper. In the midterm you be will introduced to a microprocessor we have not studied and be asked to explain basic architecture and write simple routines using this new microprocessor.
Format
I am a strong believer that one of the main roles of any University is to share its knowledge freely and openly. For this reason, all content for the course, with the exception of your grades, will be on kept on publically viewable sites which can be contributed to collaboratively. This has the added benefit of giving us practice communicating and sharing information for the betterment of the class community. Specifically we will use:
Class wiki
A wiki is a type of website that allows users to easily add and edit content and is especially suited for collaborative writing. Most of the reference and course material for Assembly Language Programming for Engineers is set up on the class wiki, meaning that any student in the class can change the site, adding or clarifying material. Students are encouraged to continually add to the class wiki as a contribution to the entire class. For example, if a student finds a great resource for surplus GameBoys and it is not listed on the wiki, that student might add it. If installation instructions for a particular piece of software are incorrect or missing information, the student might also correct this information to the wiki.
Blog
Use the class blog to submit all class assignments. In addition, you are encouraged to post to the course blog freely, using it as an engineer's sketchbook. Each week, you could document on your this blog your process in completing the projects or assignments you did, thoughts the assignments inspired for you, and any difficulties, tips, or tricks you might suggest for yourself and others.
Electronic mailing list
- All students in the class, as well as guest lecturers and other special guests, will subscribe to the course electronic mailing list. All members of the list will be able to post to it simply by writing an email to the list.
- Students will use the electronic mailing list as a way to share assignments, ask questions, seek help, or just share information pertaining to or of interest to the class. For example, many weekly assignments may be emailed into the email list/forum as well as posted onto the course blog. Resources will also be shared on the electronic mailing list, as well as posted to the wiki.
When faced with a problem in the class, instead of contacting the instructor, send an email to the electronic mailing list. This allows the class as a community to act as a resource for help.
- In addition to sharing assignments and ideas, students are strongly encouraged to respond to each other's assignments, projects and ideas through free discussion on the mailing list.
Wiki, blog, mailing list discussion
Resources go on the wiki, assignments go on the blog, and all questions and chatter goes on the discussion list
- The more active the discussion list, the better. If you feel the discussion list is clogging your email, learn to use filters. If the discussion list is filling up your mailbox, switch to gmail. With email clients and email services as sophisticated as they are, arguments about getting "too much email" are no longer sound.
Compared to wikis, blogs and discussion lists, BlackBoard is a closed and restricted system. It does not seem to fit the design of this class as successfully.
Course Structure
A detailed course schedule is continually updated on the class wiki.
Equipment
Each student will receive a Transferrer II GameBoy USB-powered parallel port programmer with accompanying 32MB "Smart Card" flash cartridge. You may borrow this equipment for the entire semester, but must return it at the end of the semester.
- All software (editor, assembler, emulator, linker, etc.) runs on the Win32 platform and is free. It will be installed on all the computers in the Wallace Hall computer lab
- As all of the software used has a small footprint and requires no installation scripts, I recommend you install all necessary software on a USB pen drive for easy portability.
Students are responsible for purchasing their own GameBoy. The following GameBoy models are acceptable for this coursework: GameBoy, GameBoy Pocket, GameBoy Light, GameBoy Color, GameBoy Advance, GameBoy Advance SP. Later GameBoys are not compatible with the original GameBoy, which is our target platform, and are therefore not suitable for this course. Find a good deal on a GameBoy at eBay. Or buy the GameBoy Advance for $20 at EB Games.
There is no textbook. Our textbook-like reference is The Z80 user's manual
- All of our reference materials are online. I expect that you may find it difficult when writing code and doing assignments to have a variety of online references at your fingertips. Therefore I highly recommend a 3-ring notebook with dividers to print and organize your most-often-used reference materials.
GameBoy
I have chosen the GameBoy as our programming platform because it is simple enough that we can create interesting code within its framework in one semester. At the same time its screen, speaker and buttons are rather sophisticated interfaces for us to work with, given the price of the unit. Last, it is a fun device that gives us the opportunity to take our work outside the realm of "academic exercise."
GameBoys are readily available and the Z80-based chip that the GameBoy uses is still a popular microprocessor. Much of the current TI programmable calculator line still uses the Z80.
Office Hours/Build Day
- Every Friday from 4:30-6:30, the CRATEL lab is open to visitors, volunteers, or anybody who wants to come by, chat, or build something. Anything goes but the discussions are usually driven by students who are excited and ready to build. During Build Day, students are free to explore circuits, software, computers and build projects. Moreover, various students have come to the lab during Build Day for help with their own projects, from microphone interfacing to Linux installation.
- Build Day doubles as my office hours, so if you want to catch me, this is a good time to come by.
Assignments
All assignments are due for submission onto the blog on midnight the day before class. This is so I can look through the assignments before the class meets. Typically we will spend the beginning of class looking at people's assignments (blog and live demo) together on the day an assignment is due. Therefore, when assignments are due make sure you bring the assignment to class and be ready to show your work. When evaluating assignments, I am looking for:
engineering: does it perform its intended function?
documentation: could somebody with your level of knowledge easily understand/modify your assignment based on your code and your notes?
creativity/originality: is there something unique or original about the assignment?
I'm a big monster when it comes to enforcing the importance of documentation.
Term Project Proposal
Toward mid semester, students will submit proposals for their term project. Proposals will be accepted if and only if the proposed project is appropriate in scale and difficulty, and if it has some original element to it.
Plagiarism
It is okay for students to work together on projects, provided that each student develops in the collaboration a full understanding of all parts of the project and all students are credited. Moreover, it is okay for students to borrow from each other's projects as long as credit is given. Plagiarism, however, is the act of stealing somebody's work without giving credit to that person. Anybody caught plagiarizing will receive an X for the course and will be penalized to the full extent allowed by University policy. No excuses for plagiarism will be accepted. There are no exceptions to this policy.
Grading
Take this class because you want to learn the material, not because you want to get a good grade. I am not very interested in discussing grades and will not give much time for it. But if you want to talk to me about Z80, GameBoys and Assembly language, I have all day.
Assignments
45%
Midterm Exam
15%
Term Project
40%
Late assignments and extensions
In general, late assignments are not accepted. If you have not completed an assignment on the day it is due, hand in your incompleted assignment for partial credit.
Feedback
I always welcome feedback about the class. Email me if you have comments or suggestions. Additionally, later in the semester I will add a "Suggestions for next year" category on the blog where we can post and discuss how to improve the course.
Responsibility
- Since the course material is broad and course meeting times are limited, students enrolling in the course must be self-motivated and ready to seek help from each others, as well as from the instructor. Resources to facilitate this will be given in the class.
Students are expected to check the email discussion list daily, so that they may stay informed of announcements and changes in assignments, and they may participate in various other conversations that may be happening on the list.
- If a student misses class without receiving instructor approval beforehand, it will be the student's responsibility to catch up on the class material.
- Students enrolling in the course should expect to average at least five hours on assignments outside of the class each week.