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