#
# TEST PROGRAM
#

# INSTR   IR15 IR14 IR13 IR12 IR11 IR10 IR09 IR08 
# MOVE    0    0    0    0    X    X    X    X   
# ADD     0    0    0    1    X    X    X    X   
# SUB     0    0    1    0    X    X    X    X   
# AND     0    0    1    1    X    X    X    X   
# LOAD    0    1    0    0    X    X    X    X   
# STORE   0    1    0    1    X    X    X    X   
# JUMPU   1    0    0    0    X    X    X    X   
# JUMPZ   1    0    0    1    X    X    X    X   
# JUMPNZ  1    0    1    0    X    X    X    X   
 
# ACC BIT TEST
# ------------
 
move   0x00
move   0x01
move   0x02
move   0x04
move   0x08
move   0x10
move   0x20
move   0x40
move   0x80
move   0x40
move   0x20
move   0x10
move   0x08
move   0x04
move   0x02
move   0x01

# ADD TEST
# --------

add    0xFF - zero ACC
add    0xF0 - load high nibble
add    0x0F - load low nibble
add    0x01 - zero ACC

# SUB TEST
# --------

sub    0x01 - set all bits high 
sub    0xF0 - zero high nibble
sub    0x0F - zero low nibble 
sub    0x01 - set all bits high 
sub    0x01 - toggle all bits
add    0x01
sub    0x02
add    0x02
sub    0x04
add    0x04
sub    0x08
add    0x08

sub    0x10
add    0x10
sub    0x20
add    0x20
sub    0x40
add    0x40
sub    0x80
add    0x80

# AND TEST
# --------

and    0x7F
and    0x3F
and    0x1F
and    0x0F
and    0x07
and    0x03
and    0x01
and    0x00

# LOAD / STORE TEST
# -----------------

move   0x01
store  0xF0
move   0x02
store  0xF1
move   0x04
store  0xF2
move   0x08
store  0xF3
move   0x10
store  0xF4
move   0x20
store  0xF5
move   0x40
store  0xF6
move   0x80
store  0xF7

load   0xF0
load   0xF1
load   0xF2
load   0xF3
load   0xF4
load   0xF5
load   0xF6
load   0xF7

# ADDM TEST
# ---------

addm   0xF0
addm   0xF1
addm   0xF2
addm   0xF3
addm   0xF4
addm   0xF5
addm   0xF6
addm   0xF7

# JUMP TEST
# ---------

move    0x00 - test jump taken
jumpZ   83
move    0x0F

move    0x01
jumpNZ  86
move    0x0F

move    0x00 - test jump not taken
jumpNZ  89
jump    90
move    0x0F

move    0x01
jumpZ   93
jump    94
move    0x0F

move    0x00
jump    0










