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

Size: px
Start display at page:

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

Transcription

1 ECE 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. Please do not use additional paper. If you write on the back please indicate where the notes belong to and also indicate on the front that there is additional information on the backside. The approximate point value is shown in brackets [] following the problem number. You have 1 hour to complete the exam. Please note that some questions give significantly more points and are more complex to solve. Organization 0a) [2] What are the first or last names of our 3 TAs? 0b) [2] Can you name 2 people form technical support services (stockroom)? Introduction 1a) [2] What is the difference between a micro controller and a micro processor? 1b) [2] What is the difference between a common computer system and an embedded computer system? 1

2 ECE st Midterm HC11 CPU / Microcontroller 2 a) [3] List all functional components of our microcontroller (built into microcontroller) 2 b) [5] explain what they are used for 2 c) [2] give suggestion what can be attached to the unit or what other unit is connected to it (do not list more than two) Functional Unit Purpose Connected to 2

3 ECE st Midterm 3 a) [2] Our microcontroller has a register based design. List all registers by completing the list below (do not list configuration registers = $10xx) 3 b) [3] List the purpose of the register (do not list more than 2 purposes) Register Purpose - Condition Code Register (general answer, more details in next question) - Program Counter 3

4 ECE st Midterm 3 c) [5] The Condition Code Register is based on 8 bits. All bits indicate certain conditions of the microcontroller. List the function of up to 5 of these bits. Bit Function ZERO 3 d) [2] The system you constructed in the laboratory indicates that the program counter points to $4000. Is there a problem with that? 4

5 ECE st Midterm UofA system hardware 4 a) [3] Our microcontroller can be operated in expanded mode but also in bootstrap mode and single chip mode. What is the difference between them? 4 b) The normal operation mode of our micro controller involves a multiplexed bus. A bus is composed of data, address and control lines. - [2] What is a multiplexed bus? - [4] What control lines do we have and what is their purpose? - [1] How many data lines and how many address lines do we have? - [1] How many physical pins are associated with the address and data lines? 5

6 ECE st Midterm 4 c) [4] In the laboratory you built a reset circuit. Why do we not simply use a pushbutton to ground reset if we want to restart the microcontroller (or what is the purpose of those 2 integrated circuits you wired to the reset pin)? 6

7 ECE st Midterm Basic Instruction Cycle You want to execute ABA. 5a) [1] What does this instruction do? 5b) [4] Which part of this process would you consider to be Fetch, Decode and Execute? Think of what happens inside the microcontroller and associate the steps to fetch, decode and execute. Fetch Decode Execute? 7

8 ECE st Midterm Data Formats 6) You read a faulty EEPROM and found that sometimes you read a binary value of and sometimes a value of at the same memory location. What does this data represent in 6 a) [1] Hexadecimal 6 b) [3] HC11 instruction. You need to state MNEMONIC instruction name Addressing mode Function of the instruction (speculate if you do not know) 6 c) [2] ASCII encoded value (give character as result if possible) 6 d) [1] Binary Coded Decimal value (give result in decimal) 6 e) [3] PC relative offset (give result in signed decimal) 8

9 ECE st Midterm Assembly Programming 7 a) [10] This is a very short program. Please fill in the gaps. Shaded area=nothing can be filled in. Label Instruction Operand EEPROM Contents Address MAIN LDX #$ $8000 $CE $8001 $00 $8002 $00 LOOP INX $8003 $ #$ $8004 $8C $8005 $00 $8006 $03 LOOP $8007 $25 $8008 $ * $8009 ORG $FFFE $FFFE $80 DC.W MAIN $FFFF END *) counts at least one point. 7 b) [2] What is happening in register X in this program? If the program counter points to $8009 what is the contents of register X? 9

10 ECE st Midterm 7c) [10] For each E clock cycle (actually each half cycle) show what values will be on the pins (AD0..7,A8..15) when the previous program is executed. Assume that the reset switch was pressed and show what happens from that point on forward. Fill in comments where appropriate. Only go through the loop one time. $FFFE $FF80 $FFFF $FF $8000 $80CE $8001 $80.. Reset Start LDX 10

11 ECE st Midterm Appendix Page0 ASCII table Assembly Commands for X register 11

12 nc. M68HC11ERG/AD Hexadecimal to ASCII Conversion Table 2. Hexadecimal to ASCII Conversion Hex ASCII Hex ASCII Hex ASCII Hex ASCII $00 NUL $20 SP space $60 ` grave $01 SOH $21! $41 A $61 a $02 STX $22 quote $42 B $62 b $03 ETX $23 # $43 C $63 c $04 EOT $24 $ $44 D $64 d $05 ENQ $25 % $45 E $65 e $06 ACK $26 & $46 F $66 f $07 BEL beep $27 apost. $47 G $67 g $08 BS back sp $28 ( $48 H $68 h $09 HT tab $29 ) $49 I $69 i $0A LF linefeed $2A * $4A J $6A j $0B VT $2B + $4B K $6B k $0C FF $2C, comma $4C L $6C l $0D CR return $2D - dash $4D M $6D m $0E SO $2E. period $4E N $6E n $0F SI $2F / $4F O $6F o $10 DLE $30 0 $50 P $70 p $11 DC1 $31 1 $51 Q $71 q $12 DC2 $32 2 $52 R $72 r $13 DC3 $33 3 $53 S $73 s $14 DC4 $34 4 $54 T $74 t $15 NAK $35 5 $55 U $75 u $16 SYN $36 6 $56 V $76 v $17 ETB $37 7 $57 W $77 w $18 CAN $38 8 $58 X $78 x $19 EM $39 9 $59 Y $79 y $1A SUB $3A : $5A Z $7A z $1B ESCAPE $3B ; $5B [ $7B { $1C FS $3C < $5C \ $7C $1D GS $3D = $5D ] $7D } $1E RS $3E > $5E ^ $7E ~ $1F US $3F? $5F _ under $7F DEL delete 58 M68HC11E Series Programming Reference Guide MOTOROLA

13 nc. M68HC11ERG/AD Opcode Maps Page 1 DIR ACCA ACCB INH INH REL INH ACCA ACCB IND,X EXT IMM DIR IND,X EXT IMM DIR IND,X EXT MSB LSB A B C D E F TEST SBA BRA TSX NEG SUB NOP CBA BRN INS CMP IDIV BRSET BHI PULA SBC EDIV BRCLR BLS PULB COM SUBD ADDD LSRD BSET BCC DES LSR AND ASLD BCLR BCS TXS BIT TAP TAB BNE PSHA ROR LDA TPA TBA BEQ PSHB ASR STA STA INX PAGE 2 BVC PULX ASL EOR DEX DAA BVS RTS ROL ADC A CLV PAGE 3 BPL ABX DEC ORA A 1011 B SEV ABA BMI RTI ADD B 1100 C CLC BSET BGE PSHX INC CPX LDD C 1101 D SEC BCLR BLT MUL TST BSR JSR PAGE 4 STD D 1110 E CLI BRSET BGT WAI JMP LDS LDX E 1111 F SEI BRCLR BLE SWI CLR XGDX STS STOP STX F A B C D E F IND,X 8 M68HC11E Series Programming Reference Guide MOTOROLA

14 nc. Instruction Set Details M68HC11 Instruction Set ABX Add Accumulator B to Index Register X ABX Operation: Description: Condition Codes and Boolean Formulae: IX (IX) + (ACCB) Adds the 8-bit unsigned contents of accumulator B to the contents of index register X (IX) considering the possible carry out of the low-order byte of the index register X; places the result in index register X (IX). Accumulator B is not changed. There is no equivalent instruction to add accumulator A to an index register. S X H I N Z V C None affected Source Form: ABX Addressing Modes, Machine Code, and Cycle-by-Cycle Execution: ABX (INH) Cycle Addr Data R/W 1 OP 3A 1 2 OP FFFF 1 M68HC11 Rev. 6 Reference Manual MOTOROLA Instruction Set Details 493

15 Instruction Set Details nc. BLO Branch if Lower (Same as BCS) BLO Operation: PC (PC) + $ Rel if (C) = 1 i.e., if (ACCX) < (M) (unsigned binary numbers) Description: Condition Codes and Boolean Formulae: Source Form: If the BLO instruction is executed immediately after execution of any of the instructions, CBA, CMP(A, B, or D), CP(X or Y), SBA, SUB(A, B, or D), the branch will occur if and only if the unsigned binary number represented by ACCX was less than the unsigned binary number represented by M. Generally not useful after INC/DEC, LD/ST, TST/CLR/COM because these instructions do not affect the C bit in the CCR. See BRA instruction for further details of the execution of the branch. S X H I N Z V C None affected BLO (rel) Addressing Modes, Machine Code, and Cycle-by-Cycle Execution: Cycle BLO (REL) Addr Data R/W 1 OP OP + 1 rr 1 3 FFFF 1 The following table is a summary of all branch instructions. Test Boolean Mnemonic Opcode Complementary Branch Comment r > m Z + (N V) = 0 BGT 2E r m BLE 2F Signed r m N V = 0 BGE 2C r < m BLT 2D Signed r = m Z = 1 BEQ 27 r m BNE 26 Signed r m Z + (N V) = 1 BLE 2F r > m BGT 2E Signed r < m N V = 1 BLT 2D r m BGE 2C Signed r > m C + Z = 0 BHI 22 r m BLS 23 Unsigned r m C = 0 BHS/BCC 24 r < m BLO/BCS 25 Unsigned r = m Z = 1 BEQ 27 r m BNE 26 Unsigned r m C + Z = 1 BLS 23 r > m BHI 22 Unsigned r < m C = 1 BLO/BCS 25 r m BHS/BCC 24 Unsigned Carry C = 1 BCS 25 No Carry BCC 24 Simple Negative N = 1 BMI 2B Plus BPL 2A Simple Overflow V = 1 BVS 29 No Overflow BVC 28 Simple r = 0 Z = 1 BEQ 27 r 0 BNE 26 Simple Always BRA 20 Never BRN 21 Unconditional Reference Manual M68HC11 Rev Instruction Set Details MOTOROLA

16 nc. Instruction Set Details M68HC11 Instruction Set BLS Branch if Lower or Same BLS Operation: PC (PC) + $ Rel if (C) + (Z) = 1 i.e., if (ACCX) (M) (unsigned binary numbers) Description: Condition Codes and Boolean Formulae: Source Form: If the BLS instruction is executed immediately after execution of any of the instructions, CBA, CMP(A, B, or D), CP(X or Y), SBA, SUB(A, B, or D), the branch will occur if and only if the unsigned binary number represented by ACCX was less than or equal to the unsigned binary number represented by M. Generally not useful after INC/DEC, LD/ST, TST/CLR/COM because these instructions do not affect the C bit in the CCR. See BRA instruction for further details of the execution of the branch. S X H I N Z V C None affected BLS (rel) Addressing Modes, Machine Code, and Cycle-by-Cycle Execution: Cycle BLS (REL) Addr Data R/W 1 OP OP + 1 rr 1 3 FFFF 1 The following table is a summary of all branch instructions. Test Boolean Mnemonic Opcode Complementary Branch Comment r > m Z + (N V) = 0 BGT 2E r m BLE 2F Signed r m N V = 0 BGE 2C r < m BLT 2D Signed r = m Z = 1 BEQ 27 r m BNE 26 Signed r m Z + (N V) = 1 BLE 2F r > m BGT 2E Signed r < m N V = 1 BLT 2D r m BGE 2C Signed r > m C + Z = 0 BHI 22 r m BLS 23 Unsigned r m C = 0 BHS/BCC 24 r < m BLO/BCS 25 Unsigned r = m Z = 1 BEQ 27 r m BNE 26 Unsigned r m C + Z = 1 BLS 23 r > m BHI 22 Unsigned r < m C = 1 BLO/BCS 25 r m BHS/BCC 24 Unsigned Carry C = 1 BCS 25 No Carry BCC 24 Simple Negative N = 1 BMI 2B Plus BPL 2A Simple Overflow V = 1 BVS 29 No Overflow BVC 28 Simple r = 0 Z = 1 BEQ 27 r 0 BNE 26 Simple Always BRA 20 Never BRN 21 Unconditional M68HC11 Rev. 6 Reference Manual MOTOROLA Instruction Set Details 513

17 nc. Instruction Set Details CPX Compare Index Register X CPX Operation: (IX) (M : M + 1) Description: Condition Codes and Boolean Formulae: Compares the contents of index register X with a 16-bit value at the address specified and sets the condition codes accordingly. The compare is accomplished internally by doing a 16-bit subtract of (M : M + 1) from index register X without modifying either index register X or (M : M + 1). S X H I N Z V C Ú Ú Ú Ú Source Form: N Z V C R15 Set if MSB of result is set; cleared otherwise. R15 R14 R13 R12 R11 R10 R9 R8 R7 R6 R5 R4 R3 R2 R1 R0 Set if result is $0000; cleared otherwise. IX15 M15 R15 + IX15 M15 R15 Set if a twos complement overflow resulted from the operation; cleared otherwise. IX15 M15 + M15 R15 + R15 IX15 Set if the absolute value of the contents of memory is larger than the absolute value of the index register; cleared otherwise. CPX (opr) Addressing Modes, Machine Code, and Cycle-by-Cycle Execution: Cycle CPX (IMM) CPX (DIR) CPX (EXT) CPX (IND,X) CPX (IND,Y) Addr Data R/W Addr Data R/W Addr Data R/W Addr Data R/W Addr Data R/W 1 OP 8C 1 OP 9C 1 OP BC 1 OP AC 1 OP CD 1 2 OP + 1 jj 1 OP + 1 dd 1 OP + 1 hh 1 OP + 1 ff 1 OP + 1 AC 1 3 OP + 2 kk 1 00dd (00dd) 1 OP + 2 ll 1 FFFF 1 OP + 2 ff 1 4 FFFF 1 00dd + 1 (00dd + 1) 1 hhll (hhll) 1 X + ff (X + ff) 1 FFFF 1 5 FFFF 1 hhll + 1 (hhll + 1) 1 X + ff + 1 (X + ff + 1) 1 Y + ff (Y + ff) 1 6 FFFF 1 FFFF 1 Y + ff + 1 (Y + ff + 1) 1 7 FFFF 1 Reference Manual M68HC11 Rev Instruction Set Details MOTOROLA

18 nc. Instruction Set Details DEX Decrement Index Register X DEX Operation: IX (IX) $0001 Description: Subtract one from index register X Only the Z bit is set or cleared according to the result of this operation. Condition Codes and Boolean Formulae: Source Form: Z S X H I N Z V C Ú DEX R15 R14 R13 R12 R11 R10 R9 R8 R7 R6 R5 R4 R3 R2 R1 R0 Set if result is $0000; cleared otherwise. Addressing Modes, Machine Code, and Cycle-by-Cycle Execution: Cycle DEX (INH) Addr Data R/W 1 OP OP FFFF 1 Reference Manual M68HC11 Rev Instruction Set Details MOTOROLA

19 nc. Instruction Set Details M68HC11 Instruction Set INX Increment Index Register X INX Operation: IX (IX) + $0001 Description: Adds one to index register X Only the Z bit is set or cleared according to the result of this operation. Condition Codes and Boolean Formulae: Source Form: Z INX S X H I N Z V C Ú R15 R14 R13 R12 R11 R10 R9 R8 R7 R6 R5 R4 R3 R2 R1 R0 Set if result is $0000; cleared otherwise. Addressing Modes, Machine Code, and Cycle-by-Cycle Execution: Cycle INX (INH) Addr Data R/W 1 OP OP FFFF 1 M68HC11 Rev. 6 Reference Manual MOTOROLA Instruction Set Details 547

20 nc. Instruction Set Details LDX Load Index Register X LDX Operation: IXH (M), IXL (M + 1) Description: Loads the most significant byte of index register X from the byte of memory at the address specified by the program, and loads the least significant byte of index register X from the next byte of memory at one plus the address specified by the program. Condition Codes and Boolean Formulae: Source Form: S X H I N Z V C Ú Ú 0 N R15 Set if MSB of result is set; cleared otherwise. Z R15 R14 R13 R12 R11 R10 R9 R8 R7 R6 R5 R4 R3 R2 R1 R0 Set if result is $0000; cleared otherwise. V 0 Cleared LDX (opr) Addressing Modes, Machine Code, and Cycle-by-Cycle Execution: Cycle LDX (IMM) LDX (DIR) LDX (EXT) LDX (IND,X) LDX (IND,Y) Addr Data R/W Addr Data R/W Addr Data R/W Addr Data R/W Addr Data R/W 1 OP CE 1 OP DE 1 OP FE 1 OP EE 1 OP CD 1 2 OP + 1 jj 1 OP + 1 dd 1 OP + 1 hh 1 OP + 1 ff 1 OP + 1 EE 1 3 OP + 2 kk 1 00dd (00dd) 1 OP + 2 ll 1 FFFF 1 OP + 2 ff dd + 1 (00dd + 1) 1 hhll (hhll) 1 X + ff (X + ff) 1 FFFF 1 5 hhll + 1 (hhll + 1) 1 X + ff + 1 (X + ff + 1) 1 Y + ff (Y + ff) 1 6 Y + ff + 1 (Y + ff + 1) 1 Reference Manual M68HC11 Rev Instruction Set Details MOTOROLA

21 Instruction Set Details nc. PULX Pull Index Register X from Stack PULX Operation: Description: SP (SP) + $0001; (IXH) SP (SP) + $0001; (IXL) Index register X is pulled from the stack (high-order byte first) beginning at the address contained in the stack pointer plus one. The stack pointer is incremented by two in total. Condition Codes and Boolean Formulae: Source Form: Push instructions are commonly used to save the contents of one or more CPU registers at the start of a subroutine. Just before returning from the subroutine, corresponding pull instructions are used to restore the saved CPU registers so the subroutine will appear not to have affected these registers. S X H I N Z V C None affected PULX Addressing Modes, Machine Code, and Cycle-by-Cycle Execution: Cycle PULX (INH) Addr Data R/W 1 OP OP SP 1 4 SP + 1 get IXH 1 5 SP + 2 get IXL 1 Reference Manual M68HC11 Rev Instruction Set Details MOTOROLA

22 nc. Instruction Set Details M68HC11 Instruction Set PSHX Push Index Register X onto Stack PSHX Operation: (IXL), SP (SP) $0001 (IXH), SP (SP) $0001 Description: The contents of index register X are pushed onto the stack (low-order byte first) at the address contained in the stack pointer. The stack pointer is then decremented by two. Condition Codes and Boolean Formulae: Source Form: Push instructions are commonly used to save the contents of one or more CPU registers at the start of a subroutine. Just before returning from the subroutine, corresponding pull instructions are used to restore the saved CPU registers so the subroutine will appear not to have affected these registers. S X H I N Z V C None affected PSHX Addressing Modes, Machine Code, and Cycle-by-Cycle Execution: Cycle PSHX (INH) Addr Data R/W 1 OP 3C 1 2 OP SP (IXL) 0 4 SP 1 (IXH) 0 M68HC11 Rev. 6 Reference Manual MOTOROLA Instruction Set Details 565

23 nc. Instruction Set Details M68HC11 Instruction Set STX Store Index Register X STX Operation: Description: M (IXH), M + 1 (IXL) Stores the most significant byte of index register X in memory at the address specified by the program, and stores the least significant byte of index register X at the next location in memory, at one plus the address specified by the program. Condition Codes and Boolean Formulae: Source Form: S X H I N Z V C Ú Ú 0 N IX15 Set if MSB of result is set; cleared otherwise. Z IX15 IX14 IX13 IX12 IX11 IX10 IX9 IX8 IX7 IX6 IX5 IX4 IX3 IX2 IX1 IX0 Set if result is $0000; cleared otherwise. V 0 Cleared STX (opr) Addressing Modes, Machine Code, and Cycle-by-Cycle Execution: Cycle STX (DIR) STX (EXT) STX (IND,X) STX (IND,Y) Addr Data R/W Addr Data R/W Addr Data R/W Addr Data R/W 1 OP DF 1 OP FF 1 OP EF 1 OP CD 1 2 OP + 1 dd 1 OP + 1 hh 1 OP + 1 ff 1 OP + 1 EF dd (IXH) 0 OP + 2 ll 1 FFFF 1 OP + 2 ff dd + 1 (IXL) 0 hhll (IXH) 0 X + ff (IXH) 0 FFFF 1 5 hhll + 1 (IXL) 0 X + ff + 1 (IXL) 0 Y + ff (IXH) 0 6 Y + ff + 1 (IXL) 0 M68HC11 Rev. 6 Reference Manual MOTOROLA Instruction Set Details 583

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

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

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

instruction 1 Fri Oct 13 13:05:

instruction 1 Fri Oct 13 13:05: 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

COE538 Lecture Notes Week 3 (Week of Sept 17, 2012)

COE538 Lecture Notes Week 3 (Week of Sept 17, 2012) COE538 Lecture Notes: Week 3 1 of 11 COE538 Lecture Notes Week 3 (Week of Sept 17, 2012) Announcements My lecture sections should now be on Blackboard. I've also created a discussion forum (and anonymous

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

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

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

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

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

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

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

EE 3170 Microcontroller Applications

EE 3170 Microcontroller Applications Lecture Overview EE 3170 Microcontroller Applications Lecture 7 : Instruction Subset & Machine Language: Conditions & Branches in Motorola 68HC11 - Miller 2.2 & 2.3 & 2.4 Based on slides for ECE3170 by

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

Condition Code Register. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

Condition Code Register. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff Condition Code Register 1 Topics Condition code register Addition and subtraction instructions Conditional branches 2 Condition Code Register Condition code bits are automatically set by some instructions

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

CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON

CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Prof. Gurindar Sohi TAs: Pradip Vallathol and Junaid Khalid Midterm Examination 1 In Class (50 minutes) Friday, September

More information

CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON

CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Prof. Gurindar Sohi TAs: Junaid Khalid and Pradip Vallathol Midterm Examination 1 In Class (50 minutes) Friday, September

More information

What is an Addressing Mode?

What is an Addressing Mode? Addressing Modes 1 2 What is an Addressing Mode? An addressing mode is a way in which an operand is specified in an instruction. There are different ways in which an operand may be specified in an instruction.

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

Using the stack and the stack pointer

Using the stack and the stack pointer Using the stack and the stack pointer o The Stack and Stack Pointer o The stack is a memory area for temporary storage o The stack pointer points to the last byte in the stack o Some instructions which

More information

Introduction to Embedded Systems EE319K (Gerstlauer), Spring 2013

Introduction to Embedded Systems EE319K (Gerstlauer), Spring 2013 The University of Texas at Austin Department of Electrical and Computer Engineering Introduction to Embedded Systems EE319K (Gerstlauer), Spring 2013 Midterm 1 Solutions Date: February 21, 2013 UT EID:

More information

Data Representation and Binary Arithmetic. Lecture 2

Data Representation and Binary Arithmetic. Lecture 2 Data Representation and Binary Arithmetic Lecture 2 Computer Data Data is stored as binary; 0 s and 1 s Because two-state ( 0 & 1 ) logic elements can be manufactured easily Bit: binary digit (smallest

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

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

C SC 230 Computer Architecture and Assembly Language April 2000 Exam Sample Solutions

C SC 230 Computer Architecture and Assembly Language April 2000 Exam Sample Solutions C SC 230 Computer Architecture and Assembly Language April 2000 Exam Sample Solutions 1. (12 marks) Circle the correct answer for each of the following: The 8-bit two's complement representation of -15

More information

Fri. Aug 25 Announcements

Fri. Aug 25 Announcements Fri. Aug 25 Announcements HW 1 / Lab 1 next week Tools and fundamentals of instructions Remember no in-lab quiz but HWs still marked Slides online Complete class for last year This year s slides available

More information

Cross Assembly and Program Development

Cross Assembly and Program Development Cross Assembly and ENGG4640/3640; Fall 2004; Prepared by Radu Muresan 1 Introduction Text Editor Program Ex. DOS, Notepad, Word saved as ASCII Source Code Assembler or Cross-Assembler Object Code Machine

More information

UNIVERSITY OF MANITOBA DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING. Term Test #2 Solution ECE 3610 MICROPROCESSING SYSTEMS

UNIVERSITY OF MANITOBA DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING. Term Test #2 Solution ECE 3610 MICROPROCESSING SYSTEMS ECE 3610 Test 2 Solution 1 of 7 PRINT LAST NAME: STUDENT NUMBER PRINT FIRST NAME: UNIVERSITY OF MANITOBA DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING DATE: Feb. 28, 11; TIME: 6:00-8:00 P.M. Term Test

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

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

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

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

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

N bit is set if result of operation in negative (MSB = 1) Z bit is set if result of operation is zero (All bits = 0)

N bit is set if result of operation in negative (MSB = 1) Z bit is set if result of operation is zero (All bits = 0) Addition and Subtraction of Hexadecimal Numbers. Setting the C (Carry), V (Overflow), N (Negative) and Z (Zero) bits How the C, V, N and Z bits of the CCR are changed Condition Code Register Bits N, Z,

More information

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

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

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

; 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

CMSC 313 Lecture 03 Multiple-byte data big-endian vs little-endian sign extension Multiplication and division Floating point formats Character Codes

CMSC 313 Lecture 03 Multiple-byte data big-endian vs little-endian sign extension Multiplication and division Floating point formats Character Codes Multiple-byte data CMSC 313 Lecture 03 big-endian vs little-endian sign extension Multiplication and division Floating point formats Character Codes UMBC, CMSC313, Richard Chang 4-5 Chapter

More information

Introduction to Programming

Introduction to Programming Introduction to Programming Chapter 2 Microcontrollers Objectives Describe the difference between source code and machine code. Define opcode, operand, and address of an operand. Explain the purpose of

More information

BRANCH IF REGISTER IS HIGHER/GREATHER/ THAN OPERAND e.g. CMPA #$D0

BRANCH IF REGISTER IS HIGHER/GREATHER/ THAN OPERAND e.g. CMPA #$D0 Midterm Review 1. Branch instructions BHI (unsigned), BGT (signed) Take a look at the preceding comparison instruction. Then, you can use this instead of using complex formula in the instruction reference.

More information

Decimal, Hexadecimal and Binary Numbers Writing an assembly language program

Decimal, Hexadecimal and Binary Numbers Writing an assembly language program Decimal, Hexadecimal and Binary Numbers Writing an assembly language program o Disassembly of MC9S12 op codes o Use flow charts to lay out structure of program o Use common flow structures if-then if-then-else

More information

CMPEN 472 Sample EXAM II

CMPEN 472 Sample EXAM II CMPEN 472 Sample EXAM II Name: Student ID number (last 4 digit): Please write your name on every page. Write your solutions clearly. You may use backside of each page for scratch but the solutions must

More information

Department of Computer Science and Engineering

Department of Computer Science and Engineering Department of Computer Science and Engineering Instruction Set Overview This is a complete overview of the instruction set for the Motorola MC9S12DT256 microprocessor. Some of the groups are irrelevant

More information

Outline. 2.8 Stack. 2.9 Subroutines

Outline. 2.8 Stack. 2.9 Subroutines Outline 21 Assembly language program structure 22 Data transfer instructions 23 Arithmetic instructions 24 Branch and loop instructions 25 Shift and rotate instructions 26 Boolean logic instructions 27

More information

CHAPTER 8. Solutions for Exercises

CHAPTER 8. Solutions for Exercises CHAPTER 8 Solutions for Exercises E8.1 The number of bits in the memory addresses is the same as the address bus width, which is 20. Thus the number of unique addresses is 2 20 = 1,048,576 = 1024 1024

More information

ME 6405 Introduction to Mechatronics

ME 6405 Introduction to Mechatronics ME 6405 Introduction to Mechatronics Fall 2005 Instructor: Professor Charles Ume LECTURE 9 Homework 1 Solution 1. Write an assembly language program to clear the usable internal RAM in the M68HC11E9. Solution:

More information

Fundamentals of Programming (C)

Fundamentals of Programming (C) Borrowed from lecturer notes by Omid Jafarinezhad Fundamentals of Programming (C) Group 8 Lecturer: Vahid Khodabakhshi Lecture Number Systems Department of Computer Engineering Outline Numeral Systems

More information

Coe538 Final Study Guide 2016 (Questions & Answers)

Coe538 Final Study Guide 2016 (Questions & Answers) Coe538 Study Guide 1 of 8 Coe538 Final Study Guide 2016 (Questions & Answers) This version contains questions AND answers. This study guide is meant to help you review coe538 and prepare for the final.

More information

Menu. Programming Models for the Atmel XMEGA Architecture (and others devices) Assembly Programming Addressing Modes for the XMEGA Instruction Set

Menu. Programming Models for the Atmel XMEGA Architecture (and others devices) Assembly Programming Addressing Modes for the XMEGA Instruction Set Menu Programming Models for the Atmel XMEGA Architecture (and others devices) Assembly Programming Addressing Modes for the XMEGA Instruction Set Look into my... See examples on web-site: doc8331, doc0856

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

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

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

ECE/CS 5780/6780: Embedded System Design

ECE/CS 5780/6780: Embedded System Design ECE/CS 5780/6780: Embedded System Design Scott R. Little Lecture 3: Assembly Language Programming Scott R. Little (Lecture 3: Assembly) ECE/CS 5780/6780 1 / 59 Administrivia 2 versions of CodeWarrior are

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

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

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

Sample Problem Set #1

Sample Problem Set #1 Sample Problem Set #1 Notes: These problems are typical exam problems; most are drawn from previous homeworks and exams. This exam is open book, open notes. It may help to have a calculator. For partial

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

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

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

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-470/570: Microprocessor-Based System Design Fall 2014.

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-470/570: Microprocessor-Based System Design Fall 2014. c 2 =1 c 1 =1 c 0 =0 c 2 =1 c 1 =1 c 0 =0 c 4 =0 c 3 =0 c 2 =0 c 1 =0 c 0 =0 c 2 =0 c 1 =0 c 0 =1 c 2 =0 c 1 =0 c 0 =0 ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY Notes - Unit 4

More information

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 02, FALL 2012

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 02, FALL 2012 CMSC 33 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 2, FALL 22 TOPICS TODAY Bits of Memory Data formats for negative numbers Modulo arithmetic & two s complement Floating point formats

More information

COSC345 Software Engineering. Basic Computer Architecture and The Stack

COSC345 Software Engineering. Basic Computer Architecture and The Stack COSC345 Software Engineering Basic Computer Architecture and The Stack Outline Architectural models A little about the 68HC11 Memory map Registers A little bit of assembly (never did us any harm) The program

More information

Reading Assignment. 68HC12 Instruction Set. M68HC12 Instruction Set Categories. Some Tips. Endianness (Byte Order) Load and Store Instructions

Reading Assignment. 68HC12 Instruction Set. M68HC12 Instruction Set Categories. Some Tips. Endianness (Byte Order) Load and Store Instructions Reading Assignment EEL 4744C: Microprocessor Applications Lecture 5 68HC12 Instruction Set Software and Hardware Engineering (Old version) Chapter 4 Or Software and Hardware Engineering (New version) Chapter

More information

538 Lecture Notes Week 3

538 Lecture Notes Week 3 538 Lecture Notes Week 3 (Sept. 20, 2017) 1/24 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

Exam 1 Fun Times. EE319K Fall 2012 Exam 1A Modified Page 1. Date: October 5, Printed Name:

Exam 1 Fun Times. EE319K Fall 2012 Exam 1A Modified Page 1. Date: October 5, Printed Name: EE319K Fall 2012 Exam 1A Modified Page 1 Exam 1 Fun Times Date: October 5, 2012 Printed Name: Last, First Your signature is your promise that you have not cheated and will not cheat on this exam, nor will

More information

HC11 Instruction Set Architecture

HC11 Instruction Set Architecture HC11 Instruction Set Architecture High-level HC11 architecture Interrupt logic MEMORY Timer and counter M8601 CPU core Serial I/O A/D converter Port A Port B Port C Port D Port E CMPE12 Summer 2009 16-2

More information

Assembly Language Development Process. ECE/CS 5780/6780: Embedded System Design. Assembly Language Listing. Assembly Language Syntax

Assembly Language Development Process. ECE/CS 5780/6780: Embedded System Design. Assembly Language Listing. Assembly Language Syntax Assembly Language Development Process ECE/CS 5780/6780: Embedded System Design Chris J. Myers Lecture 3: Assembly Language Programming Chris J. Myers (Lecture 3: Assembly Language) ECE/CS 5780/6780: Embedded

More information

Experiment 3. TITLE Optional: Write here the Title of your program.model SMALL This directive defines the memory model used in the program.

Experiment 3. TITLE Optional: Write here the Title of your program.model SMALL This directive defines the memory model used in the program. Experiment 3 Introduction: In this experiment the students are exposed to the structure of an assembly language program and the definition of data variables and constants. Objectives: Assembly language

More information

AN1742. Motorola Semiconductor Application Note. Programming the 68HC705J1A In-Circuit By Chris Falk CSG Product Engineering Austin, Texas

AN1742. Motorola Semiconductor Application Note. Programming the 68HC705J1A In-Circuit By Chris Falk CSG Product Engineering Austin, Texas Order this document by /D Motorola Semiconductor Application Note Programming the 68HC705J1A In-Circuit By Chris Falk CSG Product Engineering Austin, Texas Introduction This application note describes

More information

Administrivia. ECE/CS 5780/6780: Embedded System Design. Assembly Language Syntax. Assembly Language Development Process

Administrivia. ECE/CS 5780/6780: Embedded System Design. Assembly Language Syntax. Assembly Language Development Process Administrivia ECE/CS 5780/6780: Embedded System Design Scott R. Little Lecture 3: Assembly Language Programming 2 versions of CodeWarrior are on the lab machines. You should use the 4.5 version (CW for

More information

Ryerson University Department of Electrical and Computer Engineering ELE 538 Microprocessor Systems Final Examination December 8, 2003

Ryerson University Department of Electrical and Computer Engineering ELE 538 Microprocessor Systems Final Examination December 8, 2003 Ryerson University Department of Electrical and Computer Engineering ELE 538 Microprocessor Systems Final Examination December 8, 23 Name: Student Number: Time limit: 3 hours Section: Examiners: K Clowes,

More information

HC11 Instruction Set Architecture

HC11 Instruction Set Architecture HC11 Instruction Set Architecture Summer 2008 High-level HC11 architecture Interrupt logic MEMORY Timer and counter M8601 CPU core Serial I/O A/D converter Port A Port B Port C Port D Port E CMPE12 Summer

More information

Motorola HC11. Fun with Microcontrollers and Embedded Systems

Motorola HC11. Fun with Microcontrollers and Embedded Systems Motorola HC11 Fun with Microcontrollers and Embedded Systems Original Source: http://www.soe.ucsc.edu/classes/cmpe012c/winter04/notes/12_microcontrollers.ppt Microcontrollers What is a microcontroller?

More information

Lecture 9 Subroutines

Lecture 9 Subroutines CPE 390: Microprocessor Systems Spring 2018 Lecture 9 Subroutines Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030 Adapted from HCS12/9S12

More information

A Simple MC9S12 Program

A Simple MC9S12 Program A Simple MC9S12 Program All programs and data must be placed in memory between address 0x1000 and 0x3BFF. For our programs we will put the first instruction at 0x2000, and the first data byte at 0x1000

More information

Exam 1 Feb. 23, 25, 27?

Exam 1 Feb. 23, 25, 27? Exam 1 Feb. 23, 25, 27? You will be able to use all of the Motorola data manuals on the exam. No calculators will be allowed for the exam. Numbers Decimal to Hex (signed and unsigned) Hex to Decimal (signed

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

1.1. INTRODUCTION 1.2. NUMBER SYSTEMS

1.1. INTRODUCTION 1.2. NUMBER SYSTEMS Chapter 1. 1.1. INTRODUCTION Digital computers have brought about the information age that we live in today. Computers are important tools because they can locate and process enormous amounts of information

More information

Chemistry Hour Exam 2

Chemistry Hour Exam 2 Chemistry 838 - Hour Exam 2 Fall 2003 Department of Chemistry Michigan State University East Lansing, MI 48824 Name Student Number Question Points Score 1 15 2 15 3 15 4 15 5 15 6 15 7 15 8 15 9 15 Total

More information

INTRODUCTION TO BRANCHING. There are two forms of unconditional branching in the MC68000.

INTRODUCTION TO BRANCHING. There are two forms of unconditional branching in the MC68000. INTRODUCTION TO BRANCHING UNCONDITIONAL BRANCHING There are two forms of unconditional branching in the MC68000. BRA instruction BRA Program control passes directly to the instruction located at

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

Fundamentals of Programming

Fundamentals of Programming Fundamentals of Programming Lecture 2 Number Systems & Arithmetic Lecturer : Ebrahim Jahandar Some Parts borrowed from slides by IETC1011-Yourk University Common Number Systems System Base Symbols Used

More information