User guide
70 CHAPTER 3. THE LIBRARY
that needs to be modified by the addition of the base address of the hunk. The code
t bhunk is similar to t hunk only the data words (not the length field) are provided in
binary rather than hex characters. Such hunks are thus about half the size of character
based ones. The code t
end marks the end of an object module, but end-of-file has
the same effect. Those codes containing the characters 64 provide equivalent faciliti e s
for 64-bit versions of BCPL. Neither t
reloc nor t reloc64 are currently available in
Cintsys or Cintpos.
sys(Sys
lockirq) CIN:y, POS:y, NAT:y
Under cintpos, this call disables interrupts.
res := sys(Sys
muldiv, a, b, c) CIN:y, POS:y, NAT:y
This invoke the C implementation of muldiv. It returns the result of dividi ng c into
the double length product of a and b. It s et s result2 to the remainder. This function
is little used sin ce a more efficient muldiv function is now defined in syslib invoking
the Cintcode instru ct i on MDIV, see section 3.3.
fp := sys(Sys
openappend, name) CIN:y, POS:y, NAT:y
This function opens an output stream specified by the file name name in append
mode causing all output to be appended onto the end of the file. If the file does not
exist a zero length file of the given name is cr e ate d. If successful it return s the file
pointer to the given file, otherwise it returns zero.
fp := sys(Sys
openread, name, envname) CIN:y, POS:y, NAT:y
This opens for reading the file whose name is given by the string name. It returns
0 if the file cannot be opened, othe r wi se it returns the file pointer for the opened file.
See page 81 f or information about the treatment of file names. If name is a relative
filename, the file is first searched for in the current directory, otherwise, if envname is
non null, the directories specified by the environment variable envname are searched.
res := sys(Sys
openreadwrite, name) CIN:y, POS:y, NAT:y
This opens for reading and writing the file whose name is given by the string nam e.
It returns 0 if the file cannot be ope ne d, otherwise it returns the file pointer for the
opened file. See Section 3.3.2 for information about the treatment of file names and
Section 3.4 for information about random access files.
fp := sys(Sys
openwrite, name) CIN:y, POS:y, NAT:y
This opens for writing the file whose name i s given by the string name. It returns
0 if the file cannot be opened, othe r wi se it returns the file pointer for the opened file.
See page 81 for information about the treatment of file names.
res := sys(Sys
platform) CIN:y, POS:y, NAT:n
This returns a machine depend ent value indicating under which architecture Cintsys
or Cintpos is running.
res := sys(Sys
pollsardch) CIN:y, POS:y, NAT:y
This returns the next character from standard input if i t is immediately available ,