Introduction Chapter 1 S. Dandamudi. 2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer, 2005.

Slides:



Advertisements
Similar presentations
1 CIS 461 Compiler Design and Construction Fall 2014 Instructor: Hugh McGuire slides derived from Tevfik Bultan, Keith Cooper, and Linda Torczon Lecture-Module.
Advertisements

Assembly Language for x86 Processors 6 th Edition Chapter 1: Introduction to ASM (c) Pearson Education, All rights reserved. You may modify and copy.
Systems Software.
CSI 3125, Preliminaries, page 1 Programming languages and the process of programming –Programming means more than coding. –Why study programming languages?
Fundamentals and a Brief History of Computer Systems.
Performance D. A. Patterson and J. L. Hennessey, Computer Organization & Design: The Hardware Software Interface, Morgan Kauffman, second edition 1998.
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 1, Lab.
1 Experiment 0 COE 205 Computer Organization & Assembly Language Programming Term 043.
1 Introduction Chapter 1 n What is Assembly Language? n Data Representation.
Chapter 6: An Introduction to System Software and Virtual Machines
CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared.
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
Basic Concepts Computer Organization and Assembly Language.
Prof. B. I. Khodanpur HOD – Dept. of CSE R. V. College of Engineering
High-Level Language Interface Chapter 13 S. Dandamudi.
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#1) By Dr. Syed Noman.
Eleventh Edition 1 Introduction to Information Systems Essentials for the Internetworked E-Business Enterprise Irwin/McGraw-Hill Copyright © 2002, The.
1 ENG236: Introduction (1) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
High-Level Language Interface Chapter 17 S. Dandamudi.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
1 Chapter-01 Introduction to Computers and C++ Programming.
Course Introduction C++ An Introduction to Computing.
Software – Applications software and programming languages
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
Assembly Language for x86 Processors 7th Edition
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Computer organization & Assembly Language Programming
Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers.
Programming Language Rico Yu. Levels of Programming Languages 1.Low level languages 2.High level languages.
1 4.2 MARIE This is the MARIE architecture shown graphically.
1 Introduction to Information Systems Essentials for the Internetworked E-Business Enterprise C h a p t e r Computer Software 1.
Software – Applications software and programming languages.
Overview of Computer Organization Chapter 1 S. Dandamudi.
Introduction Chapter 1 S. Dandamudi. Outline A user’s view of computer systems What is assembly language? – Relationship to machine language Advantages.
PROGRAMMING LANGUAGES
Chapter 7 Low-Level Programming Languages. 2 Chapter Goals List the operations that a computer can perform Discuss the relationship between levels of.
Programming and Languages
Addressing Modes Chapter 6 S. Dandamudi To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,
MIPS Processor Chapter 12 S. Dandamudi To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
Experiment 0 COE 205 Computer Organization & Assembly Language Programming Term 052.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Installing Java on a Home machine For Windows Users: Download/Install: Go to downloads html.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
Basic Concepts Computer Organization & Assembly Language Programming Instructor: Maram Alsahafi [Some of the contents Adapted from slides Dr Adnan Gutub,
Processor Fundamentals Assembly Language. Learning Objectives Show understanding of the relationship between assembly language and machine code, including.
Getting ready. Why C? Design Features – Efficiency (C programs tend to be compact and to run quickly.) – Portability (C programs written on one system.
Chapter 1 An Overview of Computers and Programming Languages.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Computer Software.
Week 6 Dr. Muhammad Ayaz Intro. to Assembly Language.
Introduction to Computer Programming By: Mr. Baha Hanene Chapter 1.
Suffolk County Community College Mathematics and Computer Science Ammerman Campus CST 121Spring 2013 Section 151CRN: Computer Organization And System.
INTRODUCTION TO COMPUTER PROGRAMMING ITC-314. Computer Programming  Computer Programming means creating a sequence of instructions to enable a computer.
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
A LECTURE NOTE. Introduction to Programming languages.
Computer Applications in Business
CSC235 Computer Organization & Assembly Language
Assembly Language for x86 Processors 6th Edition
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Introduction
Microprocessor and Assembly Language
Teaching Computing to GCSE
Teaching Computing to GCSE
Programming Languages
Introduction Chapter 1 S. Dandamudi. Outline  A user’s view of computer systems  What is assembly language?  Relationship to machine language  Advantages.
Morgan Kaufmann Publishers Computer Performance
University of Gujrat Department of Computer Science
Presentation transcript:

Introduction Chapter 1 S. Dandamudi

2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,  S. Dandamudi Chapter 1: Page 2 Outline A user’s view of computer systems What is assembly language?  Relationship to machine language Advantages of high-level languages  Faster program development  Easier maintenance  Portability Why program in assembly language?  Time-efficiency  Space-efficiency  Accessibility to hardware Typical applications Why learn assembly language? Performance: C versus assembly language  Multiplication example

2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,  S. Dandamudi Chapter 1: Page 3 A User’s View of Computer Systems Depends on the degree of abstraction provided by the underlying software We consider a hierarchy of five levels  Moving to the top of hierarchy shields the user from the lower-level details  The top two levels are system independent  The lower four levels are system dependent »Assembly and machine languages are specific to a particular processor »One-to-one correspondence between assembly language and machine language

2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,  S. Dandamudi Chapter 1: Page 4 A User’s View of Computer Systems (cont’d)

2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,  S. Dandamudi Chapter 1: Page 5 What Is Assembly Language? Low-level language »Each instruction performs a much lower-level task compared to a high-level language instruction One-to-one correspondence between assembly language and machine language instructions »For most assembly language instructions, there is a machine language equivalent »Assembler translates assembly language instructions to machine language instructions Directly influenced by the instruction set and architecture of the processor (CPU)

2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,  S. Dandamudi Chapter 1: Page 6 What Is Assembly Language? (Cont’d) Some example assembly language instructions: inc result mov class_size,45 and mask1,128 add marks,10 Some points to note: »Assembly language instructions are cryptic »Mnemonics are used for operations –inc for increment, mov for move (i.e., copy) »Assembly language instructions are low level –Cannot write instructions such as mov marks, value MIPS Examples andi $t2,$t1,15 addu $t3,$t1,$t2 move $t2,$t1

2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,  S. Dandamudi Chapter 1: Page 7 What Is Assembly Language? (Cont’d) Some simple high-level language instructions can be expressed by a single assembly instruction Assembly Language C inc resultresult++; mov class_size,45class_size = 45; and mask1,128mask1 &= 128; add marks,10marks += 10;

2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,  S. Dandamudi Chapter 1: Page 8 What Is Assembly Language? (Cont’d) Most high-level language instructions need more than one assembly instruction C Assembly Language size = value;mov AX,value mov size,AX sum += x + y + z;mov AX,sum add AX,x add AX,y add AX,z mov sum,AX

2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,  S. Dandamudi Chapter 1: Page 9 What Is Assembly Language? (Cont’d) Readability of assembly language instructions is much better than the machine language instructions »Machine language instructions are a sequence of 1s and 0s Assembly Language Machine Language (in Hex) inc result FF060A00 mov class_size,45 C7060C002D00 and mask, E0080 add marks, F000A

2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,  S. Dandamudi Chapter 1: Page 10 What Is Assembly Language? (Cont’d) MIPS examples Assembly Language Machine Language (in Hex) nop move $t2,$t15 000A2021 andi $t2,$t1,15 312A000F addu $t3,$t1,$t2 012A5821

2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,  S. Dandamudi Chapter 1: Page 11 Advantages of High-level Languages Program development is faster »High-level instructions –Fewer instructions to code Programs maintenance is easier »For the same reasons as above Programs are portable »Contain few machine-dependent details –Can be used with little or no modifications on different types of machines »Compiler translates to the target machine language »Assembly language programs are not portable

2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,  S. Dandamudi Chapter 1: Page 12 Why Program in Assembly Language? Two main reasons:  Efficiency »Space-efficiency »Time-efficiency  Accessibility to system hardware Space-efficiency  Assembly code tends to be compact Time-efficiency  Assembly language programs tend to run faster »Only a well-written assembly language program runs faster –Easy to write an assembly program that runs slower than its high-level language equivalent

2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,  S. Dandamudi Chapter 1: Page 13 Typical Applications Application that need one of the three advantages of the assembly language Time-efficiency  Time-convenience »Good to have but not required for functional correctness –Graphics  Time-critical »Necessary to satisfy functionality »Real-time applications –Aircraft navigational systems –Process control systems –Robot control software –Missile control software

2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,  S. Dandamudi Chapter 1: Page 14 Typical Applications (cont’d) Accessibility to system hardware  System software typically requires direct control of the system hardware devices »Assemblers, linkers, compilers »Network interfaces, device drivers »Video games Space-efficiency  Not a big plus point for most applications  Code compactness is important in some cases –Portable and hand-held device software –Spacecraft control software

2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,  S. Dandamudi Chapter 1: Page 15 Why Learn Assembly Language? Some applications require programming in assembly language »Typically only a small part of an application is coded in assembly language (rest written in a high-level language) –Such programs are called mixed mode programs Assembly language can be used as a tool to learn computer organization »You will know more about the organization and internal workings of a computer system Personal satisfaction of learning something something complicated and useful

2005 To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,  S. Dandamudi Chapter 1: Page 16 Performance: C versus Assembly Language Last slide