ChapterM2 - ELEC 2220 Computer Systems Chapter 2....

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
1 ELEC 2220 Computer Systems Chapter 2 Programming Mode Chapter 2. Programming Model ELEC2220 Auburn University Soo-Young Lee Department of Electrical and Computer Engineering Auburn University 2. Programming Model: Chapter Objectives • Registers and Pointer • Memory Map • Effective Address •D i r e c t i v e s • Addressing Modes ELEC2220 Auburn University
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 2. Programming Model M68HC12 ELEC2220 Auburn University 2. Programming Model MC9S12C Æ single-chip mode ELEC2220 Auburn University
Background image of page 2
3 2. Programming Model (M68HC12) Most instructions move data ( operand ) from one location (register, memory, I/O port, etc.) to another with/without a certain operation on it. 2-1. Registers & Pointer • General-purpose registers AB D 15 8 7 0 Accumulators (data, offset) Index Register (data, index) X ELEC2220 Auburn University – Each register has its own designated function. Index Register Stack Pointer (points to top of stack) Program Counter (points to next instruction to fetch) Y SP PC 2-1. Registers and Pointers • Condition Codes Register 7 6 5 4 3 2 1 0 S X H I N Z V C S: Stop Disable X: Interrupt Mask H: Half Carry I : Interrupt Mask N: Negative ELEC2220 Auburn University Z: Zero V: Overflow C: Carry
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 2-2. Memory Map • MC9S12C32 (normal single-chip) $0000 $03FF Control Registers: 1 Kbytes $0800 $0FFF $8000 RAM: 2 Kbytes Data storage and stack ELEC2220 Auburn University $FF00 $FFFF $FEFF Program code and constant data FLASH EEPROM: 32 Kbytes Interrupt vectors 2-3. Addressing Modes • Instruction – Specifies a certain operation to be performed, often on data elements involved. • Operand – Data elements involved in an instruction are called operands . Big Endian : higher byte at lower address • Effective Address (EA) – The location of an operand in the memory is referred to as effective address .
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 04/22/2010.

Page1 / 12

ChapterM2 - ELEC 2220 Computer Systems Chapter 2....

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online