CS-401 Computer Architecture and Assembly Language Programming

Slides:



Advertisements
Similar presentations
Lecture By SHERY KHAN Assembly Language Lecture By SHERY KHAN
Advertisements

Princess Sumaya Univ. Computer Engineering Dept. د. بســام كحـالــه Dr. Bassam Kahhaleh.
80x86 Instruction Set Dr. Qiang Lin.
Addressing modes – 1 The way in which an operand is specified is called the Address Mode.
The CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches.
Lecture 2 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
KMUTT: S. Srakaew Instructions Can Be Divided into 3 Classes Data movement instructions  Move data from a memory location or register to another memory.
Princess Sumaya University
Target Processor Directives , When using.386, the program can only run on 386 and above processors.
Flow Control Instructions
9-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL x86 Instructions Part.
CS 300 – Lecture 6 Intro to Computer Architecture / Assembly Language Instructions.
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 5 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Computer Architecture CSE 3322 Lecture 3 Assignment: 2.4.1, 2.4.4, 2.6.1, , Due 2/3/09 Read 2.8.
Click to add Title Comunicación y Gerencia Click To add Subtitle Click to add Text Fundamentals of Assembly Language.
Assembly Language. Symbol Table Variables.DATA var DW 0 sum DD 0 array TIMES 10 DW 0 message DB ’ Welcome ’,0 char1 DB ? Symbol Table Name Offset var.
Overview of Assembly Language Chapter 4 S. Dandamudi.
Review of Assembly language. Recalling main concepts.
Computer Organization & Assembly Language University of Sargodha, Lahore Campus Prepared by Ali Saeed.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
CS2422 Assembly Language and System Programming 0 Week 13 & 14 Codes in Assembly Language.
Addressing Modes Instruction – Op-code – Operand Addressing mode indicates a way of locating data or operands. – Any instruction may belong to one or more.
CS-401 Computer Architecture & Assembly Language Programming
Microprocessors CSE- 341 Dr. Jia Uddin Assistant Professor, CSE, BRAC University Dr. Jia Uddin, CSE, BRAC University.
CS-401 Computer Architecture & Assembly Language Programming Lecture-16 Display Memory.
Instruction set Architecture
Presentation on Real Mode Memory Addressing
ADDRESSING MODES.
Microprocessor and Assembly Language
Assembly IA-32.
More on logical instruction and
Assembly Language Programming Part 2
ADDRESSING MODES.
CS-401 Compute Architecture & Assembly Language Programming
Microprocessor and Assembly Language
CS-401 Computer Architecture Assembly Language Programming
Assembly Lang. – Intel 8086 Addressing modes – 1
Morgan Kaufmann Publishers Computer Organization and Assembly Language
CS-401 Assembly Language Programming
Arithmetic Instructions
Symbolic Instruction and Addressing
X86’s instruction sets.
Introduction to Assembly Language
Morgan Kaufmann Publishers Computer Organization and Assembly Language
8086 Registers Module M14.2 Sections 9.2, 10.1.
CS-401 Computer Architecture & Assembly Language Programming
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Symbolic Instruction and Addressing
(Array and Addressing Modes)
CS-401 Computer Architecture & Assembly Language Programming
CS-401 Computer Architecture & Assembly Language Programming
CS-401 Computer Architecture & Assembly Language Programming
Symbolic Instruction and Addressing
(Array and Addressing Modes)
Lecture 06 Programming language.
University of Gujrat Department of Computer Science
Computer Architecture CST 250
University of Gujrat Department of Computer Science
CS-401 Assembly Language Programming
CS-401 Computer Architecture & Assembly Language Programming
UNIT-II Assembly Language Programs Involving Logical
Chapter 6 –Symbolic Instruction and Addressing
CS-401 Computer Architecture & Assembly Language Programming
CNET 315 Microprocessor & Assembly Language
The JUMP GROUP Unconditional Jump (JMP).
Chapter 8: Instruction Set 8086 CPU Architecture
CS-401 Computer Architecture & Assembly Language Programming
CS-401 Computer Architecture & Assembly Language Programming
(Array and Addressing Modes)
CS-401 Computer Architecture & Assembly Language Programming
Presentation transcript:

CS-401 Computer Architecture and Assembly Language Programming Lecture-6 Addressing Modes

Lets revise the last lecture

Memory Access Size

Memory Access Forms 16-bit Move mov ax, [num1]

Memory Access Forms 8-bit Move mov al, [num1]

Memory Access Forms Illegal Move mov ax, bl ; size mismatch mov [num1],[num2] ; mem to mem move

Memory Access Forms Ambiguous Move mov [num1], 5 ;5 is byte or ;word? Ambiguous mov byte[num1], 5 ;move 5 as byte mov word[num1], 5 ;move 5 as word

Loop Control L1: mov ax, bx add bx,2 sub cx,1 … L1: mov ax, bx add bx,2 sub cx,1 jnz L1 ; Jump to location L1 ; if the zero flag is ; not set

Loop Control mov cx, 10 ; load numbers count … mov bx, num1 ; point bx to first number mov cx, 10 ; load numbers count add ax, [bx] ; add number pointed by bx to ; ax l1: add bx, 2 sub cx, 1 jnz l1 mov [num1+20], ax ; write back result num1: dw 5…