-
Notifications
You must be signed in to change notification settings - Fork 5
/
README.8070
140 lines (106 loc) · 2.02 KB
/
README.8070
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
Differences from the reference 8070 instruction set
.word not .dbyte (TO FIX)
No X`FF etc but 0xFF syntax is used (probably WONTFIX)
#nn is supported for constants as well as =nn
The use of $ in a symbol is not a good idea
Expressions are more limited (TODO one day)
Lowercase is used
Need to add .ADDR (writes value - 1)
Notes:
Although similar to the 8060 the assembly language format changes totally
We split them up as
Implicit
NOP
RET
SSM
imm16
JSR (PLI 0, addr)
JMP (LDI 0)
p,imm16
PLI
logic8
AND XOR (no S) OR
A,E
A,=const
S,=const (status)
A, memory
logic16 ADD SUB
A,E
A,=const
EA,=const
A, @disp,r disp,@r , disp,r label (actually PC rel)
EA, ""
A, label (0xFFxx) .dp
EA, label (0xFFxx)
mem8 DLD ILD
dld memory
dld 0xffxx
Branches
disp,r
label (implies disp,pc)
Swaps (both ways around allowed)
XCH A,E
XCH E,A
XCH EA,Pn
XCH Pn,EA
Weird
CALL
EA/T
DIV EA,T
MPY EA,T
Loads
E,A
S,A
A,S
A,E
r,EA
T,EA
A,=const8
EA,=const16
Pn,=const16
T,=const16
A,mem
EA,mem
T,m
A,0xFFxx
EA,0xFFxx
T,0xFFxx
EA,Pn
EA,T
Stores
A,mem
A,0xffxx
EA,mem
EA,0xffxx
A only
RR
RRL
SRL
A/EA
SL A
SR A
SL EA
SR EA
Pop POP/PUSH These have equivalent LD/ST representations
but are unique instructions not aliases
A
EA
Pn (not P1, P0 is RET)
A
EA
Pn (not P1)
Syntax
:n direct page.
=n constant (also support #n I think)
n,Pn offset (Pn, SP, PC)
@n,Pn autoindex (--Pn Pn++)
Pn,@n "" implies reverse sign
There is no automatic recognition of FFxx as direct page at this point, as
the classic assembler does because we have an actual linker so addresses
are unknown.
We accept the non alias versions of some instructions. So LD P0,=n (JMP) is
permitted as is PLI P0,=n (JSR) and POP P0 (RET)
BZ and BNZ are supported as JZ and JNZ for extension. BRA will extend to JMP
when necessary. The BP and BND have no inverses. There is no test for CC and
other flags. This is architectural. Instead LD A,S AND A,=n then BZ/BNZ.
Likewise things like "clear carry" are done with AND/OR S,=n