computer systems introduction to computer architecture and assembly language part i n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Computer Systems Introduction to Computer Architecture and Assembly Language Part I PowerPoint Presentation
Download Presentation
Computer Systems Introduction to Computer Architecture and Assembly Language Part I

Loading in 2 Seconds...

play fullscreen
1 / 18
laken

Computer Systems Introduction to Computer Architecture and Assembly Language Part I - PowerPoint PPT Presentation

154 Views
Download Presentation
Computer Systems Introduction to Computer Architecture and Assembly Language Part I
An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Computer SystemsIntroduction to Computer Architecture and Assembly LanguagePart I

  2. Computer Architecture Many different definitions Interface between hardware and the lowest level of software Assembly language programmer’s view of the processor

  3. Assembly Language A low-level, human-readable representation of the binary code executed by a computer A language that controls the primitive operations on binary data Basic operations include data movement, addition, subtraction, comparison, shifting and branching

  4. Why Assembly Language? • All digital computers execute a low-level machine code. • Assembly language is a symbolic representation of machine code. • Foundation for the understanding of computer systems. • Fast, directly dealing with hardware, etc.

  5. Objectives of Study Assembly Language • To study fundamental components of assembly languages from the perspective of how software features are supported by hardware • To develop assembly language programs • To write programs to control hardware • To understand essential mechanisms in computer system such as interrupts and exceptions • To study basics of computer architecture and operating system

  6. Assembly language is machine-dependent! • Intel Inc., Pentium. • Motorola Inc., 68xxx. • Digital Inc., PDP-11. • TMS320, Z8, MCS96, etc.

  7. Computer Architecture- Languages Applications HHL  Complier Assembly Language  Assembler Machine Language High Level Language Low Level language Hardware 68000 Assembly Language C, JAVA Word, Excel

  8. The relation between assembly language and other computer science subjects The understanding of the assembly language lays the foundation for studying programming languages, complier, operating system, & computer architecture.

  9. Address Address Address Bus Memory Central Processor Unit (CPU) Instruction Data Data bus Data Data Von Neumann Machine(Stored Program Computer) • The common memory system stores both the instructions and the data

  10. 4 27 9 6 14 32 Memory Address transferred from CPU Address 0000 0001 • Array of cells storing data (data/instructions), each cell has an unique address • Address port, data port, control signals • Read cycle: data at the specified memory address is placed on the data bus • Write cycle: data on the data bus is written into the specified memory location 0002 Read Write Data Data transferred between CPU and memory

  11. Central Processor Unit (CPU) • Responsible for reading instructions from the memory and executing them • Address bus: used by CPU to provide memory address of instruction or data to the memory • Data bus: used by CPU/memory to transfer data between them

  12. Basic von Neumann Machine Instruction Format • An instruction consists of “operation code” field and the “operand address” field • Could have more or less addresses, later … • Operation code (op-code): defines what the instruction does • Operand address (address): where the operand is located Operand address Operation Code

  13. Von Neumann machinein Pseudo code Von Neumann machine operates in a two-phase mode, fetch/execute cycles. Module Von_Neumann I := 0 Repeat Fetch an instruction from memory location I I := I + 1 Execute the instruction Forever END Von_Neumann

  14. Pseudo code for execution Module Execute the instruction Decode the instruction IF instruction requires data, THEN Fetch the data from the memory END_IF Perform operation defined by instruction IF instruction requires data to be saved, THEN Save the data in memory END_IF End Execute the instruction

  15. Memory Read Read Read CPU C := A+B Instruction 5 A 6 B Write 11 C Information Flow between CPU and Memory

  16. CPU Components • Arithmetic and logic unit (ALU): calculation • Control unit (CU): interprets the instruction Memory CPU Address Address Address bus Instruction Instruction : Data : Registers Control bus CU ALU Data bus Data Data

  17. CPU Components • Registers: temporary storage • Program counter (PC): holds the address of the next instruction to be executed • Instruction register (IR): holds instruction • Data registers: hold data • Address registers: hold addresses • Condition code register (CCR): flag bits • Updated to reflect operation result • Used to change flow of program • MAR, MBR, PSW, etc. (later)

  18. Typical VirtualMemory Layout(A Process’s View) Memory Operating System Code • Process: program in execution • Operating System: resource manager of computer system • Code: program • Data: static data • Heap: dynamic data • Stack: subroutine calls Data Heap Stack