Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 271 Summer 2010 Computer Architecture and Assembly Language MTWRF 11:00 – 11:50 PM STAG 106 Instructor:Joe Crop Office hours (KEC 1130): Tuesday: 2:00.

Similar presentations


Presentation on theme: "CS 271 Summer 2010 Computer Architecture and Assembly Language MTWRF 11:00 – 11:50 PM STAG 106 Instructor:Joe Crop Office hours (KEC 1130): Tuesday: 2:00."— Presentation transcript:

1 CS 271 Summer 2010 Computer Architecture and Assembly Language MTWRF 11:00 – 11:50 PM STAG 106 Instructor:Joe Crop Office hours (KEC 1130): Tuesday: 2:00 - 3:00 pm Thursday: 2:00 - 3:00 pm Other times by appointment

2 Web pages Course: http://classes.engr.oregonstate.edu/eecs/summer2010/cs27 1 Instructor:http://people.oregonstate.edu/~cropj Textbook supplemental material: http://kipirvine.com/asm/ Get an engr account (if you don’t have one already): http://engr.oregonstate.edu/teach

3 Required Textbook Irvine, Kip R., Assembly Language for Intel-Based Computers (5th edition), Prentice-Hall, 2007. (ISBN 0132383101) More … One copy will be on 2-hour reserve at Valley Library

4 Assembler, Linker, IDE http://kipirvine.com/asm/gettingStarted http://kipirvine.com/asm/gettingStarted Install Visual C++ 2008 Express Edition (if you don’t already have a version of Visual C++) Install Visual C++ 2008 Express Edition (if you don’t already have a version of Visual C++) Install the Microsoft Assembler Install the Microsoft Assembler Install the textbook's libraries Install the textbook's libraries

5 Prerequisites Official: CS 161, MTH 231 The real requirements: Analytical skills, problem-solving ability Analytical skills, problem-solving ability Flexibility, patience, persistence Flexibility, patience, persistence Integrity, responsibility Integrity, responsibility

6 Academic Honesty For group work: Each team member does his/her share. Each member works toward the team goal. For individual work: Discussion is encouraged, but each student is expected to produce and understand all aspects of his her own programs and solutions. For quizzes and exams: No sharing of information is permitted.

7 Academic Honesty If you are having trouble with an assignment … If you are having trouble with an assignment … discuss it with other students, TAs, the instructor, or anyone else who will listen discuss it with other students, TAs, the instructor, or anyone else who will listen don’t just have someone else tell you how to solve the problem! don’t just have someone else tell you how to solve the problem! If other students ask you for help, don’t just let them copy your work! If other students ask you for help, don’t just let them copy your work! It is possible to discuss problems without plagiarizing It is possible to discuss problems without plagiarizing One of the best methods of debugging is to explain your solution to someone else. One of the best methods of debugging is to explain your solution to someone else.

8 Academic Honesty If you get help from, give help to, or "work together" with someone … If you get help from, give help to, or "work together" with someone … you must (in the program header block) list that person as a collaborator and describe the help you must (in the program header block) list that person as a collaborator and describe the help Programs that are very similar will be subjected to review unless both programs indicate that they were produced collaboratively Programs that are very similar will be subjected to review unless both programs indicate that they were produced collaboratively If you get help from printed or online sources, you must cite your references If you get help from printed or online sources, you must cite your references The bottom line is: The bottom line is: Each student is expected to produce and understand all aspects of his/her own programs and solutions. Each student is expected to produce and understand all aspects of his/her own programs and solutions.

9 Course calendar http://classes.engr.oregonstate.edu/eecs/summer2010/cs271/271Schedule.ht m Check here every week; the syllabus may be adjusted if it becomes apparent that more/less time is needed for some of the topics. Check here every week; the syllabus may be adjusted if it becomes apparent that more/less time is needed for some of the topics. PowerPoint slides will be available here after the actual lecture. Do not depend solely on these slides for the course material; much of the lecture material will be covered using other media. PowerPoint slides will be available here after the actual lecture. Do not depend solely on these slides for the course material; much of the lecture material will be covered using other media.

10 Course Learning Objectives 1. Identify the major components of a computer architecture, and explain their purposes and interactions. 2. Simulate the internal representation of data, and show how data is stored and accessed in memory. 3. Explain the relationships between a hardware architecture and its instruction set, and simulate micro-programs. 4. Create and simplify circuits that produce specified output for given inputs (e.g., adders, multiplexers, etc.). 5. Explain the Instruction Execution Cycle. 6. Explain the differences and relationships among high-level, assembly, and machine languages.

11 Course Learning Objectives 1. Write well-modularized computer programs in an assembly language, implementing decision, repetition, and procedure structures. 2. Use a debugger, and explain register contents. 3. Simulate the system stack as it is used for procedure calls and parameter passing. 4. Explain how editors, assemblers, linkers, and operating systems enable computer programming. 5. Explain various mechanisms for implementing parallelism in hardware/software.

12 FHCs (Frequently Heard Complaints) “I’ve never seen any of this stuff before!” “I’ve never seen any of this stuff before!” “This is waaaaay beyond boring!” “This is waaaaay beyond boring!” “I'm CS, not ECE” “I'm CS, not ECE” “I know for sure that I will never use this stuff!” “I know for sure that I will never use this stuff!” (… so why should I learn it?) (… so why should I learn it?)

13 Introduction to Languages Viewed by "levels" Viewed by "levels" Natural languages Natural languages Used by humans Used by humans Many interpretations Many interpretations E.G.: English, Spanish, Chinese E.G.: English, Spanish, Chinese High-level programming languages High-level programming languages English-like, translated for computer by compilers English-like, translated for computer by compilers Strict rules of syntax and semantics Strict rules of syntax and semantics E.G.: Java, C++, Perl, Python E.G.: Java, C++, Perl, Python Low-level programming languages Low-level programming languages Mnemonic instructions for specific architecture Mnemonic instructions for specific architecture Translated for computer by assemblers Translated for computer by assemblers E.G.: Intel assembly, Mac assembly E.G.: Intel assembly, Mac assembly Machine-level computer languages Machine-level computer languages Actual binary code instructions for specific architecture Actual binary code instructions for specific architecture Can be represented numerically Can be represented numerically E.G.: Intel machine instructions, Mac machine instructions E.G.: Intel machine instructions, Mac machine instructions

14 Programming environments for various language levels Natural language Natural language word processors word processors High-level programming languages High-level programming languages Text editor, compiler, linker, loader (debugger) Text editor, compiler, linker, loader (debugger) E.G.: Eclipse, Visual C++, etc. E.G.: Eclipse, Visual C++, etc. Low-level programming languages Low-level programming languages Text editor, assembler, (debugger) Text editor, assembler, (debugger) E.G.: any text editor together with MASM, Visual C++, etc. E.G.: any text editor together with MASM, Visual C++, etc. Machine-level computer languages Machine-level computer languages Some way to assign machine instructions directly into memory Some way to assign machine instructions directly into memory E.G.: set individual bits (switches) E.G.: set individual bits (switches)

15 Introduction to Computer Architecture Viewed by "levels" Viewed by "levels" Each level has an associated language Each level has an associated language Lowest level (level 0) is the actual hardware with its associated machine language Lowest level (level 0) is the actual hardware with its associated machine language Highest level is a "virtual machine" with its associated high-level language Highest level is a "virtual machine" with its associated high-level language Program statements at level k (k > 0) are translated or interpreted into statements in the language that can be executed by level k-1. Program statements at level k (k > 0) are translated or interpreted into statements in the language that can be executed by level k-1.

16

17

18 Relationship A computer's instruction set is defined by the computer's architecture. A computer's instruction set is defined by the computer's architecture. I.E.: each computer architecture has its own machine language. I.E.: each computer architecture has its own machine language. E.G.: Mac machine instructions will not work on an Intel architecture. E.G.: Mac machine instructions will not work on an Intel architecture. Virtual machines can be used to simulate another computer's architecture. Virtual machines can be used to simulate another computer's architecture. Cross-assemblers can be used to covert a machine language to another machine language. Cross-assemblers can be used to covert a machine language to another machine language.

19 Relationship Hardware:Physical devices Hardware:Physical devices E.G.: circuits, chips, disk drives, printers, etc. E.G.: circuits, chips, disk drives, printers, etc. Software:Instructions that control hardware Software:Instructions that control hardware E.G.:assemblers, compilers, operating systems, word processors, games, etc. E.G.:assemblers, compilers, operating systems, word processors, games, etc.

20 Operating Systems Operating systems provide interfaces among users, programs, and devices (including the computer itself). Operating systems provide interfaces among users, programs, and devices (including the computer itself). An operating system is implemented in the host computer's machine language. An operating system is implemented in the host computer's machine language.

21 System Architectures Super-computer Super-computer Mainframe Mainframe Multiprocessor/Parallel Multiprocessor/Parallel Server Server Distributed (Collection of Workstations) Distributed (Collection of Workstations) Network Network Personal computer Personal computer Desktop, PDA, etc. Desktop, PDA, etc. Micro-controller (Real-time/Embedded system) Micro-controller (Real-time/Embedded system) Car, appliance, watch, etc. Car, appliance, watch, etc. etc. etc.

22 Three architecture tracks Build more powerful machines Build more powerful machines Build same machine smaller/cheaper Build same machine smaller/cheaper Build lower power machines Build lower power machines

23 How is assembly language related to hardware/software? We will use assembly language to implement some software. We will use assembly language to implement some software. Unlike most high-level languages, assembly language allows direct control of hardware components Unlike most high-level languages, assembly language allows direct control of hardware components Good way to really understand how the hardware works. Good way to really understand how the hardware works.

24 Other uses for assembly language Embedded systems Embedded systems Efficiency is critical Efficiency is critical Real-time applications Real-time applications Timing is critical Timing is critical Interactive games Interactive games Speed is critical Speed is critical Low-level tasks Low-level tasks Direct control is critical Direct control is critical Device drivers Device drivers Direct control is critical Direct control is critical

25 Metrics (measurements) Speed (distance/time) is measured in electronic units: Speed (distance/time) is measured in electronic units: K = 10 3, M = 10 6, G = 10 9, etc. K = 10 3, M = 10 6, G = 10 9, etc. Size in bits, bytes is measured in binary units Size in bits, bytes is measured in binary units K = 2 10, M = 2 20, G = 2 30, etc. K = 2 10, M = 2 20, G = 2 30, etc. We use Ki, Mi, Gi for clarity We use Ki, Mi, Gi for clarity E.G., 200 GiB hard disk E.G., 200 GiB hard disk E.G., 100K = 100,000 E.G., 100K = 100,000 100Ki = 102,400

26 Questions? Read:Irvine Chapter 1


Download ppt "CS 271 Summer 2010 Computer Architecture and Assembly Language MTWRF 11:00 – 11:50 PM STAG 106 Instructor:Joe Crop Office hours (KEC 1130): Tuesday: 2:00."

Similar presentations


Ads by Google