1 / 11

Physics 413 Chapter 3

Physics 413 Chapter 3. Examples Galore. ADDA The outcome is A + M A ADDA # $ 2B 8B 2B ADDA $ 3C 9B 3C ADDA $$ 5B24 AB 5B 24. Carry Bit in CCR. ADCA The outcome is A + M + C A

chip
Download Presentation

Physics 413 Chapter 3

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. Physics 413Chapter 3

  2. Examples Galore • ADDA The outcome is A + M A • ADDA # $ 2B8B 2B • ADDA $ 3C9B 3C • ADDA $$ 5B24AB 5B 24

  3. Carry Bit in CCR • ADCA The outcome is A + M + C A • Use this instruction when expecting a carry. Incidentally, CLC will clear the carry bit.

  4. Logical AND • What is the outcome of ANDA #$ 4C if accumulator A contains 3 A ?

  5. Logical AND 3A 0011 1010 4C 0100 1100 _________________________ 0000 1000 Hence A will contain 08 after the AND operation

  6. DAA DAA Decimal Adjust Accumulator Converts binary addition of BCD numbers into BCD format What will the contents of A be with & without DAA ? LDAA # $ 2386 23 ADDA # $ 488B 48 DAA 19 WAI3E

  7. DAA LDAA # $ 23 ADDA # $ 48 DAA WAI Without DAA the contents of A = 6B With DAA the contents of A = 71

  8. Index Register X is a 16-bit register How are the following three instructions different? LDX # $ 5C42 LDX $$ 5C42 LDX $ 5C

  9. Index Register • LDX #$ 5C42 The number 5C42 is loaded into X • LDX $$ 5C42 Numbers from 5C43 and 5C42 loaded • LDX $ 5C Numbers from 005D and 005C loaded

  10. Stack • Stack is the area of RAM pointed to by the 16-bit Stack Pointer (SP) • LDS functions like LDX • LDS #$ 5C42 The number 5C42 is loaded into SP • LDS $$ 5C42 Numbers from 5C43 and 5C42 loaded • LDS $ 5C Numbers from 005D and 005C loaded

  11. ASLA ASLA Arithmetic Shift Left Accumulator A. It shifts all the 8 bits of accumulator A one bit to the LEFT. The rightmost bit becomes 0 and the leftmost bit ends up as the carry bit of CCR C 0

More Related