TempleOS [1] 'shell' operates as a programming environment - what you write is compiled and inserted into the same process that the OS is running as. It's a single address space.
[1] http://www.templeos.org/Wb/Accts/TS/Wb2/TempleOS.html