How was the first compiler written?
I heard about the chicken and the egg and bootstrapping. I have a few questions.
What wrote the first compiler that converted something into binary instructions?
Is assembly compiled or translated into binary instructions?
...I
How was the first compiler written?
I heard about the chicken and the egg and bootstrapping. I have a few questions.
What wrote the first compiler that converted something into binary instructions?
Is assembly compiled or translated into binary instructions?
...I'd find it hard to believe they wrote a compiler in binary.
Assembly instructions are (generally) a direct mapping to opcodes, which are (multi-)byte values
of machine code that can be directly interpreted by the processor. It is quite possible to
write a program in opcodes directly by looking them up from a table (such as
this one for the 6039 microprocessor, for example) that lists them with the
matching assembly instructions, and hand-determining memory
addresses/offsets for things like jumps.
The first programs were done in exactly this fashion - hand-written opcodes.
However, most of the time it's simpler to use an assembler to "compile" assembly code, which
automatically does these opcode lookups, as well as being helpful in computing addresses/offsets
for named jump labels, et cetera.
The first assemblers were written by hand. Those
assemblers could then be used to assemble more
complicated assemblers, which could then be use to
assemble compilers written for higher-level
languages, and so on. This process of iteratively writing the tools to simplify
the creation of the next set of tools is called (as mentioned by David Rabinowitz in his answer)
From Wikipedia, the free encyclopedia
Jump to: navigation, search
In computer science, an opcode (operation code) is the portion of a machine language
instruction that specifies the operation to be performed.
From Wikipedia, the free encyclopedia
(Redirected from Op-code)
Jump to: navigation, search
In computer science, an opcode (operation code) is the portion of a machine language
instruction that specifies the operation to be performed.
3 Software instruction sets
4 See also
Their specification and format are laid out in the instruction set architecture (ISA) of the
processor in question (which may be a general CPU or a more specialized processing unit). Apart
from the opcode itself, an instruction normally also has one or more specifiers for operands (i.e.
data) on which the operation should act, although some operations may have implicit operands,
or none at all. There are instruction sets with nearly uniform fields for opcode and operand
specifiers, as well as others (the x86 architecture for instance) with a more complicated, varied
length structure. 
Depending on architecture, the operands may be register values, values in the stack, other
memory values, I/O ports, etc., specified and accessed using more or less complex addressing
modes. The types of operations include arithmetics, data copying, logical operations, and
program control, as well as special instructions (such as CPUID and others).
Assembly language, or just assembly, is a low-level programming language, which uses
mnemonics, instructions and operands to represent machine code. This enhances the readability
while still giving precise control over the machine instructions. Most programming is currently
done using high-level programming languages, which are typically easier to read and write.
These languages need to be compiled (translated into assembly language), or run through other
Software instruction sets
Opcodes can also be found in so called byte codes and other representations intended for a
software interpreter rather than a hardware device. These software based instruction sets often
employ slightly higher-level data types and operations than most hardware counterparts, but are
nevertheless constructed along similar lines. Examples include the byte code found in Java class
files which are then interpreted by the Java Virtual Machine (JVM), the byte code used in GNU
Emacs for compiled LISP code,.NET Common Intermediate Language (CIL), and many others
How were the first compilers made?
I always wonder this, and perhaps I need a good history lesson on programming
languages. But since most compilers nowadays are made in C, how were the very first
compilers made (AKA before C) or were all the languages just interpreted?
With that being said, I still don't understand how even the first assembly language
was done, I understand what assembly language is but I don't see how they got the
VERY first assembly language working (like, how did they make the first commands
(like mov R21) or w/e set to the binary equivalent?
Ha, I've done this. 