Contact us Heritage collections Image license terms
HOME ACL Associates Technology Literature Applications Society Software revisited
Further reading □ Contents1. Introduction2. Regions3. Display routines4. SPROGS files5. The file format6. Character fonts7. Index variables8. Efficiency of picture storage9. The sequence list10. Further facilities11. SPROGS on the 1906A12. An example film13. SPROGS preprocessor14. Future extensionsAppendices
ACD C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

   
ACLLiteratureICL 1906A manualsSPROGS
ACLLiteratureICL 1906A manualsSPROGS
ACL ACD C&A INF CCD CISD Archives
Further reading

Contents
1. Introduction
2. Regions
3. Display routines
4. SPROGS files
5. The file format
6. Character fonts
7. Index variables
8. Efficiency of picture storage
9. The sequence list
10. Further facilities
11. SPROGS on the 1906A
12. An example film
13. SPROGS preprocessor
14. Future extensions
Appendices

Chapter 4: SPROGS FILES

So far, we have defined how graphical output can be produced immediately, the call of a display routine causing output to be produced as a result of the call. A second mode of operation allowed in SPROGS is for calls of display routines to cause the commands to be stored in a file that will be obeyed at a later point. SPROGS files can also be used to store the basic orders for a particular output device, so that background information can be speedily produced. The user may have 256 distinct files. Full details of their flexibility will become apparent when the sequence list is described.

4.1 File Definition

In its simplest form a file can be defined by the following:

      STDF (ANAME('PICT')) 
      VEC (X1, Y1, X2, Y2) 
      FIDF (1.0)

The two routines STDF and FIDF define the start and finish of a file whose name is PICT. The point at which a file is defined will normally not be important as long as it is defined before it is used. The function ANAME converts the character string of the name (which may consist of up to 7 characters) into a real number packed form, in order to overcome the problems of manipulating text in FORTRAN. File names may consist of any characters. However, if the name is longer than four, only alphanumeric characters may be used, and the name must start with a letter.

To output this file at a later point 1n the program, call:

      DRAW (ANAME('PICT'))

The result of the DRAW call is, in the simplest case, equivalent to replacing the DRAW call by the set of subroutine calls which made up the file.

It is likely that the amount of store required will be significant. For example:

      STDF (ANAME('FAN')) 
      DO 10 I = I1, 500 
      X = I
      VEC (0.0,0.0, X, 500.0) 
 10   CONTINUE 
      FIDF (1.0)

This would store away the 500 vector orders in some form.

4.2 Region Independent Files

In the examples given above, the files just contain drawing routines (display routines which are designed to produce lines or plots on the output device). The file need not contain any information about the region in terms of which it is defined.

For example:

     RGLIM(1.0,0.0,0.0,10.0,10.0)
     RGPLIM(1.0,0.0,0.0,1023.0,1023.0,0.0)
     RGLIM(2.0,0.0,0.0,500.0,500.0)
     RGPLIM(2,0,1.0,0.0,0.0,5.0,5.0)
     RGLIM(3.0,0.0,0.0,500.0,500.0)
     RGPLIM(3.0,1.0,5.0,5.0,10.0,10.0)

This defines regions 2 and 3 as the bottom left and top right areas of the display area. Both have the same limits.

The following routine calls:

      REGION (2.0) 
      DRAW (ANAME('FAN')) 
      REGION (3.0) 
      DRAW (ANAME('FAN'))

will produce the fan in two positions on the display area. Thus a single fan file can be used to produce a number of pictures of different sizes and shapes depending on the region selected when the DRAW routine is called.

4.3 Relative Files

The files described above have been absolute in the sense that the coordinates of the lines making up the file are defined even if the particular region selected will cause the output to vary. Consider the following:

      STDF (ANAME('BOX')) 
      TODXY (1.0,0.0) 
      TODXY (0.0,1.0) 
      TODXY (-1.0,0.0) 
      TODXY (0.0,-1. 0) 
      FIDF (1.0)

In this case, the box defined is relative to the display position when the file is output. For example:

      SETXY (0.0,0.0) 
      DRAW (ANAME('BOX')) 
      SETXY (5.0,5.0) 
      DRAW (ANAME('BOX'))

will produce two boxes having bottom left corners at (0,0) and (5,5) respectively.

One important point not mentioned so far is that the call of DRAW does not usually change the setting of the display position. On exit, the display position will be reset to its initial value. Also, the region selection, intensity, thickness, dotting, colour, rotation and expansion factors will be reset.

It is possible to have the display position left at its final value when the DRAW is completed. This is achieved by defining the file initially with the termination of the file being generated by:

      FIDF (2.0)

Another value of the argument for FIDF has been defined overleaf, and others may be defined, to allow some subset of the system parameters (such as rotation factor, etc) not to be reset to their initial values on exit.

4.4 File Attributes

So far only files consisting of routines which produced graphical output have been considered. However it is possible to include in the file many of the orders defined so far.

For example, the following file is permanently linked with region 2:

      STDF (ANAME('BOX')) 
      REGION (2.0)
      FIDF (1.0)

Similarly, particular line parameters can be associated permanently with a file by:

      STDF (ANAME('BOX')) 
      INTNST (XINT)
      . . . .
      FIDF (1.0)

Again, the initial attributes will be reset after the draw has been completed.

However, one display routine, ADVFLM, has special significance when used in a file. For this reason, the term picture file will be used to describe a file that does not contain ADVFLM. A file containing one or more ADVFLM commands will be termed a film file.

4.5 Subfiles

There is no reason why a file should not be defined with subfiles. For example:

      STDF (ANAME('BOXTRI')) 
      SETXY (0.0,0.0) 
      DRAW (ANAME('BOX')) 
      SETXY (3.0,0.0) 
      DRAW (ANAME('BOX')) 
      SETXY (5.0,5.0) 
      DRAW (ANAME('BOX')) 
      FIDF(1.0)

In this case the file BOXTRI contains three calls of the subfile BOX as part of it. When the file BOXTRI is drawn, the result will be three boxes at different positions. Each subfile level will reset the attributes relevant at the previous higher level. In particular the current display position will be reset to its value on entry (but see Section 4.6).

4.6 File Names

The name of each file consists of two parts. The first is the file name as given in the STDF instruction. The second is the file number. In the examples given so far, the file number has always been set to 1. This is the assumed value if none is given. A different file number is achieved by:

      NUMBR (3.0) 
      STDF (ANAME('BOX'))
      . . . 
      FIDF (1.0)

This defines the file as BOX/3. The number can be of great value when a group of similar files is required as these files can be differentiated by the numbering. To call a subfile with a particular number:

      NUMBR (3.0) 
      DRAW (ANAME('BOX'))

The routine number is associated with the next file called or defined. This action automatically resets the file number back to 1. Thus:

      NUMBR (3.0) 
      DRAW (ANAME('BOX')) 
      DRAW (ANAME('FAN' ))

will output BOX/3 and FAN/1.

Sometimes, however, it is more convenient to leave the file number unaltered - for example, when defining characters (see below). If a file is defined with:

      FIDF (3.0)

then neither the current display position nor the file number would be reset, either after the definition of the file, or its execution. Hence in the above example, defining file BOX with this setting of FIDF would cause FAN/3 to be drawn.

It is also possible to change the current file number by:

      RLNUMB (XN)

which selects CURRENT NUMBER + XN. However, the file number is always constrained to be positive. This routine is useful when dealing with character fonts (see below).

4.7 Basic Files

As mentioned at the start of this chapter, it is possible to use the file structure to save basic device orders. The routine:

      STSAV (ANAME('BSFILE'),DEV)

will cause all subsequent output to the single device specified by DEV (bit setting as for DVOUT) to be stored in the named file instead. Only one device may be selected in this way, and, as only one file of any type may be defined at anyone time, STDF may not be used while this file is open.

Saving is ended by the command:

      FISAV

Subsequently, if the file is DRAWn, and device DEV is selected, the contents of the file is sent directly to the device. Since this does not involve the region chain, the use of basic files will greatly speed the duplication of constant information from one frame to the next. Currently, only SD4020 output may be stored in this way.

There is one restriction, however. No frame advance orders will be stored in a basic file. The use of ADVFLM will lead to a warning message, and the order will be ignored. Thus only one frame of information may be stored in a basic file.

This restriction is brought about by the special use of ADVFLM within files, which will be explained in the Chapter on the sequence list.

4.8 Garbage Collection

Whenever a file name is re-used, the space taken by the original file in the file store will be lost. If a lot of re-using of file names is employed, the SPROGS program will take up a considerable amount of store on the 1906A. To regain this space, the routine:

      GARBGE

should be called (not during a file definition). The amount of space saved will be printed.

4.9 File Deletion

Apart from re-using a file name, files may be explicitly deleted by:

      DLETE (ANAME('BOX'))

This routine must not be used during a file definition. The space saved is not regained until GARBGE has been called.

4.10 SPROGS Library

It is possible to save picture, film or basic files in a 1906A EDS file for subsequent access. Such libraries have a directory which can be listed, and items added to or deleted from it.

The user wishing to save files in a library must first create a 1906A EDS file (*ED or *DA) with 4 block buckets (see Section 11.6). The bucket size is important, since errors will result if any other size is specified. The file should be assigned at run time to an ED or DA channel via the SPROGS macro (see Appendix 12). If the library is to be written or erased, the qualifier (OVER) must be added to the ED assignment, for example:

      #ED2 MYLIB(OVER)

The channel number chosen will be treated by SPROGS as the library number, which need not be the same from run to run. However, channels 11, 12 and 13 have a special use (see Chapter 6 on character fonts).

Before use, a library should be initialised by:

      LIBINT (XLIBNO)

This routine will also erase all files on an existing library.

There are five display routines which control access to a library:

      PUTLIB (ANAME('PICT'),FNO,XLIBNO)

writes the file called PICT, number FNO, to library XLIBNO, deleting any existing copy of the file already there.

      GETLIB (ANAME('PICT'),FNO,XLIBNO)

sets up an entry in the file table, ready to read down file PICT, number FNO, from library XLIBNO. The file is not actually brought into the file store until it is used.

GALLIB (XLIBNO)

sets up all files 1n library XLIBNO.

ERSLIB (ANAME('PICT'),FNO,XLIBNO)

erases the file PICT, number FNO, from library XLIBNO.

LSTLIB (XLIBNO)

lists the directory on library XLIBNO.

PUTLIB will not affect the file in the filestore. ERSLIB will erase the filestore entry only if GETLIB or GALLIB has been called for that file, but the file itself has not yet been used.

⇑ Top of page
© Chilton Computing and UKRI Science and Technology Facilities Council webmaster@chilton-computing.org.uk
Our thanks to UKRI Science and Technology Facilities Council for hosting this site