User guide

Chapter 10
The Design of Sial
Sial is an internal intermediate assembly language designed for BCPL. The first version
was called Cial ( Compac t Internal Assembly Language) was pronounced “seal”. It was
essentially an assembly language for Ci ntcode with the same function code mnemonics
and the same abstract machine registers. It was soon found that rather than having a
variety of codes to load an integer c ons tant (such as L0, L1, L2, LM1, LW, LH or L), it was
better to have one function code to load positive integers and another for negative ones
with the values sp e c i fie d by operands. This form is more convenient for tr ansl at i on and
easier to compress. The new language is called Sial (also pron ouce d “seal”) with the S
standing for smaller. Sial therefore has fewer function codes than Cintcode and most
of them take operands but stil l uses the same abstract machine regis te r s. Although
Cintcode load instructi ons save the value of the A register in B before setting A, Sial
loads typically do not. The curre nt version of Sial has not yet been updated to deal
with the extended BCPL features such as floating point and op:= assignments.
As as e x amp l e of the use of Sial, consider the program com/hello.b which is as
follows:
GET "libhdr"
LET start() = VALOF
{ writef("Hello*n")
RESULTIS 0
}
This can be translated into Sial using bcpl2sial com/hello.b to hello.sial. The
resulting file is:
F104
F113 K5 C115 C116 C97 C114 C116
F111 L1
F112 M9001
F32 P3 G94
F11 K0
F77
F107 M9001 K6 C72 C101 C108 C108 C111 C10
F106 K1 G1 L1 G94
F105
171