0% found this document useful (0 votes)
5 views1 page

Assembly Programming Examples and Guide

The document provides resources for assembly programming, including a skeleton program for practice and examples of various programming tasks. Users can write assembly code, run it in debug mode, and observe the effects on a Motorola HCS12 microcontroller. Additional resources such as a user manual and example codes for data handling, calculations, comparisons, and looping are available under Week 9 modules.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Assembly Programming Examples and Guide

The document provides resources for assembly programming, including a skeleton program for practice and examples of various programming tasks. Users can write assembly code, run it in debug mode, and observe the effects on a Motorola HCS12 microcontroller. Additional resources such as a user manual and example codes for data handling, calculations, comparisons, and looping are available under Week 9 modules.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

A bunch of worked out examples demoing various programming tasks (see below) has been

posted under Modules -> Week 9 - Assembly Programming.

The file 00.Skeleton_Program.zip does not contain any meaningful code but its purpose is for
you to have a project (that has all necessary settings) where you can try out some assembly
programming

 by writing instructions under the section marked "PUT YOUR ASSEMBLY CODE
HERE"
 then press F5 to run the assembly code in debug mode
 then in the simulator window (this window is meant to represent the insides of a motorola
hcs12 micro-controller, well the CPU and RAM parts anyway)
o you press F10 to step through your code
o Make sure you check the values inside registers and various parts of the ram to
understand how the instructions effect the microcontroller
 demo can be found in related video on the channel

The main user manual for HCS12 Microcontroller (and a shortened version) can be found
under Modules -> Week 9.

Also available ( under Modules -> Week 9 - Assembly Programming) are some example code
that does various programming tasks such as,

1. Data related (similar to variable and data related concepts in Python):


1. Placing data inside registers directly
2. Loading data from RAM into registers
3. Storing register values RAM
4. Defining data that is available as soon as a program begins (like defining contants
in Python)
2. Calculations (similar to using operators such as *, %, +, -, / etc in Python)
1. Adding
2. Multiplying
3. Dividing
3. Comparisons (decision making, like if/else in Python)
1. Comparing two values
4. Looping (repetitions, like for, while in Python)
1. Simple loop
2. Use a loop to solve an array problem (arrays are like lists in Python)

First couple of example code have been demoed in class today. Try out various instructions
from the user manual's Section 5 and/or Section 6. Watch related video on the youtube
channel to find the sections inside the pdf.

You might also like