Trailing-Edge
-
PDP-10 Archives
-
decuslib10-04
-
43,50325/io.bli
There are no other files named io.bli in the archive.
00100 MODULE IO(ENTRIES=(LOOKUP,ENTER,OPENIN,OPENOUT,CLOSEIN,
00150 GETINCH, GETOUTCH,
00200 CLOSEOUT,PURGEOUT,OUTMSG,READ,WRITE),TIMER)=
00300 BEGIN
00400 %%
00500 %
00600 THIS MODULE PROVIDES SOME I/O EXAMPLES USING BLISS. FOR
00700 THIS SET OF EXAMPLES, WE WILL ASSUME A STATIC CHANNEL
00800 ASSIGNMENT. ALL INPUT WILL BE ON CHANNEL "INCH", AND ALL
00900 OUTPUT ON CHANNEL "OUTCH". THE THREE-WORD BUFFER HEADER
01000 AREAS WILL BE "IBUFH" AND "OBUFH" AND ARE DECLARED GLOBAL IN
01100 SOME OTHER MODULE.
01200 %
01300 %%
01400
01500 BIND
01600 INCH=1,
01700 OUTCH=2;
01800
01900 %%
02000 %
02100 HERE ARE SOME USEFUL MACHINE OPERATIONS
02200 %
02300 %%
02400
02500 MACHOP
02600 CALLI=#047,
02700 OPEN=#050,
02800 TTCALL=#051,
02900 IN=#056,
03000 OUT=#057,
03100 GETSTS=#062,
03200 STATZ=#063,
03300 CLOSEUUO=#070,
03400 RELEAS=#071,
03500 LOOKUPUUO=#076,
03600 ENTERUUO=#077,
03700 XCT=#256;
03800
03900 %%
04000 %
04100 THE FOLLOWING MACRO RETURNS "TRUE" IF THE INSTRUCTION
04200 GIVEN AS ITS PARAMETER SKIPS, AND FALSE IF IT DOES NOT.
04300 PARAMETER GIVEN.
04400 %
04500 %%
04600
04700 MACRO
04800 SKIP(OP)=BEGIN
04900 VREG_1; OP; VREG_0; .VREG
05000 END$;
05100
05200 %%
05300 %
05400 HERE ARE SOME USEFUL MACROS
05500 %
05600 %%
05700
05800 MACRO
05900 RESET=CALLI(0)$,
06000
06100 COUNT(BUFH)=BUFH[2]$,
06200 PTR(BUFH)=BUFH[1]$;
06300
06400 %%
06500 %
06600 IBUFH AND OBUFH MUST BE DECLARED GLOBAL IN ANOTHER
06700 MODULE
06800 %
06900 %%
07000
07100 EXTERNAL
07200 IBUFH[3],
07300 OBUFH[3];