Presentation is loading. Please wait.

Presentation is loading. Please wait.

The CPU12 Microprocessor Core

Similar presentations


Presentation on theme: "The CPU12 Microprocessor Core"— Presentation transcript:

1 The CPU12 Microprocessor Core
Lecture L2.1

2 Reference S12CPUV2 Reference Manual S12CPUV2.pdf (in .zip file)
Print out Appendix A – Instruction Reference It will answer all questions concerning HCS12 instructions and addressing modes

3 Introducing the CPU12 The CPU12 Registers CPU12 Addressing Modes
CPU12 Instructions

4 The 68HC12 Registers

5 Condition Code Register

6 The 68HC12 Accumulators A c c u m u l a t o r A A B A c c u m u l a t
D D

7

8

9

10

11 Index Registers, X and Y I n d e x r e g i s t e r X X I n d e x r e g

12

13 S t a c k P o i n t e r S P Stack Pointer, SP

14

15 Introducing the CPU12 The CPU12 Registers CPU12 Addressing Modes
CPU12 Instructions

16

17

18 Pre-decrement indexed addressing

19 Using X as a stack pointer for a data stack
LDY 2,X+ will pop $1234 into Y

20 MOVW 0,X,2,-X

21 LDD 0,X MOVW 2,X,0,X STD 2,X

22 MOVW 2,X,2,-X

23 Introducing the CPU12 The CPU12 Registers CPU12 Addressing Modes
CPU12 Instructions

24

25

26

27

28

29

30

31

32

33

34

35

36

37 Load Accumulator A 1: ; LDAA Addressing Modes 2: =00004000 ORG $4000
5: B LDAA $5678 6: A LDAA 3,X 7: A6 E LDAA ,Y 8: C A6 F LDAA $1234,SP 9: A6 E LDAA [D,X] 10: A6 EB LDAA [$2345,Y]

38 1: ; LDAA Addressing Modes
2: = ORG $4000 3: LDAA #$35 4: A LDAA $A3 5: B LDAA $5678 6: A LDAA 3,X 7: A6 E LDAA ,Y 8: C A6 F LDAA $1234,SP 9: A6 E LDAA [D,X] 10: A6 EB LDAA [$2345,Y] 200 = $C8 = bit = 2’s comp = = $138 = $E9

39 11110010 = $F2 1: ; LDAA Addressing Modes 2: =00004000 ORG $4000
4: A LDAA $A3 5: B LDAA $5678 6: A LDAA 3,X 7: A6 E LDAA ,Y 8: C A6 F LDAA $1234,SP 9: A6 E LDAA [D,X] 10: A6 EB LDAA [$2345,Y] = $F2

40 11100111 = $E7 1: ; LDAA Addressing Modes 2: =00004000 ORG $4000
4: A LDAA $A3 5: B LDAA $5678 6: A LDAA 3,X 7: A6 E LDAA ,Y 8: C A6 F LDAA $1234,SP 9: A6 E LDAA [D,X] 10: A6 EB LDAA [$2345,Y] = $E7

41 11101011 = $EB 1: ; LDAA Addressing Modes 2: =00004000 ORG $4000
4: A LDAA $A3 5: B LDAA $5678 6: A LDAA 3,X 7: A6 E LDAA ,Y 8: C A6 F LDAA $1234,SP 9: A6 E LDAA [D,X] 10: A6 EB LDAA [$2345,Y] = $EB

42


Download ppt "The CPU12 Microprocessor Core"

Similar presentations


Ads by Google