6100 ADCCP Programming Manual
ADCCP Programming Example Using Transaction Application Language (TAL)
B–24 069225 Tandem Computers Incorporated
?PAGE "MAIN PROCEDURE"
PROC main^ MAIN;
BEGIN
subproc some^more^init;
begin
int .wbuf;
write^dex := out^key := in^key := 0;
for i := 0 to 5 do !loop and flag all write buffers available
begin
@wbuf := buf^ptrs[i];
write^posted := false;
end;
end;
This procedure cancels any dangling I/O requests.
subproc cancel^io^pipes;
begin
restart: call
awaitio(asynfnum,,COUNT^TRANS,tag,1D);
Check for an asynchronous read and print a message on the terminal, if needed.
call fileinfo(asynfnum,error);
if COUNT^TRANS > 0
then begin
error := 500;
sbuf[9] ':=' "ASYNC RESPONSE: " -> @ptr;
call write^err^msg;
error := 0;
call sblank(rbuf,30);
Issue another READ request, so one is always pending.
call read(asynfnum,rbuf,$LEN(d.command^response));
goto restart;
end; !end of then loop