ITEC 352 Lecture 14 ISA(5). Review Questions? Exam 1 next Friday Assembly –Assembler –Basic structure –Registers –Memory.

Slides:



Advertisements
Similar presentations
Cosc 2150: Computer Organization
Advertisements

ITEC 352 Lecture 13 ISA(4).
6-1 Chapter 6 - Datapath and Control Department of Information Technology, Radford University ITEC 352 Computer Organization Principles of Computer Architecture.
Assembly Language Programming
Chapter 7 Introduction to LC-3 Assembly Language Assembly Language Assembly Process Using the Editor & Simulator for Assembly Language Programming.
Cosc 2150 Arrays in assembly code. Variables and addresses Uncompiled ld [a], %r1 addcc %r1, 2, %r3 ARC has three addressing modes —immediate, direct,
Computing Machinery Chapter 7: Register Transfers.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 2: IT Students.
ITEC 352 Lecture 17 Functions in Assembly. Functions + Assembly Review Questions? Branching Call / Jump Reminder exam on Friday, project due next Friday.
LC-3 Computer LC-3 Instructions
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
TK 2633 Microprocessor & Interfacing Lecture 3: Introduction to 8085 Assembly Language Programming (2) 1 Prepared By: Associate Prof. Dr Masri Ayob.
Feb 18, 2009 Lecture 4-2 instruction set architecture (Part II of [Parhami]) MIPS encoding of instructions Spim simulator more examples of MIPS programming.
Chapter 5 The LC-3 LC-3 Computer Architecture Memory Map
Chapter 7 Low-Level Programming Languages. 2 Chapter Goals List the operations that a computer can perform Discuss the relationship between levels of.
Chap 4 & 5 LC-3 Computer LC-3 Instructions Chap 4 Homework – due Monday October 27 Chap 5 Homework – due Wednesday October 29 Project 2 Designs (Working.
Choice for the rest of the semester New Plan –assembler and machine language –Operating systems Process scheduling Memory management File system Optimization.
Table 1. Software Hierarchy Levels.. Essential Tools An assembler is a program that converts source-code programs into a machine language (object file).
Chapters 4 & 5: LC-3 Computer Architecture Machine Instructions Assembly language Programming in Machine and Assembly Language.
CS 300 – Lecture 6 Intro to Computer Architecture / Assembly Language Instructions.
ITEC 352 Lecture 11 ISA - CPU. ISA (2) Review Questions? HW 2 due on Friday ISA –Machine language –Buses –Memory.
4-1 Chapter 4 - The Instruction Set Architecture Computer Architecture and Organization by M. Murdocca and V. Heuring © 2007 M. Murdocca and V. Heuring.
Instruction Set Architecture
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
4-1 Chapter 4 - The Instruction Set Architecture Department of Information Technology, Radford University ITEC 352 Computer Organization Principles of.
ITEC 352 Lecture 20 JVM Intro. Functions + Assembly Review Questions? Project due today Activation record –How is it used?
Memory Layout and SLC500™ System Addresses. Processor Memory Division An SLC 500 processor's memory is divided into two storage areas. Like two drawers.
ITEC 352 Lecture 12 ISA(3). Review Buses Memory ALU Registers Process of compiling.
Memory and Addressing How and Where Information is Stored.
Microcode Source: Digital Computer Electronics (Malvino and Brown)
4-1 Chapter 4 - The Instruction Set Architecture Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles.
Chapter 4 The Von Neumann Model
ITEC 352 Lecture 14 ISA(6). Review Questions? Beginning / End Memory locations Variable / Memory syntax PSR Loops / Branches.
Chapter 5 The LC Instruction Set Architecture ISA = All of the programmer-visible components and operations of the computer memory organization.
5-1 Chapter 5 - Languages and the Machine Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles.
Introduction to Computer Engineering CS/ECE 252, Fall 2009 Prof. Mark D. Hill Computer Sciences Department University of Wisconsin – Madison.
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
4-1 Chapter 4 - The Instruction Set Architecture Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles.
The LC-3. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5-2 Instruction Set Architecture ISA = All of the.
Lecture 14 Today’s topics MARIE Architecture Registers Buses
 Lecture 2 Processor Organization  Control needs to have the  Ability to fetch instructions from memory  Logic and means to control instruction sequencing.
Computer Architecture CSE 3322 Lecture 3 Assignment: 2.4.1, 2.4.4, 2.6.1, , Due 2/3/09 Read 2.8.
Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions.
An Example Architecture. A Paper Computer - Woody Woody's characteristics Word size – 8 bits One word.
ITEC 352 Lecture 19 Functions in Assembly. Functions + Assembly Review Questions? Project due on Friday Stacks Function activation / deactivation.
Von Neumann Model Computer Organization I 1 September 2009 © McQuain, Feng & Ribbens The Stored Program Computer 1945: John von Neumann –
1 The Instruction Set Architecture September 27 th, 2007 By: Corbin Johnson CS 146.
Computer Systems – Machine & Assembly code. Objectives Machine Code Assembly Language Op-code Operand Instruction Set.
Ass. Prof. Dr Masri Ayob TK 2123 Lecture 14: Instruction Set Architecture Level (Level 2)
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
ITEC 352 Lecture 16 ISA(7). Review Exam / Questions? Conditional codes, how important are they? How important are comments in assembly? What are the benefits.
Computer Science 210 Computer Organization
Chapter 4 The Von Neumann Model
Chapter 4 The Von Neumann Model
Computer Architecture and Organization Miles Murdocca and Vincent Heuring Chapter 4 – The Instruction Set Architecture.
The Processor and Machine Language
LC-3 Details and Examples
Chapter 7 LC-2 Assembly Language.
Computer Science 210 Computer Organization
Instruction encoding We’ve already seen some important aspects of processor design. A datapath contains an ALU, registers and memory. Programmers and compilers.
Chapter 4 The Von Neumann Model
Chapter 7 Assembly Language
COMS 361 Computer Organization
Instruction encoding We’ve already seen some important aspects of processor design. A datapath contains an ALU, registers and memory. Programmers and compilers.
The Stored Program Computer
Lecture 11 Z80 Instruction Hong DGU.
Instruction execution and ALU
Introduction to Computer Engineering
Chapter 4 The Von Neumann Model
Presentation transcript:

ITEC 352 Lecture 14 ISA(5)

Review Questions? Exam 1 next Friday Assembly –Assembler –Basic structure –Registers –Memory

ISA(5) Outline More assembly –Instructions Structure Usage –Intro to loops Textbook link –

ISA(5) Instruction Format Every ARC instruction is 32 bits in length. –For instance, the instruction below must fit within 32 bits when represented in binary. –To do this, ARC enforces certain formats that allow us to use the 32 bits in different ways. These are called instruction formats. –A format defines how the various bit fields of an instruction are laid out within 32 bits and how it is interpreted by the ARC control unit.

ISA(5) ARC Instruction and PSR Formats

ISA(5) PSR A register that is used to store results of instructions Not values If a result is 0 If a result is negative Carry bit (c) Overflow bit (v)

ISA(5) Data Formats

ISA(5) ARC Pseudo-Ops Pseudo-ops are instructions to the assembler. They are not part of the ISA.

ISA(5) Adding 5 integers … ld [a_start], %r1 ! Load the starting address of a into %r1 ld [counter], %r2 ! Register r2 is the counter. andcc %r3,%r0, %r3 ! What does this do? loop: subcc %r2, 5, %r0 ! Have we reached the end ? be done ! If %r2 – 5 = 0, exit loop. addcc %r2, 1, %r2 ! Increment counter ld %r1, %r4 ! Load the number from the array addcc %r4, %r3, %r3 ! Accumulate sum into %r3. addcc %r1, 4, %r1 ! Goto next address ba loop done: st %r3, [output] jmpl %r15+4, %r0.org 3000 a: a_start: 3000 counter: 0 output: 0 Variables for the program

ISA(5) Summary Storage location for address of the array a. Having this location allows us to load the address “3000” into a register. Length is being used as a “counter” to determine when to end the loop.

ISA(5) Other ARC instructions Software traps: –Allows programs to invoke services from the OS/hardware, e.g., reading a keyboard or writing onto a display. –ARC has trap instructions – but they do not control the OS/hardware (due to JVM limitations).

ISA(5) Summary Assembly programming 101 Different language, but still within same paradigm