1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 (declare (special X Y screenheight screenlinelen))
16 (declare (special idel-lines-availablep idel-chars-availablep tty-type))
17
18
19
20 (defun DCTL-init ()
21 (setq idel-lines-availablep nil idel-chars-availablep nil)
22 (setq screenheight 24. screenlinelen 79.)
23 (setq tty-type 'vistar)
24 (setq X 0 Y 0)
25 (Rtyo 14))
26
27
28
29 (defun DCTL-position-cursor (x y)
30 (cond ((and (= x X)(= y Y))
31 nil)
32 ((and (= x 0)(= y 0))
33 (Rtyo 32)
34 (setq X 0 Y 0))
35 ((and (< (+ (abs (- X x))(abs (- Y y))) 4))
36 (cond ((< X x)
37 (do ex X (1+ ex)(= ex x)(Rtyo 31)))
38 ((< x X)
39 (do ex x (1+ ex)(= ex X)(Rtyo 010))))
40 (cond ((< Y y)
41 (do wy Y (1+ wy)(= wy y)(Rtyo 35)))
42 ((< y Y)
43 (do wy y (1+ wy)(= wy Y)(Rtyo 34))))
44 (setq X x Y y))
45
46 (t (setq X x Y y)
47 (Rtyo 27)(Rtyo x)(Rtyo y))))
48
49
50
51 (defun DCTL-display-char-string (string)
52 (setq X (+ X (stringlength string)))
53 (Rprinc string))
54
55
56
57 (defun DCTL-clear-rest-of-screen () (Rtyo 14))
58
59
60
61 (defun DCTL-kill-line () (Rtyo 13))
62
63
64