University of Gujrat Department of Computer Science

Slides:



Advertisements
Similar presentations
Lecture 13: 10/8/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Advertisements

Dr. Ken Hoganson, © August 2014 Programming in R COURSE NOTES 2 Hoganson Language Translation.
The 8051 Microcontroller and Embedded Systems
Assembly Language Lecture BY SHERY KHAN
Assembly Language for Intel-Based Computers, 5 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify.
Table 1. Software Hierarchy Levels.. Essential Tools An assembler is a program that converts source-code programs into a machine language (object file).
Chapter 1 Introduction to Programming. Computer Hardware CPU Memory –Main or primary –Secondary or auxiliary Input device(s) Output device(s)
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#1) By Dr. Syed Noman.
Quiz (Representative of what might appear on a test, see posted sample tests.) Instruction formats and addressing modes.
Assembly Language for Intel-Based Computers, 5th Edition
Computer Organization
Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify and copy this slide show for your personal use, or for.
Assembly Language for x86 Processors 7th Edition
Chapter 1: Basic Concepts
Assembly Language A Brief Introduction. Unit Learning Goals CPU architecture. Basic Assembler Commands High level Programming  Assembler  Machine Language.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
Chapter 19 Number Systems. Irvine, Kip R. Assembly Language for Intel-Based Computers, Translating Languages English: Display the sum of A times.
Computer organization Practical 1. Administrative Issues The course requirements are: –To be nice and open minded –To pass the exam (there is a boolean.
Princes Nora Bint Abdul Rahman University Dept. of Computer & Information Sciences CS 321 Computer Organization & Assembly Language Lecture 1 (Course Introduction)
Algorithms in Programming Computer Science Principles LO
Writing an Assembly-language program MIPS assembly language using MARS: MIPS Assembler and Runtime Simulator CS-2710 Dr. Mark L. Hornick 1.
1 Chapter 1: Introduction Appendix A: Binary and Hexadecimal Tutorial Assembly Language for Intel-Based Computers, 3rd edition Kip R. Irvine.
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
Software Development Environment
Why don’t programmers have to program in machine code?
INTRODUCTION TO AVRASSEMBLY PROGRAMMING
Assembler, Compiler, MIPS simulator
Assembly language.
Assembly Language for x86 Processors 6th Edition
Chapter 5- Assembling , Linking, and Executing Programs
Assembly Language (CSW 353)
Operating System Interface between a user and the computer hardware
Assembly Language programming
CSCI-235 Micro-Computer Applications
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
System Programming and administration
Microprocessor and Assembly Language
1. Introduction A microprocessor executes instructions given by the user Instructions should be in a language known to the microprocessor Microprocessor.
Lecture on Microcomputer
The 8051 Microcontroller and Embedded Systems
Microprocessor and Assembly Language
Microprocessor and Assembly Language
CS-401 Assembly Language Programming
COAL Chapter 1,2,3.
Unit# 8: Introduction to Computer Programming
TRANSLATORS AND IDEs Key Revision Points.
and Executing Programs
Introduction to Assembly Language
Chapter One: Introduction
The University of Adelaide, School of Computer Science
CS-401 Computer Architecture & Assembly Language Programming
Assembly Language for Intel-Based Computers
(Array and Addressing Modes)
COMPUTER SOFT WARE Software is a set of electronic instructions that tells the computer how to do certain tasks. A set of instructions is often called.
University of Gujrat Department of Computer Science
(Array and Addressing Modes)
CNET 315 Microprocessor & Assembly Language
Computer Organization and Assembly Language
MARIE: An Introduction to a Simple Computer
University of Gujrat Department of Computer Science
The University of Adelaide, School of Computer Science
CS-401 Assembly Language Programming
Microprocessor and Assembly Language
COMP 1321 Digital Infrastructure
Dept. of Computer & Information Sciences (Course Introduction)
CS-401 Computer Architecture and Assembly Language Programming
Computer Organization and Assembly Language
System Programming By Prof.Naveed Zishan.
Computer Architecture and System Programming Laboratory
(Array and Addressing Modes)
Presentation transcript:

University of Gujrat Department of Computer Science Course Code : CS-252 Computer Organization and Assembly Language Lecture # 6 Introduction to Assembly Language University of Gujrat

Contents Specific Machine Levels Assembly Language Assembly Language relation to machine language High-Level Language relation to Machine Language Portability of Assembly Language Creating and running a Program University of Gujrat

Specific Machine Levels University of Gujrat

Assembly Language Low-Level language Oldest of all programming Languages Bears closest resemblance to native machine language Provides direct access to computer hardware requiring you to understand much about your computer’s architecture and operating system You need to develop an understanding how memory addresses and instructions work at a low level, if you plan to be High-Level language developer University of Gujrat

Assembly Language relation to Machine Language Machine Language is a numeric language specifically understood by a computer’s processor Assembly language consists of statements written with short mnemonics such as ADD, SUB and CALL Assembly language has one-to-one relation with machine language i.e. One Assembly Language Instruction corresponds to exactly one machine language instruction Assembly Language MOV AX,5 Machine Language 10100000 01010000 University of Gujrat

High-Level Language relation to Machine Language High-Level Language have one-to-many relationship with assembly language and machine language e.g. Assembly Language mov ax,y add ax,4 mov bx,3 imul bx mov x,ax High Level Language x = (Y + 4) * 3; University of Gujrat

Is Assembly Language Portable? Assembly language program is not portable because it is designed for specific processor family. The instructions in assembly language may directly match the computer architecture or they may be translated during execution by a program inside the processor known as microcode interpreter University of Gujrat

Creating and Running a Program Editor .ASM File Assembler .OBJ File Linker .EXE File University of Gujrat

Programs Required Assembler A utility program that converts source code program from assembly language into machine language Linker A utility program that combines individual files created by an assembler into a single executable program Debugger A utility program that lets you to step through a program while its running and examine registers and Memory University of Gujrat

A Simple Program Move 5 to AX Move 10 to BX ADD BX to AX Move 15 to BX Assembly Language mov ax,5 mov bx,10 add ax,bx mov bx,15 University of Gujrat

General Instruction Format instruction dest, src instruction dest instruction src instruction University of Gujrat

EX01.ASM mov ax,5 mov bx,10 add ax,bx mov bx,15 mov ax,4C00h int 21h [ORG 100h] mov ax,5 mov bx,10 add ax,bx mov bx,15 mov ax,4C00h int 21h University of Gujrat

Word Representation 2 Byte Word Representation in Memory MSB LSB Big Endian Notation MSB LSB 0 1 Representation 2 Little Endian Notation LSB MSB 0 1