State University of New York at Binghamton Watson School of Engineering and Applied Science Department of Computer Science Spring, 2006 CS-220: Computer Systems II: Architecture and Programming
Lecture Section 90: T,R 8:30-9:55 A.M., FA209 Lab Section 50: R, 1:15 - 2:40 P.M., AAG002 Lab Section 51: R, 10:05 - 11:30 A.M., AAG002 Professor Richard R. Eckert Office: EB-N6 Office Hours: T 10:00-11:30 A.M., R 1:00-2:00 P.M. Phone: 777-4365 Email: reckert@binghamton.edu Course listserve email address: CS220-90@listserv.binghamton.edu Professor's Home Web Site URL (with links to the CS-220 Course Pages): http://www.cs.binghamton.edu/~reckert/ Teaching Assistant for Sections 50 and 51: Brent Rood TA's Email: bayroot@gmail.com TA's Office Hours: M 9:30-11:00 A.M.; W 11:30-1:00 P.M.; EB-N23
CATALOG DESCRIPTION:
CS-220: The architecture and programming of digital computers. Data representation. Processor, memory and I/O organization. Instruction set architectures, encoding and addressing modes. I/O techniques. I nterrupts. Assemblers, macro-processors, compilers, interpreters, linkers, loaders. Assembly and machine language programming. C programming language constructs (control and data structures, pointers, arrays and functions) and their relationship to the underlying architecture. Supervised laboratory work involves programming and debugging using machine language, assembly language and C. PREREQUISITE: CS-140, Introduction to Computer Programming; CS-210, Computer Systems I: Machine Organization (or some knowledge of digital logic). TEXTBOOKS: Pratt & Patel, "Introduction to Computing Systems", 2nd Ed., McGraw Hill, 2004, ISBN 0-07-246750-9. Irvine, "Assembly Language for Intel-Based Computers", 4th Ed., Prentice Hall, 2003, ISBN 0-13-091013-9 EVALUATION: Laboratory Projects..........................35% Term Examinations (2)........................40% Final Examination............................20% Classroom and Laboratory Attendance...........5% Several Intel 8086/88 (IBM-PC) assembly language and C language programming assignments will be made during the course of the semester. These will be due on the date specified. If turned in late, the grade will be reduced by 5% per day up to a maximum of one week. Under no circumstances will assignments be accepted more than one week late. ANY WORK FOUND TO BE COPIED WILL BE GROUNDS FOR AN F IN THE COURSE! The scheduled laboratory period will be used for discussion of assignments, instruction on the use of the various systems and software packages available in the lab, and to begin work on the assignments. An experienced proctor will be available to answer questions. In almost all cases additional work outside the scheduled laboratory period will be required in order to complete the assignments. SOFTWARE:
The following software tools will be used in this course: The Microsoft Macro Assembler (MASM), Linker (LINK) and Debugger (DEBUG); Microsoft Visual Studio .NET; and CC386 C compiler. These have been installed on most of the computers in the public computing facilities at the university. The Irvine text book includes a CD-ROM with the MASM system. In addition, instructions on how to get your own copies MASM and LINK from Microsoft can be found at the following web site: http://users.easystreet.com/jkirwan/new/pctools.html. If you use the links on this site, you will need to run WinZip on the self- extracting files, then select ml.exe and ml.err from one, and link.exe from the other. The MASM utilities and Visual Studio .NET can also be obtained from the Microsoft Academic Alliance which is available to Watson School students. It will be available sometime after the first week of classes, and instructions for using the Academic Alliance to download Microsoft software will be given then. The CC386 C compiler system can be obtained for free from: http://members.tripod.com/~ladsoft/. COURSE SCHEDULE: WEEK LECTURE TOPIC LABORATORY EXERCISE
1 Introduction to computer architecture and machine/assembly language programming: ----- a simple Von Neumann stored program computer system (Notes; P&P-Ch. 4, 5; I-Ch. 2) 2 Organization of an 8-instruction computer's data path, memory, buses, hard-wired Lab # 1: A Simple Computer controller, microprogrammed controller Simulator Exercise (Notes) 3 Intel 80X86 Internal organization & Lab # 2--Use of an Editor, machine addressing; assembly language the MASM Assembler, the requirements, directives, pseudo-ops; LINK Linker; Using Microsoft 80X86 basic instruction set (I-2, 3, 4; Visual Studio (P&P-17 P&P-7) 4 Data representation: bits, bytes and Lab # 3--Use of the DEBUG words; fixed and floating point numbers, debugger; a simple assembly character; 80X86 basic instruction set language program continued (P&P-2; I-17, 4, 6, 7) 5 The C programming language: variables, Lab # 4--Use of the CC386 operators and their relationship with C compiler; a simple C assembly/machine language constructs and program the underlying architecture; program translation and binding; High Level Language compilers, interpreters, linkers, loaders; symbolic debuggers (P&P-11, 12)
6 Branching and looping in assembly language; Lab # 5--Assembly language C conditional and iterative control and C programs that use structures (I-6; P&P-13) branches and loops 7 Procedures and the stack; C language Lab # 5, continued functions, parameter passing, stack frame (I-5, 8; P&P-14) ** TERM EXAM # 1 ** 8 Addressing modes: indirect addressing; Lab # 6, Assembly language C pointers; arrays and strings and C programs that do (I-4, P&P-16) code conversion and use procedures/functions 9 Input/Output: Ports, timing, polling Lab # 6, continued handshaking; printer interface, sound (I-17, P&P-8) 10 Interrupts and interrupt-driven Lab #7--Program that performs I/O; Interrupt Service Routines (ISR); direct I/O DMA; memory-mapped I/O (I-16; P&P-8, 9, 10) 11 Keyboard, video, mouse interfaces; Lab # 8-- Program that BIOS interrupts (I-13, 15) installs and exercises an ISR 12 Disk interface and disk I/O; standard I/O: Lab # 9--Program that does stream, buffered, file I/O (I-14; P&P-18) simple color graphics 13 Dynamic memory allocation; storage classes; Lab # 9, continued run-time stack; heap (I-10, 12, 19; P&P-8, 14) ** TERM EXAM # 2 ** 14 Modular progamming: separately-compiled/ Lab # 10--A program that assembled modules; linking assembly and uses C and assembly language C language program modules (I-12) modules and does file processing 15 Macros and macro processing; memory Lab # 10, continued organization: memory hierarchy; associative, virtual, and cache memories; Increasing performance: pipelining, multiprocessor-based systems (I-10, 2; notes, references) REFERENCES (On Reserve in Library): -Abel, IBM PC Assembler Language & Programming, 5th Edition, Prentice Hall, 2001, ISBN 0-13-030655-X. -Antonakos, The Pentium Microprocessor, Prentice Hall, 1997, ISBN 0-02-303614-1. -Bradley, D.J., Assembly Language Programming for the IBM Personal Computer, Prentice-Hall, 1984. -Brey, Barry B., The Intel Micprocessors, 7th Ed., Prentice Hall, 2006, ISBN 0-13-119506-9. -Brumm & Brumm, 80386: A Programming and Design Handbook, Tab Books, 1987, ISBN 0-8306-2937-8. -Bryant & O'Hallaron, Computer Systems, Pearson Education, Inc. (PrenticeHall), 2003, ISBN 0-13-034074-X. -Chapman, Davis, Sams Teach Yourself Visual C++ .NET in 21 Days, Sams Publishing, 2002, ISBN 0-672-32197-1. -Clements, Principles of Computer Hardware, Second Edition, PWS-Kent, 1993, ISBN 0-534-93133-2. -Comer, Essentials of Computer Architecture, Pearson/Prentice Hall, 2005, ISBN 0-13-149179-2. -Defenbaugh & Smedley, C through Design, Franklin & Beedle, ISBN 0-938661-10-8. -Deitel, et. al., Simply C++, Pearson/Prentice Hall, 2005, ISBN 0-13-142660-5. -Deitel, et. al., Visual C++ .NET: How to Program, Pearson/Prentice Hall, 2004, ISBN 0-13-437377-4. -Duncan, Advanced MS-DOS, Microsoft Press, 1986. -Eggebrecht, Interfacing to the IBM Personal Computer, Second Edition, SAMS, 1992, ISBN 0-672-22722-3. -Flynn, Computer Architecture: Pipelined and Parallel Processor Design,Jones and Bartlett, 1995, ISBN 0-86720-204-1. -Foster, C by Discovery, Scott/Jones, ISBN 0-9624230-2-5. -Fulcher, An Introduction to Microcomputer Systems: Architecture and Interfacing, Addison-Wesley, 1989. -Gear, C.W., Computer Organization and Programming, 4th Ed., McGraw-Hill, 1985. -Goody, The Intelligent Microcomputer, SRA, 1984. -Gregory, Microsoft Visual C++ .NET 2003 Kick Start, Sams, 2004, ISBN 0-672-32600-0. -Gregory, Special Edition Using Visual C++ 6, Que, 1998, ISBN 0-7897-1539-2. -Haskell, Introduction to Computer Engineering, Prentice Hall, 1993, ISBN 0-13-489436. -Heuring & Jordan, Computer Systems Design and Architecture, 2nd Ed., Pearson Education (Prentice Hall), 2004, ISBN 0-13-048440-7. -Hsu, Computer Architecture, CRC, 2001, ISBN 0-8493-1026-1. -Hu & Barad, CEDES: Object-Oriented Hardware Design Using C++, Franklin, Beedle & Associates, 1997, ISBN 1-887902-15-5. -Irvine, Assembly Language for Intel-Based Computers, 4th Ed., Prentice Hall, ISBN 0-13-660390-4, 1998. -Johnsonbaugh & Kalin, Applications Programming in C, Macmillan, ISBN 0-02-359730-5. -Jones, Assembly Language for the IBM PC Family, Second Edition, Scott/Jones, 1997, ISBN 1-57676-001-4. -Lafore, Robert, Assembly Language Primer for the IBM PC & XT, Plume/Waite Books, New American Library, 1984. -Langholz, Francioni, Kandel, Elements of Computer Organization, Prentice-Hall, 1989. -Lemone, K.A., Assembly Language & System Programming for the IBM PC and Compatibles, Little-Brown, 1985. -Leventhal, Introduction to Microprocessors: Software, Hardware, Programming, Prentice-Hall, 1978. -Liu & Gibson, Microcomputer Systems: the 8086/8088 Family Architecture, Programming, & Design, 2nd Ed., Prentice-Hall, 1986. -Maljugin, Izrailevich, Lavin, Sopin, "The Revolutionary Guide to Assembly Language," Wrox Press, 1993, ISBN 1-874416-12-5. -Malvino, Digital Computer Electronics: An introduction to Microcomputers, Second Edition, McGraw Hill, 1983, ISBN 0-07-039901-8. -Mano & Kime, Logic and Computer Design Fundamentals, 2nd Ed., Prentice Hall, ISBN 0-13-031486-2, 2001. -Matloff, Norman S., IBM Microcomputer Architecture and Assembly Language, Prentice-Hall, 1992. -Mazidi & Mazidi, The 80x86 IBM PC and Compatible Computers (Volumes I and II): Assembly Language, Design, and Interfacing, 3rd Ed., Prentice Hall, ISBN 0-13-016568-9, 2000. -Miller & Quilici, The Joy of C, Wiley, ISBN 0--471-5133-4. -Morse & Albert, The 80286 Architecture, Wiley, 1986, ISBN 0-471-83185-9. -Morse, Isaacson, Albert, The 80386/387 Architecture, Wiley, 1987, ISBN 0-471-85352-6. -Nelson, Nagle, Carroll, Irwin, Digital Logic Circuit Analysis & Design, Prentice Hall, 1995, ISBN 0-13-463894-8. -Norton, Inside the IBM-PC, Brady Co., 1983. -Null & Lobur, The Essentials of Computer Organization and Architecture, Jones and Bartlett, 2003, ISBN 0-7637-0444-X. -Oalline, Practical C Programming, 3rd Ed., O'Reilly, ISBN 1-56592-306-5. -Osborne, An Introduction to Microcomputers, Vol. I, Osborne/McGraw-Hill, 1981. -Parhami, Behrooz, Computer Architecture, Oxford University Press, 2005, ISBN 0-19--515455-X. -Patt & Patel, Introduction to Computer Systems, Second Edition, McGraw-Hill, 2001, ISBN 0-07-246750-9. -Patterson & Hennessy, Computer Organization & Design: The Hardware/Software Interface, Second Edition, Morgan Kaufmann, 1998, ISBN 1-55860-428-6. -Pohl & Pohl, A Book on C, Benjamin/Cummings, ISBN 0-8053-0060-0. -Prinz & Crawford, C in a Nutshell, O'Reilly, ISBN 0-596-00697-7. -Prinz & Kirch-Prinz, C Pocket Reference, O'Reilly, ISBN 0-596-00436-2. -Protopapas, Microcomputer Hardware Design, Prentice-Hall, 1988. -Rafiquzzaman, Microprocessors and Microcomputer-Based System Design, Second Edition, CRC Press, 1995, ISBN 0-8493-4475-1. -Rigby & Dalby, Computer Interfacing, Prentice Hall, 1995, ISBN 0-13-288374-0. -Roberts, The Art and Science of C, Addison Wesley, ISBN 0-201-54322-2. -Rollins, Dan, IBM-PC 8088 MACRO Assembler Programming, Macmillan, 1985. -Simon & Schmidt, Sams Teach Yourself Visual C++ .Net in 24 Hours, Sams Publishing, 2002, ISBN 0-672-32323-0. -Singh & Triebel, The 8088 Microprocessor: Programming, Interfacing, Software, Hardware, and Applications, Prentice-Hall, 1989. -Stallings, "Computer Organization and Architecture," Sixth Edition, Pearson Education (Prentice Hall), 2003, ISBN 0-13-035119-9. -Tannenbaum, Andrew S., Structured Computer Organization, Fifth Edition, Prentice-Hall, 2006, ISBN 0-13-148521. -Thorne, Michael, Computer Organization and Assembly Language Programming, Benjamin/Cummings, 1991. -Triebel & Singh, The 8088 and 8086 Microprocessors: Programming, Interfacing, Software, Hardware, and Applications, Second Edition, Prentice Hall, 1997, ISBN 0-13-367897-0. -Tocci, Digital Systems, Prentice-Hall, 1984. -Uffenbeck, The 80x86 Family: Design, Programming, and Interfacing, Prentice Hall, 1998, ISBN 0-13-362955-4. -Wakerly, Digital Design: Principles & Practices, Second Edition, Prentice Hall, 1994, ISBN 0-13-211459-3. -Warford, Computer Systems, 2nd Ed., Jones and Bartlett, 2002, ISBN 0-7637-1633-2. -Williams, Digital Technology, SRA, 1986. -Zaks, From Chips to Systems, Sybex, 1981. -Zaks & Lesea, Microprocessor Interfacing Techniques, Sybex, 1979.