User guide

3.3. GLOBAL FUNCTIONS 73
-1 Re-enter the interpreter with a new value in the the count
register
0 Normal successful completion (by convention)
1 Non existent Cintcode instruction
2 BRK i nst r uc ti on encountered
3 Count has reached zero
4 PC set to a negative value
5 Division by zero
10 Si ngl e step interrupt from the fast interpreter (debugging)
11 The value of the watched l ocation in the Cincode memory
has changed in the course of execut i ng the previous i n st ru c-
tion
12 Ind i r ec t address out of range
13 SIG INT received
res := sys(Sys setprefix, prefix) CIN:y, POS:y, NAT:y
This is pri m ari l y a function for the Windows CE version of t he BCPL Cintcode
System for which the re is no current working directory mechani s m. The prefix string
is held in space that was allocated when the system started. It sets the prefix that
is prepended to all future relative file names. See Section 3.3.2 and the CLI prefix
command describ e d on page 119.
res := sys(Sys
setraster, n, arg) CIN:y, POS:y, NAT:n
There is a variant of cintsys c alled rastsys that provides a means of generating
data for time-memory images, and cintpos has a similar variant called rastpos. The
setraster operation controls the rastering fe atu re as follows. If n=3, it returns 0 if
rastering is available and -1 otherwise. If n=2, the memory granularity is set to arg
bytes per pixel, the default being 12. If n=1, the number of Cintcode instructions
executed per raster line is set to arg, the default being 1000. If n is zero and arg is
non-zero then rasteri ng is activated sending i ts output to the file with name arg (the
rastering data file). Raster information is normall y collected for the duration of the
next CLI command. If n and arg are both zero, the rastering data file is closed.
The raster data file is an text file that encodes the raster lines using run length
encoding. Typical output is as follows:
K1000 S12 1000 instruction per raster line, 12 bytes per pixel
W10B3W1345B1N 10 white, 3 black, 1345 white, 1 black, newline
W13B3W12B2N etc
...
See the CLI commands raster and rast2ps on page 121 for more information on
how to use the rastering facility.
res := sys(Sys
settrcount, count) CIN:y, POS:y, NAT:n
This sets the pri vate variable trcount used by the low level t r aci ng mechanism to