for example, length computations, because otherwise a byte address of 2^16 or more would be treated as a 2s-complement signed value resulting in erroneous calculation of lengths or offsets. An individual process had access to up to 254 code segments of up to 32K words each. The code segments were divided into two domains: the first 191 were "system" segments shared by all processes, and the remaining 63 were "user" segments shared by all running the same program. Control transfer specified either an routine number within the current segment, or an external segment number and a routine number within it. A small table at the end of the segment provided the entry point address for the routine. A process's code acted on data in the stack, a single private segment also up to 32K words in size. Unlike stacks in other architectures, the HP 3000 stack was used for process globals, state preservation, procedure locals (supporting nested calls and re-entrancy), and numeric computation/evaluation. The operating system provided facilities for access to additional memory-based (non-stack) data segments, but these were not natively addressed by the instruction set and so the program was responsible for moving data from and to such "extra data segments" as necessary. SPL included a variety of support systems to allow programs to be easily segmented and then make that segmentation relatively invisible in the code. The primary mechanism was to use the compiler directive which defined which segment the following code should be placed in. The default was , but the programmer could add any number of additional named segments to organize the code into blocks. Other features SPL included a "bit-extraction" feature that allowed simplified bit fiddling. Any bit, or string of bits, in a word could be accessed using the syntax, where x and y were the start and end bit positions from 0 to 15. (Significantly, x and y must be constants known at compile time.) Thus returned the lower byte of the word storing A. This format could be used to split and merge bits as needed. Additionally, additional operations were provided for shifts and rotates, and could be applied to any variable with the , for instance . Example This simple program, from the 1984 version of the reference manual, shows most of the features of the SPL language. The program as a whole is delimited between the and . It begins