MTRDCNT: PROC(CHAN,BUFF,BYTECOUNT) RETURNS(FIXED BIN(31)); /* READ A MAG TAPE BLOCK AND RETURN THE COUNT OG BYTES IN THE BUFFER IN BYTECOUNT. IN PLI: STS$VALUE=SYS$ASSGN(...); ... STS$VALUE=MTRDCNT(CHANNEL,BUFFER,BYTECOUNT); STS$VALUE = ^X0870 IS END OF FILE T DOW 8/28/81 */ DCL IOSB(4) FIXED BIN(15); DCL BUFF CHAR(*); DCL CHAN FIXED BIN(31); DCL (L,BYTECOUNT) FIXED BIN(31) /*REALLY FIXED BIN(16) UNSIGNED WORD*/; DCL IO$_READLBLK FIXED BIN(31) GLOBALREF VALUE; DCL BUFFER FIXED BIN(31) BASED(P); DCL P PTR; DCL SYS$QIOW ENTRY(FIXED BIN(31) VALUE /*EFN*/, FIXED BIN(31) VALUE /*CHANNEL*/, FIXED BIN(31) VALUE /*FUNCTION CODE*/, FIXED BIN(15) /*IO STATUS BLOCK*/, FIXED BIN(31) /*AST ENTRY MASK */, FIXED BIN(31) /*AST PARM*/, FIXED BIN(31) /*BUFFER*/, FIXED BIN(31) VALUE /*BUFFER SIZE*/, FIXED BIN(31) /*P3*/, FIXED BIN(31) /*P4*/, FIXED BIN(31) /*P5*/, FIXED BIN(31) /*P6*/) RETURNS(FIXED BIN(31)) OPTIONS(VARIABLE); %INCLUDE $STSDEF; P = ADDR(BUFF); L = LENGTH(BUFF); STS$VALUE = SYS$QIOW(,CHAN,IO$_READLBLK,IOSB(1),,,BUFFER,L,,,,); BYTECOUNT = IOSB(2); RETURN(IOSB(1)); END MTRDCNT;