6100 ADCCP Programming Manual
ADCCP Programming Example Using Transaction Application Language (TAL)
B–18 069225 Tandem Computers Incorporated
Get the timeout value for I/O requests to the ADCCP line. If the user supplied an
illegal value, use 4 seconds by default.
!
!Obtain the timeout value from startup message.
!
 status := 0; !preset status no error
 t^o := 400; !preset default to 4 seconds
 scan ptr until " " -> @ptr;
 scan ptr while " " -> @ptr;
 if not $carry then call numin(ptr,t^o,10,status);
 if status then
 begin
 sbuf ':=' "Illegal TIMEOUT value. NUMIN STATUS = " -> @ptr;
 call numout(ptr,status,10,4);
 t^o := 400; !use default
 ptr[4] ':=' ". Using default of 4 seconds." -> @ptr;
 call write(outfile,outbuf,@ptr '-' @sbuf);
 call awaitio(outfile);
 if <> then call abend^;
 end;
 time^out :=$dbl(t^o);
!
!
! Now tell the user: 1. Line Name. 2. FRAMESIZE 3. Timeout 4. Addresses
!
 call stamp^msg(sbuf);
 @ptr := @startup^msg.infile '<<' 1;
Report the line name.
 sbuf[9] ':=' "The 6100 ADCCP line is " & ptr for 8 -> @ptr;
 call write(outfile,outbuf,@ptr '-' @sbuf);
 call awaitio(outfile);
 if <> then call abend^;
Report the frame size.
 sbuf[9] ':=' "The FRAMESIZE is " -> @ptr;
 call numout(ptr,framesize,10,3);
 ptr[3] ':=' " words." -> @ptr;
 call write(outfile,outbuf,@ptr '-' @sbuf);
 call awaitio(outfile);
 if <> then call abend^;
 call stamp^msg(sbuf);
!
!Build TIME^OUT message.
!
 seconds := time^out/100D;
 if (time^out - (seconds * 100D) > 49D) then seconds := seconds + 1D;
 minutes := seconds / 60D;
 seconds := seconds - (minutes * 60D);
 to^msg ':=' " " & to^msg for to^msg^lnth;
 if seconds = 0D and minutes = 0D then
 to^msg[3] ':=' "0 to .49 second timeout." -> @ptr
 else if minutes <> 0D then
 begin
 t^o := $int(minutes);
 call numout(to^msg[3],t^o,10,2);
 to^msg[5] ':=' " minute " -> @ptr;
 end
 else @ptr := @to^msg[3];
 if seconds <> 0D then
 begin
 t^o := $int(seconds);
 call numout(ptr,t^o,10,2);










