CMPS 2240 Computer Architecture I - Assembly Language Programming
Gordon Griesel
Office: Sci III 337
Office Hours: by appointment
Email: gordon@cs.csub.edu
Course web site: https://www.cs.csub.edu/~gordon/2240/
Class meets on Zoom:
MWF 8:00am - 8:50am (lecture 81277)
Thursday 7:20am - 9:50am (lab 81278)
Catalog Description
Introduction to computer architecture and assembly language programming.
Covers number systems and data representation, CISC and RISC instruction set
architectures, internal organization of a computer, and basics of logic design.
Each week lecture meets for 150 minutes and lab meets for 150 minutes.
Prerequisites: C- or better in the following CMPS 2010 and MATH 1040, 1050, 1060, 2310, or 2510.
Prerequisites by Topic
Programming skill in a high level language such as C, C++, Java.
Required Textbooks
Purchase of any textbooks is optional.
See textbooks link on our main page.
Appendix A from Computer Organization & Design
by Patterson & Hennessey; 3rd Ed.
Appendix A is available online.
Latest edition places similar material in Appendix B.
MIPS Assembly Language Programming by Robert L. Britton (available online).
Additional material will be available online from our main website.
Lecture Topics and Rough Schedule
Week 1 Operations on binary, octal and hexadecimal numbers
Week 2 Arithmetic, shift & rotate operations
Week 3 Subroutine linkage & call frames
Week 4 Instruction encoding, jumps & branches
Week 5 Program optimization
Week 6 Logical and bit-field operations & condition testing
Week 7 Multiplication, division, branch delay slot
Week 8 Introduction to x86-32
Week 9 x86-64 code optimization
Week 10 x86 inlining with C/C++
Week 11 More x86 inlining with C/C++
Week 12 Mips file processing
Week 13 Floating-point formats 8-bit, IEEE 32-bit
Week 14 Recursion and stack frame
Week 15 Flex week
Week 16 Final exam
Grading Policy
Homework................ 15%
Labs.................... 15%
Quizzes................. 20%
Attendance.............. 10%
Final Exam.............. 20%
Final Project........... 20%
----
Total possible.......... 100%
The overall distribution of scoring is shown above.
Letter grade will be based on percentage of total possible.
Grading Scale
A 100% |
A 93% |
A- 90% |
B+ 87% |
B 83% |
B- 80% |
C+ 77% |
C 73% |
C- 70% |
D+ 67% |
D 63% |
D- 60% |
F 0% |
Scores will be posted on the course website during the quarter.
Zoom class sessions
Class sessions will be held online using Zoom.
Class attendance will sometimes require student use of a webcam.
The following statement is justification for requiring the use of a webcam
by students, and was provided by CSUB administration.
--------
Because nonverbal feedback is helpful in human interactions, I expect
students in this class to keep their cameras on during synchronous portions
of online instruction. With this in mind, please plan where you will be
during class time so you can participate in a setting that is free from
visual distractions. If you believe you have a legitimate reason not to have
your camera turned on, please consult with me well in advance of the class
period, and I will make a determination.
--------
When class starts each day, you should be logged in to the Odin server.
Many class sessions will include some programming or a task to complete using
a text file on Odin.
Attendance
Class attendance is required.
Attendance will sometimes be recorded using Zoom session log files.
Log into Zoom a few minutes before our class time so that you are in class
when the class period begins. You may be asked to respond to questions or
perform a task during class.
Labs
Labs are hands-on assignments to be done during a lab class period.
Lab Rules:
1. Must not be late to lab.
2. Must work the entire lab period, unless excused by instructor.
3. Your program must compile and run at the end of lab period,
when it is collected for scoring.
A program that does not compile can receive a score of zero.
Homework
Homework assignments are posted on our web page.
Instructions will be given for each assignment.
Homework Rules:
1. Your program must compile and run when it is due, and collected
by the instructor.
General requirements of all assignments
. Your name at the top
. Correct file name
. Correct file location
Programming assignments:
. No compile warnings or errors
. Program must run
. Program output must be neat, clean, and complete.
. C program code must follow the K&R coding style.
. C program code must have consistent and correct indenting.
Text file written assignments:
. Neatly written text
. Correct spelling and grammar
Each assignment will also have some specific requirements in addition to
those listed above.
Your name on all assignments
Now that CSUB has become a virtual campus, some of the rules for
writing and handing-in assignments are more important. Please read
the rules below and follow them.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Amendment Sun Sep 13, 2020
-----------------------------------------------------------------------------
Your name must be at the top of every asssgnment. First and last name.
An assignment file is any file that you modify as part of an assignment.
In addition to your name, add the following information:
1. Just below your name put the date you did the work.
2. Just below that give a brief description of what this assignment is.
3. Just below that you may add special comments regarding your specific
work on the assignment.
Include in your special comments:
Sources that you used to work on and complete the assignment such as
web, textbook, lecture notes, lab, homework, tutoring center, etc.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Rules for all assignments...
1. Your name must be on every assignment.
C and C++ programs:
Put your name on the top line of every program you write.
In a comment, write just your name.
Programs will not be accepted without a name.
Forgetting your name can result in a score deduction.
Forgetting your name can also result in a score of zero.
Misspelling your own name will result in a deduction.
Text files:
Your name must be at top of any text file that you turn in.
Forgetting your name can result in a score of zero.
Quizzes:
Your name must be at top of any written quiz.
Your name must be at top of any quiz text file.
Exams:
Your name must be at top of any written exam.
Your name must be at top of any exam text file.
Your Project:
Your name must be listed in your project proposal.
Your name must be at the top of all programs written for your project.
Original author:
· If your program already has an original author listed,
do not erase or change the author's name.
· Put your name at the top as usual. Just below that,
briefly explain that you are modifying the program.
Notes:
Your name on an assignment is not optional.
Your name on an assignment indicates:
• The assignment is your work.
• You take responsibility for the assignment.
An assignment with no name will not be accepted.
The score given will be zero.
Putting your name on an assignment after it has been collected does
not help, because the assignment has already been collected.
In some cases an assignment may be collected late with a no-name penalty.
There are things in life that require protest and rebellion,
but putting your name on an assignment is not one of them.
2. Good coding style must be used.
C and C++ programs:
The linux kernel coding style is used in this course.
https://www.kernel.org/doc/html/v4.10/process/coding-style.html
K&R indent and bracing style is recommended in your programs.
Poor coding style can result in a score deduction.
Unreadable code due to poor indenting will cause a score deduction.
Choose spaces or tabs for indenting, but do not mix them.
Note: Some assignments may ask you to maintain the style of the
program's original author.
3. Spelling and grammar.
Please write carefully on all assignments.
Carelessness can cause a score deduction.
4. File locations.
All work done on the Odin server must be done in your course folder.
The folder name is the 4-digit name of this course, and will be
setup by running a script provided by your instructor.
Examples: 2240/, 3350/, 3480/
Any coursework stored outside the course folder must be stored in
a folder with permission 700.
Assignments stored in general folders or home folder will be submitted
to the system administrator for deletion.
Continued violations will be submitted to our school's department
of Academic Integrity for consideration.
Final Exam
A final exam will be given.
A date and time for the final exam will be posted.
The Semester Project
The semester project will ask you to write a somewhat complex program using all
the assembly language knowledge you have learned throughout this course.
A complete description of the project requirements will be available around
week-3 of the course. The project could take 20 to 40 hours of programming
work to complete, depending upon the grade level you wish to achieve.
Late Assignment Policy
Late assignments will not be accepted and result in a score of zero.
Individual Work Policy
All work done in this course is individual work.
Sharing of source code is not allowed.
Possession of code written by other students is not allowed.
Copying another student's work is plagiarism.
Copying answers or source code from the Internet is also plagiarism.
Academic Integrity Policy
All work done in this course is individual work.
Please do not share your work with other students.
You may discuss assignments with other students, but sharing of source code
is simply not allowed. Refer to the Academic Integrity policy printed in the
campus catalog and class schedule. Violations are enforced in accordance with
the Department's policy on academic honesty.
Absence from class
A student's responsibilities include attending classes.
If you miss a class, it is your responsibility to inform Gordon of the reason
for the missed class (documentation may be required) and to arrange to make up
any missed assignments, exams, quizzes, and class work, to the extent that this
is possible. Excusable absences include, but are not limited to:
Illness, injury, death of an immediate family member, etc.
See a complete list at CSUB Catalog page 64.
Your instructor reserves the right to amend this syllabus during the semester.
Amendments added under 'Labs'
Amendments added under 'Homework'
Amendments added under 'Your name on all assignments'