GDSX (Extended General Device Support) Manual
Extended General Device Support (GDSX) Manual—529931-001
A-1
A APPLS Requester Listing
The unconverted requester program APPLS is used in the tutorial and in configuration
examples. It is a TAL application used to send requests to a GDSX process.
The OUT file specified in the RUN command used to start APPL (the name used for
the APPLS object file) is used by APPL to open GDSX. The OUT file always specifies
the name of a GDSX process qualified by LINE and/or subdevice names.
After the application reads the startup message and opens the OUT file, it performs the
following loop:
1. Issues a waited WRITEREAD “CPU, PIN” prompt to the file.
2. Reverses the text string that was input at the prompt.
3. Issues a waited WRITE of the reversed string to the file and delays two seconds.
APPLS Listing
?NOMAP, NOLMAP, NOCODE
?INSPECT, SYMBOLS
LITERAL BUF^WDS = 100;
INT .MSG^BUF[0:BUF^WDS-1], .STARTUP^MSG[0:BUF^WDS-1];
INT .RCV^NAME[0:11] := ["$RECEIVE",8*[" "]];
INT RD^CT, WT^CT, CT^RD, RCV^FILE, MSG^FILE, FERR;
INT PID, CPU, PIN;
STRING .S^MSG^BUF := @MSG^BUF '<<' 1;
STRING .END^OF^TEXT, TEMP;
LITERAL OUTFILE = 21; !WORD OFFSET TO OUTFILE IN STARTUP MESSAGE
?NOLIST
?SOURCE $SYSTEM.SYSTEM.EXTDECS0(OPEN,READUPDATE,REPLY,DEBUG,WRITE,STOP,
? WRITEREAD,DELAY,MYPID,NUMOUT,CLOSE,FILEINFO)
?LIST
PROC REVERSE^STRING;
BEGIN
INT I;
FOR I := 0 TO ((CT^RD/2)-1) DO
BEGIN
TEMP := S^MSG^BUF[(CT^RD-1)-I];
S^MSG^BUF[(CT^RD-1)-I] := S^MSG^BUF[I];
S^MSG^BUF[I] := TEMP;
END;
END;
PROC REQUESTER^APPL MAIN;
BEGIN
CALL OPEN(RCV^NAME,RCV^FILE,,1); ! RCV DEPTH=1
IF <> THEN CALL DEBUG;