Languages: Difference between revisions

[unchecked revision][unchecked revision]
Line 40:
This is a red herring. There is no such thing as an "interpreted language". A language can be implemented using some kind of interpreter or compiler, you would have to check the specific details of that project to know whether it is suitable.
 
You may from time to time hear of operating systems written in languages which are usually interpreted, or which used an interpreter of some sort: JavaOS, [http://en.wikipedia.org/wiki/Genera_%28operating_system%29 Genera] (the Symbolics Lisp Machine OS), Smalltalk-80, UCSD Pascal, the various FORTHForth systems, etc. Most of these fall into one of three categories :
* The operating system runs in a low-level interpreter, written in Assembly or some systems language like C, which is what actually interacts with the hardware. In effect, the 'operating system' is just an application running on top of another, lower-level OS. Smalltalk-80, UCSD Pascal, and some Java OSes work like this, though they also have some modules which are compiled to native code as well (see below).
 
* All or part of the code has been compiled to native code. This may involve using a sub-set of the language with reduced runtime requirements (e.g., [http://www.citeulike.org/user/hamish/article/201596 pre Scheme], or [http://www.squeak.org/features/vm.html Slang] - while they have not been used for OS development to date, they do demonstrate this sort of low-level implementation language which can be used this way).
** '''FORTHForth'''-based operating systems are a special case of this. While FORTHForth is usually described as an interpreted language, the [http://en.wikipedia.org/wiki/Threaded_code threaded-code interpreters] many FORTH systems use work differently from most other interpreters; in effect, the interpreter walks through the various FORTHForth 'words' that the code is comprised of until it reaches the low-level words that are implemented in assembly or compiled code, which is what actually gets executed. Furthermore, FORTHForth systems incorporate a special sort of assembler, which produces code specifically meant to be used by the interpreter; also, commonly used 'words' can be compiled into native code as needed. Finally, many embedded FORTHForth systems use special-purpose hardware (see below) to support the language.
 
* The system ran on specialized hardware and microcode, which acted as hardwired 'interpreter' for it's primary language, or for the portable bytecode which it normally used. This type of system includes the SOAR (Smalltalk On A RISC), the Recursiv System, The Lillith Modula-2 System, and the Burroughs 6500 (a mainframe designed for running Algol-60 in the 1960s). The system programming techniques for these cannot work on stock hardware. For example:
Anonymous user