The CodeMe page for better understand Interpreters and Compilers.


Extension to SourceMe and helpful to ShellMe and CompileMe Pages.


Q: Ok. I now know the C Language power, portability etc. What else do I need to know?
A: We need to know about the various ways to talk to the machine.

The C that we referred to in the SourceMe page is in simplified definition a medium-level compiler.

Q: Compiler? Is there another way to process?
A: There are some "combinations" that you need to understand before being more "technological"

The Interpreter processes commands real time, line by line and converts them to a machine level binary language that the Operating System understands.

The Compiler takes the whole document containing commands (which is now called source code) and creates from it at least a binary file that can be called from the OS to operate.

Q: And in what way do the commands or source code vary?
A: Think 3 main variations here:

High level language is the one that is close to the human level syntax and logic.

Medium level language is the one that talks in a way that a processor understands, meaning arithmetic and logical operations, conditions and variables, but Still using a human syntax.

For things to be cleared, a Medium Level Language is still High, but lower than other languages or shells.

Low level language is the way to talk directly to the processor using machine syntax.

So, there are 6 combinations:

Combination
Examples
High - Level Interpreters
Old Basic, Bash Shell, Logo, PERL etc.
High - Level Compilers
QBasic, Turbo Basic, Pascal, Delphi etc.
Medium - Level Interpreters
C Interpreter (yes, there is, too:)
Medium - Level Compilers
C (as we all know it:)
Low - Level Interpreters
debug for dos etc.
Low - Level Assemblers
A normal Assembler

Attention:

Low level interpreter seems oxymoron, but since there are programs that can enter assembly code as binary instructions in memory and order the processor to execute it in real-time, this definition is not wrong.

The language Level Climax is analog. Some languages might be lower than others, but still not medium ones.

High-Low Does Not Define Quality.

Remember for Assembly:

Assembly is Not binary. It's a symbolic, textual (letters and words) representation of the machine code, still human readable.

Every binary file or instruction code in memory can be translated to Assembly or vice versa. That's why the debuggers are used and that's why a good programmer must be able to read and understand, at least in general, Assembly code.

Every processor family comes with it's Assembly code set, totally different between families.

Processors within families (386, Pentium, MMX etc.) have a common (base) code set, nomatter the differences or extentions between them.
MMX for instance is approximately 59 machine code instructions added to the Pentium instructions set, for Multimedia purposes obviously (MultiMedia eXtensions).

Remember for C:

C can be defined in two ways:

Vocabulary and Syntax
C is medium level because it is compact, small and does only use arithmetic and logical operators and conditions. Even to access the standard input-output or compare strings, an external (C or assembly written) library is needed!

Library Functions
If we count the abilities that we have in C from libraries, then C is a High level language, as we can use the external functions just like if they were internal in the compiler.


According to Eric Steven Raymond's "The Art Of Unix Programming" book:
C is where you go when you want to get as close as possible to the bare metal but stay portable.