🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.acorn.tech
1 messages
1 total messages Started by Pete McGarrigle Thu, 15 Oct 1992 11:43
FileFS
#349
Author: Pete McGarrigle
Date: Thu, 15 Oct 1992 11:43
53 lines
1737 bytes
-- FileFS Arc --

ON ERROR PROCerror

REM Rubbish program to demonstrate the Pipe Filing System
REM ) 1992 Peter McGarrigle
REM psmcgarr@uk.ac.pow.genvax

REM I'll be buggered if I know what PipeFS is for or what it
REM can legally be used for. Any hints Acorn? Anyone?

REM from various tests, files stored in PipeFS
REM seem to be analogous to named FIFO buffers, storage
REM comes from RMA by the looks of things.

REM As far as I can tell, pipe files are automatically
REM deleted when the last byte is read and the 'input' 
REM and 'output' files are both closed.

pipe$="Pipe:$.TestPipe"

REM show PipeFS in filer window
*Filer_OpenDir Pipe:$

DIM taskid% 4,block% 256
$taskid%="TASK"
SYS "Wimp_Initialise",300,!taskid%,"Pipes" TO version%

op%=OPENOUT(pipe$) : REM create pipe before use?
CLOSE#op%          : REM won't work if I don't!

op%=OPENOUT(pipe$)
IF op%=0 THEN ERROR 1,"Cannot Open Output Pipe"
ip%=OPENIN(pipe$)
IF ip%=0 THEN ERROR 1,"Cannot Open Input Pipe"

FOR I%=0 TO 1000
  SYS "Wimp_Poll",0,block%
  PRINT #op%,I%               : REM Put data into Pipe
  INPUT #ip%,N%               : REM Get same data out!
  IF N%<>I% THEN ERROR 1,"Error in Pipe Data"
NEXT
CLOSE#op%
CLOSE#ip%

SYS "Wimp_CloseDown"
END

DEF PROCerror
  *Pipe:Close
  PRINT REPORT$;" at line ";ERL
  END
ENDPROC
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads