The Pascal Scripting Engine is an embedded operating system for microcontrollers. It allows the user to program these devices in a high level language, PicoPascal (a subset of Pascal), producing byte-code which is highly compact, cross-platform compatible, and abstracted away from the fiddly low level API of the microprocessor. An onboard inferencing engine allows PicoPascal devices to make inferences about their environment: suitably programmed, emergent behaviour may then arise.