aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2005-10-12 17:29:57 +0000
committerStefan Monnier2005-10-12 17:29:57 +0000
commit0471d42690abdf59abc4a0946789171c658e026f (patch)
tree8b7829ea75c3244e76bbddcf12f8a382365ae84b
parentc755acf3df2059a8225e761c5fc511126b92b9db (diff)
downloademacs-0471d42690abdf59abc4a0946789171c658e026f.tar.gz
emacs-0471d42690abdf59abc4a0946789171c658e026f.zip
(mixal-mode-syntax-table): Add \n as end-comment.
(mixal-operation-codes): Remove. (mixal-operation-codes-alist): Immediately initialize to full value. (mixal-add-operation-code): Remove. (mixal-describe-operation-code): Make the arg non-optional. Use the interactive spec instead. Use mixal-operation-codes-alist rather than mixal-operation-codes. (mixal-font-lock-keywords): Don't highlight comments here any more. (mixal-font-lock-syntactic-keywords): New var. (mixal-mode): Use it. Fix comment-start-skip.
-rw-r--r--lisp/ChangeLog23
-rw-r--r--lisp/progmodes/mixal-mode.el1153
2 files changed, 522 insertions, 654 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bf29ee8420c..776db60e33a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,16 @@
12005-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * progmodes/mixal-mode.el (mixal-operation-codes): Remove.
4 (mixal-mode-syntax-table): Add \n as end-comment.
5 (mixal-operation-codes-alist): Immediately initialize to full value.
6 (mixal-add-operation-code): Remove.
7 (mixal-describe-operation-code): Make the arg non-optional.
8 Use the interactive spec instead.
9 Use mixal-operation-codes-alist rather than mixal-operation-codes.
10 (mixal-font-lock-keywords): Don't highlight comments here any more.
11 (mixal-font-lock-syntactic-keywords): New var.
12 (mixal-mode): Use it. Fix comment-start-skip.
13
12005-10-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 142005-10-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 15
3 * startup.el (command-line-x-option-alist): -nb => -nbi 16 * startup.el (command-line-x-option-alist): -nb => -nbi
@@ -12,6 +25,16 @@
12 25
13 * desktop.el (desktop-load-file): Do nothing when FUNCTION is nil. 26 * desktop.el (desktop-load-file): Do nothing when FUNCTION is nil.
14 27
282005-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
29
30 * progmodes/mixal-mode.el: Sync with version in the GNU MDK project.
31 Try to fix up minor layout issues like indentation, line break, etc...
32 (mixal-mode-syntax-table): Don't try to specify comment syntax,
33 because it doesn't work.
34 (mixal-operation-codes): Add some more codes.
35 (mixal-font-lock-keywords): Process comments here.
36 (mixal-mode): mixasm no longer needs -g option.
37
152005-10-11 Sven Joachim <svenjoac@gmx.de> 382005-10-11 Sven Joachim <svenjoac@gmx.de>
16 39
17 * progmodes/sh-script.el (sh-tmp-file): 40 * progmodes/sh-script.el (sh-tmp-file):
diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el
index 5134cf8292e..8c9359ae859 100644
--- a/lisp/progmodes/mixal-mode.el
+++ b/lisp/progmodes/mixal-mode.el
@@ -46,6 +46,14 @@
46 46
47;;; History: 47;;; History:
48;; Version 0.3: 48;; Version 0.3:
49;; 12/10/05: Stefan Monnier <monnier@iro.umontreal.ca>
50;; Use font-lock-syntactic-keywords to detect/mark comments.
51;; Use [^ \t\n]+ to match the operand part of a line.
52;; Drop mixal-operation-codes.
53;; Build the mixal-operation-codes-alist immediately.
54;; Use `interactive' in mixal-describe-operation-code.
55;; Remove useless ".*$" at the end of some regexps.
56;; Fix the definition of comment-start-skip.
49;; 08/10/05: sync mdk and emacs cvs 57;; 08/10/05: sync mdk and emacs cvs
50;; from emacs: compile-command and require-final-newline 58;; from emacs: compile-command and require-final-newline
51;; from mdk: see version 0.2 59;; from mdk: see version 0.2
@@ -79,10 +87,12 @@
79;;; Syntax table 87;;; Syntax table
80(defvar mixal-mode-syntax-table 88(defvar mixal-mode-syntax-table
81 (let ((st (make-syntax-table))) 89 (let ((st (make-syntax-table)))
82 ;; (modify-syntax-entry ?* "<" st) we need to do a bit more to make 90 ;; We need to do a bit more to make fontlocking for comments work.
83 ;; (modify-syntax-entry ?\n ">" st) fontlocking for comments work 91 ;; See mixal-font-lock-syntactic-keywords.
92 ;; (modify-syntax-entry ?* "<" st)
93 (modify-syntax-entry ?\n ">" st)
84 st) 94 st)
85 "Syntax table for `dot-mode'.") 95 "Syntax table for `mixal-mode'.")
86 96
87(defvar mixal-font-lock-label-face 'font-lock-variable-name-face 97(defvar mixal-font-lock-label-face 'font-lock-variable-name-face
88 "Face name to use for label names. 98 "Face name to use for label names.
@@ -99,48 +109,10 @@ value.")
99Default value is that of `font-lock-builtin-face', but you can modify its 109Default value is that of `font-lock-builtin-face', but you can modify its
100value.") 110value.")
101 111
102(defvar mixal-operation-codes
103 '("NOP" "ADD" "FADD" "SUB" "FSUB" "MUL" "FMUL" "DIV" "FDIV" "NUM" "CHAR"
104 "HLT" "SLA" "SRA" "SLAX" "SRAX" "SLC" "SRC" "MOVE" "LDA" "LD1" "LD2" "LD3"
105 "LD4" "LD5" "LD6" "LDX" "LDAN" "LD1N" "LD2N" "LD3N" "LD4N" "LD5N" "LD6N"
106 "LDXN" "STA" "ST1" "ST2" "ST3" "ST4" "ST5" "ST6" "STX" "STJ" "STZ" "JBUS"
107 "IOC" "IN" "OUT" "JRAD" "JMP" "JSJ" "JOV" "JNOV"
108 "JL" "JE" "JG" "JGE" "JNE" "JLE"
109 "JAN" "J1N" "J2N" "J3N" "J4N" "J5N" "J6N" "JXN"
110 "JAZ" "J1Z" "J2Z" "J3Z" "J4Z" "J5Z" "J6Z" "JXZ"
111 "JAP" "J1P" "J2P" "J3P" "J4P" "J5P" "J6P" "JXP"
112 "JANN" "J1NN" "J2NN" "J3NN" "J4NN" "J5NN" "J6NN" "JXNN"
113 "JANZ" "J1NZ" "J2NZ" "J3NZ" "J4NZ" "J5NZ" "J6NZ" "JXNZ"
114 "JANP" "J1NP" "J2NP" "J3NP" "J4NP" "J5NP" "J6NP" "JXNP"
115 "INCA" "DECA" "ENTA" "ENNA" "INC1" "DEC1" "ENT1" "ENN1"
116 "INC2" "DEC2" "ENT2" "ENN2" "INC3" "DEC3" "ENT3" "ENN3" "INC4" "DEC4"
117 "ENT4" "ENN4" "INC5" "DEC5" "ENT5" "ENN5" "INC6" "DEC6" "ENT6" "ENN6"
118 "INCX" "DECX" "ENTX" "ENNX" "CMPA" "FCMP" "CMP1" "CMP2" "CMP3" "CMP4"
119 "CMP5" "CMP6" "CMPX")
120 "List of possible operation codes as strings.")
121;; (makunbound 'mixal-operation-codes)
122
123(defvar mixal-assembly-pseudoinstructions 112(defvar mixal-assembly-pseudoinstructions
124 '("ORIG" "EQU" "CON" "ALF" "END") 113 '("ORIG" "EQU" "CON" "ALF" "END")
125 "List of possible assembly pseudoinstructions.") 114 "List of possible assembly pseudoinstructions.")
126 115
127;;; Font-locking:
128(defvar mixal-font-lock-keywords
129 `(("^\\([A-Z0-9a-z]+\\).*$"
130 (1 mixal-font-lock-label-face))
131 (,(regexp-opt mixal-operation-codes 'words)
132 . mixal-font-lock-operation-code-face)
133 (,(regexp-opt
134 mixal-assembly-pseudoinstructions 'words)
135 . mixal-font-lock-assembly-pseudoinstruction-face)
136 ("^[A-Z0-9a-z]*[ \t]+[A-ZO-9a-z]+[ \t]+\\(=.*=\\).*$"
137 (1 font-lock-constant-face))
138 ("^[A-Z0-9a-z]*[ \t]+[A-Z0-9a-z]+[ \t]+[A-Z0-9a-z,():+-\\*=\" ]*\t+\\(.*\\)$"
139 (1 font-lock-comment-face))
140 ("^\\*.*$" . font-lock-comment-face))
141 "Keyword highlighting specification for `mixal-mode'.")
142;; (makunbound 'mixal-font-lock-keywords)
143
144;;;; Compilation 116;;;; Compilation
145;; Output from mixasm is compatible with default behavior of emacs, 117;; Output from mixasm is compatible with default behavior of emacs,
146;; I just added a key (C-cc) and modified the make-command. 118;; I just added a key (C-cc) and modified the make-command.
@@ -149,1127 +121,996 @@ value.")
149;; Tabs works well by default. 121;; Tabs works well by default.
150 122
151;;;; Describe 123;;;; Describe
152(defvar mixal-operation-codes-alist '() 124(defvar mixal-operation-codes-alist
153 "Alist that contains all the possible operation codes for mix. 125 ;; FIXME: the codes FADD, FSUB, FMUL, FDIV, JRAD, and FCMP were in
154Each elt has the form 126 ;; mixal-operation-codes but not here. They should probably be added here.
155 (OP-CODE GROUP FULL-NAME C-BYTE F-BYTE DESCRIPTION EXECUTION-TIME) 127 `((LDA loading "load A" 8 field
156Where OP-CODE is the text of the opcode as an symbol, 128 "Put in rA the contents of cell no. M.
157FULL-NAME is the human readable name as a string,
158C-BYTE is the operation code telling what operation is to be performed,
159F-BYTE holds a modification of the operation code which can be a symbol
160 or a number,
161DESCRIPTION contains an string with a description about the operation code and
162EXECUTION-TIME holds info about the time it takes, number or string.")
163;; (makunbound 'mixal-operation-codes-alist)
164
165(defun mixal-add-operation-code (op-code group full-name C-byte F-byte
166 description execution-time)
167 "Add an operation code to `mixal-operation-codes-alist'."
168 (setq mixal-operation-codes-alist
169 (cons (list op-code group full-name C-byte F-byte
170 description execution-time)
171 mixal-operation-codes-alist)))
172
173;; now add each operation code
174
175(mixal-add-operation-code
176 'LDA 'loading "load A" 8 'field
177 "Put in rA the contents of cell no. M.
178Uses a + when there is no sign in subfield. Subfield is left padded with 129Uses a + when there is no sign in subfield. Subfield is left padded with
179zeros to make a word." 130zeros to make a word."
180 2) 131 2)
181 132
182(mixal-add-operation-code 133 (LDX loading "load X" 15 field
183 'LDX 'loading "load X" 15 'field 134 "Put in rX the contents of cell no. M.
184 "Put in rX the contents of cell no. M.
185Uses a + when there is no sign in subfield. Subfield is left padded with 135Uses a + when there is no sign in subfield. Subfield is left padded with
186zeros to make a word." 136zeros to make a word."
187 2) 137 2)
188 138
189(mixal-add-operation-code 139 (LD1 loading "load I1" ,(+ 8 1) field
190 'LD1 'loading "load I1" (+ 8 1) 'field 140 "Put in rI1 the contents of cell no. M.
191 "Put in rI1 the contents of cell no. M.
192Uses a + when there is no sign in subfield. Subfield is left padded with 141Uses a + when there is no sign in subfield. Subfield is left padded with
193zeros to make a word. Index registers only have 2 bytes and a sign, Trying 142zeros to make a word. Index registers only have 2 bytes and a sign, Trying
194to set anything more that that will result in undefined behavior." 143to set anything more that that will result in undefined behavior."
195 2) 144 2)
196 145
197(mixal-add-operation-code 146 (LD2 loading "load I2" ,(+ 8 2) field
198 'LD2 'loading "load I2" (+ 8 2) 'field 147 "Put in rI2 the contents of cell no. M.
199 "Put in rI2 the contents of cell no. M.
200Uses a + when there is no sign in subfield. Subfield is left padded with 148Uses a + when there is no sign in subfield. Subfield is left padded with
201zeros to make a word. Index registers only have 2 bytes and a sign, Trying 149zeros to make a word. Index registers only have 2 bytes and a sign, Trying
202to set anything more that that will result in undefined behavior." 150to set anything more that that will result in undefined behavior."
203 2) 151 2)
204 152
205(mixal-add-operation-code 153 (LD3 loading "load I3" ,(+ 8 3) field
206 'LD3 'loading "load I3" (+ 8 3) 'field 154 "Put in rI3 the contents of cell no. M.
207 "Put in rI3 the contents of cell no. M.
208Uses a + when there is no sign in subfield. Subfield is left padded with 155Uses a + when there is no sign in subfield. Subfield is left padded with
209zeros to make a word. Index registers only have 2 bytes and a sign, Trying 156zeros to make a word. Index registers only have 2 bytes and a sign, Trying
210to set anything more that that will result in undefined behavior." 157to set anything more that that will result in undefined behavior."
211 2) 158 2)
212 159
213(mixal-add-operation-code 160 (LD4 loading "load I4" ,(+ 8 4) field
214 'LD4 'loading "load I4" (+ 8 4) 'field 161 "Put in rI4 the contents of cell no. M.
215 "Put in rI4 the contents of cell no. M.
216Uses a + when there is no sign in subfield. Subfield is left padded with 162Uses a + when there is no sign in subfield. Subfield is left padded with
217zeros to make a word. Index registers only have 2 bytes and a sign, Trying 163zeros to make a word. Index registers only have 2 bytes and a sign, Trying
218to set anything more that that will result in undefined behavior." 164to set anything more that that will result in undefined behavior."
219 2) 165 2)
220 166
221(mixal-add-operation-code 167 (LD5 loading "load I5" ,(+ 8 5) field
222 'LD5 'loading "load I5" (+ 8 5) 'field 168 "Put in rI5 the contents of cell no. M.
223 "Put in rI5 the contents of cell no. M.
224Uses a + when there is no sign in subfield. Subfield is left padded with 169Uses a + when there is no sign in subfield. Subfield is left padded with
225zeros to make a word. Index registers only have 2 bytes and a sign, Trying 170zeros to make a word. Index registers only have 2 bytes and a sign, Trying
226to set anything more that that will result in undefined behavior." 171to set anything more that that will result in undefined behavior."
227 2) 172 2)
228 173
229(mixal-add-operation-code 174 (LD6 loading "load I6" ,(+ 8 6) field
230 'LD6 'loading "load I6" (+ 8 6) 'field 175 "Put in rI6 the contents of cell no. M.
231 "Put in rI6 the contents of cell no. M.
232Uses a + when there is no sign in subfield. Subfield is left padded with 176Uses a + when there is no sign in subfield. Subfield is left padded with
233zeros to make a word. Index registers only have 2 bytes and a sign, Trying 177zeros to make a word. Index registers only have 2 bytes and a sign, Trying
234to set anything more that that will result in undefined behavior." 178to set anything more that that will result in undefined behavior."
235 2) 179 2)
236 180
237(mixal-add-operation-code 181 (LDAN loading "load A negative" 16 field
238 'LDAN 'loading "load A negative" 16 'field 182 "Put in rA the contents of cell no. M, with opposite sign.
239 "Put in rA the contents of cell no. M, with opposite sign.
240Uses a + when there is no sign in subfield, otherwise use the opposite sign. 183Uses a + when there is no sign in subfield, otherwise use the opposite sign.
241Subfield is left padded with zeros to make a word." 184Subfield is left padded with zeros to make a word."
242 2) 185 2)
243 186
244(mixal-add-operation-code 187 (LDXN loading "load X negative" 23 field
245 'LDXN 'loading "load X negative" 23 'field 188 "Put in rX the contents of cell no. M, with opposite sign.
246 "Put in rX the contents of cell no. M, with opposite sign.
247Uses a + when there is no sign in subfield, otherwise use the opposite sign. 189Uses a + when there is no sign in subfield, otherwise use the opposite sign.
248Subfield is left padded with zeros to make a word." 190Subfield is left padded with zeros to make a word."
249 2) 191 2)
250 192
251(mixal-add-operation-code 193 (LD1N loading "load I1 negative" ,(+ 16 1) field
252 'LD1N 'loading "load I1 negative" (+ 16 1) 'field 194 "Put in rI1 the contents of cell no. M, with opposite sign.
253 "Put in rI1 the contents of cell no. M, with opposite sign.
254Uses a + when there is no sign in subfield, otherwise use the opposite sign. 195Uses a + when there is no sign in subfield, otherwise use the opposite sign.
255Subfield is left padded with zeros to make a word. Index registers only 196Subfield is left padded with zeros to make a word. Index registers only
256have 2 bytes and a sign, Trying to set anything more that that will result 197have 2 bytes and a sign, Trying to set anything more that that will result
257in undefined behavior." 198in undefined behavior."
258 2) 199 2)
259 200
260(mixal-add-operation-code 201 (LD2N loading "load I2 negative" ,(+ 16 2) field
261 'LD2N 'loading "load I2 negative" (+ 16 2) 'field 202 "Put in rI2 the contents of cell no. M, with opposite sign.
262 "Put in rI2 the contents of cell no. M, with opposite sign.
263Uses a + when there is no sign in subfield, otherwise use the opposite sign. 203Uses a + when there is no sign in subfield, otherwise use the opposite sign.
264Subfield is left padded with zeros to make a word. Index registers only 204Subfield is left padded with zeros to make a word. Index registers only
265have 2 bytes and a sign, Trying to set anything more that that will result 205have 2 bytes and a sign, Trying to set anything more that that will result
266in undefined behavior." 206in undefined behavior."
267 2) 207 2)
268 208
269(mixal-add-operation-code 209 (LD3N loading "load I3 negative" ,(+ 16 3) field
270 'LD3N 'loading "load I3 negative" (+ 16 3) 'field 210 "Put in rI3 the contents of cell no. M, with opposite sign.
271 "Put in rI3 the contents of cell no. M, with opposite sign.
272Uses a + when there is no sign in subfield, otherwise use the opposite sign. 211Uses a + when there is no sign in subfield, otherwise use the opposite sign.
273Subfield is left padded with zeros to make a word. Index registers only 212Subfield is left padded with zeros to make a word. Index registers only
274have 2 bytes and a sign, Trying to set anything more that that will result 213have 2 bytes and a sign, Trying to set anything more that that will result
275in undefined behavior." 214in undefined behavior."
276 2) 215 2)
277 216
278(mixal-add-operation-code 217 (LD4N loading "load I4 negative" ,(+ 16 4) field
279 'LD4N 'loading "load I4 negative" (+ 16 4) 'field 218 "Put in rI4 the contents of cell no. M, with opposite sign.
280 "Put in rI4 the contents of cell no. M, with opposite sign.
281Uses a + when there is no sign in subfield, otherwise use the opposite sign. 219Uses a + when there is no sign in subfield, otherwise use the opposite sign.
282Subfield is left padded with zeros to make a word. Index registers only 220Subfield is left padded with zeros to make a word. Index registers only
283have 2 bytes and a sign, Trying to set anything more that that will result 221have 2 bytes and a sign, Trying to set anything more that that will result
284in undefined behavior." 222in undefined behavior."
285 2) 223 2)
286 224
287(mixal-add-operation-code 225 (LD5N loading "load I5 negative" ,(+ 16 5) field
288 'LD5N 'loading "load I5 negative" (+ 16 5) 'field 226 "Put in rI5 the contents of cell no. M, with opposite sign.
289 "Put in rI5 the contents of cell no. M, with opposite sign.
290Uses a + when there is no sign in subfield, otherwise use the opposite sign. 227Uses a + when there is no sign in subfield, otherwise use the opposite sign.
291Subfield is left padded with zeros to make a word. Index registers only 228Subfield is left padded with zeros to make a word. Index registers only
292have 2 bytes and a sign, Trying to set anything more that that will result 229have 2 bytes and a sign, Trying to set anything more that that will result
293in undefined behavior." 230in undefined behavior."
294 2) 231 2)
295 232
296(mixal-add-operation-code 233 (LD6N loading "load I6 negative" ,(+ 16 6) field
297 'LD6N 'loading "load I6 negative" (+ 16 6) 'field 234 "Put in rI6 the contents of cell no. M, with opposite sign.
298 "Put in rI6 the contents of cell no. M, with opposite sign.
299Uses a + when there is no sign in subfield, otherwise use the opposite sign. 235Uses a + when there is no sign in subfield, otherwise use the opposite sign.
300Subfield is left padded with zeros to make a word. Index registers only 236Subfield is left padded with zeros to make a word. Index registers only
301have 2 bytes and a sign, Trying to set anything more that that will result 237have 2 bytes and a sign, Trying to set anything more that that will result
302in undefined behavior." 238in undefined behavior."
303 2) 239 2)
304 240
305(mixal-add-operation-code 241 (STA storing "store A" 24 field
306 'STA 'storing "store A" 24 'field 242 "Store in cell Nr. M the contents of rA.
307 "Store in cell Nr. M the contents of rA.
308The modification of the operation code represents the subfield of the 243The modification of the operation code represents the subfield of the
309memory cell that is to be overwritten with bytes from a register. These 244memory cell that is to be overwritten with bytes from a register. These
310bytes are taken beginning by the rightmost side of the register. The 245bytes are taken beginning by the rightmost side of the register. The
311sign of the memory cell is not changed, unless it is part of the subfield." 246sign of the memory cell is not changed, unless it is part of the subfield."
312 2) 247 2)
313 248
314(mixal-add-operation-code 249 (STX storing "store X" 31 field
315 'STX 'storing "store X" 31 'field 250 "Store in cell Nr. M the contents of rX.
316 "Store in cell Nr. M the contents of rX.
317The modification of the operation code represents the subfield of the 251The modification of the operation code represents the subfield of the
318memory cell that is to be overwritten with bytes from a register. These 252memory cell that is to be overwritten with bytes from a register. These
319bytes are taken beginning by the rightmost side of the register. The 253bytes are taken beginning by the rightmost side of the register. The
320sign of the memory cell is not changed, unless it is part of the subfield." 254sign of the memory cell is not changed, unless it is part of the subfield."
321 2) 255 2)
322 256
323(mixal-add-operation-code 257 (ST1 storing "store I1" ,(+ 24 1) field
324 'ST1 'storing "store I1" (+ 24 1) 'field 258 "Store in cell Nr. M the contents of rI1.
325 "Store in cell Nr. M the contents of rI1.
326The modification of the operation code represents the subfield of the 259The modification of the operation code represents the subfield of the
327memory cell that is to be overwritten with bytes from a register. These 260memory cell that is to be overwritten with bytes from a register. These
328bytes are taken beginning by the rightmost side of the register. The 261bytes are taken beginning by the rightmost side of the register. The
329sign of the memory cell is not changed, unless it is part of the subfield. 262sign of the memory cell is not changed, unless it is part of the subfield.
330Because index registers only have 2 bytes and a sign, the rest of the bytes 263Because index registers only have 2 bytes and a sign, the rest of the bytes
331are assumed to be 0." 264are assumed to be 0."
332 2) 265 2)
333 266
334(mixal-add-operation-code 267 (ST2 storing "store I2" ,(+ 24 2) field
335 'ST2 'storing "store I2" (+ 24 2) 'field 268 "Store in cell Nr. M the contents of rI2.
336 "Store in cell Nr. M the contents of rI2.
337The modification of the operation code represents the subfield of the 269The modification of the operation code represents the subfield of the
338memory cell that is to be overwritten with bytes from a register. These 270memory cell that is to be overwritten with bytes from a register. These
339bytes are taken beginning by the rightmost side of the register. The 271bytes are taken beginning by the rightmost side of the register. The
340sign of the memory cell is not changed, unless it is part of the subfield. 272sign of the memory cell is not changed, unless it is part of the subfield.
341Because index registers only have 2 bytes and a sign, the rest of the bytes 273Because index registers only have 2 bytes and a sign, the rest of the bytes
342are assumed to be 0." 274are assumed to be 0."
343 2) 275 2)
344 276
345(mixal-add-operation-code 277 (ST3 storing "store I3" ,(+ 24 3) field
346 'ST3 'storing "store I3" (+ 24 3) 'field 278 "Store in cell Nr. M the contents of rI3.
347 "Store in cell Nr. M the contents of rI3.
348The modification of the operation code represents the subfield of the 279The modification of the operation code represents the subfield of the
349memory cell that is to be overwritten with bytes from a register. These 280memory cell that is to be overwritten with bytes from a register. These
350bytes are taken beginning by the rightmost side of the register. The 281bytes are taken beginning by the rightmost side of the register. The
351sign of the memory cell is not changed, unless it is part of the subfield. 282sign of the memory cell is not changed, unless it is part of the subfield.
352Because index registers only have 2 bytes and a sign, the rest of the bytes 283Because index registers only have 2 bytes and a sign, the rest of the bytes
353are assumed to be 0." 284are assumed to be 0."
354 2) 285 2)
355 286
356(mixal-add-operation-code 287 (ST4 storing "store I4" ,(+ 24 4) field
357 'ST4 'storing "store I4" (+ 24 4) 'field 288 "Store in cell Nr. M the contents of rI4.
358 "Store in cell Nr. M the contents of rI4.
359The modification of the operation code represents the subfield of the 289The modification of the operation code represents the subfield of the
360memory cell that is to be overwritten with bytes from a register. These 290memory cell that is to be overwritten with bytes from a register. These
361bytes are taken beginning by the rightmost side of the register. The 291bytes are taken beginning by the rightmost side of the register. The
362sign of the memory cell is not changed, unless it is part of the subfield. 292sign of the memory cell is not changed, unless it is part of the subfield.
363Because index registers only have 2 bytes and a sign, the rest of the bytes 293Because index registers only have 2 bytes and a sign, the rest of the bytes
364are assumed to be 0." 294are assumed to be 0."
365 2) 295 2)
366 296
367(mixal-add-operation-code 297 (ST5 storing "store I5" ,(+ 24 5) field
368 'ST5 'storing "store I5" (+ 24 5) 'field 298 "Store in cell Nr. M the contents of rI5.
369 "Store in cell Nr. M the contents of rI5.
370The modification of the operation code represents the subfield of the 299The modification of the operation code represents the subfield of the
371memory cell that is to be overwritten with bytes from a register. These 300memory cell that is to be overwritten with bytes from a register. These
372bytes are taken beginning by the rightmost side of the register. The 301bytes are taken beginning by the rightmost side of the register. The
373sign of the memory cell is not changed, unless it is part of the subfield. 302sign of the memory cell is not changed, unless it is part of the subfield.
374Because index registers only have 2 bytes and a sign, the rest of the bytes 303Because index registers only have 2 bytes and a sign, the rest of the bytes
375are assumed to be 0." 304are assumed to be 0."
376 2) 305 2)
377 306
378(mixal-add-operation-code 307 (ST6 storing "store I6" ,(+ 24 6) field
379 'ST6 'storing "store I6" (+ 24 6) 'field 308 "Store in cell Nr. M the contents of rI6.
380 "Store in cell Nr. M the contents of rI6.
381The modification of the operation code represents the subfield of the 309The modification of the operation code represents the subfield of the
382memory cell that is to be overwritten with bytes from a register. These 310memory cell that is to be overwritten with bytes from a register. These
383bytes are taken beginning by the rightmost side of the register. The 311bytes are taken beginning by the rightmost side of the register. The
384sign of the memory cell is not changed, unless it is part of the subfield. 312sign of the memory cell is not changed, unless it is part of the subfield.
385Because index registers only have 2 bytes and a sign, the rest of the bytes 313Because index registers only have 2 bytes and a sign, the rest of the bytes
386are assumed to be 0." 314are assumed to be 0."
387 2) 315 2)
388 316
389(mixal-add-operation-code 317 (STJ storing "store J" 32 field
390 'STJ 'storing "store J" 32 'field 318 "Store in cell Nr. M the contents of rJ.
391 "Store in cell Nr. M the contents of rJ.
392The modification of the operation code represents the subfield of the 319The modification of the operation code represents the subfield of the
393memory cell that is to be overwritten with bytes from a register. These 320memory cell that is to be overwritten with bytes from a register. These
394bytes are taken beginning by the rightmost side of the register. The sign 321bytes are taken beginning by the rightmost side of the register. The sign
395of rJ is always +, sign of the memory cell is not changed, unless it is 322of rJ is always +, sign of the memory cell is not changed, unless it is
396part of the subfield. The default field for STJ is (0:2)." 323part of the subfield. The default field for STJ is (0:2)."
397 2) 324 2)
398 325
399(mixal-add-operation-code 326 (STZ storing "store zero" 33 field
400 'STZ 'storing "store zero" 33 'field 327 "Store in cell Nr. M '+ 0'.
401 "Store in cell Nr. M '+ 0'.
402The modification of the operation code represents the subfield of the 328The modification of the operation code represents the subfield of the
403memory cell that is to be overwritten with zeros." 329memory cell that is to be overwritten with zeros."
404 2) 330 2)
405 331
406(mixal-add-operation-code 332 (ADD arithmetic "add" 1 field
407 'ADD 'arithmetic "add" 1 'field 333 "Add to A the contents of cell Nr. M.
408 "Add to A the contents of cell Nr. M.
409Subfield is padded with zero to make a word. 334Subfield is padded with zero to make a word.
410If the result is to large, the operation result modulo 1,073,741,823 (the 335If the result is to large, the operation result modulo 1,073,741,823 (the
411maximum value storable in a MIX word) is stored in `rA', and the overflow 336maximum value storable in a MIX word) is stored in `rA', and the overflow
412toggle is set to TRUE." 337toggle is set to TRUE."
413 2) 338 2)
414 339
415(mixal-add-operation-code 340 (SUB arithmetic "subtract" 2 field
416 'SUB 'arithmetic "subtract" 2 'field 341 "Subtract to A the contents of cell Nr. M.
417 "Subtract to A the contents of cell Nr. M.
418Subfield is padded with zero to make a word. 342Subfield is padded with zero to make a word.
419If the result is to large, the operation result modulo 1,073,741,823 (the 343If the result is to large, the operation result modulo 1,073,741,823 (the
420maximum value storable in a MIX word) is stored in `rA', and the overflow 344maximum value storable in a MIX word) is stored in `rA', and the overflow
421toggle is set to TRUE." 345toggle is set to TRUE."
422 2) 346 2)
423 347
424(mixal-add-operation-code 348 (MUL arithmetic "multiply" 3 field
425 'MUL 'arithmetic "multiply" 3 'field 349 "Multiplies the contents of cell Nr. M with A, result is 10 bytes and stored in rA and rX.
426 "Multiplies the contents of cell Nr. M with A, result is 10 bytes and stored in rA and rX.
427The sign is + if the sign of rA and cell M where the same, otherwise, it is -" 350The sign is + if the sign of rA and cell M where the same, otherwise, it is -"
428 10) 351 10)
429 352
430(mixal-add-operation-code 353 (DIV arithmetic "divide" 4 field
431 'DIV 'arithmetic "divide" 4 'field 354 "Both rA and rX are taken together and divided by cell Nr. M, quotient is placed in rA, remainder in rX.
432 "Both rA and rX are taken together and divided by cell Nr. M, quotient is placed in rA, remainder in rX.
433The sign is taken from rA, and after the divide the sign of rA is set to + when 355The sign is taken from rA, and after the divide the sign of rA is set to + when
434both the sign of rA and M where the same. Divide by zero and overflow of rA result 356both the sign of rA and M where the same. Divide by zero and overflow of rA
435in undefined behavior." 357result in undefined behavior."
436 12) 358 12)
437 359
438(mixal-add-operation-code 360 (ENTA address-transfer "enter A" 48
439 'ENTA 'address-transfer "enter A" 48 2 361 "Literal value is stored in rA.
440 "Literal value is stored in rA.
441Indexed, stores value of index in rA." 362Indexed, stores value of index in rA."
442 1) 363 1)
443 364
444(mixal-add-operation-code 365 (ENTX address-transfer "enter X" 55
445 'ENTX 'address-transfer "enter X" 55 2 366 "Literal value is stored in rX.
446 "Literal value is stored in rX.
447Indexed, stores value of index in rX." 367Indexed, stores value of index in rX."
448 1) 368 1)
449 369
450(mixal-add-operation-code 370 (ENT1 address-transfer "Enter rI1" ,(+ 48 1)
451 'ENT1 'address-transfer "Enter rI1" (+ 48 1) 2 371 "Literal value is stored in rI1.
452 "Literal value is stored in rI1.
453Indexed, stores value of index in rI1." 372Indexed, stores value of index in rI1."
454 1) 373 1)
455 374
456(mixal-add-operation-code 375 (ENT2 address-transfer "Enter rI2" ,(+ 48 2)
457 'ENT2 'address-transfer "Enter rI2" (+ 48 2) 2 376 "Literal value is stored in rI2.
458 "Literal value is stored in rI2.
459Indexed, stores value of index in rI2." 377Indexed, stores value of index in rI2."
460 1) 378 1)
461 379
462(mixal-add-operation-code 380 (ENT3 address-transfer "Enter rI3" ,(+ 48 3)
463 'ENT3 'address-transfer "Enter rI3" (+ 48 3) 2 381 "Literal value is stored in rI3.
464 "Literal value is stored in rI3.
465Indexed, stores value of index in rI3." 382Indexed, stores value of index in rI3."
466 1) 383 1)
467 384
468(mixal-add-operation-code 385 (ENT4 address-transfer "Enter rI4" ,(+ 48 4)
469 'ENT4 'address-transfer "Enter rI4" (+ 48 4) 2 386 "Literal value is stored in rI4.
470 "Literal value is stored in rI4.
471Indexed, stores value of index in rI4." 387Indexed, stores value of index in rI4."
472 1) 388 1)
473 389
474(mixal-add-operation-code 390 (ENT5 address-transfer "Enter rI5" ,(+ 48 5)
475 'ENT5 'address-transfer "Enter rI5" (+ 48 5) 2 391 "Literal value is stored in rI5.
476 "Literal value is stored in rI5.
477Indexed, stores value of index in rI5." 392Indexed, stores value of index in rI5."
478 1) 393 1)
479 394
480(mixal-add-operation-code 395 (ENT6 address-transfer "Enter rI6" ,(+ 48 6)
481 'ENT6 'address-transfer "Enter rI6" (+ 48 6) 2 396 "Literal value is stored in rI6.
482 "Literal value is stored in rI6.
483Indexed, stores value of index in rI6." 397Indexed, stores value of index in rI6."
484 1) 398 1)
485 399
486(mixal-add-operation-code 400 (ENNA address-transfer "enter negative A" 48
487 'ENNA 'address-transfer "enter negative A" 48 3 401 "Literal value is stored in rA with opposite sign.
488 "Literal value is stored in rA with opposite sign.
489Indexed, stores value of index in rA with opposite sign." 402Indexed, stores value of index in rA with opposite sign."
490 1) 403 1)
491 404
492(mixal-add-operation-code 405 (ENNX address-transfer "enter negative X" 55
493 'ENNX 'address-transfer "enter negative X" 55 3 406 "Literal value is stored in rX with opposite sign.
494 "Literal value is stored in rX with opposite sign.
495Indexed, stores value of index in rX with opposite sign." 407Indexed, stores value of index in rX with opposite sign."
496 1) 408 1)
497 409
498(mixal-add-operation-code 410 (ENN1 address-transfer "Enter negative rI1" ,(+ 48 1)
499 'ENN1 'address-transfer "Enter negative rI1" (+ 48 1) 3 411 "Literal value is stored in rI1 with opposite sign.
500 "Literal value is stored in rI1 with opposite sign.
501Indexed, stores value of index in rI1 with opposite sign." 412Indexed, stores value of index in rI1 with opposite sign."
502 1) 413 1)
503 414
504(mixal-add-operation-code 415 (ENN2 address-transfer "Enter negative rI2" ,(+ 48 2)
505 'ENN2 'address-transfer "Enter negative rI2" (+ 48 2) 3 416 "Literal value is stored in rI2 with opposite sign.
506 "Literal value is stored in rI2 with opposite sign.
507Indexed, stores value of index in rI2 with opposite sign." 417Indexed, stores value of index in rI2 with opposite sign."
508 1) 418 1)
509 419
510(mixal-add-operation-code 420 (ENN3 address-transfer "Enter negative rI3" ,(+ 48 3)
511 'ENN3 'address-transfer "Enter negative rI3" (+ 48 3) 3 421 "Literal value is stored in rI3 with opposite sign.
512 "Literal value is stored in rI3 with opposite sign.
513Indexed, stores value of index in rI3 with opposite sign." 422Indexed, stores value of index in rI3 with opposite sign."
514 1) 423 1)
515 424
516(mixal-add-operation-code 425 (ENN4 address-transfer "Enter negative rI4" ,(+ 48 4)
517 'ENN4 'address-transfer "Enter negative rI4" (+ 48 4) 3 426 "Literal value is stored in rI4 with opposite sign.
518 "Literal value is stored in rI4 with opposite sign.
519Indexed, stores value of index in rI4 with opposite sign." 427Indexed, stores value of index in rI4 with opposite sign."
520 1) 428 1)
521 429
522(mixal-add-operation-code 430 (ENN5 address-transfer "Enter negative rI5" ,(+ 48 5)
523 'ENN5 'address-transfer "Enter negative rI5" (+ 48 5) 3 431 "Literal value is stored in rI5 with opposite sign.
524 "Literal value is stored in rI5 with opposite sign.
525Indexed, stores value of index in rI5 with opposite sign." 432Indexed, stores value of index in rI5 with opposite sign."
526 1) 433 1)
527 434
528(mixal-add-operation-code 435 (ENN6 address-transfer "Enter negative rI6" ,(+ 48 6)
529 'ENN6 'address-transfer "Enter negative rI6" (+ 48 6) 3 436 "Literal value is stored in rI6 with opposite sign.
530 "Literal value is stored in rI6 with opposite sign.
531Indexed, stores value of index in rI6 with opposite sign." 437Indexed, stores value of index in rI6 with opposite sign."
532 1) 438 1)
533 439
534(mixal-add-operation-code 440 (INCA address-transfer "increase A" 48
535 'INCA 'address-transfer "increase A" 48 0 441 "Increase register A with the literal value of M.
536 "Increase register A with the literal value of M.
537On overflow the overflow toggle is set." 442On overflow the overflow toggle is set."
538 1) 443 1)
539 444
540(mixal-add-operation-code 445 (INCX address-transfer "increase X" 55
541 'INCX 'address-transfer "increase X" 55 0 446 "Increase register X with the literal value of M.
542 "Increase register X with the literal value of M.
543On overflow the overflow toggle is set." 447On overflow the overflow toggle is set."
544 1) 448 1)
545 449
546(mixal-add-operation-code 450 (INC1 address-transfer "increase I1" ,(+ 48 1)
547 'INC1 'address-transfer "increase I1" (+ 48 1) 0 451 "Increase register I1 with the literal value of M.
548 "Increase register I1 with the literal value of M.
549The result is undefined when the result does not fit in 452The result is undefined when the result does not fit in
5502 bytes." 4532 bytes."
551 1) 454 1)
552 455
553(mixal-add-operation-code 456 (INC2 address-transfer "increase I2" ,(+ 48 2)
554 'INC2 'address-transfer "increase I2" (+ 48 2) 0 457 "Increase register I2 with the literal value of M.
555 "Increase register I2 with the literal value of M.
556The result is undefined when the result does not fit in 458The result is undefined when the result does not fit in
5572 bytes." 4592 bytes."
558 1) 460 1)
559 461
560(mixal-add-operation-code 462 (INC3 address-transfer "increase I3" ,(+ 48 3)
561 'INC3 'address-transfer "increase I3" (+ 48 3) 0 463 "Increase register I3 with the literal value of M.
562 "Increase register I3 with the literal value of M.
563The result is undefined when the result does not fit in 464The result is undefined when the result does not fit in
5642 bytes." 4652 bytes."
565 1) 466 1)
566 467
567(mixal-add-operation-code 468 (INC4 address-transfer "increase I4" ,(+ 48 4)
568 'INC4 'address-transfer "increase I4" (+ 48 4) 0 469 "Increase register I4 with the literal value of M.
569 "Increase register I4 with the literal value of M.
570The result is undefined when the result does not fit in 470The result is undefined when the result does not fit in
5712 bytes." 4712 bytes."
572 1) 472 1)
573 473
574(mixal-add-operation-code 474 (INC5 address-transfer "increase I5" ,(+ 48 5)
575 'INC5 'address-transfer "increase I5" (+ 48 5) 0 475 "Increase register I5 with the literal value of M.
576 "Increase register I5 with the literal value of M.
577The result is undefined when the result does not fit in 476The result is undefined when the result does not fit in
5782 bytes." 4772 bytes."
579 1) 478 1)
580 479
581(mixal-add-operation-code 480 (INC6 address-transfer "increase I6" ,(+ 48 6)
582 'INC6 'address-transfer "increase I6" (+ 48 6) 0 481 "Increase register I6 with the literal value of M.
583 "Increase register I6 with the literal value of M.
584The result is undefined when the result does not fit in 482The result is undefined when the result does not fit in
5852 bytes." 4832 bytes."
586 1) 484 1)
587 485
588(mixal-add-operation-code 486 (DECA address-transfer "decrease A" 48
589 'DECA 'address-transfer "decrease A" 48 1 487 "Decrease register A with the literal value of M.
590 "Decrease register A with the literal value of M.
591On overflow the overflow toggle is set." 488On overflow the overflow toggle is set."
592 1) 489 1)
593 490
594(mixal-add-operation-code 491 (DECX address-transfer "decrease X" 55
595 'DECX 'address-transfer "decrease X" 55 1 492 "Decrease register X with the literal value of M.
596 "Decrease register X with the literal value of M.
597On overflow the overflow toggle is set." 493On overflow the overflow toggle is set."
598 1) 494 1)
599 495
600(mixal-add-operation-code 496 (DEC1 address-transfer "decrease I1" ,(+ 48 1)
601 'DEC1 'address-transfer "decrease I1" (+ 48 1) 1 497 "Decrease register I1 with the literal value of M.
602 "Decrease register I1 with the literal value of M.
603The result is undefined when the result does not fit in 498The result is undefined when the result does not fit in
6042 bytes." 4992 bytes."
605 1) 500 1)
606 501
607(mixal-add-operation-code 502 (DEC2 address-transfer "decrease I2" ,(+ 48 2)
608 'DEC2 'address-transfer "decrease I2" (+ 48 2) 1 503 "Decrease register I2 with the literal value of M.
609 "Decrease register I2 with the literal value of M.
610The result is undefined when the result does not fit in 504The result is undefined when the result does not fit in
6112 bytes." 5052 bytes."
612 1) 506 1)
613 507
614(mixal-add-operation-code 508 (DEC3 address-transfer "decrease I3" ,(+ 48 3)
615 'DEC3 'address-transfer "decrease I3" (+ 48 3) 1 509 "Decrease register I3 with the literal value of M.
616 "Decrease register I3 with the literal value of M.
617The result is undefined when the result does not fit in 510The result is undefined when the result does not fit in
6182 bytes." 5112 bytes."
619 1) 512 1)
620 513
621(mixal-add-operation-code 514 (DEC4 address-transfer "decrease I4" ,(+ 48 4)
622 'DEC4 'address-transfer "decrease I4" (+ 48 4) 1 515 "Decrease register I4 with the literal value of M.
623 "Decrease register I4 with the literal value of M.
624The result is undefined when the result does not fit in 516The result is undefined when the result does not fit in
6252 bytes." 5172 bytes."
626 1) 518 1)
627 519
628(mixal-add-operation-code 520 (DEC5 address-transfer "decrease I5" ,(+ 48 5)
629 'DEC5 'address-transfer "decrease I5" (+ 48 5) 1 521 "Decrease register I5 with the literal value of M.
630 "Decrease register I5 with the literal value of M.
631The result is undefined when the result does not fit in 522The result is undefined when the result does not fit in
6322 bytes." 5232 bytes."
633 1) 524 1)
634 525
635(mixal-add-operation-code 526 (DEC6 address-transfer "decrease I6" ,(+ 48 6)
636 'DEC6 'address-transfer "decrease I6" (+ 48 6) 1 527 "Decrease register I6 with the literal value of M.
637 "Decrease register I6 with the literal value of M.
638The result is undefined when the result does not fit in 528The result is undefined when the result does not fit in
6392 bytes." 5292 bytes."
640 1) 530 1)
641 531
642(mixal-add-operation-code 532 (CMPA comparison "compare A" 56 field
643 'CMPA 'comparison "compare A" 56 'field 533 "Compare contents of A with contents of M.
644 "Compare contents of A with contents of M.
645The field specifier works on both fields. The comparison indicator 534The field specifier works on both fields. The comparison indicator
646is set to LESS, EQUAL or GREATER depending on the outcome." 535is set to LESS, EQUAL or GREATER depending on the outcome."
647 2) 536 2)
648 537
649 538
650(mixal-add-operation-code 539 (CMPX comparison "compare X" 63 field
651 'CMPX 'comparison "compare X" 63 'field 540 "Compare contents of rX with contents of M.
652 "Compare contents of rX with contents of M.
653The field specifier works on both fields. The comparison indicator 541The field specifier works on both fields. The comparison indicator
654is set to LESS, EQUAL or GREATER depending on the outcome." 542is set to LESS, EQUAL or GREATER depending on the outcome."
655 2) 543 2)
656 544
657 545
658(mixal-add-operation-code 546 (CMP1 comparison "compare I1" ,(+ 56 1) field
659 'CMP1 'comparison "compare I1" (+ 56 1) 'field 547 "Compare contents of rI1 with contents of M.
660 "Compare contents of rI1 with contents of M.
661The field specifier works on both fields. The comparison indicator 548The field specifier works on both fields. The comparison indicator
662is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3 549is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3
663have a value of 0." 550have a value of 0."
664 2) 551 2)
665 552
666 553
667(mixal-add-operation-code 554 (CMP2 comparison "compare I2" ,(+ 56 2) field
668 'CMP2 'comparison "compare I2" (+ 56 2) 'field 555 "Compare contents of rI2 with contents of M.
669 "Compare contents of rI2 with contents of M.
670The field specifier works on both fields. The comparison indicator 556The field specifier works on both fields. The comparison indicator
671is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3 557is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3
672have a value of 0." 558have a value of 0."
673 2) 559 2)
674 560
675 561
676(mixal-add-operation-code 562 (CMP3 comparison "compare I3" ,(+ 56 3) field
677 'CMP3 'comparison "compare I3" (+ 56 3) 'field 563 "Compare contents of rI3 with contents of M.
678 "Compare contents of rI3 with contents of M.
679The field specifier works on both fields. The comparison indicator 564The field specifier works on both fields. The comparison indicator
680is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3 565is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3
681have a value of 0." 566have a value of 0."
682 2) 567 2)
683 568
684 569
685(mixal-add-operation-code 570 (CMP4 comparison "compare I4" ,(+ 56 4) field
686 'CMP4 'comparison "compare I4" (+ 56 4) 'field 571 "Compare contents of rI4 with contents of M.
687 "Compare contents of rI4 with contents of M.
688The field specifier works on both fields. The comparison indicator 572The field specifier works on both fields. The comparison indicator
689is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3 573is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3
690have a value of 0." 574have a value of 0."
691 2) 575 2)
692 576
693 577
694(mixal-add-operation-code 578 (CMP5 comparison "compare I5" ,(+ 56 5) field
695 'CMP5 'comparison "compare I5" (+ 56 5) 'field 579 "Compare contents of rI5 with contents of M.
696 "Compare contents of rI5 with contents of M.
697The field specifier works on both fields. The comparison indicator 580The field specifier works on both fields. The comparison indicator
698is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3 581is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3
699have a value of 0." 582have a value of 0."
700 2) 583 2)
701 584
702 585
703(mixal-add-operation-code 586 (CMP6 comparison "compare I6" ,(+ 56 6) field
704 'CMP6 'comparison "compare I6" (+ 56 6) 'field 587 "Compare contents of rI6 with contents of M.
705 "Compare contents of rI6 with contents of M.
706The field specifier works on both fields. The comparison indicator 588The field specifier works on both fields. The comparison indicator
707is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3 589is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3
708have a value of 0." 590have a value of 0."
709 2) 591 2)
710 592
711(mixal-add-operation-code 593 (JMP jump "jump" 39
712 'JMP 'jump "jump" 39 0 594 "Unconditional jump.
713 "Unconditional jump.
714Register J is set to the value of the next instruction that would have 595Register J is set to the value of the next instruction that would have
715been executed when there was no jump." 596been executed when there was no jump."
716 1) 597 1)
717 598
718(mixal-add-operation-code 599 (JSJ jump "jump, save J" 39
719 'JSJ 'jump "jump, save J" 39 1 600 "Unconditional jump, but rJ is not modified."
720 "Unconditional jump, but rJ is not modified." 601 1)
721 1)
722 602
723(mixal-add-operation-code 603 (JOV jump "jump on overflow" 39
724 'JOV 'jump "jump on overflow" 39 2 604 "Jump if OV is set (and turn it off).
725 "Jump if OV is set (and turn it off).
726Register J is set to the value of the next instruction that would have 605Register J is set to the value of the next instruction that would have
727been executed when there was no jump." 606been executed when there was no jump."
728 1) 607 1)
729 608
730(mixal-add-operation-code 609 (JNOV jump "Jump on no overflow" 39
731 'JNOV 'jump "Jump on no overflow" 39 3 610 "Jump if OV is not set (and turn it off).
732 "Jump if OV is not set (and turn it off).
733Register J is set to the value of the next instruction that would have 611Register J is set to the value of the next instruction that would have
734been executed when there was no jump." 612been executed when there was no jump."
735 1) 613 1)
736 614
737(mixal-add-operation-code 615 (JL jump "Jump on less" 39
738 'JL 'jump "Jump on less" 39 4 616 "Jump if '[CM] = L'.
739 "Jump if '[CM] = L'.
740Register J is set to the value of the next instruction that would have 617Register J is set to the value of the next instruction that would have
741been executed when there was no jump." 618been executed when there was no jump."
742 1) 619 1)
743 620
744 621
745(mixal-add-operation-code 622 (JE jump "Jump on equal" 39
746 'JE 'jump "Jump on equal" 39 5 623 "Jump if '[CM] = E'.
747 "Jump if '[CM] = E'.
748Register J is set to the value of the next instruction that would have 624Register J is set to the value of the next instruction that would have
749been executed when there was no jump." 625been executed when there was no jump."
750 1) 626 1)
751 627
752 628
753(mixal-add-operation-code 629 (JG jump "Jump on greater" 39
754 'JG 'jump "Jump on greater" 39 6 630 "Jump if '[CM] = G'.
755 "Jump if '[CM] = G'.
756Register J is set to the value of the next instruction that would have 631Register J is set to the value of the next instruction that would have
757been executed when there was no jump." 632been executed when there was no jump."
758 1) 633 1)
759 634
760 635
761(mixal-add-operation-code 636 (JGE jump "Jump on not less" 39
762 'JGE 'jump "Jump on not less" 39 7 637 "Jump if '[CM]' does not equal 'L'.
763 "Jump if '[CM]' does not equal 'L'.
764Register J is set to the value of the next instruction that would have 638Register J is set to the value of the next instruction that would have
765been executed when there was no jump." 639been executed when there was no jump."
766 1) 640 1)
767 641
768 642
769(mixal-add-operation-code 643 (JNE jump "Jump on not equal" 39
770 'JNE 'jump "Jump on not equal" 39 8 644 "Jump if '[CM]' does not equal 'E'.
771 "Jump if '[CM]' does not equal 'E'.
772Register J is set to the value of the next instruction that would have 645Register J is set to the value of the next instruction that would have
773been executed when there was no jump." 646been executed when there was no jump."
774 1) 647 1)
775 648
776 649
777(mixal-add-operation-code 650 (JLE jump "Jump on not greater" 39
778 'JLE 'jump "Jump on not greater" 39 9 651 "Jump if '[CM]' does not equal 'G'.
779 "Jump if '[CM]' does not equal 'G'.
780Register J is set to the value of the next instruction that would have 652Register J is set to the value of the next instruction that would have
781been executed when there was no jump." 653been executed when there was no jump."
782 1) 654 1)
783 655
784(mixal-add-operation-code 656 (JAN jump "jump A negative" 40
785 'JAN 'jump "jump A negative" 40 0 657 "Jump if the content of rA is negative.
786 "Jump if the content of rA is negative.
787Register J is set to the value of the next instruction that would have 658Register J is set to the value of the next instruction that would have
788been executed when there was no jump." 659been executed when there was no jump."
789 1) 660 1)
790 661
791 662
792(mixal-add-operation-code 663 (JAZ jump "jump A zero" 40
793 'JAZ 'jump "jump A zero" 40 1 664 "Jump if the content of rA is zero.
794 "Jump if the content of rA is zero.
795Register J is set to the value of the next instruction that would have 665Register J is set to the value of the next instruction that would have
796been executed when there was no jump." 666been executed when there was no jump."
797 1) 667 1)
798 668
799 669
800(mixal-add-operation-code 670 (JAP jump "jump A positive" 40
801 'JAP 'jump "jump A positive" 40 2 671 "Jump if the content of rA is positive.
802 "Jump if the content of rA is positive.
803Register J is set to the value of the next instruction that would have 672Register J is set to the value of the next instruction that would have
804been executed when there was no jump." 673been executed when there was no jump."
805 1) 674 1)
806 675
807 676
808(mixal-add-operation-code 677 (JANN jump "jump A non-negative" 40
809 'JANN 'jump "jump A non-negative" 40 3 678 "Jump if the content of rA is non-negative.
810 "Jump if the content of rA is non-negative.
811Register J is set to the value of the next instruction that would have 679Register J is set to the value of the next instruction that would have
812been executed when there was no jump." 680been executed when there was no jump."
813 1) 681 1)
814 682
815 683
816(mixal-add-operation-code 684 (JANZ jump "jump A non-zero" 40
817 'JANZ 'jump "jump A non-zero" 40 4 685 "Jump if the content of rA is non-zero.
818 "Jump if the content of rA is non-zero.
819Register J is set to the value of the next instruction that would have 686Register J is set to the value of the next instruction that would have
820been executed when there was no jump." 687been executed when there was no jump."
821 1) 688 1)
822 689
823 690
824(mixal-add-operation-code 691 (JANP jump "jump A non-positive" 40
825 'JANP 'jump "jump A non-positive" 40 5 692 "Jump if the content of rA is non-positive.
826 "Jump if the content of rA is non-positive.
827Register J is set to the value of the next instruction that would have 693Register J is set to the value of the next instruction that would have
828been executed when there was no jump." 694been executed when there was no jump."
829 1) 695 1)
830 696
831(mixal-add-operation-code 697 (JXN jump "jump X negative" 47
832 'JXN 'jump "jump X negative" 47 0 698 "Jump if the content of rX is negative.
833 "Jump if the content of rX is negative.
834Register J is set to the value of the next instruction that would have 699Register J is set to the value of the next instruction that would have
835been executed when there was no jump." 700been executed when there was no jump."
836 1) 701 1)
837 702
838 703
839(mixal-add-operation-code 704 (JXZ jump "jump X zero" 47
840 'JXZ 'jump "jump X zero" 47 1 705 "Jump if the content of rX is zero.
841 "Jump if the content of rX is zero.
842Register J is set to the value of the next instruction that would have 706Register J is set to the value of the next instruction that would have
843been executed when there was no jump." 707been executed when there was no jump."
844 1) 708 1)
845 709
846 710
847(mixal-add-operation-code 711 (JXP jump "jump X positive" 47
848 'JXP 'jump "jump X positive" 47 2 712 "Jump if the content of rX is positive.
849 "Jump if the content of rX is positive.
850Register J is set to the value of the next instruction that would have 713Register J is set to the value of the next instruction that would have
851been executed when there was no jump." 714been executed when there was no jump."
852 1) 715 1)
853 716
854 717
855(mixal-add-operation-code 718 (JXNN jump "jump X non-negative" 47
856 'JXNN 'jump "jump X non-negative" 47 3 719 "Jump if the content of rX is non-negative.
857 "Jump if the content of rX is non-negative.
858Register J is set to the value of the next instruction that would have 720Register J is set to the value of the next instruction that would have
859been executed when there was no jump." 721been executed when there was no jump."
860 1) 722 1)
861 723
862 724
863(mixal-add-operation-code 725 (JXNZ jump "jump X non-zero" 47
864 'JXNZ 'jump "jump X non-zero" 47 4 726 "Jump if the content of rX is non-zero.
865 "Jump if the content of rX is non-zero.
866Register J is set to the value of the next instruction that would have 727Register J is set to the value of the next instruction that would have
867been executed when there was no jump." 728been executed when there was no jump."
868 1) 729 1)
869 730
870 731
871(mixal-add-operation-code 732 (JXNP jump "jump X non-positive" 47
872 'JXNP 'jump "jump X non-positive" 47 5 733 "Jump if the content of rX is non-positive.
873 "Jump if the content of rX is non-positive.
874Register J is set to the value of the next instruction that would have 734Register J is set to the value of the next instruction that would have
875been executed when there was no jump." 735been executed when there was no jump."
876 1) 736 1)
877 737
878(mixal-add-operation-code 738 (J1N jump "jump I1 negative" ,(+ 40 1)
879 'J1N 'jump "jump I1 negative" (+ 40 1) 0 739 "Jump if the content of rI1 is negative.
880 "Jump if the content of rI1 is negative.
881Register J is set to the value of the next instruction that would have 740Register J is set to the value of the next instruction that would have
882been executed when there was no jump." 741been executed when there was no jump."
883 1) 742 1)
884 743
885 744
886(mixal-add-operation-code 745 (J1Z jump "jump I1 zero" ,(+ 40 1)
887 'J1Z 'jump "jump I1 zero" (+ 40 1) 1 746 "Jump if the content of rI1 is zero.
888 "Jump if the content of rI1 is zero.
889Register J is set to the value of the next instruction that would have 747Register J is set to the value of the next instruction that would have
890been executed when there was no jump." 748been executed when there was no jump."
891 1) 749 1)
892 750
893 751
894(mixal-add-operation-code 752 (J1P jump "jump I1 positive" ,(+ 40 1)
895 'J1P 'jump "jump I1 positive" (+ 40 1) 2 753 "Jump if the content of rI1 is positive.
896 "Jump if the content of rI1 is positive.
897Register J is set to the value of the next instruction that would have 754Register J is set to the value of the next instruction that would have
898been executed when there was no jump." 755been executed when there was no jump."
899 1) 756 1)
900 757
901 758
902(mixal-add-operation-code 759 (J1NN jump "jump I1 non-negative" ,(+ 40 1)
903 'J1NN 'jump "jump I1 non-negative" (+ 40 1) 3 760 "Jump if the content of rI1 is non-negative.
904 "Jump if the content of rI1 is non-negative.
905Register J is set to the value of the next instruction that would have 761Register J is set to the value of the next instruction that would have
906been executed when there was no jump." 762been executed when there was no jump."
907 1) 763 1)
908 764
909 765
910(mixal-add-operation-code 766 (J1NZ jump "jump I1 non-zero" ,(+ 40 1)
911 'J1NZ 'jump "jump I1 non-zero" (+ 40 1) 4 767 "Jump if the content of rI1 is non-zero.
912 "Jump if the content of rI1 is non-zero.
913Register J is set to the value of the next instruction that would have 768Register J is set to the value of the next instruction that would have
914been executed when there was no jump." 769been executed when there was no jump."
915 1) 770 1)
916 771
917 772
918(mixal-add-operation-code 773 (J1NP jump "jump I1 non-positive" ,(+ 40 1)
919 'J1NP 'jump "jump I1 non-positive" (+ 40 1) 5 774 "Jump if the content of rI1 is non-positive.
920 "Jump if the content of rI1 is non-positive.
921Register J is set to the value of the next instruction that would have 775Register J is set to the value of the next instruction that would have
922been executed when there was no jump." 776been executed when there was no jump."
923 1) 777 1)
924 778
925(mixal-add-operation-code 779 (J2N jump "jump I2 negative" ,(+ 40 1)
926 'J2N 'jump "jump I2 negative" (+ 40 1) 0 780 "Jump if the content of rI2 is negative.
927 "Jump if the content of rI2 is negative.
928Register J is set to the value of the next instruction that would have 781Register J is set to the value of the next instruction that would have
929been executed when there was no jump." 782been executed when there was no jump."
930 1) 783 1)
931 784
932 785
933(mixal-add-operation-code 786 (J2Z jump "jump I2 zero" ,(+ 40 1)
934 'J2Z 'jump "jump I2 zero" (+ 40 1) 1 787 "Jump if the content of rI2 is zero.
935 "Jump if the content of rI2 is zero.
936Register J is set to the value of the next instruction that would have 788Register J is set to the value of the next instruction that would have
937been executed when there was no jump." 789been executed when there was no jump."
938 1) 790 1)
939 791
940 792
941(mixal-add-operation-code 793 (J2P jump "jump I2 positive" ,(+ 40 1)
942 'J2P 'jump "jump I2 positive" (+ 40 1) 2 794 "Jump if the content of rI2 is positive.
943 "Jump if the content of rI2 is positive.
944Register J is set to the value of the next instruction that would have 795Register J is set to the value of the next instruction that would have
945been executed when there was no jump." 796been executed when there was no jump."
946 1) 797 1)
947 798
948 799
949(mixal-add-operation-code 800 (J2NN jump "jump I2 non-negative" ,(+ 40 1)
950 'J2NN 'jump "jump I2 non-negative" (+ 40 1) 3 801 "Jump if the content of rI2 is non-negative.
951 "Jump if the content of rI2 is non-negative.
952Register J is set to the value of the next instruction that would have 802Register J is set to the value of the next instruction that would have
953been executed when there was no jump." 803been executed when there was no jump."
954 1) 804 1)
955 805
956 806
957(mixal-add-operation-code 807 (J2NZ jump "jump I2 non-zero" ,(+ 40 1)
958 'J2NZ 'jump "jump I2 non-zero" (+ 40 1) 4 808 "Jump if the content of rI2 is non-zero.
959 "Jump if the content of rI2 is non-zero.
960Register J is set to the value of the next instruction that would have 809Register J is set to the value of the next instruction that would have
961been executed when there was no jump." 810been executed when there was no jump."
962 1) 811 1)
963 812
964 813
965(mixal-add-operation-code 814 (J2NP jump "jump I2 non-positive" ,(+ 40 1)
966 'J2NP 'jump "jump I2 non-positive" (+ 40 1) 5 815 "Jump if the content of rI2 is non-positive.
967 "Jump if the content of rI2 is non-positive.
968Register J is set to the value of the next instruction that would have 816Register J is set to the value of the next instruction that would have
969been executed when there was no jump." 817been executed when there was no jump."
970 1) 818 1)
971 819
972 820
973(mixal-add-operation-code 821 (J3N jump "jump I3 negative" ,(+ 40 1)
974 'J3N 'jump "jump I3 negative" (+ 40 1) 0 822 "Jump if the content of rI3 is negative.
975 "Jump if the content of rI3 is negative.
976Register J is set to the value of the next instruction that would have 823Register J is set to the value of the next instruction that would have
977been executed when there was no jump." 824been executed when there was no jump."
978 1) 825 1)
979 826
980 827
981(mixal-add-operation-code 828 (J3Z jump "jump I3 zero" ,(+ 40 1)
982 'J3Z 'jump "jump I3 zero" (+ 40 1) 1 829 "Jump if the content of rI3 is zero.
983 "Jump if the content of rI3 is zero.
984Register J is set to the value of the next instruction that would have 830Register J is set to the value of the next instruction that would have
985been executed when there was no jump." 831been executed when there was no jump."
986 1) 832 1)
987 833
988 834
989(mixal-add-operation-code 835 (J3P jump "jump I3 positive" ,(+ 40 1)
990 'J3P 'jump "jump I3 positive" (+ 40 1) 2 836 "Jump if the content of rI3 is positive.
991 "Jump if the content of rI3 is positive.
992Register J is set to the value of the next instruction that would have 837Register J is set to the value of the next instruction that would have
993been executed when there was no jump." 838been executed when there was no jump."
994 1) 839 1)
995 840
996 841
997(mixal-add-operation-code 842 (J3NN jump "jump I3 non-negative" ,(+ 40 1)
998 'J3NN 'jump "jump I3 non-negative" (+ 40 1) 3 843 "Jump if the content of rI3 is non-negative.
999 "Jump if the content of rI3 is non-negative.
1000Register J is set to the value of the next instruction that would have 844Register J is set to the value of the next instruction that would have
1001been executed when there was no jump." 845been executed when there was no jump."
1002 1) 846 1)
1003 847
1004 848
1005(mixal-add-operation-code 849 (J3NZ jump "jump I3 non-zero" ,(+ 40 1)
1006 'J3NZ 'jump "jump I3 non-zero" (+ 40 1) 4 850 "Jump if the content of rI3 is non-zero.
1007 "Jump if the content of rI3 is non-zero.
1008Register J is set to the value of the next instruction that would have 851Register J is set to the value of the next instruction that would have
1009been executed when there was no jump." 852been executed when there was no jump."
1010 1) 853 1)
1011 854
1012 855
1013(mixal-add-operation-code 856 (J3NP jump "jump I3 non-positive" ,(+ 40 1)
1014 'J3NP 'jump "jump I3 non-positive" (+ 40 1) 5 857 "Jump if the content of rI3 is non-positive.
1015 "Jump if the content of rI3 is non-positive.
1016Register J is set to the value of the next instruction that would have 858Register J is set to the value of the next instruction that would have
1017been executed when there was no jump." 859been executed when there was no jump."
1018 1) 860 1)
1019 861
1020 862
1021(mixal-add-operation-code 863 (J4N jump "jump I4 negative" ,(+ 40 1)
1022 'J4N 'jump "jump I4 negative" (+ 40 1) 0 864 "Jump if the content of rI4 is negative.
1023 "Jump if the content of rI4 is negative.
1024Register J is set to the value of the next instruction that would have 865Register J is set to the value of the next instruction that would have
1025been executed when there was no jump." 866been executed when there was no jump."
1026 1) 867 1)
1027 868
1028 869
1029(mixal-add-operation-code 870 (J4Z jump "jump I4 zero" ,(+ 40 1)
1030 'J4Z 'jump "jump I4 zero" (+ 40 1) 1 871 "Jump if the content of rI4 is zero.
1031 "Jump if the content of rI4 is zero.
1032Register J is set to the value of the next instruction that would have 872Register J is set to the value of the next instruction that would have
1033been executed when there was no jump." 873been executed when there was no jump."
1034 1) 874 1)
1035 875
1036 876
1037(mixal-add-operation-code 877 (J4P jump "jump I4 positive" ,(+ 40 1)
1038 'J4P 'jump "jump I4 positive" (+ 40 1) 2 878 "Jump if the content of rI4 is positive.
1039 "Jump if the content of rI4 is positive.
1040Register J is set to the value of the next instruction that would have 879Register J is set to the value of the next instruction that would have
1041been executed when there was no jump." 880been executed when there was no jump."
1042 1) 881 1)
1043 882
1044 883
1045(mixal-add-operation-code 884 (J4NN jump "jump I4 non-negative" ,(+ 40 1)
1046 'J4NN 'jump "jump I4 non-negative" (+ 40 1) 3 885 "Jump if the content of rI4 is non-negative.
1047 "Jump if the content of rI4 is non-negative.
1048Register J is set to the value of the next instruction that would have 886Register J is set to the value of the next instruction that would have
1049been executed when there was no jump." 887been executed when there was no jump."
1050 1) 888 1)
1051 889
1052 890
1053(mixal-add-operation-code 891 (J4NZ jump "jump I4 non-zero" ,(+ 40 1)
1054 'J4NZ 'jump "jump I4 non-zero" (+ 40 1) 4 892 "Jump if the content of rI4 is non-zero.
1055 "Jump if the content of rI4 is non-zero.
1056Register J is set to the value of the next instruction that would have 893Register J is set to the value of the next instruction that would have
1057been executed when there was no jump." 894been executed when there was no jump."
1058 1) 895 1)
1059 896
1060 897
1061(mixal-add-operation-code 898 (J4NP jump "jump I4 non-positive" ,(+ 40 1)
1062 'J4NP 'jump "jump I4 non-positive" (+ 40 1) 5 899 "Jump if the content of rI4 is non-positive.
1063 "Jump if the content of rI4 is non-positive.
1064Register J is set to the value of the next instruction that would have 900Register J is set to the value of the next instruction that would have
1065been executed when there was no jump." 901been executed when there was no jump."
1066 1) 902 1)
1067 903
1068 904
1069(mixal-add-operation-code 905 (J5N jump "jump I5 negative" ,(+ 40 1)
1070 'J5N 'jump "jump I5 negative" (+ 40 1) 0 906 "Jump if the content of rI5 is negative.
1071 "Jump if the content of rI5 is negative.
1072Register J is set to the value of the next instruction that would have 907Register J is set to the value of the next instruction that would have
1073been executed when there was no jump." 908been executed when there was no jump."
1074 1) 909 1)
1075 910
1076 911
1077(mixal-add-operation-code 912 (J5Z jump "jump I5 zero" ,(+ 40 1)
1078 'J5Z 'jump "jump I5 zero" (+ 40 1) 1 913 "Jump if the content of rI5 is zero.
1079 "Jump if the content of rI5 is zero.
1080Register J is set to the value of the next instruction that would have 914Register J is set to the value of the next instruction that would have
1081been executed when there was no jump." 915been executed when there was no jump."
1082 1) 916 1)
1083 917
1084 918
1085(mixal-add-operation-code 919 (J5P jump "jump I5 positive" ,(+ 40 1)
1086 'J5P 'jump "jump I5 positive" (+ 40 1) 2 920 "Jump if the content of rI5 is positive.
1087 "Jump if the content of rI5 is positive.
1088Register J is set to the value of the next instruction that would have 921Register J is set to the value of the next instruction that would have
1089been executed when there was no jump." 922been executed when there was no jump."
1090 1) 923 1)
1091 924
1092 925
1093(mixal-add-operation-code 926 (J5NN jump "jump I5 non-negative" ,(+ 40 1)
1094 'J5NN 'jump "jump I5 non-negative" (+ 40 1) 3 927 "Jump if the content of rI5 is non-negative.
1095 "Jump if the content of rI5 is non-negative.
1096Register J is set to the value of the next instruction that would have 928Register J is set to the value of the next instruction that would have
1097been executed when there was no jump." 929been executed when there was no jump."
1098 1) 930 1)
1099 931
1100 932
1101(mixal-add-operation-code 933 (J5NZ jump "jump I5 non-zero" ,(+ 40 1)
1102 'J5NZ 'jump "jump I5 non-zero" (+ 40 1) 4 934 "Jump if the content of rI5 is non-zero.
1103 "Jump if the content of rI5 is non-zero.
1104Register J is set to the value of the next instruction that would have 935Register J is set to the value of the next instruction that would have
1105been executed when there was no jump." 936been executed when there was no jump."
1106 1) 937 1)
1107 938
1108 939
1109(mixal-add-operation-code 940 (J5NP jump "jump I5 non-positive" ,(+ 40 1)
1110 'J5NP 'jump "jump I5 non-positive" (+ 40 1) 5 941 "Jump if the content of rI5 is non-positive.
1111 "Jump if the content of rI5 is non-positive.
1112Register J is set to the value of the next instruction that would have 942Register J is set to the value of the next instruction that would have
1113been executed when there was no jump." 943been executed when there was no jump."
1114 1) 944 1)
1115 945
1116 946
1117(mixal-add-operation-code 947 (J6N jump "jump I6 negative" ,(+ 40 1)
1118 'J6N 'jump "jump I6 negative" (+ 40 1) 0 948 "Jump if the content of rI6 is negative.
1119 "Jump if the content of rI6 is negative.
1120Register J is set to the value of the next instruction that would have 949Register J is set to the value of the next instruction that would have
1121been executed when there was no jump." 950been executed when there was no jump."
1122 1) 951 1)
1123 952
1124 953
1125(mixal-add-operation-code 954 (J6Z jump "jump I6 zero" ,(+ 40 1)
1126 'J6Z 'jump "jump I6 zero" (+ 40 1) 1 955 "Jump if the content of rI6 is zero.
1127 "Jump if the content of rI6 is zero.
1128Register J is set to the value of the next instruction that would have 956Register J is set to the value of the next instruction that would have
1129been executed when there was no jump." 957been executed when there was no jump."
1130 1) 958 1)
1131 959
1132 960
1133(mixal-add-operation-code 961 (J6P jump "jump I6 positive" ,(+ 40 1)
1134 'J6P 'jump "jump I6 positive" (+ 40 1) 2 962 "Jump if the content of rI6 is positive.
1135 "Jump if the content of rI6 is positive.
1136Register J is set to the value of the next instruction that would have 963Register J is set to the value of the next instruction that would have
1137been executed when there was no jump." 964been executed when there was no jump."
1138 1) 965 1)
1139 966
1140 967
1141(mixal-add-operation-code 968 (J6NN jump "jump I6 non-negative" ,(+ 40 1)
1142 'J6NN 'jump "jump I6 non-negative" (+ 40 1) 3 969 "Jump if the content of rI6 is non-negative.
1143 "Jump if the content of rI6 is non-negative.
1144Register J is set to the value of the next instruction that would have 970Register J is set to the value of the next instruction that would have
1145been executed when there was no jump." 971been executed when there was no jump."
1146 1) 972 1)
1147 973
1148 974
1149(mixal-add-operation-code 975 (J6NZ jump "jump I6 non-zero" ,(+ 40 1)
1150 'J6NZ 'jump "jump I6 non-zero" (+ 40 1) 4 976 "Jump if the content of rI6 is non-zero.
1151 "Jump if the content of rI6 is non-zero.
1152Register J is set to the value of the next instruction that would have 977Register J is set to the value of the next instruction that would have
1153been executed when there was no jump." 978been executed when there was no jump."
1154 1) 979 1)
1155 980
1156 981
1157(mixal-add-operation-code 982 (J6NP jump "jump I6 non-positive" ,(+ 40 1)
1158 'J6NP 'jump "jump I6 non-positive" (+ 40 1) 5 983 "Jump if the content of rI6 is non-positive.
1159 "Jump if the content of rI6 is non-positive.
1160Register J is set to the value of the next instruction that would have 984Register J is set to the value of the next instruction that would have
1161been executed when there was no jump." 985been executed when there was no jump."
1162 1) 986 1)
1163 987
1164(mixal-add-operation-code 988 (SLA miscellaneous "shift left A" 6
1165 'SLA 'miscellaneous "shift left A" 6 0 989 "Shift to A, M bytes left.
1166 "Shift to A, M bytes left.
1167Hero's will be added to the right." 990Hero's will be added to the right."
1168 2) 991 2)
1169 992
1170 993
1171(mixal-add-operation-code 994 (SRA miscellaneous "shift right A" 6
1172 'SRA 'miscellaneous "shift right A" 6 1 995 "Shift to A, M bytes right.
1173 "Shift to A, M bytes right.
1174Zeros will be added to the left." 996Zeros will be added to the left."
1175 2) 997 2)
1176 998
1177 999
1178(mixal-add-operation-code 1000 (SLAX miscellaneous "shift left AX" 6
1179 'SLAX 'miscellaneous "shift left AX" 6 2 1001 "Shift AX, M bytes left.
1180 "Shift AX, M bytes left.
1181Zeros will be added to the right." 1002Zeros will be added to the right."
1182 2) 1003 2)
1183 1004
1184 1005
1185 1006
1186(mixal-add-operation-code 1007 (SRAX miscellaneous "shift right AX" 6
1187 'SRAX 'miscellaneous "shift right AX" 6 3 1008 "Shift AX, M bytes right.
1188 "Shift AX, M bytes right.
1189Zeros will be added to the left." 1009Zeros will be added to the left."
1190 2) 1010 2)
1191 1011
1192 1012
1193(mixal-add-operation-code 1013 (SLC miscellaneous "shift left AX circularly" 6
1194 'SLC 'miscellaneous "shift left AX circularly" 6 4 1014 "Shift AX, M bytes left circularly.
1195 "Shift AX, M bytes left circularly.
1196The bytes that fall off to the left will be added to the right." 1015The bytes that fall off to the left will be added to the right."
1197 2) 1016 2)
1198 1017
1199 1018
1200(mixal-add-operation-code 1019 (SRC miscellaneous "shift right AX circularly" 6
1201 'SRC 'miscellaneous "shift right AX circularly" 6 4 1020 "Shift AX, M bytes right circularly.
1202 "Shift AX, M bytes right circularly.
1203The bytes that fall off to the right will be added to the left." 1021The bytes that fall off to the right will be added to the left."
1204 2) 1022 2)
1205 1023
1206(mixal-add-operation-code 1024 (MOVE miscellaneous "move" 7 number
1207 'MOVE 'miscellaneous "move" 7 'number 1025 "Move MOD words from M to the location stored in rI1."
1208 "Move MOD words from M to the location stored in rI1." 1026 (+ 1 (* 2 number)))
1209 '(+ 1 (* 2 number)))
1210 1027
1211(mixal-add-operation-code 1028 (NOP miscellaneous "no operation" 0 ignored
1212 'NOP 'miscellaneous "no operation" 0 'ignored 1029 "No operation, M and F are not used by the machine."
1213 "No operation, M and F are not used by the machine." 1030 1)
1214 1)
1215 1031
1216(mixal-add-operation-code 1032 (HLT miscellaneous "halt" 5
1217 'HLT 'miscellaneous "halt" 5 2 1033 "Halt.
1218 "Halt.
1219Stop instruction fetching." 1034Stop instruction fetching."
1220 1) 1035 1)
1221 1036
1222(mixal-add-operation-code 1037 (IN input-output "input" 36 unit
1223 'IN 'input-output "input" 36 'unit 1038 "Transfer a block of words from the specified unit to memory.
1224 "Transfer a block of words from the specified unit to memory.
1225The transfer starts at address M." 1039The transfer starts at address M."
1226 1) 1040 1)
1227 1041
1228(mixal-add-operation-code 1042 (OUT input-output "output" 37 unit
1229 'OUT 'input-output "output" 37 'unit 1043 "Transfer a block of words from memory.
1230 "Transfer a block of words from memory.
1231The transfer starts at address M to the specified unit." 1044The transfer starts at address M to the specified unit."
1232 1) 1045 1)
1233 1046
1234(mixal-add-operation-code 1047 (IOC input-output "input-output control" 35 unit
1235 'IOC 'input-output "input-output control" 35 'unit 1048 "Perform a control operation.
1236 "Perform a control operation.
1237The control operation is given by M on the specified unit." 1049The control operation is given by M on the specified unit."
1238 1) 1050 1)
1239 1051
1240(mixal-add-operation-code 1052 (JRED input-output "jump ready" 38 unit
1241 'JRED 'input-output "jump ready" 38 'unit 1053 "Jump to M if the specified unit is ready."
1242 "Jump to M if the specified unit is ready." 1054 1)
1243 1)
1244 1055
1245 1056
1246(mixal-add-operation-code 1057 (JBUS input-output "jump busy" 34 unit
1247 'JBUS 'input-output "jump busy" 34 'unit 1058 "Jump to M if the specified unit is busy."
1248 "Jump to M if the specified unit is busy." 1059 1)
1249 1)
1250 1060
1251(mixal-add-operation-code 1061 (NUM conversion "convert to numeric" 5
1252 'NUM 'conversion "convert to numeric" 5 0 1062 "Convert rAX to its numerical value and store it in rA.
1253 "Convert rAX to its numerical value and store it in rA.
1254the register rAX is assumed to contain a character representation of 1063the register rAX is assumed to contain a character representation of
1255a number." 1064a number."
1256 10) 1065 10)
1257 1066
1258(mixal-add-operation-code 1067 (CHAR conversion "convert to characters" 5
1259 'CHAR 'conversion "convert to characters" 5 1 1068 "Convert the number stored in rA to a character representation.
1260 "Convert the number stored in rA to a character representation.
1261The converted character representation is stored in rAX." 1069The converted character representation is stored in rAX."
1262 10) 1070 10))
1071
1072 "Alist that contains all the possible operation codes for mix.
1073Each elt has the form
1074 (OP-CODE GROUP FULL-NAME C-BYTE F-BYTE DESCRIPTION EXECUTION-TIME)
1075Where OP-CODE is the text of the opcode as an symbol,
1076FULL-NAME is the human readable name as a string,
1077C-BYTE is the operation code telling what operation is to be performed,
1078F-BYTE holds a modification of the operation code which can be a symbol
1079 or a number,
1080DESCRIPTION contains an string with a description about the operation code and
1081EXECUTION-TIME holds info about the time it takes, number or string.")
1082;; (makunbound 'mixal-operation-codes-alist)
1083
1084
1085;;; Font-locking:
1086(defvar mixal-font-lock-syntactic-keywords
1087 ;; Normal comments start with a * in column 0 and end at end of line.
1088 '(("^\\*" (0 '(11))) ;(string-to-syntax "<") == '(11)
1089 ;; Every line can end with a comment which is placed after the operand.
1090 ;; I assume here that mnemonics without operands can not have a comment.
1091 ("^[[:alnum:]]*[ \t]+[[:alnum:]]+[ \t]+[^ \n\t]+[ \t]*\\([ \t]\\)[^\n \t]"
1092 (1 '(11)))))
1093
1094(defvar mixal-font-lock-keywords
1095 `(("^\\([A-Z0-9a-z]+\\)"
1096 (1 mixal-font-lock-label-face))
1097 (,(regexp-opt (mapcar (lambda (x) (symbol-name (car x)))
1098 mixal-operation-codes-alist) 'words)
1099 . mixal-font-lock-operation-code-face)
1100 (,(regexp-opt mixal-assembly-pseudoinstructions 'words)
1101 . mixal-font-lock-assembly-pseudoinstruction-face)
1102 ("^[A-Z0-9a-z]*[ \t]+[A-ZO-9a-z]+[ \t]+\\(=.*=\\)"
1103 (1 font-lock-constant-face)))
1104 "Keyword highlighting specification for `mixal-mode'.")
1105;; (makunbound 'mixal-font-lock-keywords)
1263 1106
1264(defvar mixal-describe-operation-code-history nil 1107(defvar mixal-describe-operation-code-history nil
1265 "History list for describe operation code.") 1108 "History list for describe operation code.")
1266 1109
1267(defun mixal-describe-operation-code (&optional op-code) 1110(defun mixal-describe-operation-code (op-code)
1268 "Display the full documentation of OP-CODE." 1111 "Display the full documentation of OP-CODE."
1269 (interactive) 1112 (interactive
1270 ;; We like to provide completion and history, so do it ourself 1113 (list
1271 ;; (interactive "?bla")?
1272 (unless op-code
1273 (let* ((completion-ignore-case t) 1114 (let* ((completion-ignore-case t)
1274 ;; we already have a list, but it is not in the right format 1115 ;; we already have a list, but it is not in the right format
1275 ;; transform it to a valid table so completition can use it 1116 ;; transform it to a valid table so completition can use it
@@ -1277,15 +1118,16 @@ The converted character representation is stored in rAX."
1277 (cons (symbol-name (car elm)) nil)) 1118 (cons (symbol-name (car elm)) nil))
1278 mixal-operation-codes-alist)) 1119 mixal-operation-codes-alist))
1279 ;; prompt is different depending on we are close to a valid op-code 1120 ;; prompt is different depending on we are close to a valid op-code
1280 (have-default (member (current-word) mixal-operation-codes)) 1121 (have-default (assq (intern-soft (current-word))
1122 mixal-operation-codes-alist))
1281 (prompt (concat "Describe operation code " 1123 (prompt (concat "Describe operation code "
1282 (if have-default 1124 (if have-default
1283 (concat "(default " (current-word) "): ") 1125 (concat "(default " (current-word) "): ")
1284 ": ")))) 1126 ": "))))
1285 ;; as the operation code to the user 1127 ;; As the operation code to the user.
1286 (setq op-code (completing-read prompt table nil t nil 1128 (completing-read prompt table nil t nil
1287 'mixal-describe-operation-code-history 1129 'mixal-describe-operation-code-history
1288 (current-word))))) 1130 (current-word)))))
1289 ;; get the info on the op-code and output it to the help buffer 1131 ;; get the info on the op-code and output it to the help buffer
1290 (let ((op-code-help (assq (intern-soft op-code) mixal-operation-codes-alist))) 1132 (let ((op-code-help (assq (intern-soft op-code) mixal-operation-codes-alist)))
1291 (when op-code-help 1133 (when op-code-help
@@ -1317,8 +1159,11 @@ Assumes that file has been compiled with debugging support."
1317 "Major mode for the mixal asm language. 1159 "Major mode for the mixal asm language.
1318\\{mixal-mode-map}" 1160\\{mixal-mode-map}"
1319 (set (make-local-variable 'comment-start) "*") 1161 (set (make-local-variable 'comment-start) "*")
1320 (set (make-local-variable 'comment-start-skip) "*") 1162 (set (make-local-variable 'comment-start-skip) "^\\*[ \t]*")
1321 (set (make-local-variable 'font-lock-defaults) '(mixal-font-lock-keywords)) 1163 (set (make-local-variable 'font-lock-defaults)
1164 `(mixal-font-lock-keywords nil nil nil nil
1165 (font-lock-syntactic-keywords . ,mixal-font-lock-syntactic-keywords)
1166 (parse-sexp-lookup-properties . t)))
1322 ;; might add an indent function in the future 1167 ;; might add an indent function in the future
1323 ;; (set (make-local-variable 'indent-line-function) 'mixal-indent-line) 1168 ;; (set (make-local-variable 'indent-line-function) 'mixal-indent-line)
1324 (set (make-local-variable 'compile-command) (concat "mixasm " 1169 (set (make-local-variable 'compile-command) (concat "mixasm "