/[emacs]/emacs/lisp/progmodes/mixal-mode.el
ViewVC logotype

Diff of /emacs/lisp/progmodes/mixal-mode.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26