#K$+Introduction to M68HC11

Instruction Set
Interrupt Vectors

#K$+M68HC11 Interrupt Vectors

Clock Monitor............. FFFC,FFFD
COP WatchDog.............. FFFA,FFFB
SWI....................... FFF6,FFF7
Timer (IC1F).............. FFEE,FFEF
Timer (IC2F).............. FFEC,FFED
Timer (IC3F).............. FFEA,FFEB
Timer (OC1F).............. FFE8,FFE9
Timer (OC2F).............. FFE6,FFE7
Timer (OC3F).............. FFE4,FFE5
Timer (OC4F).............. FFE2,FFE3
Timer (OC5F).............. FFE0,FFE1
Timer (TOF)............... FFDE,FFDD
Pulse Accumulator (PAOVF). FFDC,FFDD
Pulse Accumulator (PAII).. FFDA,FFDB

#K$+
Instruction Set

aba
abx
aby
adca
adcb
adda
addb
addd
anda
andb
asl
asla
aslb
asld
asr
asra
asrb
bcc
bclr
bcs
beq
bge
bgt
bhi
bhs
bita
bitb
ble
blo
bls
blt
bmi
bne
bpl
bra
brclr
brn
brset
bset
bsr
bvc
bvs
cba
clc
cli
clr
clra
clrb
clv
cmpa
cmpb
com
coma
comb
cpd
cpx
cpy
daa
dec
deca
decb
des
dex
dey
eora
eorb
fdiv
idiv
inc
inca
incb
ins
inx
iny
jmp
jsr
ldaa
ldab
ldd
lds
ldx
ldy
lsl
lsla
lslb
lsld
lsr
lsra
lsrb
lsrd
mul
neg
nega
negb
nop
oraa
orab
psha
pshb
pshx
pshy
pula
pulb
pulx
puly
rol
rola
rolb
ror
rora
rorb
rti
rts
sba
sbca
sbcb
sec
sei
sev
staa
stab
std
stop
sts
stx
sty
suba
subb
subd
swi
tab
tap
tba
test
tpa
tst
tsta
tstb
tsx
tsy
txs
tys
wai
xgdx
xgdy

#K$+
aba

Add Accumulators.  A + B -> A.  (INH)

#K$+
abx

Add B to X.  (INH)

#K$+
aby

Add B to Y.  (INH)

#K$+
adca

Add with carry to A. (IMM,DIR,EXT,INDX,INDY)

#K$+
adca

Add with carry to B.  (IMM,DIR,EXT,INDX,INDY)

#K$+
adda

Add memory to A. A + M -> A.  (IMM,DIR,EXT,INDX,INDY)

#K$+
addb

Add memory to B. B + M -> B.  (IMM,DIR,EXT,INDX,INDY)

#K$+
addd

Add 16 bit to D.  D + (M : M + 1) -> D.  (IMM,DIR,EXT,INDX,INDY)

#K$+
anda

AND A with memory.  A & M -> A (IMM,DIR,EXT,INDX,INDY)

#K$+
andb

AND B with memory.  B & M -> B (IMM,DIR,EXT,INDX,INDY)

#K$+
asl

Arithmetic shift left.  (EXT,INDX,INDY)

#K$+
asla

Arithmetic shift left A.  (INH)

#K$+
aslb

Arithmetic shift left B.  (INH)

#K$+
asld

Arithmetic shift left D.  (INH)

#K$+
asr

Arithmetic shift right.  (EXT,INDX,INDY)

#K$+
asra

Arithmetic shift right A.  (INH)

#K$+
asrb

Arithmetic shift right B.  (INH)

#K$+
bcc

Branch if carry clear.  (REL)

#K$+
bclr

Clear bits.  M : (mm) -> M (DIR,INDX,INDY)

#K$+
bcs

Branch if carry set.  (REL)

#K$+
beq

Branch if equal zero.  (REL)

#K$+
bge

Branch if greater equal zero.  (REL)

#K$+
bgt

Branch if greater than zero.  (REL)

#K$+
bhi

Branch if higher.  (REL)

#K$+
bhs

Branch if higher or same.  (REL)

#K$+
bita

Bit test A with memory. (IMM,DIR,EXT,INDX,INDY)

#K$+
bitb

Bit test B with memory. (IMM,DIR,EXT,INDX,INDY)

#K$+
ble

Branch if less than or equal to zero. (REL)

#K$+
blo

Branch if lower. (REL)

#K$+
bls

Branch if less or same. (REL)

#K$+
blt

Branch if less than zero. (REL)

#K$+
bmi

Branch if minus. (REL)

#K$+
bne

Branch if not equal zero. (REL)

#K$+
bpl

Branch if plus. (REL)

#K$+
bra

Branch always. (REL)

#K$+
brclr

Branch if bits clear. (DIR,INDX,INDY). (dd mm rr)
(ff mm rr)

#K$+
brn

Branch never. (REL)

#K$+
brset

Branch if bits set. (DIR,INDX,INDY) (dd mm rr)
(ff mm rr)

#K$+
bset

Set bits.         (DIR,INDX,INDY)   (dd mm)
(ff mm)

#K$+
bsr

Branch to subroutine.  (REL)

#K$+
bvc

Branch if overflow clear.  (REL)

#K$+
bvs

Branch if overflow set.  (REL)

#K$+
cba

Compare A to B.  (INH)

#K$+
clc

Clear carry bit.  (INH)

#K$+
cli

Clear interrupt mask.  (INH)

#K$+
clr

Clear memory bytes.  (EXT,INDX,INDY)

#K$+
clra

Clear accumulator A.  (INH)

#K$+
clrb

Clear accumulator B.  (INH)

#K$+
clv

Clear overflow flag.  (INH)

#K$+
cmpa

Compare A to memory.  (IMM,DIR,EXT,INDX,INDY)

#K$+
cmpb

Compare B to memory.  (IMM,DIR,EXT,INDX,INDY)

#K$+
com

Ones complement memory byte.  (EXT,INDX,INDY)

#K$+
coma

Ones complement A.  (INH)

#K$+
comb

Ones complement B.  (INH)

#K$+
cpd

compare D to memory 16-bit.  (IMM,DIR,EXT,INDX,INDY)

#K$+
cpx

compare X to memory 16-bit.  (IMM,DIR,EXT,INDX,INDY)

#K$+
cpy

compare Y to memory 16-bit.  (IMM,DIR,EXT,INDX,INDY)

#K$+
daa

Decimal adjust A.  (INH)

#K$+
dec

Decrement memory byte.  (EXT,INDX,INDY)

#K$+
deca

Decrement accumulator A.  (INH)

#K$+
decb

Decrement accumulator B.  (INH)

#K$+
des

Decrement stack pointer.  (INH)

#K$+
dex

Decrement index register X.  (INH)

#K$+
dey

Decrement index register Y.  (INH)

#K$+
eora

Exclusive OR A with memory.  (IMM,DIR,EXT,INDX,INDY)

#K$+
eorb

Exclusive OR B with memory.  (IMM,DIR,EXT,INDX,INDY)  

#K$+
fdiv

Fractional divide 16-bit by 16-bit .  (INH)

#K$+
idiv

Integer divide 16-bit by 16-bit .  (INH)

#K$+
inc

Increment memory byte .  (EXT,INDX,INDY)

#K$+
inca

Increment accumulator A.  (INH)

#K$+
incb

Increment accumulator B.  (INH)

#K$+
ins

Increment stack pointer.  (INH)

#K$+
inx

Increment index register X.  (INH)

#K$+
iny

Increment index register Y.  (INH)

#K$+
jmp

Jump.  (EXT,INDX,INDY)

#K$+
jsr

Jump to subroutine.  (DIR,EXT,INDX,INDY)

#K$+
ldaa

Load accumulator A.  (IMM,DIR,EXT,INDX,INDY)

#K$+
ldab

Load accumulator B.  (IMM,DIR,EXT,INDX,INDY)

#K$+
ldd

Load double accumulator D.

CC IMM   ii
DC DIR   dd
FC EXT   hh ll
EC INDX  ff
18 EC INDY  ff

#K$+
ldjs

Load stack pointer.  (IMM,DIR,EXT,INDX,INDY)

#K$+
ldx

Load index register X.  (IMM,DIR,EXT,INDX,INDY)

#K$+
ldy

Load index register Y.  (IMM,DIR,EXT,INDX,INDY)

#K$+
lsl

Logical shift left.  (EXT,INDX,INDY)

#K$+
lsla

Logical shift left A.  (INH)

#K$+
lslb

Logical shift left B.  (INH)

#K$+
lsld

Logical shift left D.  (INH)

#K$+
lsr

Logical shift right.  (EXT,INDX,INDY)

#K$+
lsra

Logical shift right A.  (INH)

#K$+
lsrb

Logical shift right B.  (INH)

#K$+
lsrd

Logical shift right D.  (INH)

#K$+
mul

Multiply A * B -> D (INH)

#K$+
neg

Two's complement memory byte. (EXT,INDX,INDY)

#K$+
nega

Two's complement A. (INH)

#K$+
negb

Two's complement B. (INH)

#K$+
nop

No operation. (INH)

#K$+
oraa

Inclusive OR accumulator A. (IMM,DIR,EXT,INDX,INDY)

#K$+
orab

Inclusive OR accumulator B. (IMM,DIR,EXT,INDX,INDY)

#K$+
psha

Push A onto stack. (INH)

#K$+
pshb

Push B onto stack. (INH)

#K$+
pshx

Push X onto stack. (INH)

#K$+
pshy

Push Y onto stack. (INH)

#K$+
pula

Pull A from stack. (INH)

#K$+
pulb

Pull B from stack. (INH)

#K$+
pulx

Pull X from stack. (Hi byte first). (INH)

#K$+
puly

Pull Y from stack. (Hi byte first). (INH)

#K$+
rol

Rotate left. (EXT,INDX,INDY)

#K$+
rola

Rotate left A. (INH)

#K$+
rolb

Rotate left B. (INH)

#K$+
ror

Rotate right. (EXT,INDX,INDY)

#K$+
rora

Rotate right A. (INH)

#K$+
rorb

Rotate right B. (INH)

#K$+
rti

Return from interrupt. (INH)

#K$+
rts

Return from subroutine. (INH)

#K$+
sba

Subtract B from A -> A. (INH)

#K$+
sbca

Subtract with carry from A -> A. (IMM,DIR,EXT,INDX,INDY)

#K$+
sbcb

Subtract with carry from B -> B. (IMM,DIR,EXT,INDX,INDY)

#K$+
sec

Set carry. (INH)

#K$+
sei

Set interrupt mask. (INH)

#K$+
sev

Set overflow flag. (INH)

#K$+
staa

Store accumulator A -> M. (DIR,EXT,INDX,INDY)

#K$+
stab

Store accumulator B -> M. (DIR,EXT,INDX,INDY)

#K$+
std

Store accumulator D -> M  (A -> M : B -> M + 1).

DD DIR  dd
FD EXT  hh ll
ED INDX ff
18 ED INDY ff'  

#K$+
stop

Stop internal clocks. (DIR,EXT,INDX,INDY)

#K$+
sts

Store stack pointer SP -> M : M + 1. (DIR,EXT,INDX,INDY)

#K$+
stx

Store index register X -> M : M +  1. (DIR,EXT,INDX,INDY)

#K$+
sty

Store index register Y -> M : M +  1. (DIR,EXT,INDX,INDY)

#K$+
suba

Subtract memory from A.  A - M -> A. (IMM,DIR,EXT,INDX,INDY)

#K$+
subb

Subtract memory from B.  B - M -> B. (IMM,DIR,EXT,INDX,INDY)

#K$+
subd

Subtract memory from D.  D - M : M + 1 -> D. (IMM,DIR,EXT,INDX,INDY)

#K$+
swi

Software interrupt. (INH)

#K$+
tab

Transfer A to B. (INH)

#K$+
tap

Transfer A to CC (Control Register). (INH)

#K$+
tba

Transfer B to A. (INH)

#K$+
test

TEST (Only in test modes). (INH)

#K$+
tpa

Transfer CC (Control Register) to A. (INH)

#K$+
tst

Test for zero or minus. (EXT,INDX,INDY)

#K$+
tsta

Test A for zero or minus. (INH)

#K$+
tstb

Test B for zero or minus. (INH)

#K$+
tsx

Transfer stack pointer to X. (INH)

#K$+
tsy

Transfer stack pointer to Y. (INH)

#K$+
txs

Transfer X to stack pointer. (INH)

#K$+
tys

Transfer Y to stack pointer. (INH)

#K$+
wai

Wait for interrupt.  Stack the registers and wait. (INH)

#K$+
xgdx

Exchange D with X. (INH)

#K$+
xgdy

Exchange D with Y. (INH)