!
! >>> OPENSI <<<
!
! OPEN STORE INPUT
!
! Open an area of store as an input "file"
!
%from IMP %include Formats, Streams, Handcall, Depio
!
! >> OPEN STORE INPUT <<
!
%external %routine Reset Store %alias "3L___reset_store"(%integer s)
   %record(SCBfm)%name Scb == Record(S)
   SCB_Next = SCB_ThisB_Base
%end

%external %routine OpenSI %alias "3L_IMP_OPEN_STORE_INPUT" -
                          (%integer Stream, Length, Base)
   %byte B
   B = Byte(Base);  B = Byte(Base+Length-1)   {fail here if not addressible}
   %record(SCB Fm) %name S == New SCB(0)
   S_ThisB_Base    = Base
   S_ThisB_Size    = Length
   S_Next          = Base
   S_Limit         = Base + Length
   S_Reset Handler = Addr1(Reset Store)
   Push Input Stream(Stream,S)
%end
