Motorola's 68HC11x Family of 8-bit Micro-controllers

by Jonathan Sawyer

CS411 - October 16, 2007

About the 68HC11

About the 68HC11 continued...

Architecture / Hardware Design

Architecture / Hardware Design continued...

Architecture / Hardware Design continued...

Architecture / Hardware Design continued...

Programmer's Model

Programmer's Model continued...

Mnemonic  Operation  Addressing Mode  Instruction               Bytes  Cycles  Condition Codes
                                      Prebyte  Opcode  Operand                 S X H I N Z V C
========  =========  ===============  =======  ======  =======  =====  ======  ===============	

ABA       Add Accum  INH              -        1B      -        1      2       - - | - | | | |
           B to A
          (A += B)

BEQ       Branch if  REL              -        27      rr       2      3       - - - - - - - -
          = Zero

Where (in condition codes):
-    no change
|    may or may not change from high to low or low to high

Where (in addressing mode):
INH  Inherent (internal)
REL  Relative

Where (in operand):
rr   Offset relative to the address following the machine code offset byte.

Programmer's Model continued...

* this is an incomplete assembly example -- more is required
LDAA	#$FD	0xFD is two's compliment for decimal -3
LDAB	#$03	0x03 is, well, you guessed it, decimal 3
ABA		Add accumulator B to A, store in A
BEQ	$DEAD	Jump to $DEAD if the zero flag is set

Programmer's Model continued...

Instruction Set

Instruction Set continued...

SOMELABEL:	LDAA #$05	any words after LDAA <oper> is a comment
SOMELABEL:	LDAA #$0005	This is wrong.

Instruction Set continued...

LDAA #$06	Load decimal '6' into accumulator A
LDAB #$55	Load decimal '85' into accumulator B
* Note, accumulator D contains the value of unsigned decimal '1621' now.
* Why is this? D can be thought of the concatenation between A and B.
* so D = 0000 0110 0101 0101 (which indeed is 1621)
ABA		This stands for Add accumulators B and A and store the result into A
STAA $0101	Store Accumulator A into address $0101 (dec. 257).
* Address $0101 now has the value 0x5B

Instruction Set continued...

	LDAA	#$06	Load decimal '6' into accumulator A
	LDAB	#$7E	Load decimal '126' into accumulator B
	ABA		This stands for Add accumulators B and A and store the result into A
	BVC	NOV	Branch to NOV if overflow is clear (V is the overflow signal).
FOO:	BRA	FOO	Infinite loop. Branch Always to label FOO.
NOV:	STAA	$0101	Store Accumulator A into address $0101 (dec. 257).
* Why is this overflow? We are working with signed 8-bit integers!

Demo

Common Uses

Questions?