1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-15 08:03:19 +00:00
Eric Swenson 85994ed770 Added files to support building and running Macsyma.
Resolves #284.

Commented out uses of time-origin in maxtul; mcldmp (init) until we
can figure out why it gives arithmetic overflows under the emulators.

Updated the expect script statements in build_macsyma_portion to not
attempt to match expected strings, but simply sleep for some time
since in some cases the matching appears not to work.
2018-03-11 13:10:19 -07:00

63 lines
2.4 KiB
Common Lisp
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;;;;;;;;;;;;;;;;;;; -*- Mode: Lisp; Package: Macsyma -*- ;;;;;;;;;;;;;;;;;;;
;;; (c) Copyright 1981 Massachusetts Institute of Technology ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(macsyma-module dover)
;;; to make it easy to queue plot files to the DOVER.
(DEFMVAR $DOVARD_VIEWPORT '((MLIST) 1 7 1 7)
"[XMIN,XMAX,YMIN,YMAX] in inches on the paper")
(DEFUN ($DOVARD_VIEWPORT ASSIGN) (IGNORE VALUE)
(IF ($LISTP VALUE)
(DO ((L (CDR VALUE) (CDR L))
(J 0 (1+ J)))
((= J 4)
(OR (NULL L) (MERROR "DOVARD_VIEWPORT list too long")))
(AND (NULL L) (MERROR "DOVARD_VIEWPORT list too short"))
(OR (NUMBERP (CAR L))
(MERROR "DOVARD_VIEWPORT list element non-numeric: ~M" (CAR L))))
(MERROR "DOVARD_VIEWPORT must be a list")))
(defmfun $dovard_file (&optional (filename "dsk:.temp.;* .plot.") (output "* PRESS"))
(setq filename ($filename_merge filename (status uname)))
(IF (NOT (PROBEF FILENAME))
(MERROR "File for input ~M does not exist" FILENAME))
(setq output ($filename_merge output filename))
(let ((dovard-command-filename (TO-MACSYMA-NAMESTRING (mergef "* DOVARD" filename)))
(dovard-output-filename OUTPUT)
(STREAM))
(UNWIND-PROTECT
(PROGN (SETQ STREAM (OPEN (MERGEF "* _DOVARD" DOVARD-COMMAND-FILENAME) 'OUT))
(MFORMAT STREAM
"DSK:MACSYM;.PLOT PRESS~%~A~%~A~%1~%~S,~S,~S,~S~%~%"
DOVARD-OUTPUT-FILENAME
FILENAME
(NTH 1 $DOVARD_VIEWPORT)
(NTH 2 $DOVARD_VIEWPORT)
(NTH 3 $DOVARD_VIEWPORT)
(NTH 4 $DOVARD_VIEWPORT)
)
(RENAMEF STREAM DOVARD-COMMAND-FILENAME))
(IF STREAM (CLOSE STREAM)))
(MTELL "~%Calling DOVARD program, reply Y to its question.~%")
(IF (PROBEF DOVARD-OUTPUT-FILENAME) (DELETEF DOVARD-OUTPUT-FILENAME))
(CALL-JOB "DOVARD" (CONCAT "@" DOVARD-COMMAND-FILENAME))
(IF (NOT (PROBEF DOVARD-OUTPUT-FILENAME))
(MERROR "Output file ~M not created" DOVARD-OUTPUT-FILENAME)
`((MLIST) ,FILENAME ,DOVARD-OUTPUT-FILENAME))))
(DEFMFUN $DOVER_FILE (&OPTIONAL (FILENAME ""))
(SETQ FILENAME ($FILENAME_MERGE FILENAME "DSK:.TEMP.;* PRESS" (STATUS UNAME)))
(IF (NOT (PROBEF FILENAME))
(MERROR "File for input ~M does not exist" FILENAME))
(CALL-JOB "DOVER" FILENAME)
FILENAME)
(DEFUN CALL-JOB (JOB JCL)
(VALRET (CONCAT ": At DDT LEVEL:"
JOB " " JCL
"<22>:JOB " (STATUS JNAME)
"<22>:CONTINUE ")))