GDSX (Extended General Device Support) Manual

Using Pseudo Procedures in a TS/MP Environment
Extended General Device Support (GDSX) Manual529931-001
D-9
USAMPLE1 Listing
218. @Term^Iocb := ^Listen (0,-1,0);
219. -- get the new address of the new buffer
220. @Work^Buf := Term^Iocb.BufaddrX;
221. -- clear the buffer, that we send to the IDS requester
222. RCV^Buf ':=' " " & RCV^Buf for 31;
223. -- move the buffer that we received from our device
224. RCV^Buf ':=' 0 & Work^Buf For Term^Iocb.Iocnt Bytes;
225. If Check^Buffer Then Begin
226. -- Buffer passed our checks
227. -- send the buffer that we just received to the IDS requester
228. Call ^Replyx(S^RCV^Buf, 64, ,Rcv^Iocb.MsgTag);
229. -- wait for the reply from the IDS requester
230. Call ^Readupdatex(Dolr^Rcv, RCV^Buf, 64);
231. End
232. Else Begin
233. -- buffer did not pass our checks
234. -- write the errorsmessage and let the user retry
235. Call ^WriteReadX(Term^File^Num, Term^Buf, 50, 62);
236. End;
237. End;
238.
239. E^Stop -> -- task is stopping
240. Call Stop^Task;
241. End; -- of Case Evt
242. End; -- of While
243.
244. End; -- Proc
245.
246.
247. !===========================================================================
248 ! Other User^Exits
249. !===========================================================================
250.
251. !===========================================================================
252. Proc LINE^HANDLER (LINE^FILE^NUM, INTERNAL^LINE^NO, IN^QUEUE^FILE^NUM);
253. !===========================================================================
254. Int LINE^FILE^NUM, INTERNAL^LINE^NO, IN^QUEUE^FILE^NUM;
255. Begin
256.
257. End;
258.
259.
260. !===========================================================================
261. Proc User^Initialize(Primary);
262. !===========================================================================
263. Int primary;
264.
265. Begin
266. End;
267.
268.
269. !===========================================================================
270. Int Proc USER^START (DCBP, OPENID);
271. !===========================================================================
272. Int .EXT DCBP;
273. Int (32) .OPENID;
274. Begin ! OPENID specified by USER (In this case, pointer to DCB)
275. ! is stored in TCB.OPENID
276. OPENID := @DCBP;
277. Return 0;
278. End;
279.
280.
281. !===========================================================================
282. Proc USER^STOP (TCB);
283 !===========================================================================
284. Int .EXT TCB(TCB^TEMPLATE);
285. Begin
286. End;
287.
288.
289. !===========================================================================
290. Proc PROCESS^ASSIGNS (buf);
291. !===========================================================================