aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorMiles Bader2005-10-15 00:26:05 +0000
committerMiles Bader2005-10-15 00:26:05 +0000
commit9fe76e1b256aefe892edf84beb1fdfaf5ab0efa1 (patch)
tree4570b6861b88c36c99783d4103d49c8658027834 /lisp/progmodes
parent2f0837ccf0ba386b9a9aab0eac2bad3076491a93 (diff)
parentd3a597b7b41c2ebdb457e7c8bb037958138028f2 (diff)
downloademacs-9fe76e1b256aefe892edf84beb1fdfaf5ab0efa1.tar.gz
emacs-9fe76e1b256aefe892edf84beb1fdfaf5ab0efa1.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-91
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 581-597) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 133-141) - Update from CVS - Merge from emacs--cvs-trunk--0 - Update from CVS: texi/gnus.texi (RSS): Fix key description. - Update from CVS: texi/gnus.texi (Document Server Internals): Addition.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/etags.el66
-rw-r--r--lisp/progmodes/f90.el12
-rw-r--r--lisp/progmodes/fortran.el2
-rw-r--r--lisp/progmodes/gdb-ui.el71
-rw-r--r--lisp/progmodes/gud.el183
-rw-r--r--lisp/progmodes/mixal-mode.el1250
-rw-r--r--lisp/progmodes/pascal.el184
-rw-r--r--lisp/progmodes/sh-script.el10
8 files changed, 786 insertions, 992 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index ea87dce591f..f6e8697543f 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1887,7 +1887,7 @@ directory specification."
1887;; XXX Kludge interface. 1887;; XXX Kludge interface.
1888 1888
1889(define-button-type 'tags-select-tags-table 1889(define-button-type 'tags-select-tags-table
1890 'action (lambda (button) (select-tags-table-select)) 1890 'action 'select-tags-table-select
1891 'help-echo "RET, t or mouse-2: select tags table") 1891 'help-echo "RET, t or mouse-2: select tags table")
1892 1892
1893;; XXX If a file is in multiple tables, selection may get the wrong one. 1893;; XXX If a file is in multiple tables, selection may get the wrong one.
@@ -1904,30 +1904,27 @@ see the doc of that variable if you want to add names to the list."
1904 (desired-point nil) 1904 (desired-point nil)
1905 b) 1905 b)
1906 (when tags-table-list 1906 (when tags-table-list
1907 (setq desired-point (point-marker)) 1907 (setq desired-point (point-marker))
1908 (setq b (point)) 1908 (setq b (point))
1909 (princ tags-table-list (current-buffer)) 1909 (princ (mapcar 'abbreviate-file-name tags-table-list) (current-buffer))
1910 (make-text-button b (point) 'type 'tags-select-tags-table) 1910 (make-text-button b (point) 'type 'tags-select-tags-table
1911 (insert "\C-m") 1911 'etags-table (car tags-table-list))
1912 (prin1 (car tags-table-list) (current-buffer)) ;invisible
1913 (insert "\n")) 1912 (insert "\n"))
1914 (while set-list 1913 (while set-list
1915 (unless (eq (car set-list) tags-table-list) 1914 (unless (eq (car set-list) tags-table-list)
1916 (setq b (point)) 1915 (setq b (point))
1917 (princ (car set-list) (current-buffer)) 1916 (princ (mapcar 'abbreviate-file-name (car set-list)) (current-buffer))
1918 (make-text-button b (point) 'type 'tags-select-tags-table) 1917 (make-text-button b (point) 'type 'tags-select-tags-table
1919 (insert "\C-m") 1918 'etags-table (car (car set-list)))
1920 (prin1 (car (car set-list)) (current-buffer)) ;invisible
1921 (insert "\n")) 1919 (insert "\n"))
1922 (setq set-list (cdr set-list))) 1920 (setq set-list (cdr set-list)))
1923 (when tags-file-name 1921 (when tags-file-name
1924 (or desired-point 1922 (or desired-point
1925 (setq desired-point (point-marker))) 1923 (setq desired-point (point-marker)))
1926 (setq b (point)) 1924 (setq b (point))
1927 (insert tags-file-name) 1925 (insert (abbreviate-file-name tags-file-name))
1928 (make-text-button b (point) 'type 'tags-select-tags-table) 1926 (make-text-button b (point) 'type 'tags-select-tags-table
1929 (insert "\C-m") 1927 'etags-table tags-file-name)
1930 (prin1 tags-file-name (current-buffer)) ;invisible
1931 (insert "\n")) 1928 (insert "\n"))
1932 (setq set-list (delete tags-file-name 1929 (setq set-list (delete tags-file-name
1933 (apply 'nconc (cons (copy-sequence tags-table-list) 1930 (apply 'nconc (cons (copy-sequence tags-table-list)
@@ -1935,10 +1932,9 @@ see the doc of that variable if you want to add names to the list."
1935 tags-table-set-list))))) 1932 tags-table-set-list)))))
1936 (while set-list 1933 (while set-list
1937 (setq b (point)) 1934 (setq b (point))
1938 (insert (car set-list)) 1935 (insert (abbreviate-file-name (car set-list)))
1939 (make-text-button b (point) 'type 'tags-select-tags-table) 1936 (make-text-button b (point) 'type 'tags-select-tags-table
1940 (insert "\C-m") 1937 'etags-table (car set-list))
1941 (prin1 (car set-list) (current-buffer)) ;invisible
1942 (insert "\n") 1938 (insert "\n")
1943 (setq set-list (delete (car set-list) set-list))) 1939 (setq set-list (delete (car set-list) set-list)))
1944 (goto-char (point-min)) 1940 (goto-char (point-min))
@@ -1951,7 +1947,8 @@ see the doc of that variable if you want to add names to the list."
1951 (select-tags-table-mode)) 1947 (select-tags-table-mode))
1952 1948
1953(defvar select-tags-table-mode-map 1949(defvar select-tags-table-mode-map
1954 (let ((map (copy-keymap button-buffer-map))) 1950 (let ((map (make-sparse-keymap)))
1951 (set-keymap-parent map button-buffer-map)
1955 (define-key map "t" 'push-button) 1952 (define-key map "t" 'push-button)
1956 (define-key map " " 'next-line) 1953 (define-key map " " 'next-line)
1957 (define-key map "\^?" 'previous-line) 1954 (define-key map "\^?" 'previous-line)
@@ -1960,24 +1957,17 @@ see the doc of that variable if you want to add names to the list."
1960 (define-key map "q" 'select-tags-table-quit) 1957 (define-key map "q" 'select-tags-table-quit)
1961 map)) 1958 map))
1962 1959
1963(defun select-tags-table-mode () 1960(define-derived-mode select-tags-table-mode fundamental-mode "Select Tags Table"
1964 "Major mode for choosing a current tags table among those already loaded. 1961 "Major mode for choosing a current tags table among those already loaded.
1965 1962
1966\\{select-tags-table-mode-map}" 1963\\{select-tags-table-mode-map}"
1967 (interactive) 1964 (setq buffer-read-only t))
1968 (kill-all-local-variables) 1965
1969 (setq buffer-read-only t 1966(defun select-tags-table-select (button)
1970 major-mode 'select-tags-table-mode
1971 mode-name "Select Tags Table")
1972 (use-local-map select-tags-table-mode-map)
1973 (setq selective-display t
1974 selective-display-ellipses nil))
1975
1976(defun select-tags-table-select ()
1977 "Select the tags table named on this line." 1967 "Select the tags table named on this line."
1978 (interactive) 1968 (interactive (list (or (button-at (line-beginning-position))
1979 (search-forward "\C-m") 1969 (error "No tags table on current line"))))
1980 (let ((name (read (current-buffer)))) 1970 (let ((name (button-get button 'etags-table)))
1981 (visit-tags-table name) 1971 (visit-tags-table name)
1982 (select-tags-table-quit) 1972 (select-tags-table-quit)
1983 (message "Tags table now %s" name))) 1973 (message "Tags table now %s" name)))
@@ -2043,5 +2033,5 @@ for \\[find-tag] (which see)."
2043 2033
2044(provide 'etags) 2034(provide 'etags)
2045 2035
2046;;; arch-tag: b897c2b5-08f3-4837-b2d3-0e7d6db1b63e 2036;; arch-tag: b897c2b5-08f3-4837-b2d3-0e7d6db1b63e
2047;;; etags.el ends here 2037;;; etags.el ends here
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 5e2a3705ef3..676833cdedc 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -4,7 +4,7 @@
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Torbj\"orn Einarsson <Torbjorn.Einarsson@era.ericsson.se> 6;; Author: Torbj\"orn Einarsson <Torbjorn.Einarsson@era.ericsson.se>
7;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk> 7;; Maintainer: Glenn Morris <rgm@gnu.org>
8;; Keywords: fortran, f90, languages 8;; Keywords: fortran, f90, languages
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -276,7 +276,7 @@ The options are 'downcase-word, 'upcase-word, 'capitalize-word and nil."
276 "target" "then" "type" "use" "where" "while" "write" 276 "target" "then" "type" "use" "where" "while" "write"
277 ;; F95 keywords. 277 ;; F95 keywords.
278 "elemental" "pure") 'words) 278 "elemental" "pure") 'words)
279 "Regexp for F90 keywords.") 279 "Regexp used by the function `f90-change-keywords'.")
280 280
281(defconst f90-keywords-level-3-re 281(defconst f90-keywords-level-3-re
282 (regexp-opt 282 (regexp-opt
@@ -370,7 +370,8 @@ subroutine\\)\\|use\\|call\\)\\>[ \t]*\\(\\sw+\\)?"
370 (list 370 (list
371 ;; Variable declarations (avoid the real function call). 371 ;; Variable declarations (avoid the real function call).
372 '("^[ \t0-9]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\\|\ 372 '("^[ \t0-9]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\\|\
373logical\\|type[ \t]*(\\sw+)\\)\\(.*::\\|[ \t]*(.*)\\)?\\([^&!\n]*\\)" 373logical\\|double[ \t]*precision\\|*type[ \t]*(\\sw+)\\)\
374\\(.*::\\|[ \t]*(.*)\\)?\\([^&!\n]*\\)"
374 (1 font-lock-type-face t) (4 font-lock-variable-name-face t)) 375 (1 font-lock-type-face t) (4 font-lock-variable-name-face t))
375 ;; do, if, select, where, and forall constructs. 376 ;; do, if, select, where, and forall constructs.
376 '("\\<\\(end[ \t]*\\(do\\|if\\|select\\|forall\\|where\\)\\)\\>\ 377 '("\\<\\(end[ \t]*\\(do\\|if\\|select\\|forall\\|where\\)\\)\\>\
@@ -381,7 +382,7 @@ do\\([ \t]*while\\)?\\|select[ \t]*case\\|where\\|forall\\)\\)\\>"
381 (2 font-lock-constant-face nil t) (3 font-lock-keyword-face)) 382 (2 font-lock-constant-face nil t) (3 font-lock-keyword-face))
382 ;; Implicit declaration. 383 ;; Implicit declaration.
383 '("\\<\\(implicit\\)[ \t]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\ 384 '("\\<\\(implicit\\)[ \t]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\
384\\|logical\\|type[ \t]*(\\sw+)\\|none\\)[ \t]*" 385\\|logical\\|double[ \t]*precision\\|type[ \t]*(\\sw+)\\|none\\)[ \t]*"
385 (1 font-lock-keyword-face) (2 font-lock-type-face)) 386 (1 font-lock-keyword-face) (2 font-lock-type-face))
386 '("\\<\\(namelist\\|common\\)[ \t]*\/\\(\\sw+\\)?\/" 387 '("\\<\\(namelist\\|common\\)[ \t]*\/\\(\\sw+\\)?\/"
387 (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) 388 (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
@@ -698,6 +699,7 @@ Used in the F90 entry in `hs-special-modes-alist'.")
698 ("`de" "deallocate" ) 699 ("`de" "deallocate" )
699 ("`df" "define" ) 700 ("`df" "define" )
700 ("`di" "dimension" ) 701 ("`di" "dimension" )
702 ("`dp" "double precision")
701 ("`dw" "do while" ) 703 ("`dw" "do while" )
702 ("`el" "else" ) 704 ("`el" "else" )
703 ("`eli" "else if" ) 705 ("`eli" "else if" )
@@ -796,8 +798,6 @@ Variables controlling indentation style and extra features:
796 The possibilities are 'downcase-word, 'upcase-word, 'capitalize-word. 798 The possibilities are 'downcase-word, 'upcase-word, 'capitalize-word.
797`f90-leave-line-no' 799`f90-leave-line-no'
798 Do not left-justify line numbers (default nil). 800 Do not left-justify line numbers (default nil).
799`f90-keywords-re'
800 List of keywords used for highlighting/upcase-keywords etc.
801 801
802Turning on F90 mode calls the value of the variable `f90-mode-hook' 802Turning on F90 mode calls the value of the variable `f90-mode-hook'
803with no args, if that value is non-nil." 803with no args, if that value is non-nil."
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index 3b6c77fef29..0d9921fcd7b 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -4,7 +4,7 @@
4;; 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 4;; 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5 5
6;; Author: Michael D. Prange <prange@erl.mit.edu> 6;; Author: Michael D. Prange <prange@erl.mit.edu>
7;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk> 7;; Maintainer: Glenn Morris <rgm@gnu.org>
8;; Keywords: fortran, languages 8;; Keywords: fortran, languages
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index fe05119d2cd..852cd8deb88 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -173,28 +173,28 @@ See Info node `(emacs)GDB Graphical Interface' for a more
173detailed description of this mode. 173detailed description of this mode.
174 174
175 175
176--------------------------------------------------------------------- 176+--------------------------------------------------------------+
177 GDB Toolbar 177| GDB Toolbar |
178--------------------------------------------------------------------- 178+-------------------------------+------------------------------+
179 GUD buffer (I/O of GDB) | Locals buffer 179| GUD buffer (I/O of GDB) | Locals buffer |
180 | 180| | |
181 | 181| | |
182 | 182| | |
183--------------------------------------------------------------------- 183+-------------------------------+------------------------------+
184 Source buffer | Input/Output (of inferior) buffer 184| Source buffer | I/O buffer (of inferior) |
185 | (comint-mode) 185| | (comint-mode) |
186 | 186| | |
187 | 187| | |
188 | 188| | |
189 | 189| | |
190 | 190| | |
191 | 191| | |
192--------------------------------------------------------------------- 192+-------------------------------+------------------------------+
193 Stack buffer | Breakpoints buffer 193| Stack buffer | Breakpoints buffer |
194 RET gdb-frames-select | SPC gdb-toggle-breakpoint 194| RET gdb-frames-select | SPC gdb-toggle-breakpoint |
195 | RET gdb-goto-breakpoint 195| | RET gdb-goto-breakpoint |
196 | d gdb-delete-breakpoint 196| | d gdb-delete-breakpoint |
197---------------------------------------------------------------------" 197+-------------------------------+------------------------------+"
198 ;; 198 ;;
199 (interactive (list (gud-query-cmdline 'gdba))) 199 (interactive (list (gud-query-cmdline 'gdba)))
200 ;; 200 ;;
@@ -1192,12 +1192,13 @@ happens to be appropriate."
1192 (let ((buf (gdb-get-buffer ',buf-key))) 1192 (let ((buf (gdb-get-buffer ',buf-key)))
1193 (and buf 1193 (and buf
1194 (with-current-buffer buf 1194 (with-current-buffer buf
1195 (let ((p (window-point (get-buffer-window buf 0))) 1195 (let* ((window (get-buffer-window buf 0))
1196 (p (window-point window))
1196 (buffer-read-only nil)) 1197 (buffer-read-only nil))
1197 (erase-buffer) 1198 (erase-buffer)
1198 (insert-buffer-substring (gdb-get-create-buffer 1199 (insert-buffer-substring (gdb-get-create-buffer
1199 'gdb-partial-output-buffer)) 1200 'gdb-partial-output-buffer))
1200 (set-window-point (get-buffer-window buf 0) p))))) 1201 (set-window-point window p)))))
1201 ;; put customisation here 1202 ;; put customisation here
1202 (,custom-defun))) 1203 (,custom-defun)))
1203 1204
@@ -2125,13 +2126,15 @@ corresponding to the mode line clicked."
2125 (while (re-search-forward "\\s-*{.*\n" nil t) 2126 (while (re-search-forward "\\s-*{.*\n" nil t)
2126 (replace-match " (array);\n" nil nil)))) 2127 (replace-match " (array);\n" nil nil))))
2127 (let ((buf (gdb-get-buffer 'gdb-locals-buffer))) 2128 (let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
2128 (and buf (with-current-buffer buf 2129 (and buf
2129 (let ((p (window-point (get-buffer-window buf 0))) 2130 (with-current-buffer buf
2131 (let* ((window (get-buffer-window buf 0))
2132 (p (window-point window))
2130 (buffer-read-only nil)) 2133 (buffer-read-only nil))
2131 (erase-buffer) 2134 (erase-buffer)
2132 (insert-buffer-substring (gdb-get-create-buffer 2135 (insert-buffer-substring (gdb-get-create-buffer
2133 'gdb-partial-output-buffer)) 2136 'gdb-partial-output-buffer))
2134 (set-window-point (get-buffer-window buf 0) p))))) 2137 (set-window-point window p)))))
2135 (run-hooks 'gdb-info-locals-hook)) 2138 (run-hooks 'gdb-info-locals-hook))
2136 2139
2137(defun gdb-info-locals-custom () 2140(defun gdb-info-locals-custom ()
@@ -2528,10 +2531,10 @@ BUFFER nil or omitted means use the current buffer."
2528 (when (< left-margin-width 2) 2531 (when (< left-margin-width 2)
2529 (save-current-buffer 2532 (save-current-buffer
2530 (setq left-margin-width 2) 2533 (setq left-margin-width 2)
2531 (if (get-buffer-window (current-buffer) 0) 2534 (let ((window (get-buffer-window (current-buffer) 0)))
2535 (if window
2532 (set-window-margins 2536 (set-window-margins
2533 (get-buffer-window (current-buffer) 0) 2537 window left-margin-width right-margin-width)))))
2534 left-margin-width right-margin-width))))
2535 (gdb-put-string 2538 (gdb-put-string
2536 (propertize putstring 2539 (propertize putstring
2537 'face (if enabled 'breakpoint-enabled 'breakpoint-disabled)) 2540 'face (if enabled 'breakpoint-enabled 'breakpoint-disabled))
@@ -2543,10 +2546,10 @@ BUFFER nil or omitted means use the current buffer."
2543 (remove-images start end)) 2546 (remove-images start end))
2544 (when remove-margin 2547 (when remove-margin
2545 (setq left-margin-width 0) 2548 (setq left-margin-width 0)
2546 (if (get-buffer-window (current-buffer) 0) 2549 (let ((window (get-buffer-window (current-buffer) 0)))
2547 (set-window-margins 2550 (if window
2548 (get-buffer-window (current-buffer) 0) 2551 (set-window-margins
2549 left-margin-width right-margin-width)))) 2552 window left-margin-width right-margin-width)))))
2550 2553
2551 2554
2552;; 2555;;
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 12c7e1c0ba0..d38697a2152 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -336,9 +336,6 @@ we're in the GUD buffer)."
336;; speedbar support functions and variables. 336;; speedbar support functions and variables.
337(eval-when-compile (require 'speedbar)) ;For speedbar-with-attached-buffer. 337(eval-when-compile (require 'speedbar)) ;For speedbar-with-attached-buffer.
338 338
339(defvar gud-last-speedbar-buffer nil
340 "The last GUD buffer used.")
341
342(defvar gud-last-speedbar-stackframe nil 339(defvar gud-last-speedbar-stackframe nil
343 "Description of the currently displayed GUD stack. 340 "Description of the currently displayed GUD stack.
344t means that there is no stack, and we are in display-file mode.") 341t means that there is no stack, and we are in display-file mode.")
@@ -355,17 +352,22 @@ t means that there is no stack, and we are in display-file mode.")
355 (define-key gud-speedbar-key-map "j" 'speedbar-edit-line) 352 (define-key gud-speedbar-key-map "j" 'speedbar-edit-line)
356 (define-key gud-speedbar-key-map "e" 'speedbar-edit-line) 353 (define-key gud-speedbar-key-map "e" 'speedbar-edit-line)
357 (define-key gud-speedbar-key-map "\C-m" 'speedbar-edit-line) 354 (define-key gud-speedbar-key-map "\C-m" 'speedbar-edit-line)
358 (define-key gud-speedbar-key-map "D" 'gdb-var-delete))) 355 (define-key gud-speedbar-key-map " " 'speedbar-toggle-line-expansion)
356 (define-key gud-speedbar-key-map "[" 'speedbar-expand-line-descendants)
357 (define-key gud-speedbar-key-map "]" 'speedbar-contract-line-descendants)
358 (define-key gud-speedbar-key-map "D" 'gdb-var-delete))
359 359
360 (speedbar-add-expansion-list '("GUD" gud-speedbar-menu-items
361 gud-speedbar-key-map
362 gud-expansion-speedbar-buttons)))
360 363
361(defvar gud-speedbar-menu-items 364(defvar gud-speedbar-menu-items
362 ;; Note to self. Add expand, and turn off items when not available.
363 '(["Jump to stack frame" speedbar-edit-line 365 '(["Jump to stack frame" speedbar-edit-line
364 (with-current-buffer gud-comint-buffer 366 :visible (with-current-buffer gud-comint-buffer
365 (not (memq gud-minor-mode '(gdbmi gdba))))] 367 (not (memq gud-minor-mode '(gdbmi gdba))))]
366 ["Edit value" speedbar-edit-line 368 ["Edit value" speedbar-edit-line
367 (with-current-buffer gud-comint-buffer 369 :visible (with-current-buffer gud-comint-buffer
368 (memq gud-minor-mode '(gdbmi gdba)))] 370 (memq gud-minor-mode '(gdbmi gdba)))]
369 ["Delete expression" gdb-var-delete 371 ["Delete expression" gdb-var-delete
370 (with-current-buffer gud-comint-buffer 372 (with-current-buffer gud-comint-buffer
371 (memq gud-minor-mode '(gdbmi gdba)))]) 373 (memq gud-minor-mode '(gdbmi gdba)))])
@@ -376,89 +378,89 @@ t means that there is no stack, and we are in display-file mode.")
376 (gud-install-speedbar-variables) 378 (gud-install-speedbar-variables)
377 (add-hook 'speedbar-load-hook 'gud-install-speedbar-variables)) 379 (add-hook 'speedbar-load-hook 'gud-install-speedbar-variables))
378 380
381(defun gud-expansion-speedbar-buttons (directory zero)
382 "Wrapper for call to speedbar-add-expansion-list. DIRECTORY and
383ZERO are not used, but are required by the caller."
384 (gud-speedbar-buttons gud-comint-buffer))
385
379(defun gud-speedbar-buttons (buffer) 386(defun gud-speedbar-buttons (buffer)
380 "Create a speedbar display based on the current state of GUD. 387 "Create a speedbar display based on the current state of GUD.
381If the GUD BUFFER is not running a supported debugger, then turn 388If the GUD BUFFER is not running a supported debugger, then turn
382off the specialized speedbar mode." 389off the specialized speedbar mode. BUFFER is not used, but are
383 (let ((minor-mode (with-current-buffer buffer gud-minor-mode))) 390required by the caller."
384 (cond 391 (when (and (boundp 'gud-comint-buffer)
385 ((memq minor-mode '(gdbmi gdba)) 392 gud-comint-buffer
386 (when (or gdb-var-changed 393 ;; gud-comint-buffer might be killed
387 (not (save-excursion 394 (buffer-name gud-comint-buffer))
388 (goto-char (point-min)) 395 (let* ((minor-mode (with-current-buffer buffer gud-minor-mode))
389 (let ((case-fold-search t)) 396 (window (get-buffer-window (current-buffer) 0))
390 (looking-at "Watch Expressions:"))))) 397 (p (window-point window)))
391 (erase-buffer) 398 (cond
392 (insert "Watch Expressions:\n") 399 ((memq minor-mode '(gdbmi gdba))
393 (let ((var-list gdb-var-list)) 400 (when (or gdb-var-changed
394 (while var-list 401 (not (save-excursion
395 (let* ((depth 0) (start 0) (char ?+) 402 (goto-char (point-min))
396 (var (car var-list)) (varnum (nth 1 var))) 403 (let ((case-fold-search t))
397 (while (string-match "\\." varnum start) 404 (looking-at "Watch Expressions:")))))
398 (setq depth (1+ depth) 405 (erase-buffer)
399 start (1+ (match-beginning 0)))) 406 (insert "Watch Expressions:\n")
400 (if (equal (nth 2 var) "0") 407 (let ((var-list gdb-var-list))
401 (speedbar-make-tag-line 'bracket ?? nil nil 408 (while var-list
402 (concat (car var) "\t" (nth 4 var)) 409 (let* ((depth 0) (start 0) (char ?+)
403 'gdb-edit-value 410 (var (car var-list)) (varnum (nth 1 var)))
404 nil 411 (while (string-match "\\." varnum start)
405 (if (and (nth 5 var) 412 (setq depth (1+ depth)
406 gdb-show-changed-values) 413 start (1+ (match-beginning 0))))
407 'font-lock-warning-face 414 (if (equal (nth 2 var) "0")
408 nil) depth) 415 (speedbar-make-tag-line 'bracket ?? nil nil
409 (if (and (cadr var-list) 416 (concat (car var) "\t" (nth 4 var))
410 (string-match varnum (cadr (cadr var-list)))) 417 'gdb-edit-value
411 (setq char ?-)) 418 nil
412 (speedbar-make-tag-line 'bracket char 419 (if (and (nth 5 var)
413 'gdb-speedbar-expand-node varnum 420 gdb-show-changed-values)
414 (concat (car var) "\t" (nth 3 var)) 421 'font-lock-warning-face
415 nil nil nil depth))) 422 nil) depth)
416 (setq var-list (cdr var-list)))) 423 (if (and (cadr var-list)
417 (setq gdb-var-changed nil))) 424 (string-match varnum (cadr (cadr var-list))))
418 (t (if (and (save-excursion 425 (setq char ?-))
419 (goto-char (point-min)) 426 (speedbar-make-tag-line 'bracket char
420 (looking-at "Current Stack")) 427 'gdb-speedbar-expand-node varnum
421 (equal gud-last-last-frame gud-last-speedbar-stackframe)) 428 (concat (car var) "\t" (nth 3 var))
422 nil 429 nil nil nil depth)))
423 (setq gud-last-speedbar-buffer buffer) 430 (setq var-list (cdr var-list))))
424 (let ((gud-frame-list 431 (setq gdb-var-changed nil)))
425 (cond ((eq minor-mode 'gdb) 432 (t (if (and (save-excursion
426 (gud-gdb-get-stackframe buffer)) 433 (goto-char (point-min))
427 ;; Add more debuggers here! 434 (looking-at "Current Stack:"))
428 (t (speedbar-remove-localized-speedbar-support buffer) 435 (equal gud-last-last-frame gud-last-speedbar-stackframe))
429 nil)))) 436 nil
430 (erase-buffer) 437 (let ((gud-frame-list
431 (if (not gud-frame-list) 438 (cond ((eq minor-mode 'gdb)
432 (insert "No Stack frames\n") 439 (gud-gdb-get-stackframe buffer))
433 (insert "Current Stack:\n")) 440 ;; Add more debuggers here!
434 (dolist (frame gud-frame-list) 441 (t (speedbar-remove-localized-speedbar-support buffer)
435 (insert (nth 1 frame) ":\n") 442 nil))))
436 (if (= (length frame) 2) 443 (erase-buffer)
437 (progn 444 (if (not gud-frame-list)
438; (speedbar-insert-button "[?]" 445 (insert "No Stack frames\n")
439; 'speedbar-button-face 446 (insert "Current Stack:\n"))
440; nil nil nil t) 447 (dolist (frame gud-frame-list)
441 (speedbar-insert-button (car frame) 448 (insert (nth 1 frame) ":\n")
442 'speedbar-directory-face 449 (if (= (length frame) 2)
443 nil nil nil t)) 450 (progn
444; (speedbar-insert-button "[+]" 451 (speedbar-insert-button (car frame)
445; 'speedbar-button-face 452 'speedbar-directory-face
446; 'speedbar-highlight-face 453 nil nil nil t))
447; 'gud-gdb-get-scope-data 454 (speedbar-insert-button
448; frame t) 455 (car frame)
449 (speedbar-insert-button (car frame) 456 'speedbar-file-face
450 'speedbar-file-face 457 'speedbar-highlight-face
451 'speedbar-highlight-face 458 (cond ((memq minor-mode '(gdbmi gdba gdb))
452 (cond ((memq minor-mode '(gdbmi gdba gdb)) 459 'gud-gdb-goto-stackframe)
453 'gud-gdb-goto-stackframe) 460 (t (error "Should never be here")))
454 (t (error "Should never be here"))) 461 frame t))))
455 frame t))) 462 (setq gud-last-speedbar-stackframe gud-last-last-frame))))
456; (let ((selected-frame 463 (set-window-point window p))))
457; (cond ((eq ff 'gud-gdb-find-file)
458; (gud-gdb-selected-frame-info buffer))
459; (t (error "Should never be here"))))))
460 )
461 (setq gud-last-speedbar-stackframe gud-last-last-frame))))))
462 464
463 465
464;; ====================================================================== 466;; ======================================================================
@@ -2573,6 +2575,9 @@ It is saved for when this flag is not set.")
2573 ;; Stop displaying an arrow in a source file. 2575 ;; Stop displaying an arrow in a source file.
2574 (setq gud-overlay-arrow-position nil) 2576 (setq gud-overlay-arrow-position nil)
2575 (set-process-buffer proc nil) 2577 (set-process-buffer proc nil)
2578 (if (featurep 'speedbar)
2579 (speedbar-change-initial-expansion-list
2580 speedbar-previously-used-expansion-list-name))
2576 (if (memq gud-minor-mode-type '(gdbmi gdba)) 2581 (if (memq gud-minor-mode-type '(gdbmi gdba))
2577 (gdb-reset) 2582 (gdb-reset)
2578 (gud-reset))) 2583 (gud-reset)))
diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el
index fd494324303..741ae8097a0 100644
--- a/lisp/progmodes/mixal-mode.el
+++ b/lisp/progmodes/mixal-mode.el
@@ -17,8 +17,8 @@
17;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18;; MA 02110-1301 USA 18;; MA 02110-1301 USA
19 19
20;; Author: Pieter E.J. Pareit <pieter.pareit@skynet.be> 20;; Author: Pieter E.J. Pareit <pieter.pareit@gmail.com>
21;; Maintainer: Pieter E.J. Pareit <pieter.pareit@skynet.be> 21;; Maintainer: Pieter E.J. Pareit <pieter.pareit@gmail.com>
22;; Created: 09 Nov 2002 22;; Created: 09 Nov 2002
23;; Version: 0.1 23;; Version: 0.1
24;; Keywords: Knuth mix mixal asm mixvm "The Art Of Computer Programming" 24;; Keywords: Knuth mix mixal asm mixvm "The Art Of Computer Programming"
@@ -27,17 +27,17 @@
27;; Major mode for the mix asm language. 27;; Major mode for the mix asm language.
28;; The mix asm language is described in "The Art Of Computer Programming". 28;; The mix asm language is described in "The Art Of Computer Programming".
29;; 29;;
30;; For optimal use, also use GNU MDK. Compiling needs mixasm, running 30;; For optimal use, also use GNU MDK. Compiling needs mixasm, running
31;; and debugging needs mixvm and mixvm.el from GNU MDK. You can get 31;; and debugging needs mixvm and mixvm.el from GNU MDK. You can get
32;; GNU MDK from `https://savannah.gnu.org/projects/mdk/' and 32;; GNU MDK from `https://savannah.gnu.org/projects/mdk/' and
33;; `ftp://ftp.gnu.org/pub/gnu/mdk'. 33;; `ftp://ftp.gnu.org/pub/gnu/mdk'.
34;; 34;;
35;; To use this mode, place the following in your .emacs file: 35;; To use this mode, place the following in your .emacs file:
36;; `(load-file "/PATH-TO-FILE/mixal-mode.el")'. 36;; `(load-file "/PATH-TO-FILE/mixal-mode.el")'.
37;; When you load a file with the extension .mixal the mode will be started 37;; When you load a file with the extension .mixal the mode will be started
38;; automatic. If you want to start the mode manual, use `M-x mixal-mode'. 38;; automatic. If you want to start the mode manual, use `M-x mixal-mode'.
39;; Font locking will work, the behavior of tabs is the same as emacs 39;; Font locking will work, the behavior of tabs is the same as Emacs's
40;; default behavior. You can compile a source file with `C-c c' you can 40;; default behavior. You can compile a source file with `C-c c' you can
41;; run a compiled file with `C-c r' or run it in debug mode with `C-c d'. 41;; run a compiled file with `C-c r' or run it in debug mode with `C-c d'.
42;; You can get more information about a particular operation code by using 42;; You can get more information about a particular operation code by using
43;; mixal-describe-operation-code or `C-h o'. 43;; mixal-describe-operation-code or `C-h o'.
@@ -45,6 +45,23 @@
45;; Have fun. 45;; Have fun.
46 46
47;;; History: 47;;; History:
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.
57;; 08/10/05: sync mdk and emacs cvs
58;; from emacs: compile-command and require-final-newline
59;; from mdk: see version 0.2
60;; correct my email address
61;; Version 0.2:
62;; 06/04/05: mixasm no longer needs -g option
63;; fontlocking of comments works in all? cases now
64;; added some more mixal-operation-codes
48;; Version 0.1: 65;; Version 0.1:
49;; Version 0.1.1: 66;; Version 0.1.1:
50;; 22/11/02: bugfix in fontlocking, needed to add a '-' to the regex. 67;; 22/11/02: bugfix in fontlocking, needed to add a '-' to the regex.
@@ -54,7 +71,6 @@
54;; 09/11/02: started mixal-mode. 71;; 09/11/02: started mixal-mode.
55 72
56;;; Code: 73;;; Code:
57
58(defvar compile-command) 74(defvar compile-command)
59 75
60;;; Key map 76;;; Key map
@@ -66,15 +82,17 @@
66 (define-key map "\C-ho" 'mixal-describe-operation-code) 82 (define-key map "\C-ho" 'mixal-describe-operation-code)
67 map) 83 map)
68 "Keymap for `mixal-mode'.") 84 "Keymap for `mixal-mode'.")
69; (makunbound 'mixal-mode-map) 85;; (makunbound 'mixal-mode-map)
70 86
71;;; Syntax table 87;;; Syntax table
72(defvar mixal-mode-syntax-table 88(defvar mixal-mode-syntax-table
73 (let ((st (make-syntax-table))) 89 (let ((st (make-syntax-table)))
74 (modify-syntax-entry ?* "<" st) 90 ;; We need to do a bit more to make fontlocking for comments work.
91 ;; See mixal-font-lock-syntactic-keywords.
92 ;; (modify-syntax-entry ?* "<" st)
75 (modify-syntax-entry ?\n ">" st) 93 (modify-syntax-entry ?\n ">" st)
76 st) 94 st)
77 "Syntax table for `dot-mode'.") 95 "Syntax table for `mixal-mode'.")
78 96
79(defvar mixal-font-lock-label-face 'font-lock-variable-name-face 97(defvar mixal-font-lock-label-face 'font-lock-variable-name-face
80 "Face name to use for label names. 98 "Face name to use for label names.
@@ -91,43 +109,9 @@ value.")
91Default 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
92value.") 110value.")
93 111
94(defvar mixal-operation-codes
95 '("NOP" "ADD" "FADD" "SUB" "FSUB" "MUL" "FMUL" "DIV" "FDIV" "NUM" "CHAR"
96 "HLT" "SLA" "SRA" "SLAX" "SRAX" "SLC" "SRC" "MOVE" "LDA" "LD1" "LD2" "LD3"
97 "LD4" "LD5" "LD6" "LDX" "LDAN" "LD1N" "LD2N" "LD3N" "LD4N" "LD5N" "LD6N"
98 "LDXN" "STA" "ST1" "ST2" "ST3" "ST4" "ST5" "ST6" "STX" "STJ" "STZ" "JBUS"
99 "IOC" "IN" "OUT" "JRAD" "JMP" "JSJ" "JOV" "JNOV"
100 "JAN" "J1N" "J2N" "J3N" "J4N" "J5N" "J6N" "JXN"
101 "JAZ" "J1Z" "J2Z" "J3Z" "J4Z" "J5Z" "J6Z" "JXZ"
102 "JAP" "J1P" "J2P" "J3P" "J4P" "J5P" "J6P" "JXP"
103 "JANN" "J1NN" "J2NN" "J3NN" "J4NN" "J5NN" "J6NN" "JXNN"
104 "JANZ" "J1NZ" "J2NZ" "J3NZ" "J4NZ" "J5NZ" "J6NZ" "JXNZ"
105 "JANP" "J1NP" "J2NP" "J3NP" "J4NP" "J5NP" "J6NP" "JXNP"
106 "INCA" "DECA" "ENTA" "ENNA" "INC1" "DEC1" "ENT1" "ENN1"
107 "INC2" "DEC2" "ENT2" "ENN2" "INC3" "DEC3" "ENT3" "ENN3" "INC4" "DEC4"
108 "ENT4" "ENN4" "INC5" "DEC5" "ENT5" "ENN5" "INC6" "DEC6" "ENT6" "ENN6"
109 "INCX" "DECX" "ENTX" "ENNX" "CMPA" "FCMP" "CMP1" "CMP2" "CMP3" "CMP4"
110 "CMP5" "CMP6" "CMPX")
111 "List of possible operation codes as strings.")
112; (makunbound 'mixal-operation-codes)
113
114(defvar mixal-assembly-pseudoinstructions 112(defvar mixal-assembly-pseudoinstructions
115 '("ORIG" "EQU" "CON" "ALF" "END") 113 '("ORIG" "EQU" "CON" "ALF" "END")
116 "List of possible assembly pseudoinstructions") 114 "List of possible assembly pseudoinstructions.")
117
118;;; Font-locking:
119(defvar mixal-font-lock-keywords
120 `(("^\\([A-Z0-9a-z]+\\).*$"
121 (1 mixal-font-lock-label-face))
122 (,(regexp-opt mixal-operation-codes 'words)
123 . mixal-font-lock-operation-code-face)
124 (,(regexp-opt
125 mixal-assembly-pseudoinstructions 'words)
126 . mixal-font-lock-assembly-pseudoinstruction-face)
127 ("^[A-Z0-9a-z]*[ \t]+[A-Z0-9a-z]+[ \t]+[\\-A-Z0-9a-z,():]*[\t]+\\(.*\\)$"
128 (1 font-lock-comment-face)))
129 "Keyword highlighting specification for `mixal-mode'.")
130; (makunbound 'mixal-font-lock-keywords)
131 115
132;;;; Compilation 116;;;; Compilation
133;; Output from mixasm is compatible with default behavior of emacs, 117;; Output from mixasm is compatible with default behavior of emacs,
@@ -137,1121 +121,940 @@ value.")
137;; Tabs works well by default. 121;; Tabs works well by default.
138 122
139;;;; Describe 123;;;; Describe
140(defvar mixal-operation-codes-alist '() 124(defvar mixal-operation-codes-alist
141 "Alist that contains all the possible operation codes for mix. 125 ;; FIXME: the codes FADD, FSUB, FMUL, FDIV, JRAD, and FCMP were in
142Each elt has the form (OP-CODE GROUP FULL-NAME C-BYTE F-BYTE DESCRIPTION EXECUTION-TIME) 126 ;; mixal-operation-codes but not here. They should probably be added here.
143Where OP-CODE is the text of the opcode as an symbol, FULL-NAME is the human readable name 127 ;;
144as a string, C-BYTE is the operation code telling what operation is to be performed, F-BYTE holds 128 ;; We used to define this with a backquote and subexps like ,(+ 8 3) for
145an modification of the operation code which can be a symbol or a number, DESCRIPTION contains 129 ;; better clarity, but the resulting code was too big and caused the
146an string with a description about the operation code and EXECUTION-TIME holds info 130 ;; byte-compiler to eat up all the stack space. Even using
147about the time it takes, number or string.") 131 ;; `eval-when-compile' didn't help because the byte-compiler insists on
148; (makunbound 'mixal-operation-codes-alist) 132 ;; compiling the code before evaluating it.
149 133 '((LDA loading "load A" 8 field
150(defun mixal-add-operation-code (op-code group full-name C-byte F-byte description execution-time) 134 "Put in rA the contents of cell no. M.
151 "Add an operation code to the list that contains information about possible op code's."
152 (setq mixal-operation-codes-alist (cons (list op-code group full-name C-byte F-byte
153 description execution-time)
154 mixal-operation-codes-alist )))
155
156;; now add each operation code
157
158(mixal-add-operation-code
159 'LDA 'loading "load A" 8 'field
160 "Put in rA the contents of cell no. M.
161Uses 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
162zeros to make a word." 136zeros to make a word."
163 2) 137 2)
164 138
165(mixal-add-operation-code 139 (LDX loading "load X" 15 field
166 'LDX 'loading "load X" 15 'field 140 "Put in rX the contents of cell no. M.
167 "Put in rX the contents of cell no. M.
168Uses 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
169zeros to make a word." 142zeros to make a word."
170 2) 143 2)
171 144
172(mixal-add-operation-code 145 (LD1 loading "load I1" 9 field
173 'LD1 'loading "load I1" (+ 8 1) 'field 146 "Put in rI1 the contents of cell no. M.
174 "Put in rI1 the contents of cell no. M.
175Uses a + when there is no sign in subfield. Subfield is left padded with 147Uses a + when there is no sign in subfield. Subfield is left padded with
176zeros to make a word. Index registers only have 2 bytes and a sign, Trying 148zeros to make a word. Index registers only have 2 bytes and a sign, Trying
177to set anything more that that will result in undefined behavior." 149to set anything more that that will result in undefined behavior."
178 2) 150 2)
179 151
180(mixal-add-operation-code 152 (LD2 loading "load I2" 10 field
181 'LD2 'loading "load I2" (+ 8 2) 'field 153 "Put in rI2 the contents of cell no. M.
182 "Put in rI2 the contents of cell no. M.
183Uses a + when there is no sign in subfield. Subfield is left padded with 154Uses a + when there is no sign in subfield. Subfield is left padded with
184zeros to make a word. Index registers only have 2 bytes and a sign, Trying 155zeros to make a word. Index registers only have 2 bytes and a sign, Trying
185to set anything more that that will result in undefined behavior." 156to set anything more that that will result in undefined behavior."
186 2) 157 2)
187 158
188(mixal-add-operation-code 159 (LD3 loading "load I3" 11 field
189 'LD3 'loading "load I3" (+ 8 3) 'field 160 "Put in rI3 the contents of cell no. M.
190 "Put in rI3 the contents of cell no. M.
191Uses a + when there is no sign in subfield. Subfield is left padded with 161Uses a + when there is no sign in subfield. Subfield is left padded with
192zeros to make a word. Index registers only have 2 bytes and a sign, Trying 162zeros to make a word. Index registers only have 2 bytes and a sign, Trying
193to set anything more that that will result in undefined behavior." 163to set anything more that that will result in undefined behavior."
194 2) 164 2)
195 165
196(mixal-add-operation-code 166 (LD4 loading "load I4" 12 field
197 'LD4 'loading "load I4" (+ 8 4) 'field 167 "Put in rI4 the contents of cell no. M.
198 "Put in rI4 the contents of cell no. M.
199Uses a + when there is no sign in subfield. Subfield is left padded with 168Uses a + when there is no sign in subfield. Subfield is left padded with
200zeros to make a word. Index registers only have 2 bytes and a sign, Trying 169zeros to make a word. Index registers only have 2 bytes and a sign, Trying
201to set anything more that that will result in undefined behavior." 170to set anything more that that will result in undefined behavior."
202 2) 171 2)
203 172
204(mixal-add-operation-code 173 (LD5 loading "load I5" 13 field
205 'LD5 'loading "load I5" (+ 8 5) 'field 174 "Put in rI5 the contents of cell no. M.
206 "Put in rI5 the contents of cell no. M.
207Uses a + when there is no sign in subfield. Subfield is left padded with 175Uses a + when there is no sign in subfield. Subfield is left padded with
208zeros to make a word. Index registers only have 2 bytes and a sign, Trying 176zeros to make a word. Index registers only have 2 bytes and a sign, Trying
209to set anything more that that will result in undefined behavior." 177to set anything more that that will result in undefined behavior."
210 2) 178 2)
211 179
212(mixal-add-operation-code 180 (LD6 loading "load I6" 14 field
213 'LD6 'loading "load I6" (+ 8 6) 'field 181 "Put in rI6 the contents of cell no. M.
214 "Put in rI6 the contents of cell no. M.
215Uses a + when there is no sign in subfield. Subfield is left padded with 182Uses a + when there is no sign in subfield. Subfield is left padded with
216zeros to make a word. Index registers only have 2 bytes and a sign, Trying 183zeros to make a word. Index registers only have 2 bytes and a sign, Trying
217to set anything more that that will result in undefined behavior." 184to set anything more that that will result in undefined behavior."
218 2) 185 2)
219 186
220(mixal-add-operation-code 187 (LDAN loading "load A negative" 16 field
221 'LDAN 'loading "load A negative" 16 'field 188 "Put in rA the contents of cell no. M, with opposite sign.
222 "Put in rA the contents of cell no. M, with opposite sign.
223Uses 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.
224Subfield is left padded with zeros to make a word." 190Subfield is left padded with zeros to make a word."
225 2) 191 2)
226 192
227(mixal-add-operation-code 193 (LDXN loading "load X negative" 23 field
228 'LDXN 'loading "load X negative" 23 'field 194 "Put in rX the contents of cell no. M, with opposite sign.
229 "Put in rX the contents of cell no. M, with opposite sign.
230Uses 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.
231Subfield is left padded with zeros to make a word." 196Subfield is left padded with zeros to make a word."
232 2) 197 2)
233 198
234(mixal-add-operation-code 199 (LD1N loading "load I1 negative" 17 field
235 'LD1N 'loading "load I1 negative" (+ 16 1) 'field 200 "Put in rI1 the contents of cell no. M, with opposite sign.
236 "Put in rI1 the contents of cell no. M, with opposite sign.
237Uses a + when there is no sign in subfield, otherwise use the opposite sign. 201Uses a + when there is no sign in subfield, otherwise use the opposite sign.
238Subfield is left padded with zeros to make a word. Index registers only 202Subfield is left padded with zeros to make a word. Index registers only
239have 2 bytes and a sign, Trying to set anything more that that will result 203have 2 bytes and a sign, Trying to set anything more that that will result
240in undefined behavior." 204in undefined behavior."
241 2) 205 2)
242 206
243(mixal-add-operation-code 207 (LD2N loading "load I2 negative" 18 field
244 'LD2N 'loading "load I2 negative" (+ 16 2) 'field 208 "Put in rI2 the contents of cell no. M, with opposite sign.
245 "Put in rI2 the contents of cell no. M, with opposite sign.
246Uses a + when there is no sign in subfield, otherwise use the opposite sign. 209Uses a + when there is no sign in subfield, otherwise use the opposite sign.
247Subfield is left padded with zeros to make a word. Index registers only 210Subfield is left padded with zeros to make a word. Index registers only
248have 2 bytes and a sign, Trying to set anything more that that will result 211have 2 bytes and a sign, Trying to set anything more that that will result
249in undefined behavior." 212in undefined behavior."
250 2) 213 2)
251 214
252(mixal-add-operation-code 215 (LD3N loading "load I3 negative" 19 field
253 'LD3N 'loading "load I3 negative" (+ 16 3) 'field 216 "Put in rI3 the contents of cell no. M, with opposite sign.
254 "Put in rI3 the contents of cell no. M, with opposite sign.
255Uses a + when there is no sign in subfield, otherwise use the opposite sign. 217Uses a + when there is no sign in subfield, otherwise use the opposite sign.
256Subfield is left padded with zeros to make a word. Index registers only 218Subfield is left padded with zeros to make a word. Index registers only
257have 2 bytes and a sign, Trying to set anything more that that will result 219have 2 bytes and a sign, Trying to set anything more that that will result
258in undefined behavior." 220in undefined behavior."
259 2) 221 2)
260 222
261(mixal-add-operation-code 223 (LD4N loading "load I4 negative" 20 field
262 'LD4N 'loading "load I4 negative" (+ 16 4) 'field 224 "Put in rI4 the contents of cell no. M, with opposite sign.
263 "Put in rI4 the contents of cell no. M, with opposite sign.
264Uses a + when there is no sign in subfield, otherwise use the opposite sign. 225Uses a + when there is no sign in subfield, otherwise use the opposite sign.
265Subfield is left padded with zeros to make a word. Index registers only 226Subfield is left padded with zeros to make a word. Index registers only
266have 2 bytes and a sign, Trying to set anything more that that will result 227have 2 bytes and a sign, Trying to set anything more that that will result
267in undefined behavior." 228in undefined behavior."
268 2) 229 2)
269 230
270(mixal-add-operation-code 231 (LD5N loading "load I5 negative" 21 field
271 'LD5N 'loading "load I5 negative" (+ 16 5) 'field 232 "Put in rI5 the contents of cell no. M, with opposite sign.
272 "Put in rI5 the contents of cell no. M, with opposite sign.
273Uses a + when there is no sign in subfield, otherwise use the opposite sign. 233Uses a + when there is no sign in subfield, otherwise use the opposite sign.
274Subfield is left padded with zeros to make a word. Index registers only 234Subfield is left padded with zeros to make a word. Index registers only
275have 2 bytes and a sign, Trying to set anything more that that will result 235have 2 bytes and a sign, Trying to set anything more that that will result
276in undefined behavior." 236in undefined behavior."
277 2) 237 2)
278 238
279(mixal-add-operation-code 239 (LD6N loading "load I6 negative" 22 field
280 'LD6N 'loading "load I6 negative" (+ 16 6) 'field 240 "Put in rI6 the contents of cell no. M, with opposite sign.
281 "Put in rI6 the contents of cell no. M, with opposite sign.
282Uses a + when there is no sign in subfield, otherwise use the opposite sign. 241Uses a + when there is no sign in subfield, otherwise use the opposite sign.
283Subfield is left padded with zeros to make a word. Index registers only 242Subfield is left padded with zeros to make a word. Index registers only
284have 2 bytes and a sign, Trying to set anything more that that will result 243have 2 bytes and a sign, Trying to set anything more that that will result
285in undefined behavior." 244in undefined behavior."
286 2) 245 2)
287 246
288(mixal-add-operation-code 247 (STA storing "store A" 24 field
289 'STA 'storing "store A" 24 'field 248 "Store in cell Nr. M the contents of rA.
290 "Store in cell Nr. M the contents of rA.
291The modification of the operation code represents the subfield of the 249The modification of the operation code represents the subfield of the
292memory cell that is to be overwritten with bytes from a register. These 250memory cell that is to be overwritten with bytes from a register. These
293bytes are taken beginning by the rightmost side of the register. The 251bytes are taken beginning by the rightmost side of the register. The
294sign of the memory cell is not changed, unless it is part of the subfield." 252sign of the memory cell is not changed, unless it is part of the subfield."
295 2) 253 2)
296 254
297(mixal-add-operation-code 255 (STX storing "store X" 31 field
298 'STX 'storing "store X" 31 'field 256 "Store in cell Nr. M the contents of rX.
299 "Store in cell Nr. M the contents of rX.
300The modification of the operation code represents the subfield of the 257The modification of the operation code represents the subfield of the
301memory cell that is to be overwritten with bytes from a register. These 258memory cell that is to be overwritten with bytes from a register. These
302bytes are taken beginning by the rightmost side of the register. The 259bytes are taken beginning by the rightmost side of the register. The
303sign of the memory cell is not changed, unless it is part of the subfield." 260sign of the memory cell is not changed, unless it is part of the subfield."
304 2) 261 2)
305 262
306(mixal-add-operation-code 263 (ST1 storing "store I1" 25 field
307 'ST1 'storing "store I1" (+ 24 1) 'field 264 "Store in cell Nr. M the contents of rI1.
308 "Store in cell Nr. M the contents of rI1.
309The modification of the operation code represents the subfield of the 265The modification of the operation code represents the subfield of the
310memory cell that is to be overwritten with bytes from a register. These 266memory cell that is to be overwritten with bytes from a register. These
311bytes are taken beginning by the rightmost side of the register. The 267bytes are taken beginning by the rightmost side of the register. The
312sign of the memory cell is not changed, unless it is part of the subfield. 268sign of the memory cell is not changed, unless it is part of the subfield.
313Because index registers only have 2 bytes and a sign, the rest of the bytes 269Because index registers only have 2 bytes and a sign, the rest of the bytes
314are assumed to be 0." 270are assumed to be 0."
315 2) 271 2)
316 272
317(mixal-add-operation-code 273 (ST2 storing "store I2" 26 field
318 'ST2 'storing "store I2" (+ 24 2) 'field 274 "Store in cell Nr. M the contents of rI2.
319 "Store in cell Nr. M the contents of rI2.
320The modification of the operation code represents the subfield of the 275The modification of the operation code represents the subfield of the
321memory cell that is to be overwritten with bytes from a register. These 276memory cell that is to be overwritten with bytes from a register. These
322bytes are taken beginning by the rightmost side of the register. The 277bytes are taken beginning by the rightmost side of the register. The
323sign of the memory cell is not changed, unless it is part of the subfield. 278sign of the memory cell is not changed, unless it is part of the subfield.
324Because index registers only have 2 bytes and a sign, the rest of the bytes 279Because index registers only have 2 bytes and a sign, the rest of the bytes
325are assumed to be 0." 280are assumed to be 0."
326 2) 281 2)
327 282
328(mixal-add-operation-code 283 (ST3 storing "store I3" 27 field
329 'ST3 'storing "store I3" (+ 24 3) 'field 284 "Store in cell Nr. M the contents of rI3.
330 "Store in cell Nr. M the contents of rI3.
331The modification of the operation code represents the subfield of the 285The modification of the operation code represents the subfield of the
332memory cell that is to be overwritten with bytes from a register. These 286memory cell that is to be overwritten with bytes from a register. These
333bytes are taken beginning by the rightmost side of the register. The 287bytes are taken beginning by the rightmost side of the register. The
334sign of the memory cell is not changed, unless it is part of the subfield. 288sign of the memory cell is not changed, unless it is part of the subfield.
335Because index registers only have 2 bytes and a sign, the rest of the bytes 289Because index registers only have 2 bytes and a sign, the rest of the bytes
336are assumed to be 0." 290are assumed to be 0."
337 2) 291 2)
338 292
339(mixal-add-operation-code 293 (ST4 storing "store I4" 28 field
340 'ST4 'storing "store I4" (+ 24 4) 'field 294 "Store in cell Nr. M the contents of rI4.
341 "Store in cell Nr. M the contents of rI4.
342The modification of the operation code represents the subfield of the 295The modification of the operation code represents the subfield of the
343memory cell that is to be overwritten with bytes from a register. These 296memory cell that is to be overwritten with bytes from a register. These
344bytes are taken beginning by the rightmost side of the register. The 297bytes are taken beginning by the rightmost side of the register. The
345sign of the memory cell is not changed, unless it is part of the subfield. 298sign of the memory cell is not changed, unless it is part of the subfield.
346Because index registers only have 2 bytes and a sign, the rest of the bytes 299Because index registers only have 2 bytes and a sign, the rest of the bytes
347are assumed to be 0." 300are assumed to be 0."
348 2) 301 2)
349 302
350(mixal-add-operation-code 303 (ST5 storing "store I5" 29 field
351 'ST5 'storing "store I5" (+ 24 5) 'field 304 "Store in cell Nr. M the contents of rI5.
352 "Store in cell Nr. M the contents of rI5.
353The modification of the operation code represents the subfield of the 305The modification of the operation code represents the subfield of the
354memory cell that is to be overwritten with bytes from a register. These 306memory cell that is to be overwritten with bytes from a register. These
355bytes are taken beginning by the rightmost side of the register. The 307bytes are taken beginning by the rightmost side of the register. The
356sign of the memory cell is not changed, unless it is part of the subfield. 308sign of the memory cell is not changed, unless it is part of the subfield.
357Because index registers only have 2 bytes and a sign, the rest of the bytes 309Because index registers only have 2 bytes and a sign, the rest of the bytes
358are assumed to be 0." 310are assumed to be 0."
359 2) 311 2)
360 312
361(mixal-add-operation-code 313 (ST6 storing "store I6" 30 field
362 'ST6 'storing "store I6" (+ 24 6) 'field 314 "Store in cell Nr. M the contents of rI6.
363 "Store in cell Nr. M the contents of rI6.
364The modification of the operation code represents the subfield of the 315The modification of the operation code represents the subfield of the
365memory cell that is to be overwritten with bytes from a register. These 316memory cell that is to be overwritten with bytes from a register. These
366bytes are taken beginning by the rightmost side of the register. The 317bytes are taken beginning by the rightmost side of the register. The
367sign of the memory cell is not changed, unless it is part of the subfield. 318sign of the memory cell is not changed, unless it is part of the subfield.
368Because index registers only have 2 bytes and a sign, the rest of the bytes 319Because index registers only have 2 bytes and a sign, the rest of the bytes
369are assumed to be 0." 320are assumed to be 0."
370 2) 321 2)
371 322
372(mixal-add-operation-code 323 (STJ storing "store J" 32 field
373 'STJ 'storing "store J" 32 'field 324 "Store in cell Nr. M the contents of rJ.
374 "Store in cell Nr. M the contents of rJ.
375The modification of the operation code represents the subfield of the 325The modification of the operation code represents the subfield of the
376memory cell that is to be overwritten with bytes from a register. These 326memory cell that is to be overwritten with bytes from a register. These
377bytes are taken beginning by the rightmost side of the register. The sign 327bytes are taken beginning by the rightmost side of the register. The sign
378of rJ is always +, sign of the memory cell is not changed, unless it is 328of rJ is always +, sign of the memory cell is not changed, unless it is
379part of the subfield. The default field for STJ is (0:2)." 329part of the subfield. The default field for STJ is (0:2)."
380 2) 330 2)
381 331
382(mixal-add-operation-code 332 (STZ storing "store zero" 33 field
383 'STZ 'storing "store zero" 33 'field 333 "Store in cell Nr. M '+ 0'.
384 "Store in cell Nr. M '+ 0'.
385The modification of the operation code represents the subfield of the 334The modification of the operation code represents the subfield of the
386memory cell that is to be overwritten with zeros." 335memory cell that is to be overwritten with zeros."
387 2) 336 2)
388 337
389(mixal-add-operation-code 338 (ADD arithmetic "add" 1 field
390 'ADD 'arithmetic "add" 1 'field 339 "Add to A the contents of cell Nr. M.
391 "Add to A the contents of cell Nr. M.
392Subfield is padded with zero to make a word. 340Subfield is padded with zero to make a word.
393If the result is to large, the operation result modulo 1,073,741,823 (the 341If the result is to large, the operation result modulo 1,073,741,823 (the
394maximum value storable in a MIX word) is stored in `rA', and the overflow 342maximum value storable in a MIX word) is stored in `rA', and the overflow
395toggle is set to TRUE." 343toggle is set to TRUE."
396 2) 344 2)
397 345
398(mixal-add-operation-code 346 (SUB arithmetic "subtract" 2 field
399 'SUB 'arithmetic "subtract" 2 'field 347 "Subtract to A the contents of cell Nr. M.
400 "Subtract to A the contents of cell Nr. M.
401Subfield is padded with zero to make a word. 348Subfield is padded with zero to make a word.
402If the result is to large, the operation result modulo 1,073,741,823 (the 349If the result is to large, the operation result modulo 1,073,741,823 (the
403maximum value storable in a MIX word) is stored in `rA', and the overflow 350maximum value storable in a MIX word) is stored in `rA', and the overflow
404toggle is set to TRUE." 351toggle is set to TRUE."
405 2) 352 2)
406 353
407(mixal-add-operation-code 354 (MUL arithmetic "multiply" 3 field
408 'MUL 'arithmetic "multiply" 3 'field 355 "Multiplies the contents of cell Nr. M with A, result is 10 bytes and stored in rA and rX.
409 "Multiplies the contents of cell Nr. M with A, result is 10 bytes and stored in rA and rX.
410The sign is + if the sign of rA and cell M where the same, otherwise, it is -" 356The sign is + if the sign of rA and cell M where the same, otherwise, it is -"
411 10) 357 10)
412 358
413(mixal-add-operation-code 359 (DIV arithmetic "divide" 4 field
414 'DIV 'arithmetic "divide" 4 'field 360 "Both rA and rX are taken together and divided by cell Nr. M, quotient is placed in rA, remainder in rX.
415 "Both rA and rX are taken together and divided by cell Nr. M, quotient is placed in rA, remainder in rX.
416The sign is taken from rA, and after the divide the sign of rA is set to + when 361The sign is taken from rA, and after the divide the sign of rA is set to + when
417both the sign of rA and M where the same. Divide by zero and overflow of rA result 362both the sign of rA and M where the same. Divide by zero and overflow of rA
418in undefined behavior." 363result in undefined behavior."
419 12) 364 12)
420 365
421(mixal-add-operation-code 366 (ENTA address-transfer "enter A" 48
422 'ENTA 'address-transfer "enter A" 48 2 367 "Literal value is stored in rA.
423 "Literal value is stored in rA.
424Indexed, stores value of index in rA." 368Indexed, stores value of index in rA."
425 1) 369 1)
426 370
427(mixal-add-operation-code 371 (ENTX address-transfer "enter X" 55
428 'ENTX 'address-transfer "enter X" 55 2 372 "Literal value is stored in rX.
429 "Literal value is stored in rX.
430Indexed, stores value of index in rX." 373Indexed, stores value of index in rX."
431 1) 374 1)
432 375
433(mixal-add-operation-code 376 (ENT1 address-transfer "Enter rI1" 49
434 'ENT1 'address-transfer "Enter rI1" (+ 48 1) 2 377 "Literal value is stored in rI1.
435 "Literal value is stored in rI1.
436Indexed, stores value of index in rI1." 378Indexed, stores value of index in rI1."
437 1) 379 1)
438 380
439(mixal-add-operation-code 381 (ENT2 address-transfer "Enter rI2" 50
440 'ENT2 'address-transfer "Enter rI2" (+ 48 2) 2 382 "Literal value is stored in rI2.
441 "Literal value is stored in rI2.
442Indexed, stores value of index in rI2." 383Indexed, stores value of index in rI2."
443 1) 384 1)
444 385
445(mixal-add-operation-code 386 (ENT3 address-transfer "Enter rI3" 51
446 'ENT3 'address-transfer "Enter rI3" (+ 48 3) 2 387 "Literal value is stored in rI3.
447 "Literal value is stored in rI3.
448Indexed, stores value of index in rI3." 388Indexed, stores value of index in rI3."
449 1) 389 1)
450 390
451(mixal-add-operation-code 391 (ENT4 address-transfer "Enter rI4" 52
452 'ENT4 'address-transfer "Enter rI4" (+ 48 4) 2 392 "Literal value is stored in rI4.
453 "Literal value is stored in rI4.
454Indexed, stores value of index in rI4." 393Indexed, stores value of index in rI4."
455 1) 394 1)
456 395
457(mixal-add-operation-code 396 (ENT5 address-transfer "Enter rI5" 53
458 'ENT5 'address-transfer "Enter rI5" (+ 48 5) 2 397 "Literal value is stored in rI5.
459 "Literal value is stored in rI5.
460Indexed, stores value of index in rI5." 398Indexed, stores value of index in rI5."
461 1) 399 1)
462 400
463(mixal-add-operation-code 401 (ENT6 address-transfer "Enter rI6" 54
464 'ENT6 'address-transfer "Enter rI6" (+ 48 6) 2 402 "Literal value is stored in rI6.
465 "Literal value is stored in rI6.
466Indexed, stores value of index in rI6." 403Indexed, stores value of index in rI6."
467 1) 404 1)
468 405
469(mixal-add-operation-code 406 (ENNA address-transfer "enter negative A" 48
470 'ENNA 'address-transfer "enter negative A" 48 3 407 "Literal value is stored in rA with opposite sign.
471 "Literal value is stored in rA with opposite sign.
472Indexed, stores value of index in rA with opposite sign." 408Indexed, stores value of index in rA with opposite sign."
473 1) 409 1)
474 410
475(mixal-add-operation-code 411 (ENNX address-transfer "enter negative X" 55
476 'ENNX 'address-transfer "enter negative X" 55 3 412 "Literal value is stored in rX with opposite sign.
477 "Literal value is stored in rX with opposite sign.
478Indexed, stores value of index in rX with opposite sign." 413Indexed, stores value of index in rX with opposite sign."
479 1) 414 1)
480 415
481(mixal-add-operation-code 416 (ENN1 address-transfer "Enter negative rI1" 49
482 'ENN1 'address-transfer "Enter negative rI1" (+ 48 1) 3 417 "Literal value is stored in rI1 with opposite sign.
483 "Literal value is stored in rI1 with opposite sign.
484Indexed, stores value of index in rI1 with opposite sign." 418Indexed, stores value of index in rI1 with opposite sign."
485 1) 419 1)
486 420
487(mixal-add-operation-code 421 (ENN2 address-transfer "Enter negative rI2" 50
488 'ENN2 'address-transfer "Enter negative rI2" (+ 48 2) 3 422 "Literal value is stored in rI2 with opposite sign.
489 "Literal value is stored in rI2 with opposite sign.
490Indexed, stores value of index in rI2 with opposite sign." 423Indexed, stores value of index in rI2 with opposite sign."
491 1) 424 1)
492 425
493(mixal-add-operation-code 426 (ENN3 address-transfer "Enter negative rI3" 51
494 'ENN3 'address-transfer "Enter negative rI3" (+ 48 3) 3 427 "Literal value is stored in rI3 with opposite sign.
495 "Literal value is stored in rI3 with opposite sign.
496Indexed, stores value of index in rI3 with opposite sign." 428Indexed, stores value of index in rI3 with opposite sign."
497 1) 429 1)
498 430
499(mixal-add-operation-code 431 (ENN4 address-transfer "Enter negative rI4" 52
500 'ENN4 'address-transfer "Enter negative rI4" (+ 48 4) 3 432 "Literal value is stored in rI4 with opposite sign.
501 "Literal value is stored in rI4 with opposite sign.
502Indexed, stores value of index in rI4 with opposite sign." 433Indexed, stores value of index in rI4 with opposite sign."
503 1) 434 1)
504 435
505(mixal-add-operation-code 436 (ENN5 address-transfer "Enter negative rI5" 53
506 'ENN5 'address-transfer "Enter negative rI5" (+ 48 5) 3 437 "Literal value is stored in rI5 with opposite sign.
507 "Literal value is stored in rI5 with opposite sign.
508Indexed, stores value of index in rI5 with opposite sign." 438Indexed, stores value of index in rI5 with opposite sign."
509 1) 439 1)
510 440
511(mixal-add-operation-code 441 (ENN6 address-transfer "Enter negative rI6" 54
512 'ENN6 'address-transfer "Enter negative rI6" (+ 48 6) 3 442 "Literal value is stored in rI6 with opposite sign.
513 "Literal value is stored in rI6 with opposite sign.
514Indexed, stores value of index in rI6 with opposite sign." 443Indexed, stores value of index in rI6 with opposite sign."
515 1) 444 1)
516 445
517(mixal-add-operation-code 446 (INCA address-transfer "increase A" 48
518 'INCA 'address-transfer "increase A" 48 0 447 "Increase register A with the literal value of M.
519 "Increase register A with the literal value of M.
520On overflow the overflow toggle is set." 448On overflow the overflow toggle is set."
521 1) 449 1)
522 450
523(mixal-add-operation-code 451 (INCX address-transfer "increase X" 55
524 'INCX 'address-transfer "increase X" 55 0 452 "Increase register X with the literal value of M.
525 "Increase register X with the literal value of M.
526On overflow the overflow toggle is set." 453On overflow the overflow toggle is set."
527 1) 454 1)
528 455
529(mixal-add-operation-code 456 (INC1 address-transfer "increase I1" 49
530 'INC1 'address-transfer "increase I1" (+ 48 1) 0 457 "Increase register I1 with the literal value of M.
531 "Increase register I1 with the literal value of M.
532The result is undefined when the result does not fit in 458The result is undefined when the result does not fit in
5332 bytes." 4592 bytes."
534 1) 460 1)
535 461
536(mixal-add-operation-code 462 (INC2 address-transfer "increase I2" 50
537 'INC2 'address-transfer "increase I2" (+ 48 2) 0 463 "Increase register I2 with the literal value of M.
538 "Increase register I2 with the literal value of M.
539The result is undefined when the result does not fit in 464The result is undefined when the result does not fit in
5402 bytes." 4652 bytes."
541 1) 466 1)
542 467
543(mixal-add-operation-code 468 (INC3 address-transfer "increase I3" 51
544 'INC3 'address-transfer "increase I3" (+ 48 3) 0 469 "Increase register I3 with the literal value of M.
545 "Increase register I3 with the literal value of M.
546The result is undefined when the result does not fit in 470The result is undefined when the result does not fit in
5472 bytes." 4712 bytes."
548 1) 472 1)
549 473
550(mixal-add-operation-code 474 (INC4 address-transfer "increase I4" 52
551 'INC4 'address-transfer "increase I4" (+ 48 4) 0 475 "Increase register I4 with the literal value of M.
552 "Increase register I4 with the literal value of M.
553The result is undefined when the result does not fit in 476The result is undefined when the result does not fit in
5542 bytes." 4772 bytes."
555 1) 478 1)
556 479
557(mixal-add-operation-code 480 (INC5 address-transfer "increase I5" 53
558 'INC5 'address-transfer "increase I5" (+ 48 5) 0 481 "Increase register I5 with the literal value of M.
559 "Increase register I5 with the literal value of M.
560The result is undefined when the result does not fit in 482The result is undefined when the result does not fit in
5612 bytes." 4832 bytes."
562 1) 484 1)
563 485
564(mixal-add-operation-code 486 (INC6 address-transfer "increase I6" 54
565 'INC6 'address-transfer "increase I6" (+ 48 6) 0 487 "Increase register I6 with the literal value of M.
566 "Increase register I6 with the literal value of M.
567The result is undefined when the result does not fit in 488The result is undefined when the result does not fit in
5682 bytes." 4892 bytes."
569 1) 490 1)
570 491
571(mixal-add-operation-code 492 (DECA address-transfer "decrease A" 48
572 'DECA 'address-transfer "decrease A" 48 1 493 "Decrease register A with the literal value of M.
573 "Decrease register A with the literal value of M.
574On overflow the overflow toggle is set." 494On overflow the overflow toggle is set."
575 1) 495 1)
576 496
577(mixal-add-operation-code 497 (DECX address-transfer "decrease X" 55
578 'DECX 'address-transfer "decrease X" 55 1 498 "Decrease register X with the literal value of M.
579 "Decrease register X with the literal value of M.
580On overflow the overflow toggle is set." 499On overflow the overflow toggle is set."
581 1) 500 1)
582 501
583(mixal-add-operation-code 502 (DEC1 address-transfer "decrease I1" 49
584 'DEC1 'address-transfer "decrease I1" (+ 48 1) 1 503 "Decrease register I1 with the literal value of M.
585 "Decrease register I1 with the literal value of M.
586The result is undefined when the result does not fit in 504The result is undefined when the result does not fit in
5872 bytes." 5052 bytes."
588 1) 506 1)
589 507
590(mixal-add-operation-code 508 (DEC2 address-transfer "decrease I2" 50
591 'DEC2 'address-transfer "decrease I2" (+ 48 2) 1 509 "Decrease register I2 with the literal value of M.
592 "Decrease register I2 with the literal value of M.
593The result is undefined when the result does not fit in 510The result is undefined when the result does not fit in
5942 bytes." 5112 bytes."
595 1) 512 1)
596 513
597(mixal-add-operation-code 514 (DEC3 address-transfer "decrease I3" 51
598 'DEC3 'address-transfer "decrease I3" (+ 48 3) 1 515 "Decrease register I3 with the literal value of M.
599 "Decrease register I3 with the literal value of M.
600The result is undefined when the result does not fit in 516The result is undefined when the result does not fit in
6012 bytes." 5172 bytes."
602 1) 518 1)
603 519
604(mixal-add-operation-code 520 (DEC4 address-transfer "decrease I4" 52
605 'DEC4 'address-transfer "decrease I4" (+ 48 4) 1 521 "Decrease register I4 with the literal value of M.
606 "Decrease register I4 with the literal value of M.
607The result is undefined when the result does not fit in 522The result is undefined when the result does not fit in
6082 bytes." 5232 bytes."
609 1) 524 1)
610 525
611(mixal-add-operation-code 526 (DEC5 address-transfer "decrease I5" 53
612 'DEC5 'address-transfer "decrease I5" (+ 48 5) 1 527 "Decrease register I5 with the literal value of M.
613 "Decrease register I5 with the literal value of M.
614The result is undefined when the result does not fit in 528The result is undefined when the result does not fit in
6152 bytes." 5292 bytes."
616 1) 530 1)
617 531
618(mixal-add-operation-code 532 (DEC6 address-transfer "decrease I6" 54
619 'DEC6 'address-transfer "decrease I6" (+ 48 6) 1 533 "Decrease register I6 with the literal value of M.
620 "Decrease register I6 with the literal value of M.
621The result is undefined when the result does not fit in 534The result is undefined when the result does not fit in
6222 bytes." 5352 bytes."
623 1) 536 1)
624 537
625(mixal-add-operation-code 538 (CMPA comparison "compare A" 56 field
626 'CMPA 'comparison "compare A" 56 'field 539 "Compare contents of A with contents of M.
627 "Compare contents of A with contents of M.
628The field specifier works on both fields. The comparison indicator 540The field specifier works on both fields. The comparison indicator
629is set to LESS, EQUAL or GREATER depending on the outcome." 541is set to LESS, EQUAL or GREATER depending on the outcome."
630 2) 542 2)
631 543
632 544 (CMPX comparison "compare X" 63 field
633(mixal-add-operation-code 545 "Compare contents of rX with contents of M.
634 'CMPX 'comparison "compare X" 63 'field
635 "Compare contents of rX with contents of M.
636The field specifier works on both fields. The comparison indicator 546The field specifier works on both fields. The comparison indicator
637is set to LESS, EQUAL or GREATER depending on the outcome." 547is set to LESS, EQUAL or GREATER depending on the outcome."
638 2) 548 2)
639
640 549
641(mixal-add-operation-code 550 (CMP1 comparison "compare I1" 57 field
642 'CMP1 'comparison "compare I1" (+ 56 1) 'field 551 "Compare contents of rI1 with contents of M.
643 "Compare contents of rI1 with contents of M.
644The field specifier works on both fields. The comparison indicator 552The field specifier works on both fields. The comparison indicator
645is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3 553is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3
646have a value of 0." 554have a value of 0."
647 2) 555 2)
648
649 556
650(mixal-add-operation-code 557 (CMP2 comparison "compare I2" 58 field
651 'CMP2 'comparison "compare I2" (+ 56 2) 'field 558 "Compare contents of rI2 with contents of M.
652 "Compare contents of rI2 with contents of M.
653The field specifier works on both fields. The comparison indicator 559The field specifier works on both fields. The comparison indicator
654is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3 560is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3
655have a value of 0." 561have a value of 0."
656 2) 562 2)
657 563
658 564 (CMP3 comparison "compare I3" 59 field
659(mixal-add-operation-code 565 "Compare contents of rI3 with contents of M.
660 'CMP3 'comparison "compare I3" (+ 56 3) 'field
661 "Compare contents of rI3 with contents of M.
662The field specifier works on both fields. The comparison indicator 566The field specifier works on both fields. The comparison indicator
663is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3 567is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3
664have a value of 0." 568have a value of 0."
665 2) 569 2)
666
667 570
668(mixal-add-operation-code 571 (CMP4 comparison "compare I4" 60 field
669 'CMP4 'comparison "compare I4" (+ 56 4) 'field 572 "Compare contents of rI4 with contents of M.
670 "Compare contents of rI4 with contents of M.
671The field specifier works on both fields. The comparison indicator 573The field specifier works on both fields. The comparison indicator
672is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3 574is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3
673have a value of 0." 575have a value of 0."
674 2) 576 2)
675
676 577
677(mixal-add-operation-code 578 (CMP5 comparison "compare I5" 61 field
678 'CMP5 'comparison "compare I5" (+ 56 5) 'field 579 "Compare contents of rI5 with contents of M.
679 "Compare contents of rI5 with contents of M.
680The field specifier works on both fields. The comparison indicator 580The field specifier works on both fields. The comparison indicator
681is 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
682have a value of 0." 582have a value of 0."
683 2) 583 2)
684 584
685 585 (CMP6 comparison "compare I6" 62 field
686(mixal-add-operation-code 586 "Compare contents of rI6 with contents of M.
687 'CMP6 'comparison "compare I6" (+ 56 6) 'field
688 "Compare contents of rI6 with contents of M.
689The field specifier works on both fields. The comparison indicator 587The field specifier works on both fields. The comparison indicator
690is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3 588is set to LESS, EQUAL or GREATER depending on the outcome. Bit 1,2 and 3
691have a value of 0." 589have a value of 0."
692 2) 590 2)
693 591
694(mixal-add-operation-code 592 (JMP jump "jump" 39
695 'JMP 'jump "jump" 39 0 593 "Unconditional jump.
696 "Unconditional jump.
697Register J is set to the value of the next instruction that would have 594Register J is set to the value of the next instruction that would have
698been executed when there was no jump." 595been executed when there was no jump."
699 1) 596 1)
700 597
701(mixal-add-operation-code 598 (JSJ jump "jump, save J" 39
702 'JSJ 'jump "jump, save J" 39 1 599 "Unconditional jump, but rJ is not modified."
703 "Unconditional jump, but rJ is not modified." 600 1)
704 1)
705 601
706(mixal-add-operation-code 602 (JOV jump "jump on overflow" 39
707 'JOV 'jump "jump on overflow" 39 2 603 "Jump if OV is set (and turn it off).
708 "Jump if OV is set (and turn it off).
709Register J is set to the value of the next instruction that would have 604Register J is set to the value of the next instruction that would have
710been executed when there was no jump." 605been executed when there was no jump."
711 1) 606 1)
712 607
713(mixal-add-operation-code 608 (JNOV jump "Jump on no overflow" 39
714 'JNOV 'jump "Jump on no overflow" 39 3 609 "Jump if OV is not set (and turn it off).
715 "Jump if OV is not set (and turn it off).
716Register J is set to the value of the next instruction that would have 610Register J is set to the value of the next instruction that would have
717been executed when there was no jump." 611been executed when there was no jump."
718 1) 612 1)
719 613
720(mixal-add-operation-code 614 (JL jump "Jump on less" 39
721 'JL 'jump "Jump on less" 39 4 615 "Jump if '[CM] = L'.
722 "Jump if '[CM] = L'.
723Register J is set to the value of the next instruction that would have 616Register J is set to the value of the next instruction that would have
724been executed when there was no jump." 617been executed when there was no jump."
725 1) 618 1)
726
727 619
728(mixal-add-operation-code 620 (JE jump "Jump on equal" 39
729 'JE 'jump "Jump on equal" 39 5 621 "Jump if '[CM] = E'.
730 "Jump if '[CM] = E'.
731Register J is set to the value of the next instruction that would have 622Register J is set to the value of the next instruction that would have
732been executed when there was no jump." 623been executed when there was no jump."
733 1) 624 1)
734
735 625
736(mixal-add-operation-code 626 (JG jump "Jump on greater" 39
737 'JG 'jump "Jump on greater" 39 6 627 "Jump if '[CM] = G'.
738 "Jump if '[CM] = G'.
739Register J is set to the value of the next instruction that would have 628Register J is set to the value of the next instruction that would have
740been executed when there was no jump." 629been executed when there was no jump."
741 1) 630 1)
742 631
743 632 (JGE jump "Jump on not less" 39
744(mixal-add-operation-code 633 "Jump if '[CM]' does not equal 'L'.
745 'JGE 'jump "Jump on not less" 39 7
746 "Jump if '[CM]' does not equal 'L'.
747Register J is set to the value of the next instruction that would have 634Register J is set to the value of the next instruction that would have
748been executed when there was no jump." 635been executed when there was no jump."
749 1) 636 1)
750
751 637
752(mixal-add-operation-code 638 (JNE jump "Jump on not equal" 39
753 'JNE 'jump "Jump on not equal" 39 8 639 "Jump if '[CM]' does not equal 'E'.
754 "Jump if '[CM]' does not equal 'E'.
755Register J is set to the value of the next instruction that would have 640Register J is set to the value of the next instruction that would have
756been executed when there was no jump." 641been executed when there was no jump."
757 1) 642 1)
758 643
759 644 (JLE jump "Jump on not greater" 39
760(mixal-add-operation-code 645 "Jump if '[CM]' does not equal 'G'.
761 'JLE 'jump "Jump on not greater" 39 9
762 "Jump if '[CM]' does not equal 'G'.
763Register J is set to the value of the next instruction that would have 646Register J is set to the value of the next instruction that would have
764been executed when there was no jump." 647been executed when there was no jump."
765 1) 648 1)
766 649
767(mixal-add-operation-code 650 (JAN jump "jump A negative" 40
768 'JAN 'jump "jump A negative" 40 0 651 "Jump if the content of rA is negative.
769 "Jump if the content of rA is negative.
770Register 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
771been executed when there was no jump." 653been executed when there was no jump."
772 1) 654 1)
773
774 655
775(mixal-add-operation-code 656 (JAZ jump "jump A zero" 40
776 'JAZ 'jump "jump A zero" 40 1 657 "Jump if the content of rA is zero.
777 "Jump if the content of rA is zero.
778Register 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
779been executed when there was no jump." 659been executed when there was no jump."
780 1) 660 1)
781
782 661
783(mixal-add-operation-code 662 (JAP jump "jump A positive" 40
784 'JAP 'jump "jump A positive" 40 2 663 "Jump if the content of rA is positive.
785 "Jump if the content of rA is positive.
786Register J is set to the value of the next instruction that would have 664Register J is set to the value of the next instruction that would have
787been executed when there was no jump." 665been executed when there was no jump."
788 1) 666 1)
789 667
790 668 (JANN jump "jump A non-negative" 40
791(mixal-add-operation-code 669 "Jump if the content of rA is non-negative.
792 'JANN 'jump "jump A non-negative" 40 3
793 "Jump if the content of rA is non-negative.
794Register J is set to the value of the next instruction that would have 670Register J is set to the value of the next instruction that would have
795been executed when there was no jump." 671been executed when there was no jump."
796 1) 672 1)
797
798 673
799(mixal-add-operation-code 674 (JANZ jump "jump A non-zero" 40
800 'JANZ 'jump "jump A non-zero" 40 4 675 "Jump if the content of rA is non-zero.
801 "Jump if the content of rA is non-zero.
802Register J is set to the value of the next instruction that would have 676Register J is set to the value of the next instruction that would have
803been executed when there was no jump." 677been executed when there was no jump."
804 1) 678 1)
805
806 679
807(mixal-add-operation-code 680 (JANP jump "jump A non-positive" 40
808 'JANP 'jump "jump A non-positive" 40 5 681 "Jump if the content of rA is non-positive.
809 "Jump if the content of rA is non-positive.
810Register J is set to the value of the next instruction that would have 682Register J is set to the value of the next instruction that would have
811been executed when there was no jump." 683been executed when there was no jump."
812 1) 684 1)
813 685
814(mixal-add-operation-code 686 (JXN jump "jump X negative" 47
815 'JXN 'jump "jump X negative" 47 0 687 "Jump if the content of rX is negative.
816 "Jump if the content of rX is negative.
817Register J is set to the value of the next instruction that would have 688Register J is set to the value of the next instruction that would have
818been executed when there was no jump." 689been executed when there was no jump."
819 1) 690 1)
820 691
821 692 (JXZ jump "jump X zero" 47
822(mixal-add-operation-code 693 "Jump if the content of rX is zero.
823 'JXZ 'jump "jump X zero" 47 1
824 "Jump if the content of rX is zero.
825Register J is set to the value of the next instruction that would have 694Register J is set to the value of the next instruction that would have
826been executed when there was no jump." 695been executed when there was no jump."
827 1) 696 1)
828
829 697
830(mixal-add-operation-code 698 (JXP jump "jump X positive" 47
831 'JXP 'jump "jump X positive" 47 2 699 "Jump if the content of rX is positive.
832 "Jump if the content of rX is positive.
833Register J is set to the value of the next instruction that would have 700Register J is set to the value of the next instruction that would have
834been executed when there was no jump." 701been executed when there was no jump."
835 1) 702 1)
836
837 703
838(mixal-add-operation-code 704 (JXNN jump "jump X non-negative" 47
839 'JXNN 'jump "jump X non-negative" 47 3 705 "Jump if the content of rX is non-negative.
840 "Jump if the content of rX is non-negative.
841Register 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
842been executed when there was no jump." 707been executed when there was no jump."
843 1) 708 1)
844 709
845 710 (JXNZ jump "jump X non-zero" 47
846(mixal-add-operation-code 711 "Jump if the content of rX is non-zero.
847 'JXNZ 'jump "jump X non-zero" 47 4
848 "Jump if the content of rX is non-zero.
849Register J is set to the value of the next instruction that would have 712Register J is set to the value of the next instruction that would have
850been executed when there was no jump." 713been executed when there was no jump."
851 1) 714 1)
852
853 715
854(mixal-add-operation-code 716 (JXNP jump "jump X non-positive" 47
855 'JXNP 'jump "jump X non-positive" 47 5 717 "Jump if the content of rX is non-positive.
856 "Jump if the content of rX is non-positive.
857Register J is set to the value of the next instruction that would have 718Register J is set to the value of the next instruction that would have
858been executed when there was no jump." 719been executed when there was no jump."
859 1) 720 1)
860 721
861(mixal-add-operation-code 722 (J1N jump "jump I1 negative" 41
862 'J1N 'jump "jump I1 negative" (+ 40 1) 0 723 "Jump if the content of rI1 is negative.
863 "Jump if the content of rI1 is negative.
864Register J is set to the value of the next instruction that would have 724Register J is set to the value of the next instruction that would have
865been executed when there was no jump." 725been executed when there was no jump."
866 1) 726 1)
867 727
868 728 (J1Z jump "jump I1 zero" 41
869(mixal-add-operation-code 729 "Jump if the content of rI1 is zero.
870 'J1Z 'jump "jump I1 zero" (+ 40 1) 1
871 "Jump if the content of rI1 is zero.
872Register J is set to the value of the next instruction that would have 730Register J is set to the value of the next instruction that would have
873been executed when there was no jump." 731been executed when there was no jump."
874 1) 732 1)
875
876 733
877(mixal-add-operation-code 734 (J1P jump "jump I1 positive" 41
878 'J1P 'jump "jump I1 positive" (+ 40 1) 2 735 "Jump if the content of rI1 is positive.
879 "Jump if the content of rI1 is positive.
880Register J is set to the value of the next instruction that would have 736Register J is set to the value of the next instruction that would have
881been executed when there was no jump." 737been executed when there was no jump."
882 1) 738 1)
883
884 739
885(mixal-add-operation-code 740 (J1NN jump "jump I1 non-negative" 41
886 'J1NN 'jump "jump I1 non-negative" (+ 40 1) 3 741 "Jump if the content of rI1 is non-negative.
887 "Jump if the content of rI1 is non-negative.
888Register J is set to the value of the next instruction that would have 742Register J is set to the value of the next instruction that would have
889been executed when there was no jump." 743been executed when there was no jump."
890 1) 744 1)
891 745
892 746 (J1NZ jump "jump I1 non-zero" 41
893(mixal-add-operation-code 747 "Jump if the content of rI1 is non-zero.
894 'J1NZ 'jump "jump I1 non-zero" (+ 40 1) 4
895 "Jump if the content of rI1 is non-zero.
896Register J is set to the value of the next instruction that would have 748Register J is set to the value of the next instruction that would have
897been executed when there was no jump." 749been executed when there was no jump."
898 1) 750 1)
899
900 751
901(mixal-add-operation-code 752 (J1NP jump "jump I1 non-positive" 41
902 'J1NP 'jump "jump I1 non-positive" (+ 40 1) 5 753 "Jump if the content of rI1 is non-positive.
903 "Jump if the content of rI1 is non-positive.
904Register 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
905been executed when there was no jump." 755been executed when there was no jump."
906 1) 756 1)
907 757
908(mixal-add-operation-code 758 (J2N jump "jump I2 negative" 41
909 'J2N 'jump "jump I2 negative" (+ 40 1) 0 759 "Jump if the content of rI2 is negative.
910 "Jump if the content of rI2 is negative.
911Register J is set to the value of the next instruction that would have 760Register J is set to the value of the next instruction that would have
912been executed when there was no jump." 761been executed when there was no jump."
913 1) 762 1)
914 763
915 764 (J2Z jump "jump I2 zero" 41
916(mixal-add-operation-code 765 "Jump if the content of rI2 is zero.
917 'J2Z 'jump "jump I2 zero" (+ 40 1) 1
918 "Jump if the content of rI2 is zero.
919Register J is set to the value of the next instruction that would have 766Register J is set to the value of the next instruction that would have
920been executed when there was no jump." 767been executed when there was no jump."
921 1) 768 1)
922
923 769
924(mixal-add-operation-code 770 (J2P jump "jump I2 positive" 41
925 'J2P 'jump "jump I2 positive" (+ 40 1) 2 771 "Jump if the content of rI2 is positive.
926 "Jump if the content of rI2 is positive.
927Register J is set to the value of the next instruction that would have 772Register J is set to the value of the next instruction that would have
928been executed when there was no jump." 773been executed when there was no jump."
929 1) 774 1)
930
931 775
932(mixal-add-operation-code 776 (J2NN jump "jump I2 non-negative" 41
933 'J2NN 'jump "jump I2 non-negative" (+ 40 1) 3 777 "Jump if the content of rI2 is non-negative.
934 "Jump if the content of rI2 is non-negative.
935Register J is set to the value of the next instruction that would have 778Register J is set to the value of the next instruction that would have
936been executed when there was no jump." 779been executed when there was no jump."
937 1) 780 1)
938 781
939 782 (J2NZ jump "jump I2 non-zero" 41
940(mixal-add-operation-code 783 "Jump if the content of rI2 is non-zero.
941 'J2NZ 'jump "jump I2 non-zero" (+ 40 1) 4
942 "Jump if the content of rI2 is non-zero.
943Register J is set to the value of the next instruction that would have 784Register J is set to the value of the next instruction that would have
944been executed when there was no jump." 785been executed when there was no jump."
945 1) 786 1)
946
947 787
948(mixal-add-operation-code 788 (J2NP jump "jump I2 non-positive" 41
949 'J2NP 'jump "jump I2 non-positive" (+ 40 1) 5 789 "Jump if the content of rI2 is non-positive.
950 "Jump if the content of rI2 is non-positive.
951Register J is set to the value of the next instruction that would have 790Register J is set to the value of the next instruction that would have
952been executed when there was no jump." 791been executed when there was no jump."
953 1) 792 1)
954 793
955 794 (J3N jump "jump I3 negative" 41
956(mixal-add-operation-code 795 "Jump if the content of rI3 is negative.
957 'J3N 'jump "jump I3 negative" (+ 40 1) 0
958 "Jump if the content of rI3 is negative.
959Register J is set to the value of the next instruction that would have 796Register J is set to the value of the next instruction that would have
960been executed when there was no jump." 797been executed when there was no jump."
961 1) 798 1)
962
963 799
964(mixal-add-operation-code 800 (J3Z jump "jump I3 zero" 41
965 'J3Z 'jump "jump I3 zero" (+ 40 1) 1 801 "Jump if the content of rI3 is zero.
966 "Jump if the content of rI3 is zero.
967Register 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
968been executed when there was no jump." 803been executed when there was no jump."
969 1) 804 1)
970
971 805
972(mixal-add-operation-code 806 (J3P jump "jump I3 positive" 41
973 'J3P 'jump "jump I3 positive" (+ 40 1) 2 807 "Jump if the content of rI3 is positive.
974 "Jump if the content of rI3 is positive.
975Register J is set to the value of the next instruction that would have 808Register J is set to the value of the next instruction that would have
976been executed when there was no jump." 809been executed when there was no jump."
977 1) 810 1)
978 811
979 812 (J3NN jump "jump I3 non-negative" 41
980(mixal-add-operation-code 813 "Jump if the content of rI3 is non-negative.
981 'J3NN 'jump "jump I3 non-negative" (+ 40 1) 3
982 "Jump if the content of rI3 is non-negative.
983Register J is set to the value of the next instruction that would have 814Register J is set to the value of the next instruction that would have
984been executed when there was no jump." 815been executed when there was no jump."
985 1) 816 1)
986
987 817
988(mixal-add-operation-code 818 (J3NZ jump "jump I3 non-zero" 41
989 'J3NZ 'jump "jump I3 non-zero" (+ 40 1) 4 819 "Jump if the content of rI3 is non-zero.
990 "Jump if the content of rI3 is non-zero.
991Register J is set to the value of the next instruction that would have 820Register J is set to the value of the next instruction that would have
992been executed when there was no jump." 821been executed when there was no jump."
993 1) 822 1)
994
995 823
996(mixal-add-operation-code 824 (J3NP jump "jump I3 non-positive" 41
997 'J3NP 'jump "jump I3 non-positive" (+ 40 1) 5 825 "Jump if the content of rI3 is non-positive.
998 "Jump if the content of rI3 is non-positive.
999Register J is set to the value of the next instruction that would have 826Register J is set to the value of the next instruction that would have
1000been executed when there was no jump." 827been executed when there was no jump."
1001 1) 828 1)
1002 829
1003 830 (J4N jump "jump I4 negative" 41
1004(mixal-add-operation-code 831 "Jump if the content of rI4 is negative.
1005 'J4N 'jump "jump I4 negative" (+ 40 1) 0
1006 "Jump if the content of rI4 is negative.
1007Register J is set to the value of the next instruction that would have 832Register J is set to the value of the next instruction that would have
1008been executed when there was no jump." 833been executed when there was no jump."
1009 1) 834 1)
1010
1011 835
1012(mixal-add-operation-code 836 (J4Z jump "jump I4 zero" 41
1013 'J4Z 'jump "jump I4 zero" (+ 40 1) 1 837 "Jump if the content of rI4 is zero.
1014 "Jump if the content of rI4 is zero.
1015Register J is set to the value of the next instruction that would have 838Register J is set to the value of the next instruction that would have
1016been executed when there was no jump." 839been executed when there was no jump."
1017 1) 840 1)
1018
1019 841
1020(mixal-add-operation-code 842 (J4P jump "jump I4 positive" 41
1021 'J4P 'jump "jump I4 positive" (+ 40 1) 2 843 "Jump if the content of rI4 is positive.
1022 "Jump if the content of rI4 is positive.
1023Register 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
1024been executed when there was no jump." 845been executed when there was no jump."
1025 1) 846 1)
1026 847
1027 848 (J4NN jump "jump I4 non-negative" 41
1028(mixal-add-operation-code 849 "Jump if the content of rI4 is non-negative.
1029 'J4NN 'jump "jump I4 non-negative" (+ 40 1) 3
1030 "Jump if the content of rI4 is non-negative.
1031Register J is set to the value of the next instruction that would have 850Register J is set to the value of the next instruction that would have
1032been executed when there was no jump." 851been executed when there was no jump."
1033 1) 852 1)
1034
1035 853
1036(mixal-add-operation-code 854 (J4NZ jump "jump I4 non-zero" 41
1037 'J4NZ 'jump "jump I4 non-zero" (+ 40 1) 4 855 "Jump if the content of rI4 is non-zero.
1038 "Jump if the content of rI4 is non-zero.
1039Register J is set to the value of the next instruction that would have 856Register J is set to the value of the next instruction that would have
1040been executed when there was no jump." 857been executed when there was no jump."
1041 1) 858 1)
1042 859
1043 860 (J4NP jump "jump I4 non-positive" 41
1044(mixal-add-operation-code 861 "Jump if the content of rI4 is non-positive.
1045 'J4NP 'jump "jump I4 non-positive" (+ 40 1) 5
1046 "Jump if the content of rI4 is non-positive.
1047Register J is set to the value of the next instruction that would have 862Register J is set to the value of the next instruction that would have
1048been executed when there was no jump." 863been executed when there was no jump."
1049 1) 864 1)
1050
1051 865
1052(mixal-add-operation-code 866 (J5N jump "jump I5 negative" 41
1053 'J5N 'jump "jump I5 negative" (+ 40 1) 0 867 "Jump if the content of rI5 is negative.
1054 "Jump if the content of rI5 is negative.
1055Register J is set to the value of the next instruction that would have 868Register J is set to the value of the next instruction that would have
1056been executed when there was no jump." 869been executed when there was no jump."
1057 1) 870 1)
1058
1059 871
1060(mixal-add-operation-code 872 (J5Z jump "jump I5 zero" 41
1061 'J5Z 'jump "jump I5 zero" (+ 40 1) 1 873 "Jump if the content of rI5 is zero.
1062 "Jump if the content of rI5 is zero.
1063Register J is set to the value of the next instruction that would have 874Register J is set to the value of the next instruction that would have
1064been executed when there was no jump." 875been executed when there was no jump."
1065 1) 876 1)
1066 877
1067 878 (J5P jump "jump I5 positive" 41
1068(mixal-add-operation-code 879 "Jump if the content of rI5 is positive.
1069 'J5P 'jump "jump I5 positive" (+ 40 1) 2
1070 "Jump if the content of rI5 is positive.
1071Register J is set to the value of the next instruction that would have 880Register J is set to the value of the next instruction that would have
1072been executed when there was no jump." 881been executed when there was no jump."
1073 1) 882 1)
1074
1075 883
1076(mixal-add-operation-code 884 (J5NN jump "jump I5 non-negative" 41
1077 'J5NN 'jump "jump I5 non-negative" (+ 40 1) 3 885 "Jump if the content of rI5 is non-negative.
1078 "Jump if the content of rI5 is non-negative.
1079Register 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
1080been executed when there was no jump." 887been executed when there was no jump."
1081 1) 888 1)
1082 889
1083 890 (J5NZ jump "jump I5 non-zero" 41
1084(mixal-add-operation-code 891 "Jump if the content of rI5 is non-zero.
1085 'J5NZ 'jump "jump I5 non-zero" (+ 40 1) 4
1086 "Jump if the content of rI5 is non-zero.
1087Register J is set to the value of the next instruction that would have 892Register J is set to the value of the next instruction that would have
1088been executed when there was no jump." 893been executed when there was no jump."
1089 1) 894 1)
1090
1091 895
1092(mixal-add-operation-code 896 (J5NP jump "jump I5 non-positive" 41
1093 'J5NP 'jump "jump I5 non-positive" (+ 40 1) 5 897 "Jump if the content of rI5 is non-positive.
1094 "Jump if the content of rI5 is non-positive.
1095Register J is set to the value of the next instruction that would have 898Register J is set to the value of the next instruction that would have
1096been executed when there was no jump." 899been executed when there was no jump."
1097 1) 900 1)
1098
1099 901
1100(mixal-add-operation-code 902 (J6N jump "jump I6 negative" 41
1101 'J6N 'jump "jump I6 negative" (+ 40 1) 0 903 "Jump if the content of rI6 is negative.
1102 "Jump if the content of rI6 is negative.
1103Register J is set to the value of the next instruction that would have 904Register J is set to the value of the next instruction that would have
1104been executed when there was no jump." 905been executed when there was no jump."
1105 1) 906 1)
1106 907
1107 908 (J6Z jump "jump I6 zero" 41
1108(mixal-add-operation-code 909 "Jump if the content of rI6 is zero.
1109 'J6Z 'jump "jump I6 zero" (+ 40 1) 1
1110 "Jump if the content of rI6 is zero.
1111Register J is set to the value of the next instruction that would have 910Register J is set to the value of the next instruction that would have
1112been executed when there was no jump." 911been executed when there was no jump."
1113 1) 912 1)
1114
1115 913
1116(mixal-add-operation-code 914 (J6P jump "jump I6 positive" 41
1117 'J6P 'jump "jump I6 positive" (+ 40 1) 2 915 "Jump if the content of rI6 is positive.
1118 "Jump if the content of rI6 is positive.
1119Register J is set to the value of the next instruction that would have 916Register J is set to the value of the next instruction that would have
1120been executed when there was no jump." 917been executed when there was no jump."
1121 1) 918 1)
1122 919
1123 920 (J6NN jump "jump I6 non-negative" 41
1124(mixal-add-operation-code 921 "Jump if the content of rI6 is non-negative.
1125 'J6NN 'jump "jump I6 non-negative" (+ 40 1) 3
1126 "Jump if the content of rI6 is non-negative.
1127Register J is set to the value of the next instruction that would have 922Register J is set to the value of the next instruction that would have
1128been executed when there was no jump." 923been executed when there was no jump."
1129 1) 924 1)
1130
1131 925
1132(mixal-add-operation-code 926 (J6NZ jump "jump I6 non-zero" 41
1133 'J6NZ 'jump "jump I6 non-zero" (+ 40 1) 4 927 "Jump if the content of rI6 is non-zero.
1134 "Jump if the content of rI6 is non-zero.
1135Register 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
1136been executed when there was no jump." 929been executed when there was no jump."
1137 1) 930 1)
1138
1139 931
1140(mixal-add-operation-code 932 (J6NP jump "jump I6 non-positive" 41
1141 'J6NP 'jump "jump I6 non-positive" (+ 40 1) 5 933 "Jump if the content of rI6 is non-positive.
1142 "Jump if the content of rI6 is non-positive.
1143Register J is set to the value of the next instruction that would have 934Register J is set to the value of the next instruction that would have
1144been executed when there was no jump." 935been executed when there was no jump."
1145 1) 936 1)
1146 937
1147(mixal-add-operation-code 938 (SLA miscellaneous "shift left A" 6
1148 'SLA 'miscellaneous "shift left A" 6 0 939 "Shift to A, M bytes left.
1149 "Shift to A, M bytes left.
1150Hero's will be added to the right." 940Hero's will be added to the right."
1151 2) 941 2)
1152 942
1153 943 (SRA miscellaneous "shift right A" 6
1154(mixal-add-operation-code 944 "Shift to A, M bytes right.
1155 'SRA 'miscellaneous "shift right A" 6 1
1156 "Shift to A, M bytes right.
1157Zeros will be added to the left." 945Zeros will be added to the left."
1158 2) 946 2)
1159
1160 947
1161(mixal-add-operation-code 948 (SLAX miscellaneous "shift left AX" 6
1162 'SLAX 'miscellaneous "shift left AX" 6 2 949 "Shift AX, M bytes left.
1163 "Shift AX, M bytes left.
1164Zeros will be added to the right." 950Zeros will be added to the right."
1165 2) 951 2)
1166
1167 952
1168 953
1169(mixal-add-operation-code 954 (SRAX miscellaneous "shift right AX" 6
1170 'SRAX 'miscellaneous "shift right AX" 6 3 955 "Shift AX, M bytes right.
1171 "Shift AX, M bytes right.
1172Zeros will be added to the left." 956Zeros will be added to the left."
1173 2) 957 2)
1174 958
1175 959 (SLC miscellaneous "shift left AX circularly" 6
1176(mixal-add-operation-code 960 "Shift AX, M bytes left circularly.
1177 'SLC 'miscellaneous "shift left AX circularly" 6 4
1178 "Shift AX, M bytes left circularly.
1179The bytes that fall off to the left will be added to the right." 961The bytes that fall off to the left will be added to the right."
1180 2) 962 2)
1181
1182 963
1183(mixal-add-operation-code 964 (SRC miscellaneous "shift right AX circularly" 6
1184 'SRC 'miscellaneous "shift right AX circularly" 6 4 965 "Shift AX, M bytes right circularly.
1185 "Shift AX, M bytes right circularly.
1186The bytes that fall off to the right will be added to the left." 966The bytes that fall off to the right will be added to the left."
1187 2) 967 2)
1188 968
1189(mixal-add-operation-code 969 (MOVE miscellaneous "move" 7 number
1190 'MOVE 'miscellaneous "move" 7 'number 970 "Move MOD words from M to the location stored in rI1."
1191 "Move MOD words from M to the location stored in rI1." 971 (+ 1 (* 2 number)))
1192 '(+ 1 (* 2 number)))
1193 972
1194(mixal-add-operation-code 973 (NOP miscellaneous "no operation" 0 ignored
1195 'NOP 'miscellaneous "no operation" 0 'ignored 974 "No operation, M and F are not used by the machine."
1196 "No operation, M and F are not used by the machine." 975 1)
1197 1)
1198 976
1199(mixal-add-operation-code 977 (HLT miscellaneous "halt" 5
1200 'HLT 'miscellaneous "halt" 5 2 978 "Halt.
1201 "Halt.
1202Stop instruction fetching." 979Stop instruction fetching."
1203 1) 980 1)
1204 981
1205(mixal-add-operation-code 982 (IN input-output "input" 36 unit
1206 'IN 'input-output "input" 36 'unit 983 "Transfer a block of words from the specified unit to memory.
1207 "Transfer a block of words from the specified unit to memory.
1208The transfer starts at address M." 984The transfer starts at address M."
1209 1) 985 1)
1210 986
1211(mixal-add-operation-code 987 (OUT input-output "output" 37 unit
1212 'OUT 'input-output "output" 37 'unit 988 "Transfer a block of words from memory.
1213 "Transfer a block of words from memory.
1214The transfer starts at address M to the specified unit." 989The transfer starts at address M to the specified unit."
1215 1) 990 1)
1216 991
1217(mixal-add-operation-code 992 (IOC input-output "input-output control" 35 unit
1218 'IOC 'input-output "input-output control" 35 'unit 993 "Perform a control operation.
1219 "Perform a control operation.
1220The control operation is given by M on the specified unit." 994The control operation is given by M on the specified unit."
1221 1) 995 1)
1222
1223(mixal-add-operation-code
1224 'JRED 'input-output "jump ready" 38 'unit
1225 "Jump to M if the specified unit is ready."
1226 1)
1227 996
997 (JRED input-output "jump ready" 38 unit
998 "Jump to M if the specified unit is ready."
999 1)
1228 1000
1229(mixal-add-operation-code 1001 (JBUS input-output "jump busy" 34 unit
1230 'JBUS 'input-output "jump busy" 34 'unit 1002 "Jump to M if the specified unit is busy."
1231 "Jump to M if the specified unit is busy." 1003 1)
1232 1)
1233 1004
1234(mixal-add-operation-code 1005 (NUM conversion "convert to numeric" 5
1235 'NUM 'conversion "convert to numeric" 5 0 1006 "Convert rAX to its numerical value and store it in rA.
1236 "Convert rAX to its numerical value and store it in rA.
1237the register rAX is assumed to contain a character representation of 1007the register rAX is assumed to contain a character representation of
1238a number." 1008a number."
1239 10) 1009 10)
1240 1010
1241(mixal-add-operation-code 1011 (CHAR conversion "convert to characters" 5
1242 'CHAR 'conversion "convert to characters" 5 1 1012 "Convert the number stored in rA to a character representation.
1243 "Convert the number stored in rA to a character representation.
1244The converted character representation is stored in rAX." 1013The converted character representation is stored in rAX."
1245 10) 1014 10))
1015
1016 "Alist that contains all the possible operation codes for mix.
1017Each elt has the form
1018 (OP-CODE GROUP FULL-NAME C-BYTE F-BYTE DESCRIPTION EXECUTION-TIME)
1019Where OP-CODE is the text of the opcode as an symbol,
1020FULL-NAME is the human readable name as a string,
1021C-BYTE is the operation code telling what operation is to be performed,
1022F-BYTE holds a modification of the operation code which can be a symbol
1023 or a number,
1024DESCRIPTION contains an string with a description about the operation code and
1025EXECUTION-TIME holds info about the time it takes, number or string.")
1026;; (makunbound 'mixal-operation-codes-alist)
1027
1028
1029;;; Font-locking:
1030(defvar mixal-font-lock-syntactic-keywords
1031 ;; Normal comments start with a * in column 0 and end at end of line.
1032 '(("^\\*" (0 '(11))) ;(string-to-syntax "<") == '(11)
1033 ;; Every line can end with a comment which is placed after the operand.
1034 ;; I assume here that mnemonics without operands can not have a comment.
1035 ("^[[:alnum:]]*[ \t]+[[:alnum:]]+[ \t]+[^ \n\t]+[ \t]*\\([ \t]\\)[^\n \t]"
1036 (1 '(11)))))
1037
1038(defvar mixal-font-lock-keywords
1039 `(("^\\([A-Z0-9a-z]+\\)"
1040 (1 mixal-font-lock-label-face))
1041 (,(regexp-opt (mapcar (lambda (x) (symbol-name (car x)))
1042 mixal-operation-codes-alist) 'words)
1043 . mixal-font-lock-operation-code-face)
1044 (,(regexp-opt mixal-assembly-pseudoinstructions 'words)
1045 . mixal-font-lock-assembly-pseudoinstruction-face)
1046 ("^[A-Z0-9a-z]*[ \t]+[A-ZO-9a-z]+[ \t]+\\(=.*=\\)"
1047 (1 font-lock-constant-face)))
1048 "Keyword highlighting specification for `mixal-mode'.")
1049;; (makunbound 'mixal-font-lock-keywords)
1246 1050
1247(defvar mixal-describe-operation-code-history nil 1051(defvar mixal-describe-operation-code-history nil
1248 "History list for describe operation code.") 1052 "History list for describe operation code.")
1249 1053
1250(defun mixal-describe-operation-code (&optional op-code) 1054(defun mixal-describe-operation-code (op-code)
1251 "Display the full documentation of OP-CODE." 1055 "Display the full documentation of OP-CODE."
1252 (interactive) 1056 (interactive
1253 ;; we like to provide completition and history, so do it ourself (interactive "?bla")? 1057 (list
1254 (unless op-code
1255 (let* ((completion-ignore-case t) 1058 (let* ((completion-ignore-case t)
1256 ;; we already have a list, but it is not in the right format 1059 ;; we already have a list, but it is not in the right format
1257 ;; transform it to a valid table so completition can use it 1060 ;; transform it to a valid table so completition can use it
@@ -1259,15 +1062,16 @@ The converted character representation is stored in rAX."
1259 (cons (symbol-name (car elm)) nil)) 1062 (cons (symbol-name (car elm)) nil))
1260 mixal-operation-codes-alist)) 1063 mixal-operation-codes-alist))
1261 ;; prompt is different depending on we are close to a valid op-code 1064 ;; prompt is different depending on we are close to a valid op-code
1262 (have-default (member (current-word) mixal-operation-codes)) 1065 (have-default (assq (intern-soft (current-word))
1066 mixal-operation-codes-alist))
1263 (prompt (concat "Describe operation code " 1067 (prompt (concat "Describe operation code "
1264 (if have-default 1068 (if have-default
1265 (concat "(default " (current-word) "): ") 1069 (concat "(default " (current-word) "): ")
1266 ": ")))) 1070 ": "))))
1267 ;; as the operation code to the user 1071 ;; As the operation code to the user.
1268 (setq op-code (completing-read prompt table nil t nil 1072 (completing-read prompt table nil t nil
1269 'mixal-describe-operation-code-history 1073 'mixal-describe-operation-code-history
1270 (current-word))))) 1074 (current-word)))))
1271 ;; get the info on the op-code and output it to the help buffer 1075 ;; get the info on the op-code and output it to the help buffer
1272 (let ((op-code-help (assq (intern-soft op-code) mixal-operation-codes-alist))) 1076 (let ((op-code-help (assq (intern-soft op-code) mixal-operation-codes-alist)))
1273 (when op-code-help 1077 (when op-code-help
@@ -1282,13 +1086,14 @@ The converted character representation is stored in rAX."
1282 1086
1283;;;; Running 1087;;;; Running
1284(defun mixal-run () 1088(defun mixal-run ()
1285 "Run's mixal file in current buffer, assumes that file has been compiled" 1089 "Run mixal file in current buffer, assumes that file has been compiled."
1286 (interactive) 1090 (interactive)
1287 (mixvm (concat "mixvm -r -t -d " 1091 (mixvm (concat "mixvm -r -t -d "
1288 (file-name-sans-extension (buffer-file-name))))) 1092 (file-name-sans-extension (buffer-file-name)))))
1289 1093
1290(defun mixal-debug () 1094(defun mixal-debug ()
1291 "Starts mixvm for debugging, assumes that file has been compiled with debugging support" 1095 "Start mixvm for debugging.
1096Assumes that file has been compiled with debugging support."
1292 (interactive) 1097 (interactive)
1293 (mixvm (concat "mixvm " 1098 (mixvm (concat "mixvm "
1294 (file-name-sans-extension (buffer-file-name))))) 1099 (file-name-sans-extension (buffer-file-name)))))
@@ -1298,11 +1103,14 @@ The converted character representation is stored in rAX."
1298 "Major mode for the mixal asm language. 1103 "Major mode for the mixal asm language.
1299\\{mixal-mode-map}" 1104\\{mixal-mode-map}"
1300 (set (make-local-variable 'comment-start) "*") 1105 (set (make-local-variable 'comment-start) "*")
1301 (set (make-local-variable 'comment-start-skip) "*") 1106 (set (make-local-variable 'comment-start-skip) "^\\*[ \t]*")
1302 (set (make-local-variable 'font-lock-defaults) '(mixal-font-lock-keywords)) 1107 (set (make-local-variable 'font-lock-defaults)
1303; might add an indent function in the future 1108 `(mixal-font-lock-keywords nil nil nil nil
1304; (set (make-local-variable 'indent-line-function) 'mixal-indent-line) 1109 (font-lock-syntactic-keywords . ,mixal-font-lock-syntactic-keywords)
1305 (set (make-local-variable 'compile-command) (concat "mixasm -g " 1110 (parse-sexp-lookup-properties . t)))
1111 ;; might add an indent function in the future
1112 ;; (set (make-local-variable 'indent-line-function) 'mixal-indent-line)
1113 (set (make-local-variable 'compile-command) (concat "mixasm "
1306 buffer-file-name)) 1114 buffer-file-name))
1307 ;; mixasm will do strange when there is no final newline, 1115 ;; mixasm will do strange when there is no final newline,
1308 ;; so let Emacs ensure that it is always there 1116 ;; so let Emacs ensure that it is always there
@@ -1314,5 +1122,5 @@ The converted character representation is stored in rAX."
1314 1122
1315(provide 'mixal-mode) 1123(provide 'mixal-mode)
1316 1124
1317;;; arch-tag: be7c128a-bf61-4951-a90e-9398267ce3f3 1125;; arch-tag: be7c128a-bf61-4951-a90e-9398267ce3f3
1318;;; mixal-mode.el ends here 1126;;; mixal-mode.el ends here
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index b84fa87a0de..3cd243580e2 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -69,36 +69,34 @@
69 "Abbrev table in use in Pascal-mode buffers.") 69 "Abbrev table in use in Pascal-mode buffers.")
70(define-abbrev-table 'pascal-mode-abbrev-table ()) 70(define-abbrev-table 'pascal-mode-abbrev-table ())
71 71
72(defvar pascal-mode-map () 72(defvar pascal-mode-map
73 (let ((map (make-sparse-keymap)))
74 (define-key map ";" 'electric-pascal-semi-or-dot)
75 (define-key map "." 'electric-pascal-semi-or-dot)
76 (define-key map ":" 'electric-pascal-colon)
77 (define-key map "=" 'electric-pascal-equal)
78 (define-key map "#" 'electric-pascal-hash)
79 (define-key map "\r" 'electric-pascal-terminate-line)
80 (define-key map "\t" 'electric-pascal-tab)
81 (define-key map "\M-\t" 'pascal-complete-word)
82 (define-key map "\M-?" 'pascal-show-completions)
83 (define-key map "\177" 'backward-delete-char-untabify)
84 (define-key map "\M-\C-h" 'pascal-mark-defun)
85 (define-key map "\C-c\C-b" 'pascal-insert-block)
86 (define-key map "\M-*" 'pascal-star-comment)
87 (define-key map "\C-c\C-c" 'pascal-comment-area)
88 (define-key map "\C-c\C-u" 'pascal-uncomment-area)
89 (define-key map "\M-\C-a" 'pascal-beg-of-defun)
90 (define-key map "\M-\C-e" 'pascal-end-of-defun)
91 (define-key map "\C-c\C-d" 'pascal-goto-defun)
92 (define-key map "\C-c\C-o" 'pascal-outline-mode)
93 ;; A command to change the whole buffer won't be used terribly
94 ;; often, so no need for a key binding.
95 ;; (define-key map "\C-cd" 'pascal-downcase-keywords)
96 ;; (define-key map "\C-cu" 'pascal-upcase-keywords)
97 ;; (define-key map "\C-cc" 'pascal-capitalize-keywords)
98 map)
73 "Keymap used in Pascal mode.") 99 "Keymap used in Pascal mode.")
74(if pascal-mode-map
75 ()
76 (setq pascal-mode-map (make-sparse-keymap))
77 (define-key pascal-mode-map ";" 'electric-pascal-semi-or-dot)
78 (define-key pascal-mode-map "." 'electric-pascal-semi-or-dot)
79 (define-key pascal-mode-map ":" 'electric-pascal-colon)
80 (define-key pascal-mode-map "=" 'electric-pascal-equal)
81 (define-key pascal-mode-map "#" 'electric-pascal-hash)
82 (define-key pascal-mode-map "\r" 'electric-pascal-terminate-line)
83 (define-key pascal-mode-map "\t" 'electric-pascal-tab)
84 (define-key pascal-mode-map "\M-\t" 'pascal-complete-word)
85 (define-key pascal-mode-map "\M-?" 'pascal-show-completions)
86 (define-key pascal-mode-map "\177" 'backward-delete-char-untabify)
87 (define-key pascal-mode-map "\M-\C-h" 'pascal-mark-defun)
88 (define-key pascal-mode-map "\C-c\C-b" 'pascal-insert-block)
89 (define-key pascal-mode-map "\M-*" 'pascal-star-comment)
90 (define-key pascal-mode-map "\C-c\C-c" 'pascal-comment-area)
91 (define-key pascal-mode-map "\C-c\C-u" 'pascal-uncomment-area)
92 (define-key pascal-mode-map "\M-\C-a" 'pascal-beg-of-defun)
93 (define-key pascal-mode-map "\M-\C-e" 'pascal-end-of-defun)
94 (define-key pascal-mode-map "\C-c\C-d" 'pascal-goto-defun)
95 (define-key pascal-mode-map "\C-c\C-o" 'pascal-outline)
96;;; A command to change the whole buffer won't be used terribly
97;;; often, so no need for a key binding.
98; (define-key pascal-mode-map "\C-cd" 'pascal-downcase-keywords)
99; (define-key pascal-mode-map "\C-cu" 'pascal-upcase-keywords)
100; (define-key pascal-mode-map "\C-cc" 'pascal-capitalize-keywords)
101 )
102 100
103(defvar pascal-imenu-generic-expression 101(defvar pascal-imenu-generic-expression
104 '((nil "^[ \t]*\\(function\\|procedure\\)[ \t\n]+\\([a-zA-Z0-9_.:]+\\)" 2)) 102 '((nil "^[ \t]*\\(function\\|procedure\\)[ \t\n]+\\([a-zA-Z0-9_.:]+\\)" 2))
@@ -132,28 +130,31 @@
132(defconst pascal-exclude-str-start "{-----\\/----- EXCLUDED -----\\/-----") 130(defconst pascal-exclude-str-start "{-----\\/----- EXCLUDED -----\\/-----")
133(defconst pascal-exclude-str-end " -----/\\----- EXCLUDED -----/\\-----}") 131(defconst pascal-exclude-str-end " -----/\\----- EXCLUDED -----/\\-----}")
134 132
135(defvar pascal-mode-syntax-table nil 133(defvar pascal-mode-syntax-table
134 (let ((st (make-syntax-table)))
135 (modify-syntax-entry ?\\ "." st)
136 (modify-syntax-entry ?\( "()1" st)
137 (modify-syntax-entry ?\) ")(4" st)
138 ;; This used to use comment-syntax `b'. But the only document I could
139 ;; find about the syntax of Pascal's comments said that (* ... } is
140 ;; a valid comment, just as { ... *) or (* ... *) or { ... }.
141 (modify-syntax-entry ?* ". 23" st)
142 (modify-syntax-entry ?{ "<" st)
143 (modify-syntax-entry ?} ">" st)
144 (modify-syntax-entry ?+ "." st)
145 (modify-syntax-entry ?- "." st)
146 (modify-syntax-entry ?= "." st)
147 (modify-syntax-entry ?% "." st)
148 (modify-syntax-entry ?< "." st)
149 (modify-syntax-entry ?> "." st)
150 (modify-syntax-entry ?& "." st)
151 (modify-syntax-entry ?| "." st)
152 (modify-syntax-entry ?_ "_" st)
153 (modify-syntax-entry ?\' "\"" st)
154 st)
136 "Syntax table in use in Pascal-mode buffers.") 155 "Syntax table in use in Pascal-mode buffers.")
137 156
138(if pascal-mode-syntax-table 157
139 ()
140 (setq pascal-mode-syntax-table (make-syntax-table))
141 (modify-syntax-entry ?\\ "." pascal-mode-syntax-table)
142 (modify-syntax-entry ?( "()1" pascal-mode-syntax-table)
143 (modify-syntax-entry ?) ")(4" pascal-mode-syntax-table)
144 (modify-syntax-entry ?* ". 23b" pascal-mode-syntax-table)
145 (modify-syntax-entry ?{ "<" pascal-mode-syntax-table)
146 (modify-syntax-entry ?} ">" pascal-mode-syntax-table)
147 (modify-syntax-entry ?+ "." pascal-mode-syntax-table)
148 (modify-syntax-entry ?- "." pascal-mode-syntax-table)
149 (modify-syntax-entry ?= "." pascal-mode-syntax-table)
150 (modify-syntax-entry ?% "." pascal-mode-syntax-table)
151 (modify-syntax-entry ?< "." pascal-mode-syntax-table)
152 (modify-syntax-entry ?> "." pascal-mode-syntax-table)
153 (modify-syntax-entry ?& "." pascal-mode-syntax-table)
154 (modify-syntax-entry ?| "." pascal-mode-syntax-table)
155 (modify-syntax-entry ?_ "_" pascal-mode-syntax-table)
156 (modify-syntax-entry ?\' "\"" pascal-mode-syntax-table))
157 158
158(defconst pascal-font-lock-keywords (purecopy 159(defconst pascal-font-lock-keywords (purecopy
159 (list 160 (list
@@ -327,7 +328,7 @@ Other useful functions are:
327\\[pascal-beg-of-defun]\t- Move to beginning of current function. 328\\[pascal-beg-of-defun]\t- Move to beginning of current function.
328\\[pascal-end-of-defun]\t- Move to end of current function. 329\\[pascal-end-of-defun]\t- Move to end of current function.
329\\[pascal-goto-defun]\t- Goto function prompted for in the minibuffer. 330\\[pascal-goto-defun]\t- Goto function prompted for in the minibuffer.
330\\[pascal-outline]\t- Enter pascal-outline-mode (see also pascal-outline). 331\\[pascal-outline-mode]\t- Enter `pascal-outline-mode'.
331 332
332Variables controlling indentation/edit style: 333Variables controlling indentation/edit style:
333 334
@@ -792,8 +793,7 @@ on the line which ends a function or procedure named NAME."
792(defun pascal-indent-command () 793(defun pascal-indent-command ()
793 "Indent for special part of code." 794 "Indent for special part of code."
794 (let* ((indent-str (pascal-calculate-indent)) 795 (let* ((indent-str (pascal-calculate-indent))
795 (type (car indent-str)) 796 (type (car indent-str)))
796 (ind (car (cdr indent-str))))
797 (cond ((and (eq type 'paramlist) 797 (cond ((and (eq type 'paramlist)
798 (or (memq 'all pascal-auto-lineup) 798 (or (memq 'all pascal-auto-lineup)
799 (memq 'paramlist pascal-auto-lineup))) 799 (memq 'paramlist pascal-auto-lineup)))
@@ -971,7 +971,7 @@ Do not count labels, case-statements or records."
971 (end-of-line) 971 (end-of-line)
972 (point-marker) 972 (point-marker)
973 (re-search-backward "\\<case\\>" nil t))) 973 (re-search-backward "\\<case\\>" nil t)))
974 (beg (point)) oldpos 974 (beg (point))
975 (ind 0)) 975 (ind 0))
976 ;; Get right indent 976 ;; Get right indent
977 (while (< (point) end) 977 (while (< (point) end)
@@ -986,7 +986,6 @@ Do not count labels, case-statements or records."
986 (setq ind (current-column))) 986 (setq ind (current-column)))
987 (pascal-end-of-statement)))) 987 (pascal-end-of-statement))))
988 (goto-char beg) 988 (goto-char beg)
989 (setq oldpos (marker-position end))
990 ;; Indent all case statements 989 ;; Indent all case statements
991 (while (< (point) end) 990 (while (< (point) end)
992 (if (re-search-forward 991 (if (re-search-forward
@@ -999,7 +998,6 @@ Do not count labels, case-statements or records."
999 (forward-char 1) 998 (forward-char 1)
1000 (delete-horizontal-space) 999 (delete-horizontal-space)
1001 (insert " ")) 1000 (insert " "))
1002 (setq oldpos (point))
1003 (pascal-end-of-statement)) 1001 (pascal-end-of-statement))
1004 (goto-char savepos))) 1002 (goto-char savepos)))
1005 1003
@@ -1490,30 +1488,20 @@ The default is a name found in the buffer around point."
1490;;; 1488;;;
1491;;; Pascal-outline-mode 1489;;; Pascal-outline-mode
1492;;; 1490;;;
1493(defvar pascal-outline-map nil "Keymap used in Pascal Outline mode.") 1491(defvar pascal-outline-map
1494 1492 (let ((map (make-sparse-keymap)))
1495(if pascal-outline-map 1493 (if (fboundp 'set-keymap-name)
1496 nil 1494 (set-keymap-name pascal-outline-map 'pascal-outline-map))
1497 (if (fboundp 'set-keymap-name) 1495 (define-key map "\M-\C-a" 'pascal-outline-prev-defun)
1498 (set-keymap-name pascal-outline-map 'pascal-outline-map)) 1496 (define-key map "\M-\C-e" 'pascal-outline-next-defun)
1499 (if (fboundp 'set-keymap-parent) 1497 (define-key map "\C-c\C-d" 'pascal-outline-goto-defun)
1500 (set-keymap-parent (setq pascal-outline-map (make-sparse-keymap)) 1498 (define-key map "\C-c\C-s" 'pascal-show-all)
1501 pascal-mode-map) 1499 (define-key map "\C-c\C-h" 'pascal-hide-other-defuns)
1502 (setq pascal-outline-map (copy-keymap pascal-mode-map))) 1500 map)
1503 (define-key pascal-outline-map "\M-\C-a" 'pascal-outline-prev-defun) 1501 "Keymap used in Pascal Outline mode.")
1504 (define-key pascal-outline-map "\M-\C-e" 'pascal-outline-next-defun) 1502
1505 (define-key pascal-outline-map "\C-c\C-d" 'pascal-outline-goto-defun) 1503(define-obsolete-function-alias 'pascal-outline 'pascal-outline-mode)
1506 (define-key pascal-outline-map "\C-c\C-s" 'pascal-show-all) 1504(define-minor-mode pascal-outline-mode
1507 (define-key pascal-outline-map "\C-c\C-h" 'pascal-hide-other-defuns))
1508
1509(defvar pascal-outline-mode nil "Non-nil while using Pascal Outline mode.")
1510(make-variable-buffer-local 'pascal-outline-mode)
1511(set-default 'pascal-outline-mode nil)
1512(if (not (assoc 'pascal-outline-mode minor-mode-alist))
1513 (setq minor-mode-alist (append minor-mode-alist
1514 (list '(pascal-outline-mode " Outl")))))
1515
1516(defun pascal-outline (&optional arg)
1517 "Outline-line minor mode for Pascal mode. 1505 "Outline-line minor mode for Pascal mode.
1518When in Pascal Outline mode, portions 1506When in Pascal Outline mode, portions
1519of the text being edited may be made invisible. \\<pascal-outline-map> 1507of the text being edited may be made invisible. \\<pascal-outline-map>
@@ -1531,26 +1519,26 @@ Pascal Outline mode provides some additional commands.
1531\\[pascal-hide-other-defuns]\ 1519\\[pascal-hide-other-defuns]\
1532\t- Hide everything but the current function (function under the cursor). 1520\t- Hide everything but the current function (function under the cursor).
1533\\[pascal-outline]\t- Leave pascal-outline-mode." 1521\\[pascal-outline]\t- Leave pascal-outline-mode."
1534 (interactive "P") 1522 :init-value nil :lighter " Outl" :keymap pascal-outline-map
1535 (setq pascal-outline-mode 1523 (add-to-invisibility-spec '(pascal . t))
1536 (if (null arg) (not pascal-outline-mode) t)) 1524 (unless pascal-outline-mode
1537 (if (fboundp 'redraw-mode-line) 1525 (pascal-show-all)))
1538 (redraw-mode-line))
1539 (if pascal-outline-mode
1540 (progn
1541 (setq selective-display t)
1542 (use-local-map pascal-outline-map))
1543 (progn
1544 (setq selective-display nil)
1545 (pascal-show-all)
1546 (use-local-map pascal-mode-map))))
1547 1526
1548(defun pascal-outline-change (b e pascal-flag) 1527(defun pascal-outline-change (b e pascal-flag)
1549 (let ((modp (buffer-modified-p))) 1528 (save-excursion
1550 (unwind-protect 1529 ;; This used to use selective display so the boundaries used by the
1551 (subst-char-in-region b e (if (= pascal-flag ?\n) 1530 ;; callers didn't have to be precise, since it just looked for \n or \^M
1552 ?\^M ?\n) pascal-flag) 1531 ;; and switched them.
1553 (set-buffer-modified-p modp)))) 1532 (goto-char b) (setq b (line-end-position))
1533 (goto-char e) (setq e (line-end-position)))
1534 (when (> e b)
1535 ;; We could try and optimize this in the case where the region is
1536 ;; already hidden. But I'm not sure it's worth the trouble.
1537 (remove-overlays b e 'invisible 'pascal)
1538 (when (eq pascal-flag ?\^M)
1539 (let ((ol (make-overlay b e nil t nil)))
1540 (overlay-put ol 'invisible 'pascal)
1541 (overlay-put ol 'evaporate t)))))
1554 1542
1555(defun pascal-show-all () 1543(defun pascal-show-all ()
1556 "Show all of the text in the buffer." 1544 "Show all of the text in the buffer."
@@ -1628,5 +1616,5 @@ Pascal Outline mode provides some additional commands.
1628 1616
1629(provide 'pascal) 1617(provide 'pascal)
1630 1618
1631;;; arch-tag: 04535136-fd93-40b4-a505-c9bebdc051f5 1619;; arch-tag: 04535136-fd93-40b4-a505-c9bebdc051f5
1632;;; pascal.el ends here 1620;;; pascal.el ends here
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 3df7dffd21e..aa598a7f370 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -3392,7 +3392,7 @@ t means to return a list of all possible completions of STRING.
3392 "Insert code to setup temporary file handling. See `sh-feature'." 3392 "Insert code to setup temporary file handling. See `sh-feature'."
3393 (bash sh-append ksh88) 3393 (bash sh-append ksh88)
3394 (csh (file-name-nondirectory (buffer-file-name)) 3394 (csh (file-name-nondirectory (buffer-file-name))
3395 "set tmp = /tmp/" str ".$$" \n 3395 "set tmp = `mktemp -t " str ".XXXXXX`" \n
3396 "onintr exit" \n _ 3396 "onintr exit" \n _
3397 (and (goto-char (point-max)) 3397 (and (goto-char (point-max))
3398 (not (bolp)) 3398 (not (bolp))
@@ -3400,8 +3400,8 @@ t means to return a list of all possible completions of STRING.
3400 "exit:\n" 3400 "exit:\n"
3401 "rm $tmp* >&/dev/null" > \n) 3401 "rm $tmp* >&/dev/null" > \n)
3402 (es (file-name-nondirectory (buffer-file-name)) 3402 (es (file-name-nondirectory (buffer-file-name))
3403 > "local( signals = $signals sighup sigint; tmp = /tmp/" str 3403 > "local( signals = $signals sighup sigint;" \n
3404 ".$pid ) {" \n 3404 > "tmp = `{ mktemp -t " str ".XXXXXX } ) {" \n
3405 > "catch @ e {" \n 3405 > "catch @ e {" \n
3406 > "rm $tmp^* >[2]/dev/null" \n 3406 > "rm $tmp^* >[2]/dev/null" \n
3407 "throw $e" \n 3407 "throw $e" \n
@@ -3412,10 +3412,10 @@ t means to return a list of all possible completions of STRING.
3412 (ksh88 sh-modify sh 3412 (ksh88 sh-modify sh
3413 7 "EXIT") 3413 7 "EXIT")
3414 (rc (file-name-nondirectory (buffer-file-name)) 3414 (rc (file-name-nondirectory (buffer-file-name))
3415 > "tmp = /tmp/" str ".$pid" \n 3415 > "tmp = `{ mktemp -t " str ".XXXXXX }" \n
3416 "fn sigexit { rm $tmp^* >[2]/dev/null }" \n) 3416 "fn sigexit { rm $tmp^* >[2]/dev/null }" \n)
3417 (sh (file-name-nondirectory (buffer-file-name)) 3417 (sh (file-name-nondirectory (buffer-file-name))
3418 > "TMP=${TMPDIR:-/tmp}/" str ".$$" \n 3418 > "TMP=`mktemp -t " str ".XXXXXX`" \n
3419 "trap \"rm $TMP* 2>/dev/null\" " ?0 \n)) 3419 "trap \"rm $TMP* 2>/dev/null\" " ?0 \n))
3420 3420
3421 3421