LISTING FOR >spec>on>11/30/82>hp2645.ctl COMPILED BY Multics LISP Compiler, Version hc9.2, June 5, 1981 ON 11/30/82 1529.3 mst Tue IN BEHALF OF Holmstedt.SysMaint.a ;;; *********************************************************** ;;; * * ;;; * Copyright, (C) Honeywell Information Systems Inc., 1982 * ;;; * * ;;; * Copyright (c) 1978 by Massachusetts Institute of * ;;; * Technology and Honeywell Information Systems, Inc. * ;;; * * ;;; *********************************************************** ;;; ;;; -*-LISP-*- ;;; ;;; HP2645 control package ;;; EAK 3/18/78 ;;; (declare (special xconses yconses escfxconsesyconses X Y screenheight ospeed tty-type)) (declare (special idel-lines-availablep idel-chars-availablep screenlinelen)) ; Initialize terminal and terminal control package. (defun DCTL-init () (setq xconses (list nil nil)) (setq yconses (list nil nil)) (setq escfxconsesyconses (nconc (list (ascii 33) '& 'a) xconses (list 'c) yconses (list 'R))) (setq screenheight 24.) ; 20 lines for editing (setq screenlinelen 79.) (setq idel-lines-availablep t idel-chars-availablep t) (setq tty-type 'hp2645) (Rtyo 33) (Rprinc "H") ; clear screen: home, (Rtyo 33) (Rprinc "J") ; and erase to end (setq X 0 Y 0)) ; Move terminal's cursor to desired position. (defun DCTL-position-cursor (x y) (prog (ycost ; cost of y and x relative xcost ; movement what ; which movement is best cost) ; cost of that movement (and (= x X)(= y Y) ; return right away if already (return nil)) ; at desired position (setq what 1 ; 1: "home and relative move" cost (+ 2 y x x)) ; cost is V + 2H + 2 (and (> cost 9) ; direct cursor address better? (setq what 0 ; 0: "direct cursor address" cost 9)) ; cost is 9 characters (setq ycost (- y Y)) (and (< ycost 0) (setq ycost (* (- ycost) 2))) (setq xcost (- X x)) (and (< xcost 0) (setq xcost (* (- xcost) 2))) (and (< (+ ycost xcost) cost) (setq what 3 ; 3: "relative move" cost (+ ycost xcost))) (and (< (+ 1 ycost x x) cost) (setq what 2)) ; 2: "CR and relative move" (cond ((= what 0) ; Direct Cursor Address (rplaca xconses (+ 60 (// x 10.))) (rplaca (cdr xconses) (+ 60 (\ x 10.))) (rplaca yconses (+ 60 (// y 10.))) (rplaca (cdr yconses) (+ 60 (\ y 10.))) (Rprinc (implode escfxconsesyconses)) (setq X x Y y) (return nil)) ((= what 1) ; home and relative move? (Rtyo 33)(Rprinc "H") ; home (setq X 0 Y 0)) ; keep track of cursor ; fall through to relative move ((= what 2) ; CR and relative move? (Rtyo 15) ; CR (setq X 0))) ; keep track of cursor ; fall through to relative move ; Relative Move (cond ((< X x) (do ex X (1+ ex)(= ex x)(Rtyo 33)(Rprinc "C"))) ((< x X) (do ex x (1+ ex)(= ex X)(Rtyo 10)))) (cond ((< Y y) (do wy Y (1+ wy)(= wy y)(Rtyo 12))) ((< y Y) (do wy y (1+ wy)(= wy Y)(Rtyo 33)(Rprinc "A")))) (setq X x Y y) (return nil))) ; Output string. (defun DCTL-display-char-string (string) (setq X (+ X (stringlength string))) (Rprinc string)) ; Clear to end of screen. (defun DCTL-clear-rest-of-screen () (Rtyo 33)(Rprinc "J")) ; Clear to end of line. (defun DCTL-kill-line () (Rtyo 33)(Rprinc "K")) ; Insert character string in line at current position. (defun DCTL-insert-char-string (str) (Rtyo 33)(Rprinc "Q") (Rprinc str) (Rtyo 33)(Rprinc "R") (setq X (+ X (stringlength str)))) ; Delete characters from current position in line. (defun DCTL-delete-chars (n) (do i 1 (1+ i)(> i n) (Rtyo 33)(Rprinc "P")(DCTL-pad 7000.))) ; Insert n blank lines at current position. (defun DCTL-insert-lines (n) (do i 1 (1+ i)(> i n) (Rtyo 33)(Rprinc "L"))) ; Delete n lines at current position. (defun DCTL-delete-lines (n) (do i 1 (1+ i)(> i n) (Rtyo 33)(Rprinc "M"))) ; Send pad characters to wait specified no. of microseconds. (defun DCTL-pad (n) (do i (// (* n ospeed) 1000000.) (1- i) (= i 0) (Rtyo 0))) Functions Defined Name Offset Offset Name DCTL-clear-rest-of-screen 512 0 DCTL-init DCTL-delete-chars 602 120 DCTL-position-cursor DCTL-delete-lines 670 476 DCTL-display-char-string DCTL-display-char-string 476 512 DCTL-clear-rest-of-screen DCTL-init 0 526 DCTL-kill-line DCTL-insert-char-string 542 542 DCTL-insert-char-string DCTL-insert-lines 640 602 DCTL-delete-chars DCTL-kill-line 526 640 DCTL-insert-lines DCTL-pad 720 670 DCTL-delete-lines DCTL-position-cursor 120 720 DCTL-pad Functions Referenced DCTL-pad Rprinc nconc Rtyo implode stringlength ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved