User guide

Chapter 9
The Design of Cintcode
The original version of Cintcode was a byte stream interpretive code designed to be
both compact and capable of efficient interpretation on small 16 bit machines machines
based on 8 bit micro processors such as the Z80 and 6502. Versions that ran on the BBC
Microcomputer and under CP/M were mar keted by RCP Ltd [2]. The current version
of Cintcode was extended for 32 bit implementations of BCPL and mainly differs from
the original by the provision of 32 bit operand s and the removal of a size restriction of
the global vector.
There is now also a version of Cintcode for 64-bit implementations of BCPL. This is
almost identical to the 32-bit version. A nineth Cintcode regis te r (MW) has been added.
This is normally zero but can be set by a new Cintcode instruction (MW), see below.
On 64-bit implementations, the instructions that take four byte immediate operands,
namely KW, LLPW, LW, LPW, SPW, APW, and AW, sign extend the four byte imme di ate
operand before adding the MW register into the senior half of the 64-bit r e su l t before
resetting the MW to zero. In this version static variables are allocated in 64-bit 8 byte
aligned locati on s.
The Cintcode machine has nine registers as shown in figure 9.1.
B
C
P
G
ST
PC
Count
A
Stack frame Global vector Program area
Registers
MW
Figure 9.1: The Cintcode machine
155