--
--	Inmos Libraries
--	Copyright (C) 1988, 1989, 1990, 1991, 1993  Inmos Limited
--
--	This library is free software; you can redistribute it and/or
--	modify it under the terms of the GNU Lesser General Public
--	License as published by the Free Software Foundation; either
--	version 2 of the License, or (at your option) any later version.
--
--	This library is distributed in the hope that it will be useful,
--	but WITHOUT ANY WARRANTY; without even the implied warranty of
--	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
--	Lesser General Public License for more details.
--
--	You should have received a copy of the GNU Lesser General Public
--	License along with this library; if not, write to the Free Software
--	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
--

--** @module hostio

#COMMENT "Host i/o library, V1.00, 10/03/89"
#COMMENT "(c) Copyright INMOS Limited 1989"
#INCLUDE "hostio.inc"
--{{{  sp.core
--* Return the contents of the root transputer's memory as peeked from
-- the transputer when the server was invoked with the analyse option.
--
-- If offset + (SIZE data) is larger than the total memory peeked then
-- only those bytes from offset up to the end of that memory peeked are
-- returned in data. If both offset and SIZE data are zero, the routine
-- fails if the memory was not peeked, succeeds otherwise.
--
-- @param fs from server
-- @param ts to server
-- @param offset this gives the offset from base of memory ( (MOSTNEG
--   INT) ) of the memory segment to be read ( so offset should be
--   non-negative ); result will be >= spr.operation.failed if offset
--   is larger than the amount of memory that was peeked
-- @param bytes.read the number of bytes read, which will be [data FROM
--   0 FOR bytes.read], if result = spr.ok; otherwise will be zero
-- @param data contains the contents of the memory read; (SIZE data) is
--   the amount of memory in bytes that is requested to be read
-- @param result equal to spr.ok if the peeked memory was successfully
--   returned; otherwise takes on a value indicating what the problem
--   was: spr.bad.packet.size   data is too large, (SIZE data) >
--   sp.max.corerequest.size >=spr.operation.failed  the operation
--   failed or the transputer was not analysed when the server was
--   invoked or offset is greater than the amount of memory peeked -
--   refer to hostio.inc or iserver documentation for further details
PROC sp.core (CHAN OF SP fs, ts, VAL INT32 offset,
              INT bytes.read, []BYTE data, BYTE result)
  SEQ
    result := spr.operation.failed
:
--}}}  sp.core
--{{{  so.core
PROC so.core (CHAN OF SP fs, ts, VAL INT32 offset,
              INT bytes.read, []BYTE data, BYTE result)

  sp.core (fs, ts, offset, bytes.read, data, result)
:
--}}}  so.core
