Contact us Heritage collections Image license terms
HOME ACL Associates Technology Literature Applications Society Software revisited
Further reading □ Introduction and contents2. The SMOG system3. Mapping to a device4. Line drawing5. Text printing6. Control of the medium7. Command-sets in files8. Economy - Integer routines9. High level routines10. Appendices11. Manual updates
ACD C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

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

Introduction and contents
2. The SMOG system
3. Mapping to a device
4. Line drawing
5. Text printing
6. Control of the medium
7. Command-sets in files
8. Economy - Integer routines
9. High level routines
10. Appendices
11. Manual updates

5. TEXT PRINTING

The high-speed printing capability of the FR80 (some tens of thousands of characters per second in one particular mode of operation) makes it an attractive device for the recording of textual material (eg for archive purposes). This major use of the device is treated in Section 5.2, for the present we continue with its use in a strictly graphical mode.

5.1 Characters as Graphical Elements

It is often useful to represent numerical information in the form of characters distributed over the visible area. The characters are usually chosen from the most easily represented font for a given device, the criteria being:

  1. The character resembles the object of study (eg the use of plotting-points to represent stars),
  2. the character has a certain "Density" or opacity (eg for use in lineprinter "Surface" mappings etc),
  3. the character is numeric and by its value serves to identify contours, flow-lines etc,
  4. the character is "Unbiased" in that it has rotational symmetry (eg the asterisk, the plotting-point etc).

In these instances the character is not an element in a text-string as such. Consequently, for the above purposes, the concept, current plotting position is still relevant and the following character plotting subroutines will print one character so that its lower left-hand corner, or that of its defining, or exscribed, rectangle is at the point (XP,YP), the current plotting position. See Appendix 3 for the SMOG character set and character codes, see (6.3.2) for selection of font and (5.4) for reassignment of codes.

plot a character, coded 5.1.1
      HPLOT(I) 

plots the character with code number "I" with its lower left-hand corner at (XP,YP) - the exceptions being those characters (see Section 5.4.2 and Section 5.1.3) which are centred upon (XP,YP).

plot a character, explicit 5.1.2
      HPLOTS('S') 

plots the one-element string "S" located as in (5.1.1). There is no "Keyboard representation" for the explicit specification of the plotting-point.

The following commands are equivalent:

(a)   CALL HPLOTS('S')
(b)   DATA I/'S'/
      ..........
      CALL HPLOTS(I)
plot a point 5.1.3
      PLOTPT 

this subroutine will cause the printing of the "Plotting-point" (a small circular dot) at the current plotting position (XP,YP). The character will be centred upon (XP,YP). Since this routine generates a low-level FR80 control word no reallocation of an entry in the text-table in TEXTAB is required (see 5.4).

NB The plotting of single characters in the above contexts leaves the current plotting position (XP,YP) unchanged.

5.2 Characters as Elements of Text-strings

The FR80 is capable of very high quality text-printing and a subset of the SMOG system is devoted to typing commands (as opposed to drawing commands, that is). Although no distinct "Current typing position" pointer is maintained by the system, it is helpful to refer to a purely notional pointer (XT,YT) when we are considering the printing of text with no drawing commands interspersed.

See (6.3.2) for font selection and (5.4) for reassignment of codes. The character codes can be found in Appendix 3.

print a text string 5.2.1
      HTEXT(N,LOC) 

prints "N" characters from core location "LOC", starting at (XT,YT) on the output medium. If the last call was to a plotting subroutine then (XT,YT) = (XP,YP) ie in this case the text is printed from the current plotting position. Here "N" is the number of characters to be printed at this call and "LOC" is one of the following:

  1. a literal string, eg
    1. 9HEUPHONIUM or
    2. 'CLAVICHORD'
    which replaces LOC explicitly as an argument of HTEXT(N,LOC)
  2. a variable or an element in an ARRAY containing FORTRAN STRING characters read in, perhaps, from data at run time or initialised as follows:
    1. DATA LCH/4HARCH/ or
    2. DATA JCH/14HEXISTENTIALISM/
    where JCH is a previously dimensioned array.

Note: The "4H" FORMAT here and in the following example is a consequence of the "COMPRESS INTEGER" mode in which SMOG operates - see the parameter "PD" in Appendix 2. Characters are packed four to an INTEGER location and eight to a REAL location.

The pointer (XT,YT) is reset to the end of the last character and, if further text output commands follow, concatenation of the two strings occurs, Any plotting command will take (XP,YP) as its starting point, lines will be plotted as though the text were not there and (XT,YT) will be the most recent Value of (XP,YP) when printing or typing is resumed.

Example:

      DIMENSION ITEXT(20) 
      READ(1,10)(ITEXT(I),I=1,18)
 10   FORMAT(18A4)

with a data file on channel 1 beginning:

IN THE 'SIXTIES SURELY NO SERIOUS PHILOSOPHY STUDENT COULD HAVE FAILED T
O HAVE BEEN AMUSED WHEN READING THE REVOLTING MESSES OF ORTEGA Y GA

will load the array ITEXT(I). Subsequently the instructions:

      CALL HTEXT(2,'NO BIAS PLEASE - WE ARE FROM MARS') 
      CALL HTEXT(26,ITEXT(12))                            5.2.2

will cause:

NO STUDENT COULD HAVE FAILED

to be printed upon the output medium, starting at the point (XP,YP) if these happen to be an isolated pair of printing instructions. However, if printing has occurred immediately before this then the output string will be appended ie it will start at (XT,YT).

Precisely the same effect can be obtained by any of the following examples:

CALL HTEXT(28,'NO STUDENT COULD HAVE FAILED')          5.2.3
CALL HTEXT(28,28HNO STUDENT COULD HAVE FAILED)         5.2.4
CALL HTEXT(28,'NO STUDENT COULD HAVE FAILED AT ALL')   5.2.5
CALL HTEXT(28,35HNO STUDENT COULD HAVE FAILED AT ALL)  5.2.6

In each case resetting of the notional pointer (XT,YT) takes place in anticipation of more text but the calling of a plotting routine will reset (XP,YP) and destroy (XT,YT).

The following two subroutines are for the "Typing" (ie printing as opposed to plotting) of single characters:

type a character, coded 5.2.7
      HTYPE(I) 

this prints SMOG character number "I" at (XT,YT) and resets (XT,YT) by one character space in anticipation of more text.

type a character, explicit 5.2.8
      HTYPES('S') 

this prints the single-element string "S" at (XT,YT) and resets (XT,YT) in the same way as 5.2.7. In each case the lower left-hand vertex of the exscribed rectangle defines the "Position" of the character.

It is often necessary to print, as a text-string, a number stored in core in machine coded form. This is not a trivial operation since the process involves decoding and re-encoding before the number can be included in the printing instruction. The "Typing" of a number is performed by the following two subroutines:

type a number 5.2.9
      TYPNB(X,A,B) 

prints the number "X" as a character string starting from (XT,YT). The form in which the number is to be represented is indicated by the values "A" and "B", their interpretation being as follows:

A = 0.0:               E-FORMAT, field width B+7
B = 0.0:               I-FORMAT, field width A+1
A ≠ 0.0, B ≠ 0.0:      F-FORMAT, field width A+B+2 

A places and sign before and B places after the point.

type an integer 5.2.10
      JTYPEN(N,I) 

prints the INTEGER "N" as a character string of field width I+1.

In both of these cases it is the number field that is left justified to the point (XT,YT).

5.3 Text Format Control

The SMOG system allows control of character font, size, spacing, orientation etc whenever the selected main device has the facility to implement the user's choice. (The limitations of the lineprinter, for example, as a graphic output device are that character font, orientation, spacing and size are fixed.) Format control is effected by the following subroutines:

set character height 5.3.1
      CHHT(Y) 

sets the height of the defining (exscribed) rectangle to be "Y" units in the selected region. The user may reassign the character codes, defining his own subset of the FR80 character set (see Section 5.4); the setting Y=0.0 causes the height to be defined by the current setting of the character spacing (5.3.3).

A more practical method of setting character size is given in 5.3.6.

set line spacing 5.3.2
      LNSP(DY) 

defines the spacing between the character base-lines in successive lines to be "DY" units in the selected region.

set character spacing 5.3.3
      CHSP(X) 

defines character spacing to be "X" units in the current Region. Note the effects of the following two subroutines:

use "Typewriter spacing" 5.3.4
      MONO 

interprets all subsequent character spacing instructions (whether they be from within the SMOG system or from the user) as being: "The distance between the left-hand sides of the exscribed rectangles of adjacent characters", ie the usual typewriter spacing and selects mono-spacing for any subsequent text output. This is the default option.

Mono-spaced text

Mono-spaced text
Full image ⇗
© UKRI Science and Technology Facilities Council
use proportional spacing 5.3.5
      PROP 

interprets all subsequent character spacing instructions as being: "The distance between adjacent sides of the characters' exscribed rectangles" and selects proportional spacing for any subsequent text output.

Proportional-spaced text

Proportional-spaced text
Full image ⇗
© UKRI Science and Technology Facilities Council
set character size 5.3.6
      CHSIZE(Y)
      JCHSIZ(IY) 

this sets character height to be "Y" units in the current region and then sets the character and line spacing to "standard" values, based upon this height, so as to provide an aesthetically pleasing format with economy. Calls to the subroutines MONO and PROP remain effective when this subroutine is called.

repeat linefeed 5.3.7
      HLINES(N) 

issues "N" linefeed instructions, resetting the typing position (XT,YT) to (XP,YT - N*DY) where "DY" is set by the last call to LKSP or CHSIZE. The user may thus set a block of type left-justified to a margin defined by an initial call to SETX(AMARG) (see 4.1.4) followed by his text output.

new page 5.3.8
      HPAGE 

resets typing position to: "Top line, left margin, new page" and uses the subroutine ADVFLM (6.3.5). The effect is, of course, dependent upon which SMOG device has been initialised since the left-hand margin position is different for each device.

newline character 5.3.9
      NLCHAR('S') 

the single-character string "S" is interpreted as the instruction to issue a linefeed and carriage return to XP on the selected device.

Note: Displacement is as set by CALL LNSP(DY), (5.3.2) or CALL CHSIZE (I) (5.3.6)

"S" can be any character in the SMOG character set or any character from the reassigned set that the user may have assembled in the text-table (see Section 5.4). Since this character must be included in the input text-string, the user must be careful to count it when setting up FORTRAN READ instructions etc. The interpretation of "S" as "Linefeed" continues until either:

      CALL NLCHAR('P') 

is encountered with "P" ≢ "S" or

      CALL NLCHAR(-1)
      

is encountered, which is the default setting in which the linefeed character is defined as character code 63 ( ← on the 1906A)

The effect of not having defined a newline character differs according to the SMOG device selected. For example, the Tektronix 4010 display issues its own linefeed if text output reaches a right-hand margin whilst on the FR80 printing continues out of the visible area, re-appearing through the opposed side as though wrapping around the frame.

Example: 5.3.10

      CALL NLCHAR('T')
      CALL HTEXT(24,'THEN - TRY TO, SEE METALLIC HYDRIDES - THEIR MORPHOLOGY')
      CALL NLCHAR('A')
      CALL HTEXT(20,29HL-A . . WET AN' COLD AN' SMOG)
      

will cause:

HEN -
RY
0, SEE ME
ALL-
. . WET
N' COLD

to be printed.

set character orientation 5.3.11
      CHOCT(R) 

on the FR80 this subroutine defines a rotation of "R" units of π/4 to be applied to each character that is subsequently printed. R is rounded and assigned to a type INTEGER variable in the range (0,7). R = 0.0 is the default setting. The rotation is anticlockwise with respect to a "Normally" orientated character and is not related to the last call to CHOCT(R). Proportional spacing does not work if an odd multiple of π/4 is selected.

5.4 User-defined Character Sets

The "SMOG Character Codes" are, in fact, the local "Host-machine" internal character code representations. Hence the 64-entry table for the 1906A reflects that machine's restriction to 64 (6-bit) printable characters. From the FR80 character table in Appendix 3 it is evident that the two-digit hexadecimal coding for characters allows the printing of upper and lower case letters and many "Special" characters. It is possible to reassign the Host-machine codes so that, in a particular program, the user may print characters from this extended set. He is still restricted in respect of the total number of characters available to him at any one time. The recoding is achieved by constructing a "Look-up" table locally in the SMOG COMMON BLOCK named TEXTAB. At initialisation the table is loaded with the FR80 codes for the lineprinter characters, each being indexed by the Host-machine's code for that character. On the 1906A, replacing the upper case alphabet by the lower case, for example, requires the following coding:

      COMMON/TEXTAB/LOWERC(64)                   5.4.1
      DO 10 I = 1,26 
      LOWERC(I+33) = I+96+256 
  10  CONTINUE 

It is necessary to add in the 256 in order to set the "Top" bit in the FR80 representation for printing characters. It is not necessary to add the 256 for control characters, eg linefeed. A further example appears in Appendix 3.

See 6.3.2 for the select font control routine.

A set of characters which is centred upon the current point (XT,YT) is provided on the FR80. These are useful for graphs, probability distributions, etc. The characters available, as well as the plotting dot (see 5.1.3) are:

Centred-up character       FR80 code                          5.4.2
                         Octal    Decimal
-  (minus)                340       224
*  (asterisk)             341       225
+  (plus)                 342       226
.  (full stop)            343       227
0  (letter 0)             344       228
X  (letter X)             345       229
⇑ 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