diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2017-03-31 19:21:21 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2017-03-31 19:21:21 +0200 |
commit | 8d9279befa4ad3166814b88463f0194575c42f83 (patch) | |
tree | 6f1cee50c09a1a39ce21c78b0c1a75a40c7d7a9d | |
parent | 8d9143162fb19dbd45b2c1deb6a1f7690eaa636f (diff) | |
download | eumel-8d9279befa4ad3166814b88463f0194575c42f83.tar.gz eumel-8d9279befa4ad3166814b88463f0194575c42f83.tar.bz2 eumel-8d9279befa4ad3166814b88463f0194575c42f83.zip |
internals: Add short description of eumel0 machine
-rw-r--r-- | internals.rst | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/internals.rst b/internals.rst index 5653c2a..5f1b062 100644 --- a/internals.rst +++ b/internals.rst @@ -32,3 +32,32 @@ Bootstrapping 5. Generate initial task tree. 6. Save all dataspaces to disk. +Virtual machine +^^^^^^^^^^^^^^^ + +The EUMEL0 machine is a process virtual machine just like Pascal’s p-code +machine or the Java Virtual Machine (JVM). It isolates tasks from each other +and the system. Running native code is not possible. EUMEL0 is a multi address +machine with no general purpose registers and thus data lives in virtual memory +only. A few internal registers like instruction counter, condition flag for +branching, several segment and status registers and a stack pointer exist. + +The CISC instruction set was specifically designed for the high-level language +ELAN. It includes arithmetic operations for ELAN’s primitive datatypes such as +signed and unsigned integer as well as float (REAL) and operations for +bytestrings (TEXT) and dataspaces. However the machine itself does not enforce +datatypes at runtime. The usual control flow operations are accompanied by +ELAN-specific call and return instructions. Special instructions for terminal +and archive disk I/O, exception-like error handling and inter-process +communication (IPC) are available. + +The 54 primary instructions can be encoded with two bytes. They consist of a +6 bit opcode and one short operand. Whenever the latter is longer than 10 bit a +long encoding using two bytes plus operands is used. This format also encodes +42 secondary/special instructions. + +Read more instruction encoding details in chapter two of [kernel83]_ and the +ELAN package `eumel coder`_. + +.. _eumel coder: src/basic/eumel%20coder%201.8.1.html + |