368aefcb645211c0d03d4b88fae25050f79401d9
[pdp8.git] / sw / os8 / v3d / sources / devext / dectapes / dectape1 / cclrem.ma
1 /
2 /
3 /
4 /COPYRIGHT (C) 1979 BY DIGITAL EQUIPMENT CORPORATION
5 /
6 /
7 /
8 /THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT NOTICE
9 /AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
10 /CORPORATION. DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY
11 /FOR ANY ERRORS THAT MAY APPEAR IN THIS DOCUMENT.
12 /
13 /THE SOFTWARE DESCRIBED IN THIS DOCUMENT IS FURNISHED TO THE PURCHASER
14 /UNDER A LICENSE FOR USE ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED
15 /(WITH INCLUSION OF DIGITAL'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH
16 /SYSTEM, EXCEPT AS MAY OTHERWISE BE PROVIDED IN WRITING BY DIGITAL.
17 /
18 /DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY FOR THE USE
19 /OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY
20 /DIGITAL.
21 /
22 /
23 /
24
25 \f
26 /VERSION=V3A (D.H.)
27 \f/1 CCL RECOLLECTION ROUTINES
28
29 .EXTERNAL REMD,SCAN,LBEGIN,BEGLN,PRMESG,PRINT
30
31 DATWD=7666
32 CLXR=35
33 XR=16
34
35 .ENTRY REMEM,FOREVER,RECALL
36 \f .RSECT CCLREM
37 FIELD 1
38
39 /CCL REMEMBERS UP TO 8 COMMAND LINES (EACH UP TO 55 DECIMAL
40 /SIXBIT CHARACTERS LONG) IN BLOCK 65 ON THE SYSTEM DEVICE.
41 /THIS BLOCK WHEN READ INTO 04000-04377 HAS THE FOLLOWING FORMAT:
42
43 /4000-4037 REM-LINE 0
44 /4040-4177 REM-LINE 1
45 /4100-4137 REM-LINE 2
46 /4140-4177 REM-LINE 3
47 /4200-4237 REM-LINE 4
48 /4240-4277 REM-LINE 5
49 /4300-4337 REM-LINE 6
50 /4340-4377 REM-LINE 7
51
52 /EACH REM-LINE HAS THE FOLLOWING FORMAT:
53
54 /WORD 0: IN-USE FLAG, MUST BE '1234' TO INDICATE LINE WAS REMEMBERED HERE
55 /WORD 1: DATE LINE WAS REMEMBERED
56 /WORD 2: COMMAND DEPENDENT INFORMATION
57 /WORD 3: RESERVED FOR FUTURE EXPANSION
58 /WORDS 4-37 COMMAND LINE NOT INCLUDING KEYWORD OR FOLLOWING SPACES
59 / PACKED IN 6-BIT AND TERMINATED BY A 6-BIT 0.
60
61 /ROUTINES:
62
63 / TAD (DEP
64 / JMS REMEM
65 / N
66
67 /REMEMBERS CURRENT LINE IN REM-LINE N. AC IS LINE DEPENDENT INFORMATION.
68 /IF LINE IS TOO BIG, THIS PRINTS A WARNING MESSAGE AND RETURNS AS IF OK.
69
70 / JMS RECALL
71 / N
72
73 /RECALLS REM-LINE N INTO BUFFER
74 /IF NOTHING THERE, PRINTS A BAD SYNTAX MESSAGE AND RETURNS TO OS/8.
75 /UPON RETURN, LINE-DEPENDENT INFO IS IN AC.
76 /IF DATES DON'T MATCH, IT'S NOT THERE UNLESS DATE = -1
77
78 /0 USED BY TECO, MAKE COMMANDS
79 /1 USED BY EDIT, CREATE COMMANDS
80 /2 USED BY COMPILE, EXECUTE COMMANDS & PAL.
81 / DEPENDENT WORD IS PTR TO FIRST ENTRY IN MAIN TABLE
82
83 /3 USED BY 'UA' COMMAND
84 /4 USED BY UB
85 /5 USED BY UC
86
87 / JMS FOREVER
88
89 /CAUSES NEXT CALL TO REMEM TO INSERT -1 AS DATE
90 \f REMSPACE=4000
91 REMBLOCK=65
92
93 REMEM, 0
94 DCA DEP
95 TAD I (REMD
96 SMA CLA
97 JMP I REMEM /DON'T REMEMBER IF JUST RECALLED
98 JMS I (RDREM
99 JMP I (MEMBIG
100 TAD I REMEM
101 ISZ REMEM
102 CLL RTL
103 RTL
104 RAL /MULTIPLY BY 40
105 TAD (REMSPACE
106 DCA LPTR
107 TAD (1234
108 CDF 0
109 DCA I LPTR
110 CDF 10
111 ISZ LPTR
112 FORVR, TAD I (DATWD /REPLACED BY CMA IF WANT NO DATE
113 JMS LPUT /STORE DATE
114 TAD DEP
115 JMS LPUT /STORE DEPENDENT INFO
116 JMS LPUT /RESERVED
117 JMS I (SCAN /GO PAST KEYWORD AND BLANKS
118 TAD I (LBEGIN
119 DCA XR
120 L$: JMS I (GETF
121 JMP 3$
122 JMS I (ROTL
123 DCA TML
124 JMS I (GETF
125 JMP 2$
126 TAD TML
127 JMS LPUT
128 JMP L$
129 2$: TAD TML
130 3$: JMS LPUT
131 JMS I (WRREM
132 JMP I (MEMBIG
133 REMGO, JMP I REMEM
134 \fDEP, 0
135 LPTR, 0 /PTS TO REM-LINE
136 TML, 0 /TEMP
137
138 /PUT INTO REM-LINE
139
140 LPUT, 0
141 DCA TML
142 TAD LPTR
143 AND (37
144 SNA CLA
145 JMP I (MEMBIG
146 TAD TML
147 CDF 0
148 DCA I LPTR
149 CDF 10
150 ISZ LPTR
151 JMP I LPUT
152
153 FOREVER,0
154 TAD LCMA
155 DCA FORVR
156 JMP I FOREVER /NON-ZERO MEANS SET DATE TO -1
157 \fRECALL, 0
158 JMS I (RDREM
159 JMP I (REMERR
160 TAD I RECALL
161 ISZ RECALL
162 JMS I (ROTL
163 RAR
164 TAD (REMSPACE
165 DCA LPTR
166 JMS LGET
167 TAD (-1234
168 SZA CLA
169 JMP I (REMER2
170 JMS LGET
171 SNA
172 JMP I (REMER2
173 LCMA, CMA
174 SNA
175 JMP 1$
176 IAC
177 TAD I (DATWD /SAME DAY?
178 SZA CLA
179 JMP I (REMER2
180 1$: JMS LGET
181 DCA DEP
182 JMS LGET /IGNORE RESERVED WORD
183 CLA
184 TAD (BEGLN-1
185 DCA XR
186 TAD (BEGLN-1
187 DCA I (LBEGIN
188 L$: JMS LGET
189 DCA TML
190 TAD TML
191 JMS I (ROTL
192 RAL
193 JMS I (PUTF
194 JMP LV$
195 TAD TML
196 JMS I (PUTF
197 JMP LV$
198 JMP L$
199
200 LV$: TAD DEP
201 JMP I RECALL
202 \fLGET, 0
203 CDF 0
204 TAD I LPTR
205 CDF 10
206 ISZ LPTR
207 JMP I LGET
208 PAGE
209 \fPUTF, 0
210 AND (77
211 SNA
212 JMP PUTZ
213 ISZ PUTF
214 TAD (240
215 AND (77
216 TAD (240
217 PUTZ, CDF 0
218 DCA I XR
219 CDF 10
220 JMP I PUTF
221
222 REMERR, JMS I (PRMESG
223 REMBAD
224 REMER2, JMS I (PRMESG
225 BADREM
226 \fMEMBIG, CLA
227 JMS I (PRINT
228 MEMWARN
229 JMP I (REMGO
230
231 RDREM, 0
232 CIF 0
233 JMS I (7607
234 200 /READ 2 PAGES INTO FIELD 0
235 4000 /LOCATION 4000
236 REMBLOCK
237 SKP CLA
238 ISZ RDREM
239 JMP I RDREM
240
241 WRREM, 0
242 CIF 0
243 JMS I (7607
244 4200 /WRITE 2 PAGES FROM FIELD 0
245 4000 /LOCATION 4000
246 REMBLOCK
247 SKP CLA
248 ISZ WRREM
249 JMP I WRREM
250 \f/GET FROM INPUT LINE VIA XR
251
252 GETF, 0
253 CDF 0
254 TAD I XR
255 CDF 10
256 SZA
257 ISZ GETF
258 AND (77
259 JMP I GETF
260 \fROTL, 0
261 CLL RTL
262 RTL
263 RTL
264 JMP I ROTL
265
266 MEMWARN,TEXT /%CAN'T REMEMBER/
267 REMBAD, TEXT \#I/O ERROR TRYING TO RECALL\
268 BADREM, TEXT /#BAD RECOLLECTION/
269 PAGE
270 \f