Chapter 1 Introduction.

Slides:



Advertisements
Similar presentations
Princess Sumaya Univ. Computer Engineering Dept. Chapter 2: IT Students.
Advertisements

Representing Numbers: Integers
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
TK 2633 Microprocessor & Interfacing Lecture 3: Introduction to 8085 Assembly Language Programming (2) 1 Prepared By: Associate Prof. Dr Masri Ayob.
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
Introduction to Microprocessors Number Systems and Conversions No /6/00 Chapter 1: Introduction to 68HC11 The 68HC11 Microcontroller.
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
ARM Core Architecture. Common ARM Cortex Core In the case of ARM-based microcontrollers a company named ARM Holdings designs the core and licenses it.
Chapter 17 Microprocessor Fundamentals William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper.
Chapter 2 Software Tools and Assembly Language Syntax.
CSCI 125 & 161 Lecture 2 Martin van Bommel. Hardware vs Software Hardware - physical components you can see and touch –e.g. processor, keyboard, disk.
Summer 2014 Chapter 1: Basic Concepts. Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Chapter Overview Welcome to Assembly Language.
Chapter 1: Basic Concepts
Stack Stack Pointer A stack is a means of storing data that works on a ‘Last in first out’ (LIFO) basis. It reverses the order that data arrives and is.
IT Groundwork ICS3UC - Unit 1 Hardware. Overview of Computer System.
ECE 456 Computer Architecture
Assembly Language A Brief Introduction. Unit Learning Goals CPU architecture. Basic Assembler Commands High level Programming  Assembler  Machine Language.
Chapter 19 Number Systems. Irvine, Kip R. Assembly Language for Intel-Based Computers, Translating Languages English: Display the sum of A times.
Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers.
CSCI 211 Intro Computer Organization –Consists of gates for logic And Or Not –Processor –Memory –I/O interface.
CSNB374: Microprocessor Systems Chapter 1: Introduction to Microprocessor.
EEL 3801C EEL 3801 Part I Computing Basics. EEL 3801C Data Representation Digital computers are binary in nature. They operate only on 0’s and 1’s. Everything.
Computer Architecture Memory, Math and Logic. Basic Building Blocks Seen: – Memory – Logic & Math.
Chapter 1 : Overview of Computer and Programming By Suraya Alias
Computer Organization and Assembly Languages 2007/11/10
CS 125 Lecture 2 Martin van Bommel. Hardware vs Software Hardware - physical components you can see and touch –e.g. processor, keyboard, disk drive Software.
Basic Concepts Computer Organization & Assembly Language Programming Instructor: Maram Alsahafi [Some of the contents Adapted from slides Dr Adnan Gutub,
ECE 447: Lecture 11 Introduction to Programming in Assembly Language.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
CPS4200 System Programming Spring 1 Systems Programming Chapter 1 Background I.
Chapter 3 Getting Started. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To give an overview of the structure of a contemporary.
1 Contents: 3.1 Instruction format and Addressing Modes 3.2 Instruction Introduction Chapter 3 Instruction system.
1 Chapter 1: Introduction Appendix A: Binary and Hexadecimal Tutorial Assembly Language for Intel-Based Computers, 3rd edition Kip R. Irvine.
1 Chapter 1: Basic Concepts Assembly Language for Intel-Based Computers, 4th edition Kip R. Irvine 9/6/2003.
Chapter 1: Introduction to Computers and Programming
Assembly Language for x86 Processors 6th Edition
Addressing Modes in Microprocessors
Engineering Problem Solving With C An Object Based Approach
Assembly Language (CSW 353)
Processor/Memory Chapter 3
Control Unit Lecture 6.
Overview of Computers and Programming Chapter 1
PROGRAMMING THE BASIC COMPUTER
Microprocessor Systems Design I
Introduction to Computer Architecture
David Kauchak CS 52 – Spring 2016
ECE 3430 – Intro to Microcomputer Systems
Computer Architecture
Computer Hardware Introduction.
Chapter 1: Introduction to Computers and Programming
Computer Electronic device Accepts data - input
Chapter One: Introduction
Chap. 6 Programming the Basic Computer
Topic 3 Number Representations and Computer Arithmetics
CSCE Fall 2013 Prof. Jennifer L. Welch.
Computer Electronic device Accepts data - input
Chapter 8 Central Processing Unit
Topic 3 Number Representations and Computer Arithmetics
Introduction to Micro Controllers & Embedded System Design
Computer Electronic device Accepts data - input
Computer Organization and Assembly Language
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
CSCE Fall 2012 Prof. Jennifer L. Welch.
Introduction to Microprocessor Programming
Chapter 6 Programming the basic computer
COMPUTER ORGANIZATION AND ARCHITECTURE
Dr. Clincy Professor of CS
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

Chapter 1 Introduction

WHY YOU SHOULD LEARN ASSEMBLY To create system software for new processors: Compilers, Optimizers, Assemblers, Linkers, Device Drivers. To better understand the limitations of fundamental data types: Precision, Range, Overflow, Representation Error To better understand high level languages: Visualizing pass-by-value, pass-by-reference, recursion, pointers, and writing code to take advantage of memory hierarchies based on locality of reference

WHEN ASSEMBLY IS NEEDED To optimize performance: Implementing code fragments that account for most of the execution time. Using fixed-point arithmetic when the processor has no floating-point instructions For code not easily implemented in a high-level language: Reversing the order of bits and bytes Low-level access to hardware resources: Device drivers, interrupt routines. Reverse engineering to understand and eradicate malware

Arithmetic and Logic Unit (ALU) COMPUTER COMPONENTS Main Memory (1 GB = 109 bytes) Registers (16 x 32-bits) Arithmetic and Logic Unit (ALU) Control Unit Central Processing Unit (CPU) nanoseconds (10-9 sec) microseconds (10-6 sec) milliseconds (10-3 sec) Disk Drive (1 TB = 1012 bytes)

Terminology Radix Bit (Binary Digit) Byte Word Octal Hexadecimal Bit (Binary Digit) Byte Word Half-Word Double-Word Representation/Interpretation Range Overflow Resolution/Precision Unsigned Signed 2’s complement Sign Plus Magnitude Memory Address Register Opcode Immediate Constant Label

WHAT ASSEMBLY LANGUAGE LOOKS LIKE Assembler directives Comment lines Label Executable Instructions Instruction Mnemonic ("OpCode") Instruction Operands Comments

HOW ASSEMBLERS WORK Original source code Assembler Pass 1 Original source code ... L1: LDRB R0,x+1 x: .byte 3,5,7 Pass 1: Source code is processed one line at a time, from beginning to end. A "Location Counter" keeps track of the memory address of each line and is used to enter each label and its memory address into a "Symbol Table". Location Counter Label addresses determined ... 1234 LDRB R0,x+1 4764 .byte 3,5,7 Symbol Table Assembler Pass 2 Identifier Relative Address L1 1234 x 4764 Pass 2: Source code is processed a second time, starting over at the beginning. Instruction mnemonics are replaced by their binary coded representation, using the symbol table to replace each label reference by its corresponding memory address. Label references resolved ... 1234 LDRB R0,[#4765] 4764 .byte 3,5,7

HARDWARE ENVIRONMENT STM32F429ZI Discovery Board Front View Rear View USB connector for power and downloading code ARM Cortex-M4F: 180 MHz 32-bit CPU 2MB of flash memory 256KB RAM (variables) 3-axis Gyroscope FPU & DSP Instructions CRC32 hardware Programmable push button Reset button Touch-sensitive color display 240x320 pixels USB connector for thumb drive

Signed Integer Data Types

Unsigned Integer Data Types

IDENTIFIER CONVENTIONS Variable Names All lowercase Append digits to indicate size in bits Prefix with ‘s’ for signed, ‘u’ for unsigned Function Names Capitalize 1st letter of each word Macros and Symbolic Constants All Caps