Handout 5-Chapter3 - Source: H.-W. Huang, MC68HC12: An...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Handout 5 –Chapter 3 Figures and Examples Source: H.-W. Huang, MC68HC12: An Introduction , 1 st Ed., Chapter 2 Contents Assembly Programming Flow Chart Simple Assembly Code Example Looping Constructs Loop Primitive Instructions Looping Examples Assembly Programming Flow Chart Handout 5: Chapter 3 p. 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Simple Assembly Code Example Example assembly code N1, N2, SUM are labels for specific memory addresses STOP is a software interrupt (SWI) Details of example instructions. After being assembled Mnemonic Operand Machine Code After being stored to controller memory Example code mapped to memory beginning at $C200 Handout 5: Chapter 3 p. 2
Background image of page 2
Execution of example code Memory and registers (A, B, PC) when program begins Memory and registers (A, B, PC) after first instruction: $02 Æ A; PC Å PC+3 Memory and registers (A, B, PC) after second instruction: A A+$29; PC PC+3 Memory and registers (A, B, PC) after third instruction: A M($C209); PC PC+3 Next instruction is STOP (SWI) Handout 5: Chapter 3 p. 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

Handout 5-Chapter3 - Source: H.-W. Huang, MC68HC12: An...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online