The cpu12 microprocessor core
Download
1 / 42

The CPU12 Microprocessor Core - PowerPoint PPT Presentation


  • 77 Views
  • Uploaded on

The CPU12 Microprocessor Core. Lecture L2.1. 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. Introducing the CPU12. The CPU12 Registers

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' The CPU12 Microprocessor Core' - abdul-gordon


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
The cpu12 microprocessor core

The CPU12 Microprocessor Core

Lecture L2.1


Reference
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


Introducing the cpu12
Introducing the CPU12

  • The CPU12 Registers

  • CPU12 Addressing Modes

  • CPU12 Instructions




The cpu12 microprocessor core

A

c

c

u

m

u

l

a

t

o

r

A

A

c

c

u

m

u

l

a

t

o

r

B

A

B

A

c

c

u

m

u

l

a

t

o

r

D

D

The 68HC12 Accumulators


The cpu12 microprocessor core

I

n

d

e

x

r

e

g

i

s

t

e

r

X

X

I

n

d

e

x

r

e

g

i

s

t

e

r

Y

Y

Index Registers, X and Y


The cpu12 microprocessor core

S

t

a

c

k

P

o

i

n

t

e

r

S

P

Stack Pointer, SP


Introducing the cpu121
Introducing the CPU12

  • The CPU12 Registers

  • CPU12 Addressing Modes

  • CPU12 Instructions



Using x as a stack pointer for a data stack
Using X as a stack pointerfor a data stack

LDY 2,X+will pop $1234 into Y



Ldd 0 x movw 2 x 0 x std 2 x
LDD 0,XMOVW 2,X,0,XSTD 2,X



Introducing the cpu122
Introducing the CPU12

  • The CPU12 Registers

  • CPU12 Addressing Modes

  • CPU12 Instructions


The cpu12 microprocessor core

Load Accumulator A

1: ; LDAA Addressing Modes

2: =00004000 ORG $4000

3: 4000 86 35 LDAA #$35

4: 4002 96 A3 LDAA $A3

5: 4004 B6 5678 LDAA $5678

6: 4007 A6 03 LDAA 3,X

7: 4009 A6 E9 38 LDAA -200,Y

8: 400C A6 F2 1234 LDAA $1234,SP

9: 4010 A6 E7 LDAA [D,X]

10: 4012 A6 EB 2345 LDAA [$2345,Y]


The cpu12 microprocessor core

1: ; LDAA Addressing Modes

2: =00004000 ORG $4000

3: 4000 86 35 LDAA #$35

4: 4002 96 A3 LDAA $A3

5: 4004 B6 5678 LDAA $5678

6: 4007 A6 03 LDAA 3,X

7: 4009 A6 E9 38 LDAA -200,Y

8: 400C A6 F2 1234 LDAA $1234,SP

9: 4010 A6 E7 LDAA [D,X]

10: 4012 A6 EB 2345 LDAA [$2345,Y]

200 = $C8 = 11001000 9-bit = 011001000

2’s comp = 100111000 = $138

11101001 = $E9


The cpu12 microprocessor core

1: ; LDAA Addressing Modes

2: =00004000 ORG $4000

3: 4000 86 35 LDAA #$35

4: 4002 96 A3 LDAA $A3

5: 4004 B6 5678 LDAA $5678

6: 4007 A6 03 LDAA 3,X

7: 4009 A6 E9 38 LDAA -200,Y

8: 400C A6 F2 1234 LDAA $1234,SP

9: 4010 A6 E7 LDAA [D,X]

10: 4012 A6 EB 2345 LDAA [$2345,Y]

11110010 = $F2


The cpu12 microprocessor core

1: ; LDAA Addressing Modes

2: =00004000 ORG $4000

3: 4000 86 35 LDAA #$35

4: 4002 96 A3 LDAA $A3

5: 4004 B6 5678 LDAA $5678

6: 4007 A6 03 LDAA 3,X

7: 4009 A6 E9 38 LDAA -200,Y

8: 400C A6 F2 1234 LDAA $1234,SP

9: 4010 A6 E7 LDAA [D,X]

10: 4012 A6 EB 2345 LDAA [$2345,Y]

11100111 = $E7


The cpu12 microprocessor core

1: ; LDAA Addressing Modes

2: =00004000 ORG $4000

3: 4000 86 35 LDAA #$35

4: 4002 96 A3 LDAA $A3

5: 4004 B6 5678 LDAA $5678

6: 4007 A6 03 LDAA 3,X

7: 4009 A6 E9 38 LDAA -200,Y

8: 400C A6 F2 1234 LDAA $1234,SP

9: 4010 A6 E7 LDAA [D,X]

10: 4012 A6 EB 2345 LDAA [$2345,Y]

11101011 = $EB