Home » Archimedes archive » Zipped Apps » BCPL » BCPL/alib/IOHdr

BCPL/alib/IOHdr

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Zipped Apps » BCPL
Filename: BCPL/alib/IOHdr
Read OK:
File size: 0D08 bytes
Load address: 0000
Exec address: 0000
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
/* BCPL I/O Library
 * Stream control block definitions
 */

GLOBAL $(
   MakeNewStream : 135;
   EndStream: 136 $);

MANIFEST $(
s.name.max.size  = 32

// Stream vector offsets
s.magic 	 = 0			// Must be s.is.a.stream
s.stream.chain	 = s.magic	    + 1 // All streams are linked on this
s.flags 	 = s.stream.chain   + 1 // A flag word
s.name		 = s.flags	    + 1 // First byte of stream name
s.name.end	 = s.name + ( s.name.max.size / bytesperword )
s.channel	 = s.name.end		// The OS file handle
s.error.handler  = s.channel	    + 1 // Caller if any serious errors
s.selecter	 = s.error.handler  + 1 // Called before any IO on this stream
s.reader	 = s.selecter	    + 1 // The rdch() function
s.writer	 = s.reader	    + 1 // The wrch() routine
s.unreader	 = s.writer	    + 1 // The unrdch() routine
s.last.char	 = s.unreader	    + 1 // Last character read by the reader()
s.real.reader	 = s.last.char	    + 1 // The real reader if unreadch pending
s.error.count	 = s.real.reader    + 1 // Number of OS errors since created
s.last.error	 = s.error.count    + 1 // The last OS error from this stream
s.endreader	 = s.last.error     + 1 // The endread() routine
s.endwriter	 = s.endreader	    + 1 // The endwrite() routine
s.buffer.size	 = s.endwriter	    + 1 // The size of the IO buffer
s.buffer.address = s.buffer.size    + 1 // The machine address of the buffer
s.buffer.pointer = s.buffer.address + 1 // The extraction pointer
s.buffer.count	 = s.buffer.pointer + 1 // Number of elements in the buffer

s.stream.size	 = s.buffer.count	// The size of the stream block

s.is.a.stream	 = #x52A5A552 // A magic number indicating the stream is valid
s.is.a.store.file= (('s'<<8|'t')<<8|'o')<<8|'r'

s.stream.type.bits    = #b00000000000000000000000011111111
s.is.wrch.bit	      = #b00000000000000000000000000000001
s.is.vdu.bits	      = #b00000000000000000000000000000011
s.is.printer.bits     = #b00000000000000000000000000000101
s.is.serial.bits      = #b00000000000000000000000000001001
s.is.store.bits       = #b00000000000000000000000000010000
s.is.null.bits	      = #b00000000000000000000000001000000
s.is.file.bits	      = #b00000000000000000000000010000000
s.has.channel.bit     = #b00000100000000000000000000000000
s.is.input.bit	      = #b00010000000000000000000000000000
s.is.output.bit       = #b00100000000000000000000000000000
s.ended.bit	      = #b10000000000000000000000000000000


// Store file vector offsets
store.magic	   = 0			  // magic to test validity
store.nextfile	   = store.magic + 1	  // Pointer to next store file
store.name	   = store.nextfile + 1   // name of the file (first byte)
store.name.end	   = store.name + (s.name.max.size/bytesperword)
store.start	   = store.name.end + 1   // where file is in store (bcpl ptr)
store.size	   = store.start + 1	  // size of data (bytes)
store.maxsize	   = store.size + 1	  // space allocated for file (bytes)
store.block.size   = store.maxsize	  // The size of the file block


e.no.work.space 	     = 700
e.bad.input.stream	     = 701
e.bad.output.stream	     = 702
e.has.been.ended	     = 703
e.must.not.read 	     = 704
e.must.not.write	     = 705
e.no.buffer.room	     = 706
e.nasty.error		     = 707
e.cant.load.file	     = 708
e.store.file.full	     = 709

s.op.close		     = #x00
s.op.input		     = #x40
s.op.output		     = #x80
s.op.update		     = #xC0

$)
00000000  2f 2a 20 42 43 50 4c 20  49 2f 4f 20 4c 69 62 72  |/* BCPL I/O Libr|
00000010  61 72 79 0a 20 2a 20 53  74 72 65 61 6d 20 63 6f  |ary. * Stream co|
00000020  6e 74 72 6f 6c 20 62 6c  6f 63 6b 20 64 65 66 69  |ntrol block defi|
00000030  6e 69 74 69 6f 6e 73 0a  20 2a 2f 0a 0a 47 4c 4f  |nitions. */..GLO|
00000040  42 41 4c 20 24 28 0a 20  20 20 4d 61 6b 65 4e 65  |BAL $(.   MakeNe|
00000050  77 53 74 72 65 61 6d 20  3a 20 31 33 35 3b 0a 20  |wStream : 135;. |
00000060  20 20 45 6e 64 53 74 72  65 61 6d 3a 20 31 33 36  |  EndStream: 136|
00000070  20 24 29 3b 0a 0a 4d 41  4e 49 46 45 53 54 20 24  | $);..MANIFEST $|
00000080  28 0a 73 2e 6e 61 6d 65  2e 6d 61 78 2e 73 69 7a  |(.s.name.max.siz|
00000090  65 20 20 3d 20 33 32 0a  0a 2f 2f 20 53 74 72 65  |e  = 32..// Stre|
000000a0  61 6d 20 76 65 63 74 6f  72 20 6f 66 66 73 65 74  |am vector offset|
000000b0  73 0a 73 2e 6d 61 67 69  63 20 09 20 3d 20 30 09  |s.s.magic . = 0.|
000000c0  09 09 2f 2f 20 4d 75 73  74 20 62 65 20 73 2e 69  |..// Must be s.i|
000000d0  73 2e 61 2e 73 74 72 65  61 6d 0a 73 2e 73 74 72  |s.a.stream.s.str|
000000e0  65 61 6d 2e 63 68 61 69  6e 09 20 3d 20 73 2e 6d  |eam.chain. = s.m|
000000f0  61 67 69 63 09 20 20 20  20 2b 20 31 20 2f 2f 20  |agic.    + 1 // |
00000100  41 6c 6c 20 73 74 72 65  61 6d 73 20 61 72 65 20  |All streams are |
00000110  6c 69 6e 6b 65 64 20 6f  6e 20 74 68 69 73 0a 73  |linked on this.s|
00000120  2e 66 6c 61 67 73 20 09  20 3d 20 73 2e 73 74 72  |.flags . = s.str|
00000130  65 61 6d 2e 63 68 61 69  6e 20 20 20 2b 20 31 20  |eam.chain   + 1 |
00000140  2f 2f 20 41 20 66 6c 61  67 20 77 6f 72 64 0a 73  |// A flag word.s|
00000150  2e 6e 61 6d 65 09 09 20  3d 20 73 2e 66 6c 61 67  |.name.. = s.flag|
00000160  73 09 20 20 20 20 2b 20  31 20 2f 2f 20 46 69 72  |s.    + 1 // Fir|
00000170  73 74 20 62 79 74 65 20  6f 66 20 73 74 72 65 61  |st byte of strea|
00000180  6d 20 6e 61 6d 65 0a 73  2e 6e 61 6d 65 2e 65 6e  |m name.s.name.en|
00000190  64 09 20 3d 20 73 2e 6e  61 6d 65 20 2b 20 28 20  |d. = s.name + ( |
000001a0  73 2e 6e 61 6d 65 2e 6d  61 78 2e 73 69 7a 65 20  |s.name.max.size |
000001b0  2f 20 62 79 74 65 73 70  65 72 77 6f 72 64 20 29  |/ bytesperword )|
000001c0  0a 73 2e 63 68 61 6e 6e  65 6c 09 20 3d 20 73 2e  |.s.channel. = s.|
000001d0  6e 61 6d 65 2e 65 6e 64  09 09 2f 2f 20 54 68 65  |name.end..// The|
000001e0  20 4f 53 20 66 69 6c 65  20 68 61 6e 64 6c 65 0a  | OS file handle.|
000001f0  73 2e 65 72 72 6f 72 2e  68 61 6e 64 6c 65 72 20  |s.error.handler |
00000200  20 3d 20 73 2e 63 68 61  6e 6e 65 6c 09 20 20 20  | = s.channel.   |
00000210  20 2b 20 31 20 2f 2f 20  43 61 6c 6c 65 72 20 69  | + 1 // Caller i|
00000220  66 20 61 6e 79 20 73 65  72 69 6f 75 73 20 65 72  |f any serious er|
00000230  72 6f 72 73 0a 73 2e 73  65 6c 65 63 74 65 72 09  |rors.s.selecter.|
00000240  20 3d 20 73 2e 65 72 72  6f 72 2e 68 61 6e 64 6c  | = s.error.handl|
00000250  65 72 20 20 2b 20 31 20  2f 2f 20 43 61 6c 6c 65  |er  + 1 // Calle|
00000260  64 20 62 65 66 6f 72 65  20 61 6e 79 20 49 4f 20  |d before any IO |
00000270  6f 6e 20 74 68 69 73 20  73 74 72 65 61 6d 0a 73  |on this stream.s|
00000280  2e 72 65 61 64 65 72 09  20 3d 20 73 2e 73 65 6c  |.reader. = s.sel|
00000290  65 63 74 65 72 09 20 20  20 20 2b 20 31 20 2f 2f  |ecter.    + 1 //|
000002a0  20 54 68 65 20 72 64 63  68 28 29 20 66 75 6e 63  | The rdch() func|
000002b0  74 69 6f 6e 0a 73 2e 77  72 69 74 65 72 09 20 3d  |tion.s.writer. =|
000002c0  20 73 2e 72 65 61 64 65  72 09 20 20 20 20 2b 20  | s.reader.    + |
000002d0  31 20 2f 2f 20 54 68 65  20 77 72 63 68 28 29 20  |1 // The wrch() |
000002e0  72 6f 75 74 69 6e 65 0a  73 2e 75 6e 72 65 61 64  |routine.s.unread|
000002f0  65 72 09 20 3d 20 73 2e  77 72 69 74 65 72 09 20  |er. = s.writer. |
00000300  20 20 20 2b 20 31 20 2f  2f 20 54 68 65 20 75 6e  |   + 1 // The un|
00000310  72 64 63 68 28 29 20 72  6f 75 74 69 6e 65 0a 73  |rdch() routine.s|
00000320  2e 6c 61 73 74 2e 63 68  61 72 09 20 3d 20 73 2e  |.last.char. = s.|
00000330  75 6e 72 65 61 64 65 72  09 20 20 20 20 2b 20 31  |unreader.    + 1|
00000340  20 2f 2f 20 4c 61 73 74  20 63 68 61 72 61 63 74  | // Last charact|
00000350  65 72 20 72 65 61 64 20  62 79 20 74 68 65 20 72  |er read by the r|
00000360  65 61 64 65 72 28 29 0a  73 2e 72 65 61 6c 2e 72  |eader().s.real.r|
00000370  65 61 64 65 72 09 20 3d  20 73 2e 6c 61 73 74 2e  |eader. = s.last.|
00000380  63 68 61 72 09 20 20 20  20 2b 20 31 20 2f 2f 20  |char.    + 1 // |
00000390  54 68 65 20 72 65 61 6c  20 72 65 61 64 65 72 20  |The real reader |
000003a0  69 66 20 75 6e 72 65 61  64 63 68 20 70 65 6e 64  |if unreadch pend|
000003b0  69 6e 67 0a 73 2e 65 72  72 6f 72 2e 63 6f 75 6e  |ing.s.error.coun|
000003c0  74 09 20 3d 20 73 2e 72  65 61 6c 2e 72 65 61 64  |t. = s.real.read|
000003d0  65 72 20 20 20 20 2b 20  31 20 2f 2f 20 4e 75 6d  |er    + 1 // Num|
000003e0  62 65 72 20 6f 66 20 4f  53 20 65 72 72 6f 72 73  |ber of OS errors|
000003f0  20 73 69 6e 63 65 20 63  72 65 61 74 65 64 0a 73  | since created.s|
00000400  2e 6c 61 73 74 2e 65 72  72 6f 72 09 20 3d 20 73  |.last.error. = s|
00000410  2e 65 72 72 6f 72 2e 63  6f 75 6e 74 20 20 20 20  |.error.count    |
00000420  2b 20 31 20 2f 2f 20 54  68 65 20 6c 61 73 74 20  |+ 1 // The last |
00000430  4f 53 20 65 72 72 6f 72  20 66 72 6f 6d 20 74 68  |OS error from th|
00000440  69 73 20 73 74 72 65 61  6d 0a 73 2e 65 6e 64 72  |is stream.s.endr|
00000450  65 61 64 65 72 09 20 3d  20 73 2e 6c 61 73 74 2e  |eader. = s.last.|
00000460  65 72 72 6f 72 20 20 20  20 20 2b 20 31 20 2f 2f  |error     + 1 //|
00000470  20 54 68 65 20 65 6e 64  72 65 61 64 28 29 20 72  | The endread() r|
00000480  6f 75 74 69 6e 65 0a 73  2e 65 6e 64 77 72 69 74  |outine.s.endwrit|
00000490  65 72 09 20 3d 20 73 2e  65 6e 64 72 65 61 64 65  |er. = s.endreade|
000004a0  72 09 20 20 20 20 2b 20  31 20 2f 2f 20 54 68 65  |r.    + 1 // The|
000004b0  20 65 6e 64 77 72 69 74  65 28 29 20 72 6f 75 74  | endwrite() rout|
000004c0  69 6e 65 0a 73 2e 62 75  66 66 65 72 2e 73 69 7a  |ine.s.buffer.siz|
000004d0  65 09 20 3d 20 73 2e 65  6e 64 77 72 69 74 65 72  |e. = s.endwriter|
000004e0  09 20 20 20 20 2b 20 31  20 2f 2f 20 54 68 65 20  |.    + 1 // The |
000004f0  73 69 7a 65 20 6f 66 20  74 68 65 20 49 4f 20 62  |size of the IO b|
00000500  75 66 66 65 72 0a 73 2e  62 75 66 66 65 72 2e 61  |uffer.s.buffer.a|
00000510  64 64 72 65 73 73 20 3d  20 73 2e 62 75 66 66 65  |ddress = s.buffe|
00000520  72 2e 73 69 7a 65 20 20  20 20 2b 20 31 20 2f 2f  |r.size    + 1 //|
00000530  20 54 68 65 20 6d 61 63  68 69 6e 65 20 61 64 64  | The machine add|
00000540  72 65 73 73 20 6f 66 20  74 68 65 20 62 75 66 66  |ress of the buff|
00000550  65 72 0a 73 2e 62 75 66  66 65 72 2e 70 6f 69 6e  |er.s.buffer.poin|
00000560  74 65 72 20 3d 20 73 2e  62 75 66 66 65 72 2e 61  |ter = s.buffer.a|
00000570  64 64 72 65 73 73 20 2b  20 31 20 2f 2f 20 54 68  |ddress + 1 // Th|
00000580  65 20 65 78 74 72 61 63  74 69 6f 6e 20 70 6f 69  |e extraction poi|
00000590  6e 74 65 72 0a 73 2e 62  75 66 66 65 72 2e 63 6f  |nter.s.buffer.co|
000005a0  75 6e 74 09 20 3d 20 73  2e 62 75 66 66 65 72 2e  |unt. = s.buffer.|
000005b0  70 6f 69 6e 74 65 72 20  2b 20 31 20 2f 2f 20 4e  |pointer + 1 // N|
000005c0  75 6d 62 65 72 20 6f 66  20 65 6c 65 6d 65 6e 74  |umber of element|
000005d0  73 20 69 6e 20 74 68 65  20 62 75 66 66 65 72 0a  |s in the buffer.|
000005e0  0a 73 2e 73 74 72 65 61  6d 2e 73 69 7a 65 09 20  |.s.stream.size. |
000005f0  3d 20 73 2e 62 75 66 66  65 72 2e 63 6f 75 6e 74  |= s.buffer.count|
00000600  09 2f 2f 20 54 68 65 20  73 69 7a 65 20 6f 66 20  |.// The size of |
00000610  74 68 65 20 73 74 72 65  61 6d 20 62 6c 6f 63 6b  |the stream block|
00000620  0a 0a 73 2e 69 73 2e 61  2e 73 74 72 65 61 6d 09  |..s.is.a.stream.|
00000630  20 3d 20 23 78 35 32 41  35 41 35 35 32 20 2f 2f  | = #x52A5A552 //|
00000640  20 41 20 6d 61 67 69 63  20 6e 75 6d 62 65 72 20  | A magic number |
00000650  69 6e 64 69 63 61 74 69  6e 67 20 74 68 65 20 73  |indicating the s|
00000660  74 72 65 61 6d 20 69 73  20 76 61 6c 69 64 0a 73  |tream is valid.s|
00000670  2e 69 73 2e 61 2e 73 74  6f 72 65 2e 66 69 6c 65  |.is.a.store.file|
00000680  3d 20 28 28 27 73 27 3c  3c 38 7c 27 74 27 29 3c  |= (('s'<<8|'t')<|
00000690  3c 38 7c 27 6f 27 29 3c  3c 38 7c 27 72 27 0a 0a  |<8|'o')<<8|'r'..|
000006a0  73 2e 73 74 72 65 61 6d  2e 74 79 70 65 2e 62 69  |s.stream.type.bi|
000006b0  74 73 20 20 20 20 3d 20  23 62 30 30 30 30 30 30  |ts    = #b000000|
000006c0  30 30 30 30 30 30 30 30  30 30 30 30 30 30 30 30  |0000000000000000|
000006d0  30 30 31 31 31 31 31 31  31 31 0a 73 2e 69 73 2e  |0011111111.s.is.|
000006e0  77 72 63 68 2e 62 69 74  09 20 20 20 20 20 20 3d  |wrch.bit.      =|
000006f0  20 23 62 30 30 30 30 30  30 30 30 30 30 30 30 30  | #b0000000000000|
00000700  30 30 30 30 30 30 30 30  30 30 30 30 30 30 30 30  |0000000000000000|
00000710  30 30 31 0a 73 2e 69 73  2e 76 64 75 2e 62 69 74  |001.s.is.vdu.bit|
00000720  73 09 20 20 20 20 20 20  3d 20 23 62 30 30 30 30  |s.      = #b0000|
00000730  30 30 30 30 30 30 30 30  30 30 30 30 30 30 30 30  |0000000000000000|
00000740  30 30 30 30 30 30 30 30  30 30 31 31 0a 73 2e 69  |000000000011.s.i|
00000750  73 2e 70 72 69 6e 74 65  72 2e 62 69 74 73 20 20  |s.printer.bits  |
00000760  20 20 20 3d 20 23 62 30  30 30 30 30 30 30 30 30  |   = #b000000000|
00000770  30 30 30 30 30 30 30 30  30 30 30 30 30 30 30 30  |0000000000000000|
00000780  30 30 30 30 31 30 31 0a  73 2e 69 73 2e 73 65 72  |0000101.s.is.ser|
00000790  69 61 6c 2e 62 69 74 73  20 20 20 20 20 20 3d 20  |ial.bits      = |
000007a0  23 62 30 30 30 30 30 30  30 30 30 30 30 30 30 30  |#b00000000000000|
000007b0  30 30 30 30 30 30 30 30  30 30 30 30 30 30 31 30  |0000000000000010|
000007c0  30 31 0a 73 2e 69 73 2e  73 74 6f 72 65 2e 62 69  |01.s.is.store.bi|
000007d0  74 73 20 20 20 20 20 20  20 3d 20 23 62 30 30 30  |ts       = #b000|
000007e0  30 30 30 30 30 30 30 30  30 30 30 30 30 30 30 30  |0000000000000000|
000007f0  30 30 30 30 30 30 30 30  31 30 30 30 30 0a 73 2e  |0000000010000.s.|
00000800  69 73 2e 6e 75 6c 6c 2e  62 69 74 73 09 20 20 20  |is.null.bits.   |
00000810  20 20 20 3d 20 23 62 30  30 30 30 30 30 30 30 30  |   = #b000000000|
00000820  30 30 30 30 30 30 30 30  30 30 30 30 30 30 30 30  |0000000000000000|
00000830  31 30 30 30 30 30 30 0a  73 2e 69 73 2e 66 69 6c  |1000000.s.is.fil|
00000840  65 2e 62 69 74 73 09 20  20 20 20 20 20 3d 20 23  |e.bits.      = #|
00000850  62 30 30 30 30 30 30 30  30 30 30 30 30 30 30 30  |b000000000000000|
00000860  30 30 30 30 30 30 30 30  30 31 30 30 30 30 30 30  |0000000001000000|
00000870  30 0a 73 2e 68 61 73 2e  63 68 61 6e 6e 65 6c 2e  |0.s.has.channel.|
00000880  62 69 74 20 20 20 20 20  3d 20 23 62 30 30 30 30  |bit     = #b0000|
00000890  30 31 30 30 30 30 30 30  30 30 30 30 30 30 30 30  |0100000000000000|
000008a0  30 30 30 30 30 30 30 30  30 30 30 30 0a 73 2e 69  |000000000000.s.i|
000008b0  73 2e 69 6e 70 75 74 2e  62 69 74 09 20 20 20 20  |s.input.bit.    |
000008c0  20 20 3d 20 23 62 30 30  30 31 30 30 30 30 30 30  |  = #b0001000000|
000008d0  30 30 30 30 30 30 30 30  30 30 30 30 30 30 30 30  |0000000000000000|
000008e0  30 30 30 30 30 30 0a 73  2e 69 73 2e 6f 75 74 70  |000000.s.is.outp|
000008f0  75 74 2e 62 69 74 20 20  20 20 20 20 20 3d 20 23  |ut.bit       = #|
00000900  62 30 30 31 30 30 30 30  30 30 30 30 30 30 30 30  |b001000000000000|
00000910  30 30 30 30 30 30 30 30  30 30 30 30 30 30 30 30  |0000000000000000|
00000920  30 0a 73 2e 65 6e 64 65  64 2e 62 69 74 09 20 20  |0.s.ended.bit.  |
00000930  20 20 20 20 3d 20 23 62  31 30 30 30 30 30 30 30  |    = #b10000000|
00000940  30 30 30 30 30 30 30 30  30 30 30 30 30 30 30 30  |0000000000000000|
00000950  30 30 30 30 30 30 30 30  0a 0a 0a 2f 2f 20 53 74  |00000000...// St|
00000960  6f 72 65 20 66 69 6c 65  20 76 65 63 74 6f 72 20  |ore file vector |
00000970  6f 66 66 73 65 74 73 0a  73 74 6f 72 65 2e 6d 61  |offsets.store.ma|
00000980  67 69 63 09 20 20 20 3d  20 30 09 09 09 20 20 2f  |gic.   = 0...  /|
00000990  2f 20 6d 61 67 69 63 20  74 6f 20 74 65 73 74 20  |/ magic to test |
000009a0  76 61 6c 69 64 69 74 79  0a 73 74 6f 72 65 2e 6e  |validity.store.n|
000009b0  65 78 74 66 69 6c 65 09  20 20 20 3d 20 73 74 6f  |extfile.   = sto|
000009c0  72 65 2e 6d 61 67 69 63  20 2b 20 31 09 20 20 2f  |re.magic + 1.  /|
000009d0  2f 20 50 6f 69 6e 74 65  72 20 74 6f 20 6e 65 78  |/ Pointer to nex|
000009e0  74 20 73 74 6f 72 65 20  66 69 6c 65 0a 73 74 6f  |t store file.sto|
000009f0  72 65 2e 6e 61 6d 65 09  20 20 20 3d 20 73 74 6f  |re.name.   = sto|
00000a00  72 65 2e 6e 65 78 74 66  69 6c 65 20 2b 20 31 20  |re.nextfile + 1 |
00000a10  20 20 2f 2f 20 6e 61 6d  65 20 6f 66 20 74 68 65  |  // name of the|
00000a20  20 66 69 6c 65 20 28 66  69 72 73 74 20 62 79 74  | file (first byt|
00000a30  65 29 0a 73 74 6f 72 65  2e 6e 61 6d 65 2e 65 6e  |e).store.name.en|
00000a40  64 09 20 20 20 3d 20 73  74 6f 72 65 2e 6e 61 6d  |d.   = store.nam|
00000a50  65 20 2b 20 28 73 2e 6e  61 6d 65 2e 6d 61 78 2e  |e + (s.name.max.|
00000a60  73 69 7a 65 2f 62 79 74  65 73 70 65 72 77 6f 72  |size/bytesperwor|
00000a70  64 29 0a 73 74 6f 72 65  2e 73 74 61 72 74 09 20  |d).store.start. |
00000a80  20 20 3d 20 73 74 6f 72  65 2e 6e 61 6d 65 2e 65  |  = store.name.e|
00000a90  6e 64 20 2b 20 31 20 20  20 2f 2f 20 77 68 65 72  |nd + 1   // wher|
00000aa0  65 20 66 69 6c 65 20 69  73 20 69 6e 20 73 74 6f  |e file is in sto|
00000ab0  72 65 20 28 62 63 70 6c  20 70 74 72 29 0a 73 74  |re (bcpl ptr).st|
00000ac0  6f 72 65 2e 73 69 7a 65  09 20 20 20 3d 20 73 74  |ore.size.   = st|
00000ad0  6f 72 65 2e 73 74 61 72  74 20 2b 20 31 09 20 20  |ore.start + 1.  |
00000ae0  2f 2f 20 73 69 7a 65 20  6f 66 20 64 61 74 61 20  |// size of data |
00000af0  28 62 79 74 65 73 29 0a  73 74 6f 72 65 2e 6d 61  |(bytes).store.ma|
00000b00  78 73 69 7a 65 09 20 20  20 3d 20 73 74 6f 72 65  |xsize.   = store|
00000b10  2e 73 69 7a 65 20 2b 20  31 09 20 20 2f 2f 20 73  |.size + 1.  // s|
00000b20  70 61 63 65 20 61 6c 6c  6f 63 61 74 65 64 20 66  |pace allocated f|
00000b30  6f 72 20 66 69 6c 65 20  28 62 79 74 65 73 29 0a  |or file (bytes).|
00000b40  73 74 6f 72 65 2e 62 6c  6f 63 6b 2e 73 69 7a 65  |store.block.size|
00000b50  20 20 20 3d 20 73 74 6f  72 65 2e 6d 61 78 73 69  |   = store.maxsi|
00000b60  7a 65 09 20 20 2f 2f 20  54 68 65 20 73 69 7a 65  |ze.  // The size|
00000b70  20 6f 66 20 74 68 65 20  66 69 6c 65 20 62 6c 6f  | of the file blo|
00000b80  63 6b 0a 0a 0a 65 2e 6e  6f 2e 77 6f 72 6b 2e 73  |ck...e.no.work.s|
00000b90  70 61 63 65 20 09 20 20  20 20 20 3d 20 37 30 30  |pace .     = 700|
00000ba0  0a 65 2e 62 61 64 2e 69  6e 70 75 74 2e 73 74 72  |.e.bad.input.str|
00000bb0  65 61 6d 09 20 20 20 20  20 3d 20 37 30 31 0a 65  |eam.     = 701.e|
00000bc0  2e 62 61 64 2e 6f 75 74  70 75 74 2e 73 74 72 65  |.bad.output.stre|
00000bd0  61 6d 09 20 20 20 20 20  3d 20 37 30 32 0a 65 2e  |am.     = 702.e.|
00000be0  68 61 73 2e 62 65 65 6e  2e 65 6e 64 65 64 09 20  |has.been.ended. |
00000bf0  20 20 20 20 3d 20 37 30  33 0a 65 2e 6d 75 73 74  |    = 703.e.must|
00000c00  2e 6e 6f 74 2e 72 65 61  64 20 09 20 20 20 20 20  |.not.read .     |
00000c10  3d 20 37 30 34 0a 65 2e  6d 75 73 74 2e 6e 6f 74  |= 704.e.must.not|
00000c20  2e 77 72 69 74 65 09 20  20 20 20 20 3d 20 37 30  |.write.     = 70|
00000c30  35 0a 65 2e 6e 6f 2e 62  75 66 66 65 72 2e 72 6f  |5.e.no.buffer.ro|
00000c40  6f 6d 09 20 20 20 20 20  3d 20 37 30 36 0a 65 2e  |om.     = 706.e.|
00000c50  6e 61 73 74 79 2e 65 72  72 6f 72 09 09 20 20 20  |nasty.error..   |
00000c60  20 20 3d 20 37 30 37 0a  65 2e 63 61 6e 74 2e 6c  |  = 707.e.cant.l|
00000c70  6f 61 64 2e 66 69 6c 65  09 20 20 20 20 20 3d 20  |oad.file.     = |
00000c80  37 30 38 0a 65 2e 73 74  6f 72 65 2e 66 69 6c 65  |708.e.store.file|
00000c90  2e 66 75 6c 6c 09 20 20  20 20 20 3d 20 37 30 39  |.full.     = 709|
00000ca0  0a 0a 73 2e 6f 70 2e 63  6c 6f 73 65 09 09 20 20  |..s.op.close..  |
00000cb0  20 20 20 3d 20 23 78 30  30 0a 73 2e 6f 70 2e 69  |   = #x00.s.op.i|
00000cc0  6e 70 75 74 09 09 20 20  20 20 20 3d 20 23 78 34  |nput..     = #x4|
00000cd0  30 0a 73 2e 6f 70 2e 6f  75 74 70 75 74 09 09 20  |0.s.op.output.. |
00000ce0  20 20 20 20 3d 20 23 78  38 30 0a 73 2e 6f 70 2e  |    = #x80.s.op.|
00000cf0  75 70 64 61 74 65 09 09  20 20 20 20 20 3d 20 23  |update..     = #|
00000d00  78 43 30 0a 0a 24 29 0a                           |xC0..$).|
00000d08