User guide
4.3. COMMANDS 121
This is command differs from fail since it terminates the execution of a complete
command-command while fail allows a command-command to continue run.
rast2ps FROM,SCALE,TO/K,ML,MH,MG,FL,FH,FG,
DPI/K,INCL/K,A4/S,A3/S,A2/S,A1/S,A0/S CIN:y, POS:y, NAT:y
This commands converts a raster data file (written using the raster command
described above) into a postscript file suitable for printing. There are parameters to
control the region to convert, t he output pap er size and other parameters. It is also
possible to posible to include anotations in the resulting p i ct ur e .
The FROM parameter specifies the name of the raster data file. RASTER is the default.
SCALE specifies a magnification as a percentage. The default is 80. The TO parameter
specifies the name of the postscript file to be generated. RASTER.ps is the default.
The parameters ML and MH specify the low and high lim i ts of the address space to be
processed. MG specifies the separation of the grid l i n e on the memory ax i s . The defaul ts
are ML=0 MH=300100 and MG=100000. The units are in bytes. The parameters FL and
FH specify the low and high limits of the instruction count axis to be processed. FG
specifies the separation of the grid line on the memory axis. The defaults are FL=0
FH=20000000 and FG=1000000. DPI specified the approximate number of dots per inch
used by the output device. The default is 300. An specified the output page size.
The default is A4. The INCL parameter specifies the name of a file to be copied into
the postscript file. The default is psincl. This file allows annotations to be made in
the picture. The file cintcode/psincl was used to annotate the memory time graph
shown in Figure 4.2. This file contains lines such as:
F2 setfont
(SYN) 1.1 35 2 PDL
(TRN) 8.1 30 1.7 PUL
(CG) 15.3 36 2.1 PUR
(GET Stream) 0.45 270 1.7 PUL
...
(OCODE Buffer) 13.9 245 2 PDR
% 8.5 150 MVT (HELLO WORLD) SC
F3 setfont
(Self Compilation of the Cintcode BCPL Compiler) TITLE
The postscript macros PDL, PUL, PUR and PDR draw arrows with specified labels, byte
address, instruction count and arrow lengths. The arrow directions are re spectively:
down left, Up left, up right and down right. The macro MVT moves to the specified
position in the graph and SC draws a string centered at that position. The TITLE macro
draws the graph title and F2 and F3 are fonts suitable for the labels and title. The
resulting pos tsc r i pt file can, of course, be further editied by hand.
raster COUNT,SCALE,TO/K,HELP/S CIN:y, POS:y, NAT:y
This command controls the collection of raster i ng information but only works when
the BCPL Cintcode system is running under the rastering interpreter rasterp. The
implementation uses sys(Sys setraster,...) calls that are described on page 73. If
raster is given an argument it activate s the rastering mechanism. Once rastering is
activated infor mati on will b e written to a raster dat a file for the duration of the next
CLI command. The format of this file is also outlined on page 73.