6100 ADCCP Programming Manual
ADCCP Programming Example Using Transaction Application Language (TAL)
069225 Tandem Computers Incorporated B–19
ptr[2] ':=' " second " -> @ptr;
end;
ptr ':=' "AWAITIO time out";
scan to^msg while " " -> @ptr;
i := to^msg^lnth '-' (@ptr '-' @to^msg);
to^msg ':=' ptr for i;
to^msg[i] ':=' " " & to^msg[i] for to^msg^lnth - i - 1;
!
sbuf[9] ':=' to^msg for to^msg^lnth -> @ptr;
Report the timeout interval.
call write(outfile,outbuf,@ptr '-' @sbuf);
call awaitio(outfile);
if <> then call abend^;
!
!Tell user what addresses we are using;
!
call stamp^msg(sbuf);
sbuf[9] ':=' "Using addresses: " -> @ptr;
call numout(ptr,addresses.<0:7>,10,3);
ptr[3] ':=' "," -> @ptr;
call numout(ptr,addresses.<8:15>,10,3);
Report the addresses.
call write(outfile,outbuf,@ptr[3] '-' @sbuf);
call awaitio(outfile);
if <> then call abend^;
!
! select a backup cpu and startup a backup process.
!
if select^backup(backupcpu) then ! ok, backup selected
else call abend^;
call monitorcpus(%100000 '>>' backupcpu);
Start the backup process.
@recbuff := lastaddr '-' rec^io^size;
last^addr := @recbuff;
call readupdate(recfile,recbuff,rec^io^size);
if <> then call abend^;
if not createbackup(backupcpu,backupcrtpid) then call abend^;
!
!Init storage for I/O buffers;
!Lastaddr is now @recbuff - 1;
!
@read^buf := last^addr - framesize - 1;
last^addr := @read^buf;
Initialize buffers. The station sends 6 frames at a time.
for i := 0 to 5 do !loop and allocate the write buffers
begin
buf^ptrs[i] := last^addr - framesize - buf^head^size;
@wbuf := last^addr := buf^ptrs[i];
write^posted := false;
end;
!
!OK - all set.
!
call stamp^msg(sbuf);
sbuf[9] ':=' "=" & sbuf[9] for 41 -> @ptr;
call write(outfile,outbuf,@ptr[3] '-' @sbuf);
call awaitio(outfile);
if <> then call abend^;
END;