Developing Software in Assembly Language
6812 Assembly Language Examples
By Jonathan W. Valvano

     This article, which discusses assembly language programming, accompanies the book Embedded Microcomputer Systems: Real Time Interfacing published by Brooks-Cole 1999. This document has four overall parts
     Overview
     Syntax (fields, pseudo ops)
     Local variables
     Examples (this document)

Stack and Interrupt Examples on the 6812
     
This subsection includes examples of stack initialization, stack overflow checking, setting of interrupt vectors and the use of the stack to pass parameters.

Interpreter Examples on the 6812
     
This subsection includes interpreters implemented with decision trees, vector tables, command tables, linked lists and binary trees.

First In First Out Queue Examples on the 6812
     
This subsection includes examples of first in first out queues.

Arithmetic Examples on the 6812
     This subsection includes examples of addition, subtraction, multiplication, digital filters, table interpolation, and fuzzy logic. The addition and subtraction examples show techniques to recognize and compensate for overflow.

Shift Examples on the 6812
     This subsection includes examples of signed and unsigned shifts.

Control Structure Examples on the 6812
     This subsection includes examples of if-then, for-loop, gadfly-loops and while-loop.