1 / 16

CEN 226 : Computer Organization & Assembly Language : CSC 225 (Lec#1)

CEN 226 : Computer Organization & Assembly Language : CSC 225 (Lec#1). By Dr. Syed Noman. Course organization. Course is divided into two sections: Computer organization Assembly language programming Computer organization and assembly language are interrelated.

eliot
Download Presentation

CEN 226 : Computer Organization & Assembly Language : CSC 225 (Lec#1)

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CEN 226: Computer Organization & Assembly Language :CSC 225(Lec#1) By Dr. Syed Noman

  2. Course organization • Course is divided into two sections: • Computer organization • Assembly language programming • Computer organization and assembly language are interrelated. • Program in assembly and get better understanding of the machine • Get familiarized with the machine to better program in assembly language. To program in assembly language requires knowledge of the machine.

  3. Text Book

  4. Reference Book

  5. Course Outline • Introduction to PC hardware. • von Neumann machine • 8086 machine architecture • PC software requirements • Assembly language programmers requirements • Program logical and control • String operations • Arithmetic operations for processing binary data • Assembling linking and executing a program.

  6. Marks Distribution • Lab : 20 Marks • Mid-1: 15 Marks • Mid-2: 15 Marks • Assignment: 6 marks • Quizzes: 2 Marks (best of 2 out of 3) • Attendance: 2 Marks (after 2 absents, 1 mark will be deducted) • Final: 40 Marks

  7. Collection of Programs • Learning Tip: object of the program must be clearly defined. • Program Codes are as follows: • EP#: Example program number • LT#: Lab Task number • QP#: Quiz program number • AP#: Assignment program#

  8. Software Hierarchy Levels

  9. What is Assembly Language? • A low-levelprocessor-specific programming language, designed to match the processor’s machine instruction set • each assembly language instruction matches exactly one machine language instruction • we study here Intel’s 80x86 (and Pentiums)

  10. Why learn Assembly Language? • To learn how high-level language code gets translated into machine language • i.e.: to learn the details hidden in HLL code • To learn the computer’s hardware • by direct access to memory, video controller, sound card, keyboard… • To speed up applications • direct access to hardware (ex: writing directly to I/O ports instead of doing a system call) • good ASM code is faster and smaller: rewrite in ASM the critical areas of code

  11. Table: Comparison of Assembly Language and High-Level Languages

  12. Machine Language • An assembler is a program that converts ASM code into machine language code: • mov al,5 (Assembly Language) • 1011000000000101 (Machine Language) • most significant byte is the opcode for “move into register AL” • the least significant byte is for the operand “5” • Directly programming in machine language offers no advantage (over Assembly)...

  13. Binary Numbers/Storage Size • are used to store both code and data • On Intel’s x86: • byte = 8 bits (smallest addressable unit) • word = 2 bytes • doubleword = 2 words • quadword = 2 doublewords

  14. Data Representation • Even if we know that a block of memory contains data, to obtain its value we need to choose an interpretation • Ex: memory content “0100 0001” can either represent: • the number 2^{6} + 1 = 65 • or the ASCII code of character “A”

  15. Data Representation • Number Systems • Binary/Octal/Decimal/Hexadecimal • Converting between various number systems • Signed/Unsigned Interpretation • Two’s Complement • Addition/Subtraction • Character Storage

  16. Number Systems • A written number is meaningful only with respect to a base • To tell the assembler which base we use: • Hexadecimal 25 is written as 25h • Octal 25 is written as 25o or 25q • Binary 1010 is written as 1010b • Decimal 1010 is written as 1010 or 1010d • You are supposed to know how to convert from one base to another.

More Related