1 / 42

The CPU12 Microprocessor Core

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

Download Presentation

The CPU12 Microprocessor Core

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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. 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

  7. 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

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

  9. Introducing the CPU12 • The CPU12 Registers • CPU12 Addressing Modes • CPU12 Instructions

  10. Pre-decrement indexed addressing

  11. Using X as a stack pointerfor a data stack LDY 2,X+will pop $1234 into Y

  12. MOVW 0,X,2,-X

  13. LDD 0,XMOVW 2,X,0,XSTD 2,X

  14. MOVW 2,X,2,-X

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

  16. 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]

  17. 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

  18. 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

  19. 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

  20. 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

More Related