|
|
CS2340 Computer Architecture
|
|
Instructor: John Cole |
Section 005 Monday/Wednesday from 1:00 to 2:15 |
Office and Hours | Room: ECS West 1.315 |
Teaching Assistant: TBA |
Last update: 3/17/2022 |
Syllabus is on Coursebook | Schedule |
Textbook: Computer Organization and
Design, MIPS Version, sixth edition, by
Patterson & Hennesey | |
Up to this point, all of your programmig courses have used high-level languages with many built-in functions, classes, and other constructs that hid the inner workings of the computer from you. Those things are great, and make it easy to write code that focuses on the task at hand. Consider, though, that someone had to write those library functions and the low-level drivers in the operating system, and often at least some of that is written in assembly language. Also consider that if you are going to understand cybersecurity, this level of comprehension of how processors actually work is essential. Thus the need for a course in how the computer actually works. And besides, are you not curious as what is really going on inside the box? You may have heard that your instructor has not taught computer architecture in this milennium, and that is true. However, I have written a great many programs in various assembly languages, starting with the Univac 1108 mainframe and, most recently, MIPS in preparation for teaching this course. You may also be aware that at least once a year I give an introductory tutorial on x86 assembly language to the Computer Security Group. Thus one of the unstated objectives is to teach you how to write good assembly code, not just hack together something that mostly works. This means, among other things:
I will be taking attendance, and although it will not figure directly into your grade, I tend to be unsympathetic to poor students who miss a lot of classes. Warning! Warning! DO NOT TAKE THIS COURSE FROM THIS PROFESSOR! Not unless you are willing to work hard, write moderately difficult programs, read the textbook, and ask questions in class. Not that the other professors are much easier, but fair warning. But if you want to not only meet the requirement of taking this course but become competent in writing assembly code, by all means, sign up. | |
Course Topics in DetailThis course will teach you how to understand and write programs in assembly language. While this is specific to the MIPS processor, the general techniques will be applicable to most machines. Topics include:
| |
Assembly language coding conventions
1. Use tabs. Labels should be in column 1. Instructions and directives should be tabbed to column 10 or 11. Operands should be tabbed to column 18. 2. Comments on individual instructions should be tabbed to about column 30, and on the same line, not the line above. 3. Do not indent assembly code. There is no structuring the way you would structure C++ or Java, and it makes it less readable, not more 4. Use meaningful labels. "Do" and "while" and "loop" are not meaningful. 5. Re-read the slides from Appendix A. For more information, see Documentation Standards |