Programmer s Model = model of µc useful to view hardware during execution of software instructions

Size: px
Start display at page:

Download "Programmer s Model = model of µc useful to view hardware during execution of software instructions"

Transcription

1 HC12/S12 Programmer s Model Programmer s Model = model of µc useful to view hardware during execution of software instructions Recall: General Microcontroller/Computer Architecture note: Control Unit & Register File CPU Control Unit ALU Register File Data Path program data m n m n m-bit bus uses n-bit data bus control bus I/O Devices AMS Instruction Execution p.1 HC12/S12 Programmer s Model Programmer s Model = model of µc useful to view hardware during execution of software instructions focus on Register File & Control Unit of a specific controller will be different for each different brand/model of controller Register File A D @8-bit Accumulator: A, or 1@16-bit Accumulator: D 16-bit Index Register: X bit Index Register: Y Control Unit IR Multi-byte Instruction Register S X H I N Z V C current instruction 16-bit Program Counter of next instruction bit Stack Pointer of stack bit Condition Code Register AMS Instruction Execution p.2

2 HC12/S12 Programmer s Model Register File store data in/out of memory or ALU Accumulators: 8-bit OR 16-bit general purpose storage Index Registers: 16-bit general purpose or in indexed ing Control Unit Instruction Register (IR) holds current instruction, multi-byte Program Counter () holds of next instruction, 16-bit Stack Pointer () holds of stack (special block of memory), 16-bit Condition Code Register () holds flag s generated by last instruction executed, 8-bit known as Status Register in other controllers Central Processing Unit A L U Control Unit Register File 2@8-bit Accumulator: A, A D IR or 1@16-bit Accumulator: D 16-bit Index Register: X 16-bit Index Register: Y Multi-byte Instruction Register: current instruction 16-bit Program Counter: addr. next instruction 16-bit Stack Pointer: of stack 8-bit Condition Code Register S X H I N Z V C AMS Instruction Execution p.3 Condition Code Register = register 8 of individually functioning bits AKA: Flags Register, Status Register Stop Disable External Interrupt Mask Half Carry Interrupt Mask 7 S X H I N Z V C 0 Carry/orrow Overflow Zero Negative LACK = set by ALU GRAY = other; covered later ALU Status Flags: each condition tested after each instr. exec. C: Carry Flag = 1 if carry (addition) or borrow (subtraction) occurs in instr. exec. V: Overflow Flag C _ Overflow An 1 n 1 Sn 1 An 1 n 1 S = 1 if 2 s complement overflow occurs in instr. exec. Z: Zero Flag: =1 if ALU result = 0 N: Negative Flag: =1 if MSU of ALU result is 1 (i.e., negative in S2C) H: Half-Carry Flag: =1 if carry from lower nibble (nibble = ½ byte =4 bits) 2 n 1 AMS Instruction Execution p.4 1

3 Examples Instructions & resulting flag status 8-bit addition (hexadecimal) 7 + 4A assign each problem to group of students to evaluate as TPS exercise write answers (C=, V=, etc) on board before next slide 07 + F A AMS Instruction Execution p.5 Examples Instructions & resulting flag status 8-bit addition 7 + 4A 07 + F A V (2C overflow) is ALWAYS checked, even if is not in S2C AMS Instruction Execution p.6

4 Examples & Carry Flag Rules Instructions & resulting flag status 8-bit subtraction (hexadecimal) Carry Flag (C) Rules * if A + (addition), then C = carry_out (Cout) * if A (subtraction), then C = Cout (not_cout, inverse) if A >, no borrow is needed C = 0 if A <, borrow needed C = 1 9 AMS Instruction Execution p.7 Example: Carry Flag & Subtraction Evaluate: -4 (-3) operation is A (subt.) C = Cout A < borrow will be needed C should be 1 Note: in S2C form, the more negative a number is, the smaller it is EX: -4 = 1100 is smaller than -3 (= 1101) Thus, you can compare A < or > in normal/decimal or S2C notation 6 AMS Instruction Execution p.8

5 HC12/S12 Assembly Instructions Assembly (ASM) language: programming in the smallest unit of machine (µc, µp) action Example ASM program code ASM Instruction Format LAEL INSTR_MNEMONIC OPERAND(S) COMMENT example: AMS Instruction Execution p.9 HC12/S12 Assembly Instructions ASM Instruction Format LAEL INSTR_MNEMONIC OPERAND(S) COMMENT example: LAEL: identifies location of a line of code used by Assembler (compiler); not part of actual instructions generally used for looping (jump, branch) CHECK is branch location of later instruction (RA CHECK) MNEMONIC: text code for each ASM instruction translated by Assembler to a specific instr. op-code op-code = hex machine code for each ASM instruction CMPA is instruction to compare in acca to operand OPERAND: data/ used by ASM instruction function of ing mode (discussed later) some instr. don t have operands #$0A is the acca will be compared to AMS Instruction Execution p.10

6 HC12/S12 Assembler Notation $= HEX EX: $12 = %= IN EX: %10 = 2 10 none = DEC EX: 12 = #denotes a data (rather than an ) EX: ADDA #$A5, adds $A5 to acca ADDA $A5, adds at $A5 to acca illustration to clarify will come soon! first need to make things even more complicated AMS Instruction Execution p.11 ASM Instructions & Program Assembly Example ASM program code Program Assembly instr._mnemonics converted to HEX op-codes So HEX s can represent instruction op-code bytes instruction data or operand bytes data/instruction bytes and you need to be able to tell which witch is which! AMS Instruction Execution p.12

7 Clear As Mud! Relationship between Software (instruction) and Hardware Program Elements: SOFTWARE: HARDWARE: location of instr., action to perform, data to act on, CPU control bits, data bits (or of data) Relationship between Program and Data memory all instructions are converted to hex and stored in memory Program = block of memory es allocated to program bytes most instruction act on data and produce results stored in memory Data = block of memory es allocated to data bytes Relationship between Address and Data s evaluate: #1 + #2 = #3 #1 + 2 = #6 block 1 4 block 2 5 block 3 6 no # implies an ; in block 2 is #5, so #1+#5=#6 Address Data within AMS Instruction Execution p.13 68HC12 Expanded Programmer s Model CPU (ALU, Register File, Control Unit) and note separate memory allocated for Program and Data AMS Instruction Execution p.14

8 Microcontroller Program Development from concept to action A. Write program to complete task check syntax; test functionality (Simulator). Assemble program (Assembler) ASM code Machine code (op-codes and operands) C. Upload program to program memory D. Run program on Microcontroller set to start of program memory 1. fetch instruction to IR from program memory 2. decode instruction: set ALU to perform instruction 3. execute instruction: load/store to data memory & register file advance to next instruction in program memory repeat step 1 until commanded to stop AMS Instruction Execution p.15 Instruction Execution Cycle 3 steps of instruction execution cycle Fetch: Load instruction byte from program memory into IR Decode: Translate op-code to control signals for ALU and Control Unit Execute: Pass data through ALU to generate desired result Example 1. fetch bytes for LDAA #$00 2. decode: set ALU to load #$00 into acca 3. execute: acca contains $00 4. fetch bytes for CMPA #$0A 5. decode: set ALU to compare acca with the $0A 6. execute: set C/V/N/Z flags (e.g., if acca were $0A, Z 1) 7. etc AMS Instruction Execution p.16

9 Instruction Cycle Example Code Executed: LDAA $3000 (load from $3000) STAA $2000 (store to $2000) Explaining the instruction execution chart AMS Instruction Execution p.17 Instruction Cycle Example Code Executed: LDAA $3000 (load from $3000) STAA $2000 (store to $2000) AMS Instruction Execution p.18

10 HC12 Instruction Set Instruction Set: the full set of functional instructions a µc/µp can execute varies with each family of controllers, but generally very similar asic types of instructions (see HO_3) Data Transfer/Manipulation move data to/from memory; shift/rotate; etc. Arithmetic add; subtract; increment; decrement; etc. Logic & it Operations oolean logic; condition flag clears; etc. Data Test compare/test data & set flags (test for conditional branches) ranch jump out of program sequence; if-then-else operations Function Call (Subroutine) start/end subroutines; adjust covered later in class AMS Instruction Execution p.19 Reading HO_3 Information in HO_3 instruction tables mnemonic description of function operation in terms of programmer s model elements flag affects Data Transfer/Manipulation Table A. Load instructions put data into CPU memory (e.g. Register File) Mnemonic Function Operation C V Z N LDAA Load accumulator A A M -- 0 LDA Load accumulator M -- 0 LDD Load accumulator D A M, M LDX Load index register X X M:M LDY Load index register Y Y M:M LDS Load stack pointer () M:M (M) defined by instruction operand all these instructions CLEAR V (make 0) and CHANGE Z and N based on ALU result AMS Instruction Execution p.20

11 2-byte Operations Accumulators acca is MSy of accd; acc is LSy of accd operations instructions refer to only one 8-bit memory where does 2 nd byte come from for 16-bit instructions (e.g., LDX) defined/reference memory (M) MSy; M+1 LSy 16-bit Register (e.g., ix) MSy [8:15] LSy [0:7] 8-bit memory M-1 M M+1 M+2 M+3 e.g., M = $679D $679C $679D $679E $679F $67A0 AMS Instruction Execution p.21 Quick Review: HC12 Instructions Data Transfer/Manipulation Table. Store instructions put data (from CPU) into memory Mnemonic Function Operation C V Z N STAA Store accumulator A A M -- 0 STA Store accumulator M -- 0 STD Store accumulator D A M, M STX Store index register X X M:M STY Store index register Y Y M:M STS Store stack pointer () M:M You don t have to memorize these. Instruction tables will always be available to you. Even on exams! Table C. Move/transfer instructions copy data to a memory/register Mnemonic Function Operation C V Z N TA Transfer acc. A to acc. A -- 0 TA Transfer acc. to acc. A A -- 0 TAP Transfer acc. A to A TPA Transfer to acc.a A MOV Mem to Mem: move byte (M) 1 (M) MOVW Mem to Mem: move Word (M:M+1) 1 (M:M+1) which is which? Shift/rotate instructions Logic shift: input = 0, output to carry_out Arithmetic shift: shift right puts copy of MS into MS Rotate: input rolls from output (carry_out included) AMS Instruction Execution p.22

12 Quick Review: HC12 Instructions Arithmetic Addition: adds Register with (or Register), stores in Register note: A A+, but no A+ Subtraction: subtr. Register with (or Register), stores in Register Decrement: subtr. 1 from in (M, A,,, X or Y) Increment: add 1 to in (M, A,,, X or Y) Logic AND, OR, XOR, Complement (invert) 2 s complement = $00 A (or ); additive inverse, same as A +1 it Operations Clear flags: C, I, V it Test; AND s A (or ) with : application unknown to me it Set/Clear clears (make 0) or sets (make 1) individual bits of a byte can affect 1 or multiple bits very useful for defining individual bits of an I/O port requires a mask byte AMS Instruction Execution p.23 Masking Concept it set/clear instructions (SET, CLR) [as well as some others we ll learn later] use mask bytes. Mask byte defines which bits of a byte will be affected by instr. other bits will not be changed Instruction format mnemonic mem_addr mask SET/CLR addr of data bits to set/clr if mask bit = 1 change if mask bit = 0 don t change Examples: ASM instruction *only operates on ; not on CPU registers or operands because masking is bit-wise operation, mask bytes often specified in binary AMS Instruction Execution p.24

13 SET/CLR Examples Determine memory after each instruction set/clear all bits that are 1 in the mask operand SET $9D % in $9D is $AD = % bset $AF SET $673 % in $673 is $00 bset $E7 data: mask: bset-> red=set, blue=pass data: mask: bset-> INITIAL addr. $009C $009D $009E $672 $673 $9C $AD $E2 $FF $00 CLR $009E % in $009E is $E2 bclr $62 CLR $009C $9C in $9C is $9C mask also $9C = % bclr $00 data: mask: bclr-> red=clr, blue=pass data: mask: bclr-> FINAL addr. $009C $009D $009E $672 $673 $00 $AF $62 $FF $E7 AMS Instruction Execution p.25 Quick Review: HC12 Instructions Data Test Instructions Compare Data Compare: C=, V=, Z=, N= compare 2 s by subtracting them flags will show <, >, or = N will show which was greater EX: CA Compare A=$5D to =$37 A $5D - $37 N = 0 A > (subtraction not negative) Z will show if they were equal Test Data Test: C= 0, V=0, Z=, N= subtracts $00 flags show if in tested memory/register is negative (N) or zero (Z) AMS Instruction Execution p.26

14 Address Modes 68HC12 has six (6) ing modes ing modes define how data is associated with an instruction Inherent: instruction requires no data form outside the CPU EX: AA {A A+} or INX {increment ix by 1} inherent instructions have no operands all needed data within CPU registers Immediate: data is in operand (not in memory) easily identified by having a # in the operand EX: LDAA #$F3 {put $F3 into acca} or ANDA #$2C Extended: data for instruction is in memory 2-byte operand specifies memory EX: LDA $204 {put in $204 into acc; <$204>} Direct: data for instruction is in memory with 1-byte special case of Extended used for es $0000 $00FF (256 bytes), where MSy is $00 saves program bytes and execution time; eliminates 1 operand es $00 $FF largely used by configuration registers (control I/O functions) EX: ADDA $E3 {A A+<$00E3>} remaining 2 modes are more complicated and will be covered later <..> notation means the at this mem. addr. AMS Instruction Execution p.27 Address Modes Identify the mode for each of the following instructions Inherent, Immediate, Direct, Extended LDA #$4F STAA $8D2C AA LDX #$8D2C STY $8D2C INC ANDA $C6 TA LSL $F0 SUD $8D2C ADDD #$0750 Immediate Extended Inherent Immediate Extended Inherent Direct Inherent Direct Extended Immediate AMS Instruction Execution p.28

15 Quiz 1 Topics Following topics should be studied for Quiz review base conversion S2C form and conversions oolean logic; DeMorgan s rules flip-flop/register operation Microcontroller architecture; structure & name/function of blocks 68HC12 programmers model bits; setting after hexadecimal math 68HC12 instruction format & execution cycle masking concept: SET/CLR instructions 68HC12 modes: the simple ones (INH, IMM, DIR, EXT) AMS Instruction Execution p.29 Instruction Register Chart Initial Values $2100 A AA $ED $2100 Inherent Add to A A2 +4 =ED Initial Values $2100 A INC $4C $0060 $20 $2100 Inherent Increment ( +1) AMS Instruction Execution p.30

16 Instruction Register Chart Initial Values $2100 A ANDA #$4C $00 $2100 Immediate AND w/ M (A2)(4C) A2 = C = Initial Values A LDX #$8000 Immediate Inherent AX Add to ix C $2100 $0061 $00C7 $2000 $2001 $2002 $00 $FF $31 $5E $20 $8000 $804 AMS Instruction Execution p.31 Instruction Register Chart Initial Values $2100 A LDX $60 $2000 Direct Load ix from M (60) LDAA $C7 Direct C STAA $2001 D Extended $FF $0060 $FF $2000 $4 $20 $2000 $2001 $FF $5E AMS Instruction Execution p.32

17 Instruction Register Chart: Flags AA INC $ED $2100 $4C $0060 $20 $ x- ANDA #$4C A LDX #$8000 $00 $ $8000 AMS Instruction Execution p.33 Instruction Register Chart: Flags AX Add to ix C LDX $60 $8048 $ LDAA $C7 C STAA $2001 D $FF $0060 $FF $2000 $4 $ $2000 $2001 $FF $5E AMS Instruction Execution p.34

18 Indexed Address Mode Indexed: instruction data is in memory at specified relative to (offset from) a reference that is stored in a CPU register reference can be in ix, iy,, or offsets are signed number can offset forward or backward useful for accessing a list of data beginning (or ending) at the reference Several varieties of indexed ing in HC12 ASM we will only study Indexed-Immediate others covered in textbook and HO_ reference CPU register offset ex: addr index A $XX C 601D 601E block of memory AMS Instruction Execution p.35 Indexed-Immediate Addressing Indexed-Immediate reference in ix, iy,, or offset in operand just like Immediate mode has data in operand Format: MNEMONIC offset,reference Example: LDX #$6017 LDAA $05,X {acca <$5+<iX>>} acca loaded with in memory at addr ($65 + in ix) note: at index, < <ix> >, is irrelevant unless instr. was LDAA $00,X acca $AA $27 target of instruction ix 6017 reference offset ex: addr index 6017 $ A C 601D 601E block of memory AMS Instruction Execution p.36

19 Indexed Immediate Addressing Example LDY #$5000 ADDA $4C,Y A A + M, M = <$4C + <iy> > M = $504C A $21 + $1A A $3 acca acc $21 $80 ix $2000 iy $5000 reference INITIAL Example (same memory as above) 1) LDY #$ ) ADDA 0,Y acca $21 3) INY acc $80 4) ADDA $0,Y can add a series of numbers like this ix $2000 iy $5000 reload Y to move to another set A 04 5E addr A C 504D 504E memory block acca acc ix iy 2 $D4 $80 $2000 $5000 acca acc $3 $80 ix $2000 iy $5000 reference acca acc ix iy 3 $D4 $80 $2000 $5001 FINAL A 04 5E addr A C 504D 504E memory block acca acc ix iy 4 $FC $80 $2000 $5001 AMS Instruction Execution p.37 Instruction Register Chart Initial Values $01 $00F0 $2C $ $3011 $31 $3012 $ $301A $20 $3109 $E A LDX $3011 $01 $00F0 $2C $3011 $ $3011 $31 $3012 $ $301A $20 $3109 $E Add to A A2 +4 =ED ORA #$F0 $F1 $00F0 $3100 $2C..... $3011 $31 $3012 $ $301A $20 $3109 $E C which is right? STA $09,X D OR & $F1 <F0> $00F0 $2C A2 OR 2C $ OR & <F0> $3011 $31 01 OR 2C $3012 $ OR & F0 $301A $20 01 OR F0 $F1 $E $3109 which is right? + 09 ix + 09 ix $3011+$09 $3100+$09 $3100+<$09> AMS Instruction Execution p.38

20 HC12 Compiler Directives Directive: command to compiler; makes coding easier HC12 ASM Directives (see HO_3) EQU equates symbol with numeric valve -use to define memory location or constant -assembler replaces label with correct # EX: LIST EQU $5 defines variable LIST = $5 ORG origin: set memory addr. of instructions/data that follow -all programs must specify their ORG EX: TOP ORG $6000 sets program origin at $6000 END set end of program -any ASM instructions following END are d -can have directives after END AMS Instruction Execution p.39 HC12 Compiler Directives Directive: command to compiler HC12 ASM Directives (see HO_3) FC form constant byte -reserves block of memory & initiates contents of reserved block EX: AC FC $11, $12, $13 reserves 3 bytes w/ valves $11, $12 & $13 at addr. assigned to label AC FD form double-byte -same as FC but 2 bytes per operand FCC form constant character -stores ASCII code for alphanumeric characters enclosed in " " symbols EX: NAME FCC MIKE stores 4 ASCII bytes for MIKE RM reserve block of memory EX: TEMP RM $10 reserves 16 ($10) bytes starting at addr. assigned to label TEMP AMS Instruction Execution p.40

21 Assembly Process Assembly Process: The process of converting ASM code into executable machine code. Input.ASM (text file) Outputs.LST compiled code program es & op-codes.s19 record HEX file that can be uploaded to C to store program to memory Testing paths Simulator Test on hardware AMS Instruction Execution p.41 Assembly Process Example AMS Instruction Execution p.42

Lecture 3 Addressing Modes, Instruction Samples, Machine Code, Instruction Execution Cycle

Lecture 3 Addressing Modes, Instruction Samples, Machine Code, Instruction Execution Cycle Lecture 3 Addressing Modes, Instruction Samples, Machine Code, Instruction Execution Cycle Contents 3.1. Register Transfer Notation... 2 3.2. HCS12 Addressing Modes... 2 1. Inherent Mode (INH)... 2 2.

More information

MACHINE ARCHITECTURE & LANGUAGE

MACHINE ARCHITECTURE & LANGUAGE in the name of God the compassionate, the merciful notes on MACHINE ARCHITECTURE & LANGUAGE compiled by Jumong Chap. 9 Microprocessor Fundamentals A system designer should consider a microprocessor-based

More information

Microcontroller Basics A microcontroller is a small, low-cost computer-on-a-chip which usually includes:

Microcontroller Basics A microcontroller is a small, low-cost computer-on-a-chip which usually includes: Microcontroller Basics A microcontroller is a small, low-cost computer-on-a-chip which usually includes: An 8 or 16 bit microprocessor (CPU). A small amount of RAM. Programmable ROM and/or flash memory.

More information

MICROPROCESSOR AND MICROCOMPUTER BASICS

MICROPROCESSOR AND MICROCOMPUTER BASICS Introduction MICROPROCESSOR AND MICROCOMPUTER BASICS At present there are many types and sizes of computers available. These computers are designed and constructed based on digital and Integrated Circuit

More information

HC12 Assembly Language Programming

HC12 Assembly Language Programming HC12 Assembly Language Programming Programming Model Addressing Modes Assembler Directives HC12 Instructions Flow Charts 1 Assembler Directives In order to write an assembly language program it is necessary

More information

Microprocessor/Microcontroller. Introduction

Microprocessor/Microcontroller. Introduction Microprocessor/Microcontroller Introduction Microprocessor/Microcontroller microprocessor - also known as a CU or central processing unit - is a complete computation engine that is fabricated on a single

More information

M6800. Assembly Language Programming

M6800. Assembly Language Programming M6800 Assembly Language Programming 1 3. MC6802 MICROPROCESSOR MC6802 microprocessor runs in 1MHz clock cycle. It has 64 Kbyte memory address capacity using 16-bit addressing path (A0-A15). The 8-bit data

More information

ASSEMBLY LANGUAGE PROGRAMMING (6800) (R. Horvath, Introduction to Microprocessors, Chapter 6)

ASSEMBLY LANGUAGE PROGRAMMING (6800) (R. Horvath, Introduction to Microprocessors, Chapter 6) ASSEMBLY LANGUAGE PROGRAMMING (6800) (R. Horvath, Introduction to Microprocessors, Chapter 6) 1 COMPUTER LANGUAGES In order for a computer to be able to execute a program, the program must first be present

More information

Introduction to Microcontrollers

Introduction to Microcontrollers Introduction to Microcontrollers Motorola M68HC11 Specs Assembly Programming Language BUFFALO Topics of Discussion Microcontrollers M68HC11 Package & Pinouts Accumulators Index Registers Special Registers

More information

Z80 Instruction Set. Z80 Assembly Language

Z80 Instruction Set. Z80 Assembly Language 75 Z80 Assembly Language The assembly language allows the user to write a program without concern for memory addresses or machine instruction formats. It uses symbolic addresses to identify memory locations

More information

150127-Microprocessor & Assembly Language

150127-Microprocessor & Assembly Language Chapter 3 Z80 Microprocessor Architecture The Z 80 is one of the most talented 8 bit microprocessors, and many microprocessor-based systems are designed around the Z80. The Z80 microprocessor needs an

More information

BASIC COMPUTER ORGANIZATION AND DESIGN

BASIC COMPUTER ORGANIZATION AND DESIGN 1 BASIC COMPUTER ORGANIZATION AND DESIGN Instruction Codes Computer Registers Computer Instructions Timing and Control Instruction Cycle Memory Reference Instructions Input-Output and Interrupt Complete

More information

Computer organization

Computer organization Computer organization Computer design an application of digital logic design procedures Computer = processing unit + memory system Processing unit = control + datapath Control = finite state machine inputs

More information

CPU Organization and Assembly Language

CPU Organization and Assembly Language COS 140 Foundations of Computer Science School of Computing and Information Science University of Maine October 2, 2015 Outline 1 2 3 4 5 6 7 8 Homework and announcements Reading: Chapter 12 Homework:

More information

1 Classical Universal Computer 3

1 Classical Universal Computer 3 Chapter 6: Machine Language and Assembler Christian Jacob 1 Classical Universal Computer 3 1.1 Von Neumann Architecture 3 1.2 CPU and RAM 5 1.3 Arithmetic Logical Unit (ALU) 6 1.4 Arithmetic Logical Unit

More information

MICROPROCESSOR. Exclusive for IACE Students www.iace.co.in iacehyd.blogspot.in Ph: 9700077455/422 Page 1

MICROPROCESSOR. Exclusive for IACE Students www.iace.co.in iacehyd.blogspot.in Ph: 9700077455/422 Page 1 MICROPROCESSOR A microprocessor incorporates the functions of a computer s central processing unit (CPU) on a single Integrated (IC), or at most a few integrated circuit. It is a multipurpose, programmable

More information

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2 Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of

More information

Central Processing Unit (CPU)

Central Processing Unit (CPU) Central Processing Unit (CPU) CPU is the heart and brain It interprets and executes machine level instructions Controls data transfer from/to Main Memory (MM) and CPU Detects any errors In the following

More information

Chapter 2 Topics. 2.1 Classification of Computers & Instructions 2.2 Classes of Instruction Sets 2.3 Informal Description of Simple RISC Computer, SRC

Chapter 2 Topics. 2.1 Classification of Computers & Instructions 2.2 Classes of Instruction Sets 2.3 Informal Description of Simple RISC Computer, SRC Chapter 2 Topics 2.1 Classification of Computers & Instructions 2.2 Classes of Instruction Sets 2.3 Informal Description of Simple RISC Computer, SRC See Appendix C for Assembly language information. 2.4

More information

Summary of the MARIE Assembly Language

Summary of the MARIE Assembly Language Supplement for Assignment # (sections.8 -. of the textbook) Summary of the MARIE Assembly Language Type of Instructions Arithmetic Data Transfer I/O Branch Subroutine call and return Mnemonic ADD X SUBT

More information

The stack and the stack pointer

The stack and the stack pointer The stack and the stack pointer If you google the word stack, one of the definitions you will get is: A reserved area of memory used to keep track of a program's internal operations, including functions,

More information

8085 INSTRUCTION SET

8085 INSTRUCTION SET DATA TRANSFER INSTRUCTIONS Opcode Operand Description 8085 INSTRUCTION SET INSTRUCTION DETAILS Copy from source to destination OV Rd, Rs This instruction copies the contents of the source, Rs register

More information

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek Instruction Set Architecture or How to talk to computers if you aren t in Star Trek The Instruction Set Architecture Application Compiler Instr. Set Proc. Operating System I/O system Instruction Set Architecture

More information

PART B QUESTIONS AND ANSWERS UNIT I

PART B QUESTIONS AND ANSWERS UNIT I PART B QUESTIONS AND ANSWERS UNIT I 1. Explain the architecture of 8085 microprocessor? Logic pin out of 8085 microprocessor Address bus: unidirectional bus, used as high order bus Data bus: bi-directional

More information

(Refer Slide Time: 00:01:16 min)

(Refer Slide Time: 00:01:16 min) Digital Computer Organization Prof. P. K. Biswas Department of Electronic & Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture No. # 04 CPU Design: Tirning & Control

More information

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language Chapter 4 Register Transfer and Microoperations Section 4.1 Register Transfer Language Digital systems are composed of modules that are constructed from digital components, such as registers, decoders,

More information

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions CS101 Lecture 26: Low Level Programming John Magee 30 July 2013 Some material copyright Jones and Bartlett 1 Overview/Questions What did we do last time? How can we control the computer s circuits? How

More information

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995 UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering EEC180B Lab 7: MISP Processor Design Spring 1995 Objective: In this lab, you will complete the design of the MISP processor,

More information

EE 261 Introduction to Logic Circuits. Module #2 Number Systems

EE 261 Introduction to Logic Circuits. Module #2 Number Systems EE 261 Introduction to Logic Circuits Module #2 Number Systems Topics A. Number System Formation B. Base Conversions C. Binary Arithmetic D. Signed Numbers E. Signed Arithmetic F. Binary Codes Textbook

More information

EE282 Computer Architecture and Organization Midterm Exam February 13, 2001. (Total Time = 120 minutes, Total Points = 100)

EE282 Computer Architecture and Organization Midterm Exam February 13, 2001. (Total Time = 120 minutes, Total Points = 100) EE282 Computer Architecture and Organization Midterm Exam February 13, 2001 (Total Time = 120 minutes, Total Points = 100) Name: (please print) Wolfe - Solution In recognition of and in the spirit of the

More information

Chapter 9 Computer Design Basics!

Chapter 9 Computer Design Basics! Logic and Computer Design Fundamentals Chapter 9 Computer Design Basics! Part 2 A Simple Computer! Charles Kime & Thomas Kaminski 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode)

More information

Notes on Assembly Language

Notes on Assembly Language Notes on Assembly Language Brief introduction to assembly programming The main components of a computer that take part in the execution of a program written in assembly code are the following: A set of

More information

CHAPTER 7: The CPU and Memory

CHAPTER 7: The CPU and Memory CHAPTER 7: The CPU and Memory The Architecture of Computer Hardware, Systems Software & Networking: An Information Technology Approach 4th Edition, Irv Englander John Wiley and Sons 2010 PowerPoint slides

More information

CPU Organisation and Operation

CPU Organisation and Operation CPU Organisation and Operation The Fetch-Execute Cycle The operation of the CPU 1 is usually described in terms of the Fetch-Execute cycle. 2 Fetch-Execute Cycle Fetch the Instruction Increment the Program

More information

Computer Organization and Architecture

Computer Organization and Architecture Computer Organization and Architecture Chapter 11 Instruction Sets: Addressing Modes and Formats Instruction Set Design One goal of instruction set design is to minimize instruction length Another goal

More information

Faculty of Engineering Student Number:

Faculty of Engineering Student Number: Philadelphia University Student Name: Faculty of Engineering Student Number: Dept. of Computer Engineering Final Exam, First Semester: 2012/2013 Course Title: Microprocessors Date: 17/01//2013 Course No:

More information

BCD (ASCII) Arithmetic. Where and Why is BCD used? Packed BCD, ASCII, Unpacked BCD. BCD Adjustment Instructions AAA. Example

BCD (ASCII) Arithmetic. Where and Why is BCD used? Packed BCD, ASCII, Unpacked BCD. BCD Adjustment Instructions AAA. Example BCD (ASCII) Arithmetic We will first look at unpacked BCD which means strings that look like '4567'. Bytes then look like 34h 35h 36h 37h OR: 04h 05h 06h 07h x86 processors also have instructions for packed

More information

Chapter 5 Instructor's Manual

Chapter 5 Instructor's Manual The Essentials of Computer Organization and Architecture Linda Null and Julia Lobur Jones and Bartlett Publishers, 2003 Chapter 5 Instructor's Manual Chapter Objectives Chapter 5, A Closer Look at Instruction

More information

1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12

1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12 C5 Solutions 1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12 To Compute 0 0 = 00000000 To Compute 1 Step 1. Convert 1 to binary 00000001 Step 2. Flip the bits 11111110

More information

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 1 - INTRODUCTION JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ Unit 1.MaNoTaS 1 Definitions (I) Description A computer is: A

More information

Binary Numbers. Binary Octal Hexadecimal

Binary Numbers. Binary Octal Hexadecimal Binary Numbers Binary Octal Hexadecimal Binary Numbers COUNTING SYSTEMS UNLIMITED... Since you have been using the 10 different digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 all your life, you may wonder how

More information

Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Systems I: Computer Organization and Architecture Lecture : Microprogrammed Control Microprogramming The control unit is responsible for initiating the sequence of microoperations that comprise instructions.

More information

Computer Science 281 Binary and Hexadecimal Review

Computer Science 281 Binary and Hexadecimal Review Computer Science 281 Binary and Hexadecimal Review 1 The Binary Number System Computers store everything, both instructions and data, by using many, many transistors, each of which can be in one of two

More information

2011, The McGraw-Hill Companies, Inc. Chapter 3

2011, The McGraw-Hill Companies, Inc. Chapter 3 Chapter 3 3.1 Decimal System The radix or base of a number system determines the total number of different symbols or digits used by that system. The decimal system has a base of 10 with the digits 0 through

More information

Instruction Set Design

Instruction Set Design Instruction Set Design Instruction Set Architecture: to what purpose? ISA provides the level of abstraction between the software and the hardware One of the most important abstraction in CS It s narrow,

More information

The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization

The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization David Sullins, Dr. Hardy Pottinger, Dr. Daryl Beetner University of Missouri Rolla Session I.

More information

6800 Basics. By Ruben Gonzalez

6800 Basics. By Ruben Gonzalez 6800 Basics By Ruben Gonzalez 6800 Processor Uses 8 bit words Has addressable main memory of 64k Has Memory Mapped I/O and interrupts The 6800 has the following main registers: 8- bit Accumulator A (AccA)

More information

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals CPU Architectures Motorola 68000 Several CPU architectures exist currently: Motorola Intel AMD (Advanced Micro Devices) PowerPC Pick one to study; others will be variations on this. Arbitrary pick: Motorola

More information

PROBLEMS (Cap. 4 - Istruzioni macchina)

PROBLEMS (Cap. 4 - Istruzioni macchina) 98 CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS PROBLEMS (Cap. 4 - Istruzioni macchina) 2.1 Represent the decimal values 5, 2, 14, 10, 26, 19, 51, and 43, as signed, 7-bit numbers in the following binary

More information

Instruction Set Architecture (ISA)

Instruction Set Architecture (ISA) Instruction Set Architecture (ISA) * Instruction set architecture of a machine fills the semantic gap between the user and the machine. * ISA serves as the starting point for the design of a new machine

More information

Administrative Issues

Administrative Issues CSC 3210 Computer Organization and Programming Introduction and Overview Dr. Anu Bourgeois (modified by Yuan Long) Administrative Issues Required Prerequisites CSc 2010 Intro to CSc CSc 2310 Java Programming

More information

Programming the Motorola MC68HC11 Microcontroller

Programming the Motorola MC68HC11 Microcontroller Programming the Motorola MC68HC11 Microcontroller CONTENTS: COMMON PROGRAM INSTRUCTIONS WITH EXAMPLES MEMORY LOCATIONS PORTS SUBROUTINE LIBRARIES PARALLEL I/O CONTROL REGISTER (PIOC) COMMON PROGRAM INSTRUCTIONS

More information

Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis

Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis 1 1 Table of Contents 1 Table of Contents... 3 2 Overview... 5 3 Installation... 7 4 The CPU

More information

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu.

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu. Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu.tw Review Computers in mid 50 s Hardware was expensive

More information

MACHINE INSTRUCTIONS AND PROGRAMS

MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER OBJECTIVES In this chapter you will learn about: Machine instructions and program execution, including branching and subroutine call and return operations

More information

Addressing The problem. When & Where do we encounter Data? The concept of addressing data' in computations. The implications for our machine design(s)

Addressing The problem. When & Where do we encounter Data? The concept of addressing data' in computations. The implications for our machine design(s) Addressing The problem Objectives:- When & Where do we encounter Data? The concept of addressing data' in computations The implications for our machine design(s) Introducing the stack-machine concept Slide

More information

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc Other architectures Example. Accumulator-based machines A single register, called the accumulator, stores the operand before the operation, and stores the result after the operation. Load x # into acc

More information

l C-Programming l A real computer language l Data Representation l Everything goes down to bits and bytes l Machine representation Language

l C-Programming l A real computer language l Data Representation l Everything goes down to bits and bytes l Machine representation Language 198:211 Computer Architecture Topics: Processor Design Where are we now? C-Programming A real computer language Data Representation Everything goes down to bits and bytes Machine representation Language

More information

An Overview of Stack Architecture and the PSC 1000 Microprocessor

An Overview of Stack Architecture and the PSC 1000 Microprocessor An Overview of Stack Architecture and the PSC 1000 Microprocessor Introduction A stack is an important data handling structure used in computing. Specifically, a stack is a dynamic set of elements in which

More information

CHAPTER 4 MARIE: An Introduction to a Simple Computer

CHAPTER 4 MARIE: An Introduction to a Simple Computer CHAPTER 4 MARIE: An Introduction to a Simple Computer 4.1 Introduction 195 4.2 CPU Basics and Organization 195 4.2.1 The Registers 196 4.2.2 The ALU 197 4.2.3 The Control Unit 197 4.3 The Bus 197 4.4 Clocks

More information

An Introduction to Assembly Programming with the ARM 32-bit Processor Family

An Introduction to Assembly Programming with the ARM 32-bit Processor Family An Introduction to Assembly Programming with the ARM 32-bit Processor Family G. Agosta Politecnico di Milano December 3, 2011 Contents 1 Introduction 1 1.1 Prerequisites............................. 2

More information

LSN 2 Computer Processors

LSN 2 Computer Processors LSN 2 Computer Processors Department of Engineering Technology LSN 2 Computer Processors Microprocessors Design Instruction set Processor organization Processor performance Bandwidth Clock speed LSN 2

More information

LABORATORY MANUAL EE0310 MICROPROCESSOR & MICROCONTROLLER LAB

LABORATORY MANUAL EE0310 MICROPROCESSOR & MICROCONTROLLER LAB LABORATORY MANUAL EE0310 MICROPROCESSOR & MICROCONTROLLER LAB DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING FACULTY OF ENGINEERING & TECHNOLOGY SRM UNIVERSITY, Kattankulathur 603 203 1 LIST OF EXEPRIMENTS

More information

EC 362 Problem Set #2

EC 362 Problem Set #2 EC 362 Problem Set #2 1) Using Single Precision IEEE 754, what is FF28 0000? 2) Suppose the fraction enhanced of a processor is 40% and the speedup of the enhancement was tenfold. What is the overall speedup?

More information

CSE 141L Computer Architecture Lab Fall 2003. Lecture 2

CSE 141L Computer Architecture Lab Fall 2003. Lecture 2 CSE 141L Computer Architecture Lab Fall 2003 Lecture 2 Pramod V. Argade CSE141L: Computer Architecture Lab Instructor: TA: Readers: Pramod V. Argade (p2argade@cs.ucsd.edu) Office Hour: Tue./Thu. 9:30-10:30

More information

Microprocessor and Microcontroller Architecture

Microprocessor and Microcontroller Architecture Microprocessor and Microcontroller Architecture 1 Von Neumann Architecture Stored-Program Digital Computer Digital computation in ALU Programmable via set of standard instructions input memory output Internal

More information

IBCM: The Itty Bitty Computing Machine

IBCM: The Itty Bitty Computing Machine Chapter 1 IBCM: The Itty Bitty Computing Machine The child receives data through the sense organs; the child also has some inborn processing capacities otherwise it would not be able to learn but in addition,

More information

Graded ARM assembly language Examples

Graded ARM assembly language Examples Graded ARM assembly language Examples These examples have been created to help students with the basics of Keil s ARM development system. I am providing a series of examples that demonstrate the ARM s

More information

LC-3 Assembly Language

LC-3 Assembly Language LC-3 Assembly Language Programming and tips Textbook Chapter 7 CMPE12 Summer 2008 Assembly and Assembler Machine language - binary Assembly language - symbolic 0001110010000110 An assembler is a program

More information

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Chapter 2 Basic Structure of Computers Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Outline Functional Units Basic Operational Concepts Bus Structures Software

More information

TIMING DIAGRAM O 8085

TIMING DIAGRAM O 8085 5 TIMING DIAGRAM O 8085 5.1 INTRODUCTION Timing diagram is the display of initiation of read/write and transfer of data operations under the control of 3-status signals IO / M, S 1, and S 0. As the heartbeat

More information

An Introduction to the ARM 7 Architecture

An Introduction to the ARM 7 Architecture An Introduction to the ARM 7 Architecture Trevor Martin CEng, MIEE Technical Director This article gives an overview of the ARM 7 architecture and a description of its major features for a developer new

More information

plc numbers - 13.1 Encoded values; BCD and ASCII Error detection; parity, gray code and checksums

plc numbers - 13.1 Encoded values; BCD and ASCII Error detection; parity, gray code and checksums plc numbers - 3. Topics: Number bases; binary, octal, decimal, hexadecimal Binary calculations; s compliments, addition, subtraction and Boolean operations Encoded values; BCD and ASCII Error detection;

More information

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1 UNIT 22: PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1 This work covers part of outcome 2 of the Edexcel standard module. The material is

More information

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8 ECE Department Summer LECTURE #5: Number Systems EEL : Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz Decimal Number System: -Our standard number system is base, also

More information

Traditional IBM Mainframe Operating Principles

Traditional IBM Mainframe Operating Principles C H A P T E R 1 7 Traditional IBM Mainframe Operating Principles WHEN YOU FINISH READING THIS CHAPTER YOU SHOULD BE ABLE TO: Distinguish between an absolute address and a relative address. Briefly explain

More information

Keil C51 Cross Compiler

Keil C51 Cross Compiler Keil C51 Cross Compiler ANSI C Compiler Generates fast compact code for the 8051 and it s derivatives Advantages of C over Assembler Do not need to know the microcontroller instruction set Register allocation

More information

ARM Cortex-M3 Assembly Language

ARM Cortex-M3 Assembly Language ARM Cortex-M3 Assembly Language When a high level language compiler processes source code, it generates the assembly language translation of all of the high level code into a processor s specific set of

More information

The string of digits 101101 in the binary number system represents the quantity

The string of digits 101101 in the binary number system represents the quantity Data Representation Section 3.1 Data Types Registers contain either data or control information Control information is a bit or group of bits used to specify the sequence of command signals needed for

More information

Instruction Set Architecture. Datapath & Control. Instruction. LC-3 Overview: Memory and Registers. CIT 595 Spring 2010

Instruction Set Architecture. Datapath & Control. Instruction. LC-3 Overview: Memory and Registers. CIT 595 Spring 2010 Instruction Set Architecture Micro-architecture Datapath & Control CIT 595 Spring 2010 ISA =Programmer-visible components & operations Memory organization Address space -- how may locations can be addressed?

More information

Building A RISC Microcontroller in an FPGA

Building A RISC Microcontroller in an FPGA Building A RISC Microcontroller in an FPGA Name : Yap Zi He Course : 4 SEL Supervisor : PM Muhammad Mun im Ahmad Zabidi Introduction Reduce Instruction Set Computer (RISC) is a new trend on computer design.

More information

Comp 255Q - 1M: Computer Organization Lab #3 - Machine Language Programs for the PDP-8

Comp 255Q - 1M: Computer Organization Lab #3 - Machine Language Programs for the PDP-8 Comp 255Q - 1M: Computer Organization Lab #3 - Machine Language Programs for the PDP-8 January 22, 2013 Name: Grade /10 Introduction: In this lab you will write, test, and execute a number of simple PDP-8

More information

How To Write A Microsoft Microsoft 8D (Droid) (Program) (Powerbook) (I386) (Microsoft) (Donga) (Opera) And (Dungeo) (Dugeo

How To Write A Microsoft Microsoft 8D (Droid) (Program) (Powerbook) (I386) (Microsoft) (Donga) (Opera) And (Dungeo) (Dugeo CPU08 Central Processor Unit Reference Manual M68HC08 Microcontrollers CPU08RM Rev. 02/2006 freescale.com CPU08 Central Processor Unit Reference Manual To provide the most up-to-date information, the

More information

Introduction. What is an Operating System?

Introduction. What is an Operating System? Introduction What is an Operating System? 1 What is an Operating System? 2 Why is an Operating System Needed? 3 How Did They Develop? Historical Approach Affect of Architecture 4 Efficient Utilization

More information

The Little Man Computer

The Little Man Computer The Little Man Computer The Little Man Computer - an instructional model of von Neuman computer architecture John von Neuman (1903-1957) and Alan Turing (1912-1954) each independently laid foundation for

More information

5 Combinatorial Components. 5.0 Full adder. Full subtractor

5 Combinatorial Components. 5.0 Full adder. Full subtractor 5 Combatorial Components Use for data transformation, manipulation, terconnection, and for control: arithmetic operations - addition, subtraction, multiplication and division. logic operations - AND, OR,

More information

Unpacked BCD Arithmetic. BCD (ASCII) Arithmetic. Where and Why is BCD used? From the SQL Server Manual. Packed BCD, ASCII, Unpacked BCD

Unpacked BCD Arithmetic. BCD (ASCII) Arithmetic. Where and Why is BCD used? From the SQL Server Manual. Packed BCD, ASCII, Unpacked BCD BCD (ASCII) Arithmetic The Intel Instruction set can handle both packed (two digits per byte) and unpacked BCD (one decimal digit per byte) We will first look at unpacked BCD Unpacked BCD can be either

More information

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX Overview CISC Developments Over Twenty Years Classic CISC design: Digital VAX VAXÕs RISC successor: PRISM/Alpha IntelÕs ubiquitous 80x86 architecture Ð 8086 through the Pentium Pro (P6) RJS 2/3/97 Philosophy

More information

Chapter 2 Assemblers http://www.intel.com/multi-core/demos.htm

Chapter 2 Assemblers http://www.intel.com/multi-core/demos.htm Chapter 2 Assemblers http://www.intel.com/multi-core/demos.htm Source Program Assembler Object Code Linker Executable Code Loader 1 Outline 2.1 Basic Assembler Functions A simple SIC assembler Assembler

More information

Chapter 7 Assembly Language

Chapter 7 Assembly Language Chapter 7 Assembly Language Human-Readable Machine Language Computers like ones and zeros 0001110010000110 Humans like symbols ADD R6,R2,R6 increment index reg. Assembler is a program that turns symbols

More information

The AVR Microcontroller and C Compiler Co-Design Dr. Gaute Myklebust ATMEL Corporation ATMEL Development Center, Trondheim, Norway

The AVR Microcontroller and C Compiler Co-Design Dr. Gaute Myklebust ATMEL Corporation ATMEL Development Center, Trondheim, Norway The AVR Microcontroller and C Compiler Co-Design Dr. Gaute Myklebust ATMEL Corporation ATMEL Development Center, Trondheim, Norway Abstract High Level Languages (HLLs) are rapidly becoming the standard

More information

Central Processing Unit

Central Processing Unit Chapter 4 Central Processing Unit 1. CPU organization and operation flowchart 1.1. General concepts The primary function of the Central Processing Unit is to execute sequences of instructions representing

More information

EECS 427 RISC PROCESSOR

EECS 427 RISC PROCESSOR RISC PROCESSOR ISA FOR EECS 427 PROCESSOR ImmHi/ ImmLo/ OP Code Rdest OP Code Ext Rsrc Mnemonic Operands 15-12 11-8 7-4 3-0 Notes (* is Baseline) ADD Rsrc, Rdest 0000 Rdest 0101 Rsrc * ADDI Imm, Rdest

More information

High level code and machine code

High level code and machine code High level code and machine code Teacher s Notes Lesson Plan x Length 60 mins Specification Link 2.1.7/cde Programming languages Learning objective Students should be able to (a) explain the difference

More information

Let s put together a Manual Processor

Let s put together a Manual Processor Lecture 14 Let s put together a Manual Processor Hardware Lecture 14 Slide 1 The processor Inside every computer there is at least one processor which can take an instruction, some operands and produce

More information

Interrupts and the Timer Overflow Interrupts Huang Sections 6.1-6.4. What Happens When You Reset the HCS12?

Interrupts and the Timer Overflow Interrupts Huang Sections 6.1-6.4. What Happens When You Reset the HCS12? Interrupts and the Timer Overflow Interrupts Huang Sections 6.1-6.4 o Using the Timer Overflow Flag to interrupt a delay o Introduction to Interrupts o How to generate an interrupt when the timer overflows

More information

Call Subroutine (PC<15:0>) TOS, (W15)+2 W15 (PC<23:16>) TOS, Process data. Write to PC NOP NOP NOP NOP

Call Subroutine (PC<15:0>) TOS, (W15)+2 W15 (PC<23:16>) TOS, Process data. Write to PC NOP NOP NOP NOP Section 3. Descriptions CALL Call Subroutine Syntax: {label:} CALL lit23 CALL.S Operands: lit23 [0... 8388606] (PC)+4 PC, (PC) TOS, (W15)+2 W15 (PC) TOS, (W15)+2 W15 lit23 PC, NOP Register.

More information

Intel 8086 architecture

Intel 8086 architecture Intel 8086 architecture Today we ll take a look at Intel s 8086, which is one of the oldest and yet most prevalent processor architectures around. We ll make many comparisons between the MIPS and 8086

More information

Z80 Microprocessors Z80 CPU. User Manual UM008006-0714. Copyright 2014 Zilog, Inc. All rights reserved. www.zilog.com

Z80 Microprocessors Z80 CPU. User Manual UM008006-0714. Copyright 2014 Zilog, Inc. All rights reserved. www.zilog.com Z80 Microprocessors Z80 CPU UM008006-0714 Copyright 2014 Zilog, Inc. All rights reserved. www.zilog.com ii Warning: DO NOT USE THIS PRODUCT IN LIFE SUPPORT SYSTEMS. LIFE SUPPORT POLICY ZILOG S PRODUCTS

More information

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC6504 - Microprocessor & Microcontroller Year/Sem : II/IV

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC6504 - Microprocessor & Microcontroller Year/Sem : II/IV DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC6504 - Microprocessor & Microcontroller Year/Sem : II/IV UNIT I THE 8086 MICROPROCESSOR 1. What is the purpose of segment registers

More information