Computer Architecture Microsoft Assembler. Procedures Internal Internal External External Speeds learning Speeds learning Importing Importing.code extrn.

Slides:



Advertisements
Similar presentations
ASSEMBLER M. Antczak, S. Wąsik. Debug session: starting of the example.exe program debugging process debug example.exe checking the value that is stored.
Advertisements

Flow of Control Instruction/Control structure Looping structure Looping structure Branching structure Branching structure For assembly language program.
Lecture 20: 11/12/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Assembly Programming Notes for Practical 3 Munaf Sheikh
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /15/2013 Lecture 11: MIPS-Conditional Instructions Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.
Assembly Language for x86 Processors 6th Edition Chapter 5: Procedures (c) Pearson Education, All rights reserved. You may modify and copy this slide.
COMP 2003: Assembly Language and Digital Logic
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 4 Assembly Language Programming 2.
Assembly Programming Notes for Practical2 Munaf Sheikh
Subroutines: Passing Arguments Using the Stack. Passing Arguments via the Stack Arguments to a subroutine are pushed onto the stack. The subroutine accesses.
Assembly Language :CSC 225 (Lec#4: Flag Register and Conditional Statements) By Dr. Syed Noman.
The CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches.
LAB Flow Control Instructions
Cos 365 Practical Microsoft Assembler. Course Details Lecturer: Dr Venter Lecturer: Dr Venter Prac Assistant: Kelvin Andrews Prac Assistant: Kelvin Andrews.
1 ICS 51 Introductory Computer Organization Fall 2006 updated: Oct. 2, 2006.
Assembly Language for Intel-Based Computers
1 Lecture 5: Procedures Assembly Language for Intel-Based Computers, 4th edition Kip R. Irvine.
Flow Control Instructions
Irvine, Kip R. Assembly Language For Intel-Based Computers XADD Instruction.code mov ax,1000h mov bx,2000h ; AX = 1000h, BX = 2000h xadd ax,bx ; AX = 3000h,
ICS312 Set 11 Introduction to Subroutines. All the combinations in which a subroutine can be written 1. The subroutine may be: a. Internal or b. External.
Factorial of a number data segment x1 db 4 fact dw ? data ends
Introduction to Subroutines. All the combinations in which a subroutine can be written 1. The subroutine may be: a. Internal or b. External 2. The type.
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#5) By Dr. Syed Noman.
Dr. José M. Reyes Álamo 1.  Review: ◦ of Comparisons ◦ of Set on Condition  Statement Labels  Unconditional Jumps  Conditional Jumps.
Assembly Programming Practical 3. Jump statements Simplest form of Jump statement Simplest form of Jump statement –“jmp Label” Can be used to end a Loop.
Executing and Linking an assembly program. Lesson plan Review Program logic and control Practice exercise Assembling, Linking and Executing Programs Practice.
1 ICS 51 Introductory Computer Organization Fall 2009.
4-Oct Fall 2001: copyright ©T. Pearce, D. Hutchinson, L. Marshall Sept  direct mode: OK for static addresses  indirect register mode:
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#9) By Dr. Syed Noman.
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.
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.
Subroutines: Passing Arguments Using the Stack. Passing Arguments via the Stack Arguments to a subroutine are pushed onto the stack. The subroutine accesses.
ACOE251Sofware Constructs1 Software Constructs What they are …..
Assembly Language programming
In Class Program Write, assemble and test a program: –Use the DB directive to define the following list of numbers and name it array: 31h, 32h, 33h, 34h.
Review of Assembly language. Recalling main concepts.
Assembly 06. Outline cmp (review) Jump commands test mnemonic bt mnemonic Addressing 1.
Session 4: Atomic Language. Take Turing Machine Look back to 1 st session’s work on hardware, RISC and CISC register- based machines. Also look forward.
2/20/2016CAP 2211 Flow Control Instructions. 2/20/2016CAP 2212 Transfer of Control Flow control instructions are used to control the flow of a program.
Comparison Instructions Test instruction –Performs an implied AND operation between each of the bits in 2 operands. Neither operand is modified. (Flags.
Assembly Programming Practical2. Initialising Variables (Recap) Initialising variables are done in the.data section Initialising variables are done in.
ICS312 Set 12 Subroutines: Passing Arguments Using the Stack.
Jumps, Loops and Branching. Unconditional Jumps Transfer the control flow of the program to a specified instruction, other than the next instruction in.
File Operations. FILE PROCESSING For the purposes of the following discussion, reading means copying all or part of an existing file into memory Writing.
Programming Languages Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
CS2422 Assembly Language and System Programming 0 Week 13 & 14 Codes in Assembly Language.
7-Nov Fall 2001: copyright ©T. Pearce, D. Hutchinson, L. Marshall Oct lecture23-24-hll-interrupts 1 High Level Language vs. Assembly.
Computer Architecture CST 250
Assembly Language programming
Microprocessor and Assembly Language
Assembly IA-32.
Assembly Language Programming Part 2
Microprocessor and Assembly Language
(The Stack and Procedures)
CS-401 Assembly Language Programming
Assembler Design Options
فصل پنجم انشعاب و حلقه.
Microprocessor and Assembly Language
(The Stack and Procedures)
Microprocessor Lab CSL1543 0:0:2
Flow Control Instructions
University of Gujrat Department of Computer Science
CS-401 Computer Architecture & Assembly Language Programming
Assembly Language for Intel 8086 Jump Condition
(The Stack and Procedures)
CS-401 Computer Architecture and Assembly Language Programming
Assembly 06 Recursion.
CS-401 Computer Architecture & Assembly Language Programming
CS-401 Computer Architecture & Assembly Language Programming
Presentation transcript:

Computer Architecture Microsoft Assembler

Procedures Internal Internal External External Speeds learning Speeds learning Importing Importing.code extrn Clrf:proc, Readstring:proc main proc

Cont.. procedures Calling Calling call Readstring call Readint Initialization Initialization What do you ask ? What do you ask ?

Cont.. procedures Which registers? Which registers? Reg sizes = var sizes? Reg sizes = var sizes? Data saved? Data saved?

“if” Compare 2 objects Compare 2 objects 2 outcomes 2 outcomes cmp ax, bx cmp ax, 97

“hop-a-long” Goto Goto Jump to labels Jump to labels jmp looplabel Conditional jumps Conditional jumps –a jump that needs a condition –condition …cmp statement –“fall through”

Conditional Statements Explain! mov ax, 5 mov bx, 7 cmp ax, bx jg lessthan jmp greaterthan

Practical Assignment Plan! Plan! Use the skeleton program (1 st prac) Use the skeleton program (1 st prac) Cut relevant code from 2 nd prac eg. Cut relevant code from 2 nd prac eg.