instruction 1 Fri Oct 13 13:05:

Size: px
Start display at page:

Download "instruction 1 Fri Oct 13 13:05:"

Transcription

1 instruction Fri Oct :0:0. Introduction SECTION INSTRUCTION SET This section describes the aressing modes and instruction types.. Aressing Modes The CPU uses eight aressing modes for flexibility in accessing data. The aressing modes define the manner in which the CPU finds the data required to execute an instruction. The eight aressing modes are: Inherent Immediate Direct Extended Indexed, no oset Indexed, -bit oset Indexed, -bit oset Relative.. Inherent Inherent instructions are those that have no operand, such as return from interrupt (RTI) and stop (STOP). Some of the inherent instructions act on data in the CPU registers, such as set carry flag (SEC) and increment accumulator (INCA). Inherent instructions require no operand aress and are one byte long... Immediate Immediate instructions are those that contain a value to be used in an operation with the value in the accumulator or index register. Immediate instructions require no operand aress and are two bytes long. The opcode is the first byte, and the immediate data value is the second byte. 0 0 MCHC0CA INSTRUCTION SET MOTOROLA -

2 instruction Fri Oct :0: Direct Direct instructions can access any of the first memory aresses with two bytes. The first byte is the opcode, and the second is the low byte of the operand aress. In direct aressing, the CPU automatically uses $00 as the high byte of the operand aress... Extended Extended instructions use three bytes and can access any aress in memory. The first byte is the opcode; the second and third bytes are the high and low bytes of the operand aress. When using the Motorola assembler, the programmer does not need to specify whether an instruction is direct or extended. The assembler automatically selects the shortest form of the instruction... Indexed, No Oset Indexed instructions with no oset are -byte instructions that can access data with variable aresses within the first memory locations. The index register contains the low byte of the eective aress of the operand. The CPU automatically uses $00 as the high byte, so these instructions can aress locations $0000 $00FF. Indexed, no oset instructions are often used to move a pointer through a table or to hold the aress of a frequently used RAM or I/O location... Indexed, -Bit Oset Indexed, -bit oset instructions are -byte instructions that can access data with variable aresses within the first memory locations. The CPU as the unsigned byte in the index register to the unsigned byte following the opcode. The sum is the eective aress of the operand. These instructions can access locations $0000 $0FE. Indexed -bit oset instructions are useful for selecting the kth element in an n-element table. The table can begin anywhere within the first memory locations and could extend as far as location 0 ($0FE). The k value is typically in the index register, and the aress of the beginning of the table is in the byte following the opcode. MOTOROLA INSTRUCTION SET MCHC0CA -

3 instruction Fri Oct :0:0.. Indexed, -Bit Oset Indexed, -bit oset instructions are -byte instructions that can access data with variable aresses at any location in memory. The CPU as the unsigned byte in the index register to the two unsigned bytes following the opcode. The sum is the eective aress of the operand. The first byte after the opcode is the high byte of the -bit oset; the second byte is the low byte of the oset. Indexed, -bit oset instructions are useful for selecting the kth element in an n-element table anywhere in memory. As with direct and extended aressing, the Motorola assembler determines the shortest form of indexed aressing... Relative Relative aressing is only for branch instructions. If the branch condition is true, the CPU finds the eective branch destination by aing the signed byte following the opcode to the contents of the program counter. If the branch condition is not true, the CPU goes to the next instruction. The oset is a signed, two s complement byte that gives a branching range of to + bytes from the aress of the next location after the branch instruction. When using the Motorola assembler, the programmer does not need to calculate the oset, because the assembler determines the proper oset and verifies that it is within the span of the branch.. Instruction Types The MCU instructions fall into the following five categories: Register/memory instructions Read-modify-write instructions Jump/branch instructions Bit manipulation instructions Control instructions 0 0 MCHC0CA INSTRUCTION SET MOTOROLA -

4 instruction Fri Oct :0: Register/Memory Instructions These instructions operate on CPU registers and memory locations. Most of them use two operands. One operand is in either the accumulator or the index register. The CPU finds the other operand in memory... Read-Modify-Write Instructions Table -. Register/Memory Instructions Instruction A Memory Byte and Carry Bit to Accumulator A Memory Byte to Accumulator AND Memory Byte with Accumulator Bit Test Accumulator Compare Accumulator Compare Index Register with Memory Byte EXCLUSIVE OR Accumulator with Memory Byte Unconditional Jump Jump to Subroutine Load Accumulator with Memory Byte Load Index Register with Memory Byte Multiply OR Accumulator with Memory Byte Subtract Memory Byte and Carry Bit from Accumulator Store Accumulator in Memory Store Index Register in Memory Subtract Memory Byte from Accumulator Mnemonic These instructions read a memory location or a register, modify its contents, and write the modified value back to the memory location or to the register. ADC ADD AND BIT CMP CPX EOR JMP JSR LDA LDX MUL ORA SBC STA STX SUB MOTOROLA INSTRUCTION SET MCHC0CA -

5 instruction Fri Oct :0:0 NOTE Do not use read-modify-write instructions on write-only registers... Jump/Branch Instructions Table -. Read-Modify-Write Instructions Instruction Arithmetic Shift Left (Same as LSL) Arithmetic Shift Right Mnemonic NOTES:. Unlike other read-modify-write instructions, BCLR and BSET use only direct aressing.. TST is an exception to the read-modify-write sequence because it does not write a replacement value. Jump instructions allow the CPU to interrupt the normal sequence of the program counter. The unconditional jump instruction (JMP) and the jump to subroutine instruction (JSR) have no register operand. Branch instructions allow the CPU to interrupt the normal sequence of the program counter when a test condition is met. If the test condition is not met, the branch is not performed. The BRCLR and BRSET instructions cause a branch based on the state of any readable bit in the first memory locations. These -byte instructions use a combination of direct aressing and relative aressing. The direct aress of the ASL ASR Clear Bit BCLR () Set Bit BSET () Clear Register Complement (One s Complement) Decrement Increment Logical Shift Left (Same as ASL) Logical Shift Right Negate (Two s Complement) Rotate Left through Carry Bit Rotate Right through Carry Bit CLR COM DEC INC LSL LSR NEG ROL ROR Test for Negative or Zero TST () 0 0 MCHC0CA INSTRUCTION SET MOTOROLA -

6 instruction Fri Oct :0:0 0 0 byte to be tested is in the byte following the opcode. The third byte is the signed oset byte. The CPU finds the eective branch destination by aing the third byte to the program counter if the specified bit tests true. The bit to be tested and its condition (set or clear) is part of the opcode. The span of branching is from to + from the aress of the next location after the branch instruction. The CPU also transfers the tested bit to the carry/borrow bit of the condition code register. Table -. Jump and Branch Instructions Instruction Branch if Carry Bit Clear Branch if Carry Bit Set Branch if Equal Branch if Half-Carry Bit Clear Branch if Half-Carry Bit Set Branch if Higher Branch if Higher or Same Branch if IRQ Pin High Branch if IRQ Pin Low Branch if Lower Branch if Lower or Same Branch if Interrupt Mask Clear Branch if Minus Branch if Interrupt Mask Set Branch if Not Equal Branch if Plus Branch Always Branch if Bit Clear Branch Never Branch if Bit Set Branch to Subroutine Unconditional Jump Jump to Subroutine Mnemonic BCC BCS BEQ BHCC BHCS BHI BHS BIH BIL BLO BLS BMC BMI BMS BNE BPL BRA BRCLR BRN BRSET BSR JMP JSR MOTOROLA INSTRUCTION SET MCHC0CA -

7 instruction Fri Oct :0:0.. Bit Manipulation Instructions The CPU can set or clear any writable bit in the first bytes of memory. Port registers, port data direction registers, timer registers, and on-chip RAM locations are in the first bytes of memory. The CPU can also test and branch based on the state of any bit in any of the first memory locations. Table -. Bit Manipulation Instructions Bit Clear Branch if Bit Clear Branch if Bit Set Bit Set Instruction NOTE Mnemonic BCLR BRCLR BRSET BSET Avoid using bit clear and bit set instructions in registers containing write-only bits, which may be changed inadvertently. 0.. Control Instructions These instructions act on CPU registers and control CPU operation during program execution. Table -. Control Instructions Clear Carry Bit Instruction Clear Interrupt Mask No Operation Reset Stack Pointer Return from Interrupt Return from Subroutine Set Carry Bit Set Interrupt Mask Stop Oscillator and Enable IRQ Pin Software Interrupt Transfer Accumulator to Index Register Transfer Index Register to Accumulator Stop CPU Clock and Enable Interrupts Mnemonic CLC CLI NOP RSP RTI RTS SEC SEI STOP SWI TAX TXA WAIT 0 MCHC0CA INSTRUCTION SET MOTOROLA -

8 instruction Fri Oct :0: Instruction Set Summary Source Form ADC #opr ADC opr ADC opr ADC opr,x ADC opr,x ADC,X ADD #opr ADD opr ADD opr ADD opr,x ADD opr,x ADD,X AND #opr AND opr AND opr AND opr,x AND opr,x AND,X ASL opr ASLA ASLX ASL opr,x ASL,X ASR opr ASRA ASRX ASR opr,x ASR,X Table - is an alphabetical list of all MHC0 instructions and shows the eect of each instruction on the condition code register. Operation Table -. Instruction Set Summary Description Eect on CCR H I N Z C A with Carry A (A) + (M) + (C) A without Carry A (A) + (M) Logical AND A (A) (M) Arithmetic Shift Left (Same as LSL) C 0 Arithmetic Shift Right C b b0 BCC rel Branch if Carry Bit Clear PC (PC) + + rel? C = 0 REL rr BCLR n opr Clear Bit n Mn 0 Aress Mode (b0) (b) (b) (b) (b) (b) (b) (b) BCS rel Branch if Carry Bit Set (Same as BLO) PC (PC) + + rel? C = REL rr BEQ rel Branch if Equal PC (PC) + + rel? Z = REL rr BHCC rel Branch if Half-Carry Bit Clear PC (PC) + + rel? H = 0 REL rr BHCS rel Branch if Half-Carry Bit Set PC (PC) + + rel? H = REL rr b b0 Opcode A B C D E F AB BB CB DB EB FB A B C D E F B D F Operand ee ee ee Cycles MOTOROLA INSTRUCTION SET MCHC0CA -

9 instruction Fri Oct :0:0 Source Form BHI rel Branch if Higher PC (PC) + + rel? C Z = 0 REL rr BHS rel Branch if Higher or Same PC (PC) + + rel? C = 0 REL rr BIH rel Branch if IRQ Pin High PC (PC) + + rel? IRQ = REL F rr BIL rel Branch if IRQ Pin Low PC (PC) + + rel? IRQ = 0 REL E rr BIT #opr BIT opr BIT opr BIT opr,x BIT opr,x BIT,X Table -. Instruction Set Summary (Continued) Operation Description Eect on CCR H I N Z C Bit Test Accumulator with Memory Byte (A) (M) BLO rel Branch if Lower (Same as BCS) PC (PC) + + rel? C = REL rr BLS rel Branch if Lower or Same PC (PC) + + rel? C Z = REL rr BMC rel Branch if Interrupt Mask Clear PC (PC) + + rel? I = 0 REL C rr BMI rel Branch if Minus PC (PC) + + rel? N = REL B rr BMS rel Branch if Interrupt Mask Set PC (PC) + + rel? I = REL D rr BNE rel Branch if Not Equal PC (PC) + + rel? Z = 0 REL rr BPL rel Branch if Plus PC (PC) + + rel? N = 0 REL A rr BRA rel Branch Always PC (PC) + + rel? = REL 0 rr BRCLR n opr rel Branch if Bit n clear PC (PC) + + rel? Mn = 0 (b0) (b) (b) (b) (b) (b) (b) (b) BRN rel Branch Never PC (PC) + + rel? = 0 REL rr BRSET n opr rel Branch if Bit n Set PC (PC) + + rel? Mn = BSET n opr Set Bit n Mn Aress Mode (b0) (b) (b) (b) (b) (b) (b) (b) (b0) (b) (b) (b) (b) (b) (b) (b) Opcode A B C D E F B 0D 0F A 0C 0E 0 A C E Operand ee rr rr rr rr rr rr rr rr rr rr rr rr rr rr rr rr Cycles 0 0 MCHC0CA INSTRUCTION SET MOTOROLA -

10 instruction 0 Fri Oct :0:0 0 0 Source Form BSR rel Branch to Subroutine PC (PC) + ; push (PCL) SP (SP) ; push (PCH) SP (SP) PC (PC) + rel REL AD rr CLC Clear Carry Bit C 0 0 CLI Clear Interrupt Mask I 0 0 A CLR opr CLRA CLRX CLR opr,x CLR,X CMP #opr CMP opr CMP opr CMP opr,x CMP opr,x CMP,X COM opr COMA COMX COM opr,x COM,X CPX #opr CPX opr CPX opr CPX opr,x CPX opr,x CPX,X DEC opr DECA DECX DEC opr,x DEC,X EOR #opr EOR opr EOR opr EOR opr,x EOR opr,x EOR,X INC opr INCA INCX INC opr,x INC,X JMP opr JMP opr JMP opr,x JMP opr,x JMP,X Clear Byte M $00 A $00 X $00 M $00 M $00 0 Compare Accumulator with Memory Byte (A) (M) Complement Byte (One s Complement) M (M) = $FF (M) A (A) = $FF (A) X (X) = $FF (X) M (M) = $FF (M) M (M) = $FF (M) Compare Index Register with Memory Byte (X) (M) Decrement Byte M (M) A (A) X (X) M (M) M (M) EXCLUSIVE OR Accumulator with Memory Byte A (A) (M) Increment Byte Table -. Instruction Set Summary (Continued) Operation Description M (M) + A (A) + X (X) + M (M) + M (M) + Eect on CCR H I N Z C Unconditional Jump PC Jump Aress Aress Mode Opcode F F F F F A B C D E F A B C D E F A A A A A A B C D E F C C C C C BC CC DC EC FC Operand ee ee ee ee Cycles MOTOROLA INSTRUCTION SET MCHC0CA -0

11 instruction Fri Oct :0:0 Source Form JSR opr JSR opr JSR opr,x JSR opr,x JSR,X LDA #opr LDA opr LDA opr LDA opr,x LDA opr,x LDA,X LDX #opr LDX opr LDX opr LDX opr,x LDX opr,x LDX,X LSL opr LSLA LSLX LSL opr,x LSL,X LSR opr LSRA LSRX LSR opr,x LSR,X Jump to Subroutine PC (PC) + n (n =,, or ) Push (PCL); SP (SP) Push (PCH); SP (SP) PC Eective Aress Load Accumulator with Memory Byte A (M) Load Index Register with Memory Byte X (M) Logical Shift Left (Same as ASL) C 0 b b0 Logical Shift Right 0 C 0 b b0 MUL Unsigned Multiply X : A (X) (A) 0 0 NEG opr NEGA NEGX NEG opr,x NEG,X Negate Byte (Two s Complement) M (M) = $00 (M) A (A) = $00 (A) X (X) = $00 (X) M (M) = $00 (M) M (M) = $00 (M) NOP No Operation D ORA #opr ORA opr ORA opr ORA opr,x ORA opr,x ORA,X ROL opr ROLA ROLX ROL opr,x ROL,X Table -. Instruction Set Summary (Continued) Operation Description Eect on CCR H I N Z C Logical OR Accumulator with Memory A (A) (M) Rotate Byte Left through Carry Bit C b b0 Aress Mode Opcode BD CD DD ED FD A B C D E F AE BE CE DE EE FE AA BA CA DA EA FA Operand ee ee ee ee Cycles 0 0 MCHC0CA INSTRUCTION SET MOTOROLA -

12 instruction Fri Oct :0:0 0 0 ROR opr RORA RORX ROR opr,x ROR,X Rotate Byte Right through Carry Bit C b b0 RSP Reset Stack Pointer SP $00FF C RTI RTS SBC #opr SBC opr SBC opr SBC opr,x SBC opr,x SBC,X Return from Interrupt Return from Subroutine Subtract Memory Byte and Carry Bit from Accumulator SP (SP) + ; Pull (CCR) SP (SP) + ; Pull (A) SP (SP) + ; Pull (X) SP (SP) + ; Pull (PCH) SP (SP) + ; Pull (PCL) SP (SP) + ; Pull (PCH) SP (SP) + ; Pull (PCL) A (A) (M) (C) 0 SEC Set Carry Bit C SEI Set Interrupt Mask I B STA opr STA opr STA opr,x STA opr,x STA,X Store Accumulator in Memory M (A) STOP Stop Oscillator and Enable IRQ Pin 0 E STX opr STX opr STX opr,x STX opr,x STX,X SUB #opr SUB opr SUB opr SUB opr,x SUB opr,x SUB,X SWI Source Form Store Index Register In Memory M (X) Subtract Memory Byte from Accumulator A (A) (M) Software Interrupt Table -. Instruction Set Summary (Continued) Operation Description Eect on CCR H I N Z C A B C D E F B C D E F BF CF DF EF FF A0 B0 C0 D0 E0 F0 ee ee ee ee PC (PC) + ; Push (PCL) SP (SP) ; Push (PCH) SP (SP) ; Push (X) SP (SP) ; Push (A) SP (SP) ; Push (CCR) SP (SP) ; I PCH Interrupt Vector High Byte PCL Interrupt Vector Low Byte 0 TAX Transfer Accumulator to Index Register X (A) Aress Mode Opcode Operand Cycles MOTOROLA INSTRUCTION SET MCHC0CA -

13 instruction Fri Oct :0:0 Source Form TST opr TSTA TSTX TST opr,x TST,X Table -. Instruction Set Summary (Continued) Operation Description Eect on CCR H I N Z C Test Memory Byte for Negative or Zero (M) $00 TXA Transfer Index Register to Accumulator A (X) F WAIT Stop CPU Clock and Enable Interrupts 0 F Aress Mode A Accumulator opr Operand (one or two bytes) C Carry/borrow flag PC Program counter CCR Condition code register PCH Program counter high byte Direct aress of operand PCL Program counter low byte rr Direct aress of operand and relative oset of branch instruction REL Relative aressing mode Direct aressing mode rel Relative program counter oset byte ee High and low bytes of oset in indexed, -bit oset aressing rr Relative program counter oset byte Extended aressing mode SP Stack pointer Oset byte in indexed, -bit oset aressing X Index register H Half-carry flag Z Zero flag High and low bytes of operand aress in extended aressing # Immediate value I Interrupt mask Logical AND Immediate operand byte Logical OR Immediate aressing mode Logical EXCLUSIVE OR Inherent aressing mode ( ) Contents of Indexed, no oset aressing mode ( ) Negation (two s complement) Indexed, -bit oset aressing mode Loaded with Indexed, -bit oset aressing mode? If M Memory location : Concatenated with N Negative flag Set or cleared n Any bit Not aected Opcode D D D D D Operand Cycles 0 0 MCHC0CA INSTRUCTION SET MOTOROLA -

14 instruction Fri Oct :0:0 0 0 Table -. Opcode Map Bit Manipulation Branch Read-Modify-Write Control Register/Memory REL MSB 0 A B C D E F MSB LSB LSB 0 SUB SUB SUB SUB SUB SUB RTI NEG NEG NEGX NEGA NEG BRA REL BSET0 BRSET0 0 CMP CMP CMP CMP CMP CMP RTS BRN REL BCLR0 BRCLR0 SBC SBC SBC SBC SBC SBC MUL BHI REL BSET BRSET 0 CPX CPX CPX CPX CPX CPX SWI COM COM COMX COMA COM BLS REL BCLR BRCLR AND AND AND AND AND AND LSR LSR LSRX LSRA LSR BCC REL BSET BRSET BIT BIT BIT BIT BIT BIT BCS/BLO REL BCLR BRCLR LDA LDA LDA LDA LDA LDA ROR ROR RORX RORA ROR BNE REL BSET BRSET STA STA STA STA STA TAX ASR ASR ASRX ASRA ASR BEQ REL BCLR BRCLR MOTOROLA INSTRUCTION SET MCHC0CA - ASLX/LSLX ASLA/LSLA EOR EOR EOR EOR EOR EOR CLC ASL/LSL ASL/LSL ASL/LSL BHCC REL BSET BRSET ADC ADC ADC ADC ADC ADC SEC ROL ROL ROLX ROLA ROL BHCS REL BCLR BRCLR A ORA ORA ORA ORA ORA ORA CLI DEC DEC DECX DECA DEC BPL REL BSET BRSET A B ADD ADD ADD ADD ADD ADD SEI BMI REL BCLR BRCLR B C JMP JMP JMP JMP JMP RSP INC INC INCX INCA INC BMC REL BSET BRSET C D JSR JSR JSR JSR JSR BSR REL NOP TST TST TSTX TSTA TST BMS REL BCLR BRCLR D E LDX LDX LDX LDX LDX LDX STOP BIL REL BSET BRSET E F STX STX STX STX STX TXA WAIT CLR CLR CLRX CLRA CLR BIH REL BCLR BRCLR F 0 MSB of Opcode in Hexadecimal MSB LSB Number of Cycles Opcode Mnemonic Number of Bytes/Aressing Mode BRSET0 LSB of Opcode in Hexadecimal 0 = Inherent REL = Relative = Immediate = Indexed, No Oset = Direct = Indexed, -Bit Oset = Extended = Indexed, -Bit Oset

7.5 HCS08 Instruction Set Summary

7.5 HCS08 Instruction Set Summary hapter 7 entral Processor Unit (S08PUV) 7. HS08 Instruction Set Summary Instruction Set Summary Nomenclature The nomenclature listed here is used in the instruction descriptions in Table 7-. Operators

More information

Table 1: Mnemonics Operations Dictionary. Add Accumulators Add B to Y. Add with carry to B. Add Memory to B. Add 16-bit to D And B with Memory

Table 1: Mnemonics Operations Dictionary. Add Accumulators Add B to Y. Add with carry to B. Add Memory to B. Add 16-bit to D And B with Memory Table 1: Mnemonics s Dictionary ABA ABX ABY ADCA ADCB ADDA ADDB ADDD ANDA ANDB ASL ASLA ASLB ASLD ASR ASRA ASRB BCC BCLR BCS BEQ BGE BGT BHI BHS BITA BITB BLE BLO BLS BLT Add Accumulators Add B to X Add

More information

The 6502 Instruction Set

The 6502 Instruction Set The 6502 Instruction Set Load and Store Group LDA Load Accumulator N,Z LDX Load X Register N,Z LDY Load Y Register N,Z STA Store Accumulator STX Store X Register STY Store Y Register Arithmetic Group ADC

More information

COSC 243. Instruction Sets And Addressing Modes. Lecture 7&8 Instruction Sets and Addressing Modes. COSC 243 (Computer Architecture)

COSC 243. Instruction Sets And Addressing Modes. Lecture 7&8 Instruction Sets and Addressing Modes. COSC 243 (Computer Architecture) COSC 243 Instruction Sets And Addressing Modes 1 Overview This Lecture Source Chapters 12 & 13 (10 th editition) Textbook uses x86 and ARM (we use 6502) Next 2 Lectures Assembly language programming 2

More information

CPU08RM/AD REV 3 8M68HC08M. CPU08 Central Processor Unit. Reference Manual

CPU08RM/AD REV 3 8M68HC08M. CPU08 Central Processor Unit. Reference Manual CPU08RM/AD REV 3 68HC08M6 HC08M68HC 8M68HC08M CPU08 Central Processor Unit Reference Manual blank CPU08 Central Processor Unit Reference Manual Motorola reserves the right to make changes without further

More information

Programming the Motorola MC68HC11 Microcontroller

Programming the Motorola MC68HC11 Microcontroller Programming the Motorola MC68HC11 Microcontroller COMMON PROGRAM INSTRUCTIONS WITH EXAMPLES aba Add register B to register A Similar commands are abx aby aba add the value in register B to the value in

More information

0b) [2] Can you name 2 people form technical support services (stockroom)?

0b) [2] Can you name 2 people form technical support services (stockroom)? ECE 372 1 st Midterm ECE 372 Midterm Exam Fall 2004 In this exam only pencil/pen are allowed. Please write your name on the front page. If you unstaple the papers write your name on the loose papers also.

More information

The Motorola 68HC11 Instruc5on Set

The Motorola 68HC11 Instruc5on Set The Motorola 68HC11 Instruc5on Set Some Defini5ons A, B * accumulators A and B D * double accumulator (A + B) IX, IY * index registers X and Y SP * stack pointer M * some memory loca5on opr * an operand

More information

A. CPU INSTRUCTION SET SUMMARY

A. CPU INSTRUCTION SET SUMMARY A. CPU INSTRUCTION SET SUMMARY This appendix summarizes the CPU instruction set. Table A-1 is a matrix of CPU instructions and addressing modes arranged by operation code. Table A-2 lists the CPU instruction

More information

MC68705P3 Bootstrap ROM

MC68705P3 Bootstrap ROM MC68705P3 Bootstrap ROM ;This is a listing of the Bootstrap ROM which resides in Motorola's MC68705P3 single chip ;micros. Its sole purpose is to program its own EPROM by copying the data from an external

More information

ECET Chapter 2, Part 3 of 3

ECET Chapter 2, Part 3 of 3 ECET 310-001 Chapter 2, Part 3 of 3 W. Barnes, 9/2006, rev d. 10/07 Ref. Huang, Han-Way, The HCS12/9S12: An Introduction to Software and Hardware Interfacing, Thomson/Delmar. In This Set of Slides: 1.

More information

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers o How to disassemble an MC9S12 instruction sequence o Binary numbers are a code and represent what the programmer intends for the

More information

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers o How to disassemble an MC9S12 instruction sequence o Binary numbers are a code and represent what the programmer intends for the

More information

; Once Initialized, monitor character in calls to CN05 ; set carry for input, to be tested CN35 C SEC

; Once Initialized, monitor character in calls to CN05 ; set carry for input, to be tested CN35 C SEC // // Serialcode.s // 256 Byte Prom P8 and 512 Byte PROM P9A (second version) for Apple II Serial Card // P9A differs from P9 by adding RTS/ACK software flow control to output and // by removing batch

More information

MC9S12 Assembler Directives A Summary of MC9S12 Instructions Disassembly of MC9S12 op codes. Summary of HCS12 addressing modes ADDRESSING MODES

MC9S12 Assembler Directives A Summary of MC9S12 Instructions Disassembly of MC9S12 op codes. Summary of HCS12 addressing modes ADDRESSING MODES MC9S12 Assembler Directives A Summary of MC9S12 Instructions Disassembly of MC9S12 op codes o Review of Addressing Modes o Which branch instruction to use (signed vs unsigned) o Using X and Y registers

More information

68HC11 PROGRAMMER'S MODEL

68HC11 PROGRAMMER'S MODEL 8H11 PROGRMMER'S MODEL s (,, and D) s and are general-purpose 8-bit accumulators used to hold operands and results of arithmetic calculations or data manipulations. Some instructions treat the combination

More information

INSTRUCTION SET AND EXECUTION

INSTRUCTION SET AND EXECUTION SECTION 6 INSTRUCTION SET AND EXECUTION Fetch F1 F2 F3 F3e F4 F5 F6 Decode D1 D2 D3 D3e D4 D5 Execute E1 E2 E3 E3e E4 Instruction Cycle: 1 2 3 4 5 6 7 MOTOROLA INSTRUCTION SET AND EXECUTION 6-1 SECTION

More information

Computers and Microprocessors

Computers and Microprocessors Computers and Microprocessors - Introduction Over the last few decades, computers, and microprocessors in particular, have begun to have an enormous impact upon our lives. In early stages of development,

More information

MC68705U3 Bootstrap ROM

MC68705U3 Bootstrap ROM MC68705U3 Bootstrap ROM ;This is a listing of the Bootstrap ROM which resides in Motorola's MC68705U3 single chip ;micros. Its sole purpose is to program its own EPROM by copying the data from an external

More information

Regarding the change of names mentioned in the document, such as Mitsubishi Electric and Mitsubishi XX, to Renesas Technology Corp.

Regarding the change of names mentioned in the document, such as Mitsubishi Electric and Mitsubishi XX, to Renesas Technology Corp. To all our customers Regarding the change of names mentioned in the document, such as Mitsubishi Electric and Mitsubishi XX, to Renesas Technology Corp. The semiconductor operations of Hitachi and Mitsubishi

More information

Lecture 7 Assembly Programming: Shift & Logical

Lecture 7 Assembly Programming: Shift & Logical CPE 390: Microprocessor Systems Fall 2017 Lecture 7 Assembly Programming: Shift & Logical Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030

More information

SECTION 6 CENTRAL PROCESSING UNIT

SECTION 6 CENTRAL PROCESSING UNIT SECTION 6 CENTRAL PROCESSING UNIT This section discusses the M68HC11 central processing unit (CPU), which is responsible for executing all software instructions in their programmed sequence. The M68HC11

More information

EE 3170 Microcontroller Applications

EE 3170 Microcontroller Applications EE 37 Microcontroller Applications Lecture 8: Instruction Subset & Machine Language: A Brief Tour of the 68HC Instruction Set - Miller 2.4 & 5.2-5.3 & Appendix A Based on slides for ECE37 by Profs. Davis,

More information

Chapter 7 Central Processor Unit (S08CPUV2)

Chapter 7 Central Processor Unit (S08CPUV2) Chapter 7 Central Processor Unit (S08CPUV2) 7.1 Introduction This section provides summary information about the registers, addressing modes, and instruction set of the CPU of the HCS08 Family. For a more

More information

AN1742. Programming the 68HC705J1A In-Circuit By Chris Falk CSG Product Engineering Austin, Texas. Introduction. Overview

AN1742. Programming the 68HC705J1A In-Circuit By Chris Falk CSG Product Engineering Austin, Texas. Introduction. Overview Order this document by /D Programming the 68HC705J1A In-Circuit By Chris Falk CSG Product Engineering Austin, Texas Introduction Overview This application note describes how a user can program the 68HC705J1A

More information

Motorola 6809 and Hitachi 6309 Programmer s Reference

Motorola 6809 and Hitachi 6309 Programmer s Reference Motorola 6809 and Hitachi 6309 Programmer s Reference 2009 by Darren Atkinson A note about cycle counts The MPU cycle counts listed throughout this document will sometimes show two different values separated

More information

2. Arithmetic Instructions addition, subtraction, multiplication, divison (HCS12 Core Users Guide, Sections 4.3.4, and ).

2. Arithmetic Instructions addition, subtraction, multiplication, divison (HCS12 Core Users Guide, Sections 4.3.4, and ). AS12 Assembler Directives A Summary of 9S12 instructions Disassembly of 9S12 op codes Huang Section 1.8, Chapter 2 MC9S12 V1.5 Core User Guide Version 1.2, Section 12 o A labels is a name assigned the

More information

ECE331 Handout 3- ASM Instructions, Address Modes and Directives

ECE331 Handout 3- ASM Instructions, Address Modes and Directives ECE331 Handout 3- ASM Instructions, Address Modes and Directives ASM Instructions Functional Instruction Groups Data Transfer/Manipulation Arithmetic Logic & Bit Operations Data Test Branch Function Call

More information

Example Programs for 6502 Microprocessor Kit

Example Programs for 6502 Microprocessor Kit Example Programs for 6502 Microprocessor Kit 0001 0000 0002 0000 GPIO1.EQU $8000 0003 0000 0004 0000 0005 0200.ORG $200 0006 0200 0007 0200 A5 00 LDA $0 0008 0202 8D 00 80 STA $GPIO1 0009 0205 00 BRK 0010

More information

Addressing Mode Description Addressing Mode Source Format Abbrev. Description

Addressing Mode Description Addressing Mode Source Format Abbrev. Description Addressing Mode Description Addressing Mode Source Format Abbrev. Description Inherent INST (no operands) INH Operands (if any) are in CPU registers Immediate INST #opr8i or INST #opr16i IMM Operand is

More information

ARM Assembly Language. Programming

ARM Assembly Language. Programming Outline: ARM Assembly Language the ARM instruction set writing simple programs examples Programming hands-on: writing simple ARM assembly programs 2005 PEVE IT Unit ARM System Design ARM assembly language

More information

Lecture 6 Assembly Programming: Branch & Iteration

Lecture 6 Assembly Programming: Branch & Iteration CPE 390: Microprocessor Systems Spring 2018 Lecture 6 Assembly Programming: Branch & Iteration Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ

More information

Chapter 2: HCS12 Assembly Programming. EE383: Introduction to Embedded Systems University of Kentucky. Samir Rawashdeh

Chapter 2: HCS12 Assembly Programming. EE383: Introduction to Embedded Systems University of Kentucky. Samir Rawashdeh Chapter 2: HCS12 Assembly Programming EE383: Introduction to Embedded Systems University of Kentucky Samir Rawashdeh With slides based on material by H. Huang Delmar Cengage Learning 1 Three Sections of

More information

EE 3170 Microcontroller Applications

EE 3170 Microcontroller Applications Q. 3.9 of HW3 EE 37 Microcontroller Applications (a) (c) (b) (d) Midterm Review: Miller Chapter -3 -The Stuff That Might Be On the Exam D67 (e) (g) (h) CEC23 (i) (f) (j) (k) (l) (m) EE37/CC/Lecture-Review

More information

Programming Book for 6809 Microprocessor Kit

Programming Book for 6809 Microprocessor Kit Programming Book for 6809 Microprocessor Kit Wichit Sirichote, wichit.sirichote@gmail.com Image By Konstantin Lanzet - CPU collection Konstantin Lanzet, CC BY-SA 3.0, Rev1.2 March 2018 1 Contents Lab 1

More information

HC11 Instruction Set

HC11 Instruction Set HC11 Instruction Set Instruction classes 1. Accumulator and Memory 2. Stack and Index Register 3. Condition Code Register 4. Program control instructions CMPE12 Summer 2009 19-2 1 Accumulator and memory

More information

*********************************************** * MOR Byte Definition * *********************************************** org MOR fcb $20

*********************************************** * MOR Byte Definition * *********************************************** org MOR fcb $20 * PULSE_V2.ASM - Pulse Generator * * Version 2.0 97-09-17 * * Real-Time version * * Problems: * * 1- wrong timing cause step > 1 for value * * encoder * * 2- Delay initialize to 0002 with InitDelay * *

More information

By: Dr. Hamed Saghaei

By: Dr. Hamed Saghaei By: Dr. Hamed Saghaei The AVR RISC Microcontroller supports powerful and efficient addressing modes for access to the program memory (Flash) and data memory (SRAM). This section describes the different

More information

EE 308 Spring The HCS12 has 6 addressing modes

EE 308 Spring The HCS12 has 6 addressing modes The HCS12 has 6 addressing modes Most of the HC12 s instructions access data in memory There are several ways for the HC12 to determine which address to access Effective Address: Memory address used by

More information

CIS-331 Exam 2 Fall 2015 Total of 105 Points Version 1

CIS-331 Exam 2 Fall 2015 Total of 105 Points Version 1 Version 1 1. (20 Points) Given the class A network address 117.0.0.0 will be divided into multiple subnets. a. (5 Points) How many bits will be necessary to address 4,000 subnets? b. (5 Points) What is

More information

III. Flags of the Processor Staus Register

III. Flags of the Processor Staus Register III. Flags of the Processor Staus Register INHALT 1. Meaning 2. Application 2.1 Shifts 2.2 Branches 2.3 Addition and Subtraction 2.4 Comparisons in magnitude 1. Meaning processor status register Overflow

More information

M68HC05AG/AD Rev. 3. M68HC05 Applications Guide

M68HC05AG/AD Rev. 3. M68HC05 Applications Guide M68HC05AG/AD Rev. 3 HC 5 M68HC05 Applications Guide N O N - D I S C L O S U R E A G R E E M E N T R E Q U I R E D Motorola, Inc., 1996; All Rights Reserved M68HC05 Microcontroller Applications Guide N

More information

4. Specifications and Additional Information

4. Specifications and Additional Information 4. Specifications and Additional Information AGX52004-1.0 8B/10B Code This section provides information about the data and control codes for Arria GX devices. Code Notation The 8B/10B data and control

More information

68000 Instruction Set (2) 9/20/6 Lecture 3 - Instruction Set - Al 1

68000 Instruction Set (2) 9/20/6 Lecture 3 - Instruction Set - Al 1 68000 Instruction Set (2) 9/20/6 Lecture 3 - Instruction Set - Al 1 Lecture Overview The 68000 Instruction Set continued The understand and effectively use an architecture must understand the register

More information

Appendix A: The ISA of a Small 8-bit Processor

Appendix A: The ISA of a Small 8-bit Processor Computer Architecture in VHDL 1 Appendix A: The ISA of a Small 8-bit Processor Introduction to Small8 An Instruction Set Processor (ISP) is characterized by its instruction set, address modes (means to

More information

OSIAC Read OSIAC 5362 posted on the course website

OSIAC Read OSIAC 5362 posted on the course website OSIAC 5362 Read OSIAC 5362 posted on the course website The Basic Structure of Control Unit m CLK Run/Inhibit Control Step Counter m Preset (to any new state) Reset IR Decoder/Encoder (combinational logic)

More information

CIS-331 Exam 2 Fall 2014 Total of 105 Points. Version 1

CIS-331 Exam 2 Fall 2014 Total of 105 Points. Version 1 Version 1 1. (20 Points) Given the class A network address 119.0.0.0 will be divided into a maximum of 15,900 subnets. a. (5 Points) How many bits will be necessary to address the 15,900 subnets? b. (5

More information

BINARY LOAD AND PUNCH

BINARY LOAD AND PUNCH BINARY LOAD AND PUNCH To easily decrease the amount of time it takes to load a long tape (Cassette or paper) a BINARY formatting technique can be used instead of the conventional ASCII format used by the

More information

Assembly Language Programming of 8085

Assembly Language Programming of 8085 Assembly Language Programming of 8085 1. Introduction A microprocessor executes instructions given by the user Instructions should be in a language known to the microprocessor Microprocessor understands

More information

MC68HC05J1A/D Rev. 1.0 HC 5 MC68HC05J1A MC68HCL05J1A MC68HSC05J1A. HCMOS Microcontroller Units TECHNICAL DATA

MC68HC05J1A/D Rev. 1.0 HC 5 MC68HC05J1A MC68HCL05J1A MC68HSC05J1A. HCMOS Microcontroller Units TECHNICAL DATA MC68HC0J1A/D Rev. 1.0 HC MC68HC0J1A MC68HCL0J1A MC68HSC0J1A HCMOS Microcontroller Units TECHNICAL DATA Technical Data Motorola reserves the right to make changes without further notice to any products

More information

2) [ 2 marks] Both of the following statements cause the value $0300 to be stored in location $1000, but at different times. Explain the difference.

2) [ 2 marks] Both of the following statements cause the value $0300 to be stored in location $1000, but at different times. Explain the difference. 1) [ 9 marks] Write a sequence of directives for an HCS12 assembly language program that performs all of these tasks, in this order: a) Define an array called Measurements starting from memory location

More information

H8/300L Series Programming Manual

H8/300L Series Programming Manual H8/300L Series Programming Manual Notice When using this document, keep the following in mind: 1. This document may, wholly or partially, be subject to change without notice. 2. All rights are reserved:

More information

CIS-331 Fall 2014 Exam 1 Name: Total of 109 Points Version 1

CIS-331 Fall 2014 Exam 1 Name: Total of 109 Points Version 1 Version 1 1. (24 Points) Show the routing tables for routers A, B, C, and D. Make sure you account for traffic to the Internet. Router A Router B Router C Router D Network Next Hop Next Hop Next Hop Next

More information

10-1 C D Pearson Education, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 4e

10-1 C D Pearson Education, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 4e 10-1 C D E A B 10-2 A B A B C (A B) C D A A B (A B) C E D (A B) C D E (A B) C + D E (A B) C 10-3 Opcode Mode Address or operand 10-4 Memory 250 Opcode Mode PC = 250 251 ADRS 252 Next instruction ACC Opcode:

More information

S12CPUV2. Reference Manual HCS12. Microcontrollers. S12CPUV2/D Rev. 0 7/2003 MOTOROLA.COM/SEMICONDUCTORS

S12CPUV2. Reference Manual HCS12. Microcontrollers. S12CPUV2/D Rev. 0 7/2003 MOTOROLA.COM/SEMICONDUCTORS HCS12 Microcontrollers /D Rev. 0 7/2003 MOTOROLA.COM/SEMICONDUCTORS To provide the most up-to-date information, the revision of our documents on the World Wide Web will be the most current. Your printed

More information

Programming. A. Assembly Language Programming. A.1 Machine Code. Machine Code Example: Motorola ADD

Programming. A. Assembly Language Programming. A.1 Machine Code. Machine Code Example: Motorola ADD A. Assembly Language Programming Programming of a computer system: Machine code direct execution Assembly language tool: assembler High level programming language tool: interpreter tool: compiler Programming

More information

EE4390 Microprocessors

EE4390 Microprocessors EE4390 Microprocessors Lesson 6,7 Instruction Set, Branch Instructions, Assembler Directives Revised: Aug 1, 2003 1 68HC12 Instruction Set An instruction set is defined as a set of instructions that a

More information

Freescale Semiconductor, I

Freescale Semiconductor, I Application Note Rev. 1, 11/2001 Interfacing the MC68HC05C5 SIOP to an I 2 C Peripheral By Naji Naufel Introduction SIOP Definition When designing a system based on a standard, non-custom designed, microcontroller

More information

CIS-331 Spring 2016 Exam 1 Name: Total of 109 Points Version 1

CIS-331 Spring 2016 Exam 1 Name: Total of 109 Points Version 1 Version 1 Instructions Write your name on the exam paper. Write your name and version number on the top of the yellow paper. Answer Question 1 on the exam paper. Answer Questions 2-4 on the yellow paper.

More information

Accumulator and memory instructions 1. Loads, stores, and transfers 2. Arithmetic operations 3. Multiply and divide 4. Logical operations 5. Data test

Accumulator and memory instructions 1. Loads, stores, and transfers 2. Arithmetic operations 3. Multiply and divide 4. Logical operations 5. Data test HC11 Instruction Set Instruction classes 1. 2. 3. 4. Accumulator and Memory Stack and Index Register Condition Code Register Program control instructions 2 1 Accumulator and memory instructions 1. Loads,

More information

CIS-331 Fall 2013 Exam 1 Name: Total of 120 Points Version 1

CIS-331 Fall 2013 Exam 1 Name: Total of 120 Points Version 1 Version 1 1. (24 Points) Show the routing tables for routers A, B, C, and D. Make sure you account for traffic to the Internet. NOTE: Router E should only be used for Internet traffic. Router A Router

More information

RCX internals (Revised February 24)

RCX internals (Revised February 24) CMSC 23000 Winter 2006 Operating Systems Handout 3 January 27 RCX internals (Revised February 24) 1 Introduction This document collects together various pieces of information about the hardware in the

More information

SECTION 6 INSTRUCTION SET INTRODUCTION

SECTION 6 INSTRUCTION SET INTRODUCTION SECTION 6 INSTRUCTION SET INTRODUCTION Fetch F1 F2 F3 F3e F4 F5 F6... Decode D1 D2 D3 D3e D4 D5... Execute E1 E2 E3 E3e E4... Instruction Cycle: 1 2 3 4 5 6 7... MOTOROLA INSTRUCTION SET INTRODUCTION 6-1

More information

NAM M6800 DISK-BUG DS VER 3.5 OPT PAG

NAM M6800 DISK-BUG DS VER 3.5 OPT PAG NAM M6800 DISK-BUG DS VER 3.5 OPT PAG Floppy Disk Controller Debug Monitor Written 27 Aug 1980 Michael Holley Record of modifications 18 OCT 1981 Disk routines DC-1 23 JAN 1982 Command Table 8 MAY 1982

More information

CIS-331 Exam 2 Spring 2016 Total of 110 Points Version 1

CIS-331 Exam 2 Spring 2016 Total of 110 Points Version 1 Version 1 1. (20 Points) Given the class A network address 121.0.0.0 will be divided into multiple subnets. a. (5 Points) How many bits will be necessary to address 8,100 subnets? b. (5 Points) What is

More information

Assembly Language Programming of 8085

Assembly Language Programming of 8085 Assembly Language Programming of 8085 Topics 1. Introduction 2. Programming model of 8085 3. Instruction set of 8085 4. Example Programs 5. Addressing modes of 8085 6. Instruction & Data Formats of 8085

More information

ARM Instruction Set Architecture. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

ARM Instruction Set Architecture. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University ARM Instruction Set Architecture Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Condition Field (1) Most ARM instructions can be conditionally

More information

COSC 243. Assembly Language Techniques. Lecture 9. COSC 243 (Computer Architecture)

COSC 243. Assembly Language Techniques. Lecture 9. COSC 243 (Computer Architecture) COSC 243 Assembly Language Techniques 1 Overview This Lecture Source Handouts Next Lectures Memory and Storage Systems 2 Parameter Passing In a high level language we don t worry about the number of parameters

More information

EECE416 :Microcomputer Fundamentals and Design Instruction Sets and Groups

EECE416 :Microcomputer Fundamentals and Design Instruction Sets and Groups EECE416 :Microcomputer Fundamentals and Design 68000 Instruction Sets and Groups 1 Instruction Groups Data Transfer Groups Arithmetic Group Logical Group Shift and Rotate Group Bit Manipulation Group Binary

More information

Chapter 2 HCS12 Assembly Language

Chapter 2 HCS12 Assembly Language Chapter 2 HCS12 Assembly Language ECE 3120 Dr. Mohamed Mahmoud http://iweb.tntech.edu/mmahmoud/ mmahmoud@tntech.edu Outline 2.1 Assembly language program structure 2.2 Data transfer instructions 2.3 Arithmetic

More information

SN8F5000 Family Instruction Set

SN8F5000 Family Instruction Set SONiX Technology Co., Ltd. 8051-based Microcontroller 1 Overview SN8F5000 is 8051 Flash Type microcontroller supports comprehensive assembly instructions and which are fully compatible with standard 8051.

More information

AN1239. HC05 MCU Keypad Decoding Techniques Using the MC68HC705J1A. Introduction

AN1239. HC05 MCU Keypad Decoding Techniques Using the MC68HC705J1A. Introduction Order this document by /D Rev. 1.0 HC05 MCU Keypad Decoding Techniques Using the MC68HC705J1A By David Yoder CSIC Applications Introduction This application note demonstrates the use of a matrix keypad

More information

ECE 471 Embedded Systems Lecture 5

ECE 471 Embedded Systems Lecture 5 ECE 471 Embedded Systems Lecture 5 Vince Weaver http://www.eece.maine.edu/ vweaver vincent.weaver@maine.edu 17 September 2013 HW#1 is due Thursday Announcements For next class, at least skim book Chapter

More information

Most of the HC12 s instructions access data in memory There are several ways for the HC12 to determine which address to access

Most of the HC12 s instructions access data in memory There are several ways for the HC12 to determine which address to access HC12 Addressing Modes Instruction coding and execution o Inherent, Extended, Direct, Immediate, Indexed, and Relative Modes o Summary of MC9S12 Addressing Modes o Using X and Y registers as pointers o

More information

538 Lecture Notes Week 3

538 Lecture Notes Week 3 538 Lecture Notes Week 3 (Sept. 16, 2013) 1/18 538 Lecture Notes Week 3 Answers to last week's questions 1 Write code so that the least significant bit of Accumulator A is cleared, the most significant

More information

Freescale Semiconductor, I

Freescale Semiconductor, I nc. 11/2003 I 2 C Slave on the HC908QT/QY Family MCU By Stanislav Arendarik Freescale Czech System Application Laboratory Roznov pod Radhostem, Czech Republic Introduction I 2 C Overview The I 2 C (inter-integrated

More information

Disassembly of an HC12 Program It is sometimes useful to be able to convert HC12 op codes into mnemonics. For example, consider the hex code:

Disassembly of an HC12 Program It is sometimes useful to be able to convert HC12 op codes into mnemonics. For example, consider the hex code: Disassembly of an HC12 Program It is sometimes useful to be able to convert HC12 op codes into mnemonics. For example, consider the hex code: ADDR DATA ---- ------------------------------------------------------

More information

AN2093. Motorola Semiconductor Application Note. Creating Efficient C Code for the MC68HC08. Freescale Semiconductor, I.

AN2093. Motorola Semiconductor Application Note. Creating Efficient C Code for the MC68HC08. Freescale Semiconductor, I. nc. Motorola Semiconductor Application Note Order this document by /D Creating Efficient C Code for the MC68HC08 by Stuart Robb East Kilbride, Scotland 1 Introduction The C programming language is a powerful,

More information

TABLE 9-1. Symbolic Convention for Addressing Modes. Register indirect LDA (R1) ACC M[ R1] Refers to Figure 9-4. Addressing mode. Symbolic convention

TABLE 9-1. Symbolic Convention for Addressing Modes. Register indirect LDA (R1) ACC M[ R1] Refers to Figure 9-4. Addressing mode. Symbolic convention T-236 Symbolic Convention for Addressing Modes TABLE 9-1 Symbolic Convention for Addressing Modes Refers to Figure 9-4 Addressing mode Symbolic convention Register transfer Effective address Contents of

More information

1 Introduction Forth, the Language Why Forth? Comparing to other Forths Stack Checking... 5

1 Introduction Forth, the Language Why Forth? Comparing to other Forths Stack Checking... 5 1 Contents 1 Introduction 4 1.1 Forth, the Language......................... 4 1.1.1 Why Forth?.......................... 4 1.1.2 Comparing to other Forths................. 4 1.1.3 Stack Checking........................

More information

Mark II Aiken Relay Calculator

Mark II Aiken Relay Calculator Introduction to Embedded Microcomputer Systems Lecture 6.1 Mark II Aiken Relay Calculator 2.12. Tutorial 2. Arithmetic and logical operations format descriptions examples h 8-bit unsigned hexadecimal $00

More information

Introduction to Microcontrollers II

Introduction to Microcontrollers II Introduction to Microcontrollers II brset, brclr Indexed Addressing Example µp Laboratory #2 BUFFALO Assembling Code EECE 143 Digital Design Project Purpose: To allow students to design their own digital

More information

Lecture #3 Microcontroller Instruction Set Embedded System Engineering Philip Koopman Wednesday, 20-Jan-2015

Lecture #3 Microcontroller Instruction Set Embedded System Engineering Philip Koopman Wednesday, 20-Jan-2015 Lecture #3 Microcontroller Instruction Set 18-348 Embedded System Engineering Philip Koopman Wednesday, 20-Jan-2015 Electrical& Computer ENGINEERING Copyright 2006-2015, Philip Koopman, All Rights Reserved

More information

TYPES OF INTERRUPTS: -

TYPES OF INTERRUPTS: - There are 3 types of interrupts. TYPES OF INTERRUPTS: - External Interrupts. Internal Interrupts. Software interrupts. Hardware Interrupts (1) External interrupts come from I/O devices, from a timing device

More information

538 Lecture Notes Week 5

538 Lecture Notes Week 5 538 Lecture Notes Week 5 (Sept. 30, 2013) 1/15 538 Lecture Notes Week 5 Answers to last week's questions 1. With the diagram shown for a port (single bit), what happens if the Direction Register is read?

More information

538 Lecture Notes Week 5

538 Lecture Notes Week 5 538 Lecture Notes Week 5 (October 4, 2017) 1/18 538 Lecture Notes Week 5 Announements Midterm: Tuesday, October 25 Answers to last week's questions 1. With the diagram shown for a port (single bit), what

More information

Outline. ARM Introduction & Instruction Set Architecture. ARM History. ARM s visible registers

Outline. ARM Introduction & Instruction Set Architecture. ARM History. ARM s visible registers Outline ARM Introduction & Instruction Set Architecture Aleksandar Milenkovic E-mail: Web: milenka@ece.uah.edu http://www.ece.uah.edu/~milenka ARM Architecture ARM Organization and Implementation ARM Instruction

More information

AN-HK-32. In-Circuit Programming of FLASH Memory in the MC68HC908GP32. nc... Freescale Semiconductor, I. PART 1 Introduction

AN-HK-32. In-Circuit Programming of FLASH Memory in the MC68HC908GP32. nc... Freescale Semiconductor, I. PART 1 Introduction Order this document by AN-HK-32/H Rev. 2.0 AN-HK-32 In-Circuit Programming of FLASH Memory in the MC68HC908GP32 By T.C. Lun Applications Engineering Microcontroller Division Hong Kong PART 1 Introduction

More information

Exam I Review February 2017

Exam I Review February 2017 Exam I Review February 2017 Binary Number Representations Conversion of binary to hexadecimal and decimal. Convert binary number 1000 1101 to hexadecimal: Make groups of 4 bits to convert to hexadecimal,

More information

AN1745. Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas. Introduction

AN1745. Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas. Introduction Order this document by /D Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas Introduction More and more applications are requiring liquid crystal displays

More information

Application Note. Interfacing the CS5525/6/9 to the 68HC05. By Keith Coffey MOSI (PD3) SDO MISO (PD2) SCLK. Figure 1. 3-Wire and 4-Wire Interfaces

Application Note. Interfacing the CS5525/6/9 to the 68HC05. By Keith Coffey MOSI (PD3) SDO MISO (PD2) SCLK. Figure 1. 3-Wire and 4-Wire Interfaces Application Note Interfacing the CS5525/6/9 to the 68HC05 By Keith Coffey INTRODUCTION This application note details the interface of Crystal Semiconductor s CS5525/6/9 Analog-to-Digital Converter (ADC)

More information

ME4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 7

ME4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 7 ME4447/6405 Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics Instructor: Professor Charles Ume LECTURE 7 Reading Assignments Reading assignments for this week and next

More information

Chapter. Computer Architecture

Chapter. Computer Architecture Chapter 4 Computer Architecture Figure 4.1 Input device Central processing unit Main memory Output device Bus Data flow Control Figure 4.2 Central processing unit () Status bits ( ) Accumulator ( ) Index

More information

Lecture 11: Advanced Arithmetic Instructions

Lecture 11: Advanced Arithmetic Instructions Lecture 11: Advanced Arithmetic Instructions Today s Goals Use basic multiplication li and divisioni i instructions. ti Use shift and rotate instructions Multiplication Three different multiplication li

More information

ECE3120: Computer Systems Hardware & Software Development Tools

ECE3120: Computer Systems Hardware & Software Development Tools ECE3120: Computer Systems Hardware & Software Development Tools Manjeera Jeedigunta http://blogs.cae.tntech.edu/msjeedigun21 Email: msjeedigun21@tntech.edu Tel: 931-372-6181, Prescott Hall 120 Using the

More information

LAB 1: MC68000 CPU PROGRAMMING DATA TRANSFER INSTRUCTIONS

LAB 1: MC68000 CPU PROGRAMMING DATA TRANSFER INSTRUCTIONS LAB 1: MC68000 CPU PROGRAMMING DATA TRANSFER INSTRUCTIONS OBJECTIVES At the end of the laboratory works, you should be able to write simple assembly language programs for the MC68000 CPU using data transfer

More information

ECE 372 Microcontroller Design Assembly Programming. ECE 372 Microcontroller Design Assembly Programming

ECE 372 Microcontroller Design Assembly Programming. ECE 372 Microcontroller Design Assembly Programming Assembly Programming HCS12 Assembly Programming Basic Assembly Programming Top Assembly Instructions (Instruction You Should Know!) Assembly Programming Concepts Assembly Programming HCS12 Assembly Instructions

More information

INTRODUCTION WHY USE A REAL-TIME KERNEL?

INTRODUCTION WHY USE A REAL-TIME KERNEL? Order this document by AN1262 Simple Real-Time Kernels for M68HC05 Microcontrollers By Joanne Field CSIC Applications Freescale Ltd. East Kilbride, Scotland INTRODUCTION This application note demonstrates

More information

8051 Overview and Instruction Set

8051 Overview and Instruction Set 8051 Overview and Instruction Set Curtis A. Nelson Engr 355 1 Microprocessors vs. Microcontrollers Microprocessors are single-chip CPUs used in microcomputers Microcontrollers and microprocessors are different

More information

H8/500 Series Programming Manual

H8/500 Series Programming Manual H8/500 Series Programming Manual Catalog No. ADE-602-021 Preface The H8/500 Family of Hitachi-original microcontrollers is built around a 16-bit CPU core that offers enhanced speed and a large address

More information