Assembly Language A Brief Introduction. Unit Learning Goals CPU architecture. Basic Assembler Commands High level Programming  Assembler  Machine Language.

Slides:



Advertisements
Similar presentations
Assembly Language – 1.
Advertisements

Chapter 2: Data Manipulation
Machine cycle.
Slide 4-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 4 Computer Organization.
The 8051 Microcontroller and Embedded Systems
1 COMS 361 Computer Organization Title: Instructions Date: 9/28/2004 Lecture Number: 10.
2.3) Example of program execution 1. instruction  B25 8 Op-code B means to change the value of the program counter if the contents of the indicated register.
The CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches.
CSE115: Introduction to Computer Science I
CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
Computer Systems. Computer System Components Computer Networks.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
Stored Program Concept: The Hardware View
1 Sec (2.3) Program Execution. 2 In the CPU we have CU and ALU, in CU there are two special purpose registers: 1. Instruction Register 2. Program Counter.
KEY COMPONENTS OF A COMPUTER SYSTEM ANDREW LOLAVAR.
Basic Operational Concepts of a Computer
CPS120: Introduction to Computer Science
Basic Microcomputer Design. Inside the CPU Registers – storage locations Control Unit (CU) – coordinates the sequencing of steps involved in executing.
CPU Computer Hardware Organization (How does the computer look from inside?) Register file ALU PC System bus Memory bus Main memory Bus interface I/O bridge.
The Central Processing Unit (CPU) and the Machine Cycle.
CS 111 – Sept. 15 Chapter 2 – Manipulating data by performing instructions “What is going on in the CPU?” Commitment: –Please read through section 2.3.
Computer Architecture Memory, Math and Logic. Basic Building Blocks Seen: – Memory – Logic & Math.
Computer Structure & Architecture 7b - CPU & Buses.
Computer Architecture Lecture 03 Fasih ur Rehman.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Machine Instructions.
Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions.
COMPILERS CLASS 22/7,23/7. Introduction Compiler: A Compiler is a program that can read a program in one language (Source) and translate it into an equivalent.
Computer Organization 1 Instruction Fetch and Execute.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
Dale & Lewis Chapter 5 Computing components
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
1 EKT 225 MICROCONTROLLER I CHAPTER ASSEMBLY LANGUAGE PROGRAMMING.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Central Processing Unit Decode Cycle. Central Processing Unit Current Instruction Register (CIR) I1 The fetch cycle has transferred an instruction from.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
First Foray into Programming (the hard way). A reminder from last lesson: A machine code instruction has two parts:  Op-code  Operand An instruction.
Addressing Modes in Microprocessors
CPU Organisation & Operation
Edexcel GCSE Computer Science Topic 15 - The Processor (CPU)
Computer Science 210 Computer Organization
The 8051 Microcontroller and Embedded Systems
Computer Architecture
CS-401 Assembly Language Programming
פרק 2: חיווט, זיכרונות בנקים זוגיים ואי-זוגיים
Data Representation – Instructions
The fetch-execute cycle
The Processor and Machine Language
Number Representations and Basic Processor Architecture
Functional Units.
Computer Programming Machine and Assembly.
CS149D Elements of Computer Science
CSCE Fall 2013 Prof. Jennifer L. Welch.
Computer Architecture
COMP 1321 Digital Infrastructure
von Neumann Architecture CPU
MARIE: An Introduction to a Simple Computer
CSCE Fall 2012 Prof. Jennifer L. Welch.
Chapter 4: Representing instructions
Program Execution.
The Von Neumann Machine
Computer Concept and Practice
Chapter 6 Programming the basic computer
CS334: MIPS language _Mars simulator Lab 2_1
Information Representation: Machine Instructions
Computer Architecture and System Programming Laboratory
Sec (2.3) Program Execution.
Presentation transcript:

Assembly Language A Brief Introduction

Unit Learning Goals CPU architecture. Basic Assembler Commands High level Programming  Assembler  Machine Language

First: Machine Code Machine Code is a language made of only 1’s and 0’s. It consists of: –Operators (instructions) –Operands (data) you can program in machine code it’s just very tedious

What is It? A language which has a one-to-one correspondence with machine code. That is, Every assembly instruction has a unique machine code representation. Assembly language is specific for each processor.

Background: CPU The CPU consists of: –ALU – Arithmetic/ Logic Unit Does all the math –Registers Temporary storage for executing instructions. D- Flip-Flops! –Program Counter Stores the address in ram of the current instruction –Decode Unit Figures out what to do with the instruction

How it works When the OS lets a program run, it is loaded into RAM Called into the CPU one instruction at a time CPU performs the instruction and updates the program counter.

An instruction Consists of: Op Code- a 3 letter pneumonic code representing a instruction (add, mov…) Operands specify which data should be operated on and where the answer should be stored. (Registers, Numbers, addresses in Ram)

For Example: mov The move instruction moves one hexadecimal byte into a specified register. Ex: mov AL,3F ;moves the number 3F into register AL

Your Code Every line of your assembly code should have a brief comment explaining what it does. Open the Assignment and try make some ASM programs!