User guide

1.2. A CINTPOS CONSOLE SESSION 7
This shows that the total size of th e compiler is 34,576 bytes and t h at it can be
compiled (on a 1.6GHz Pentium machine) in 0.280 seconds. Since this involves
executing 28,261,599 Cintcode instructi ons, th e rat e is just over 100 milli on Cint-
code instructions per second with the current interpreter.
1.2 A Ci ntpos Console Session
When the Cintpos system is started (on a machine called meopham) in the di-
rectory Cintpos/cintpos, its opening message is as follows:
meopham$ cintpos
Cintpos System (09 Mar 2010)
0.000 1>
There is a directory called com that holds the BCPL source code of several
Cintpos commands, such as bcpl.b, bench100.b and fact.b. We can inspect
fact.b using the type command as follows.
0.000 1> type com/fact.b
SECTION "fact"
GET "libhdr"
LET f(n) = n=0 -> 1, n*f(n-1)
LET start() = VALOF
{ FOR i = 1 TO 10 DO
writef("f(%i2) = %i8*n", i, f(i))
RESULTIS 0
}
0.000 1>
It can be compiled and r u n as follows.
0.000 1> c bc fact
bcpl com/fact.b to cin/fact hdrs POSHDRS
BCPL (20 Oct 2009)
Code size = 120 bytes
0.020 1> fact
f( 1) = 1
f( 2) = 2
f( 3) = 6
f( 4) = 24
f( 5) = 120
f( 6) = 720
f( 7) = 5040
f( 8) = 40320
f( 9) = 362880
f(10) = 3628800
0.000 1>