LISTING FOR >spec>on>6599>smarterm.ctl COMPILED BY Multics LISP Compiler, Version 2.13c, July 11, 1983 ON 11/15/84 1312.1 mst Thu IN BEHALF OF GJohnson.SysMaint.a ;;; ***************************************************** ;;; * * ;;; * Copyright (C) 1983 by Massachusetts Institute of * ;;; * Technology and Honeywell Information Systems Inc. * ;;; * * ;;; ***************************************************** ;;; ;;; -*-LISP-*- ;;; ;;; Netronics Smarterm-80 control package ;;; Ripped off from iq120.ctl.lisp by Alberto Magnani 12/3/83. ;;; (declare (special X Y screenheight screenlinelen tty-type)) (declare (special idel-lines-availablep idel-chars-availablep)) (declare (*expr Rprinc Rtyo)) ; Initialize terminal and terminal control package. (defun DCTL-init () (setq idel-lines-availablep t idel-chars-availablep t) (setq screenheight 24. screenlinelen 79.) (setq tty-type 'smarterm) (Rtyo 14) (setq X 0 Y 0)) ; Move terminal's cursor to desired position. (defun DCTL-position-cursor (x y) (cond ((and (= x X)(= y Y)) nil) ((and (= x 0)(= y 0)) (Rtyo 32) (setq X 0 Y 0)) ((and (= x 0)(= y Y)) (Rtyo 15) (setq X 0 Y y)) ((and (= x 0)(< (abs(- Y y)) 3)) (Rtyo 15) (cond ((< Y y) (do wy Y (1+ wy)(= wy y)(Rtyo 12))) ((< y Y) (do wy y (1+ wy)(= wy Y)(Rtyo 13)))) (setq X 0 Y y)) ((and (< (+ (abs (- X x))(abs (- Y y))) 4)) (cond ((< X x) (do ex X (1+ ex)(= ex x)(Rtyo 1))) ((< 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 13)))) (setq X x Y y)) ;; Direct Cursor Addressing is best. (t (setq X x Y y) (Rtyo 33) (Rprinc "=")(Rtyo (+ 40 y))(Rtyo (+ 40 x)) ))) ; 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 "Y")) ; Clear to end of line. (defun DCTL-kill-line () (Rtyo 33)(Rprinc "T")) ; Inserting/deleteing lines (defun DCTL-insert-lines (n) (do i 1 (1+ i)(> i n) (Rtyo 33)(Rprinc "E"))) (defun DCTL-delete-lines (n) (do i 1 (1+ i)(> i n) (Rtyo 33)(Rprinc "R"))) ; Inserting/deleteing characters (defun DCTL-insert-char-string (str) (Rtyo 33)(Rprinc "N") (Rprinc str) (Rtyo 33)(Rprinc "M") (setq X (+ X (stringlength str)))) (defun DCTL-delete-chars (n) (do i 1 (1+ i)(> i n) (Rtyo 33)(Rprinc "W"))) ; That's it guys. Functions Defined Name Offset Offset Name DCTL-clear-rest-of-screen 376 0 DCTL-init DCTL-delete-chars 546 34 DCTL-position-cursor DCTL-delete-lines 456 362 DCTL-display-char-string DCTL-display-char-string 362 376 DCTL-clear-rest-of-screen DCTL-init 0 412 DCTL-kill-line DCTL-insert-char-string 506 426 DCTL-insert-lines DCTL-insert-lines 426 456 DCTL-delete-lines DCTL-kill-line 412 506 DCTL-insert-char-string DCTL-position-cursor 34 546 DCTL-delete-chars Functions Referenced Rprinc Rtyo 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