arithmetic op : ADD, SUB,
INC
logical op :
CMP, AND, OR
data transfer : LDA,
STA
control transfer : BEQ, JMP, JSR
others :
NOP
Addressing mode
* absolute
LD R1, 100
* indirect
LD R1,(100)
* index
LD R1,(R2+R3)
* register
ADD R4,R3
* immediate
ADD R3,#2
* auto-increment LD R1,(R2)+
* auto-decrement LD R1,-(R2)
Calculate the effective address
Case study of an assembly language Motorola
6800
with the simulator SIM68 and an assembler A68
programmer model of 6800
A 8 bits
B 8 bits
X 16 bits index register
SP 16 bits stack pointer
CC 8 bits H,I,N,Z,V,C
memory model of 6800
64K : 00-FF for short, 0000-FFFF long
assembler a68
directive .ORG, .END, .DB define byte, .DW define word
symbolic name NAME:
literal H'100 (hex), 100, #2, #'A'
Example Find max from array AR[0..2]