|
|
#1 |
|
Senior Member
Professional user
Join Date: Aug 2004
Location: Greece
Posts: 164
|
Hi everyone!
Does anyone knows how programming languages, like assembly, c, c++, pascal and etc, created? |
|
|
|
|
|
#2 |
|
Member
Advanced member
Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 39
|
Here might be quite a good place to start;
http://www.antlr.org/ And eventually that will lead you to; http://compilers.iecc.com/crenshaw/ Assembly is a different kettle of fish altogether since it doesn't need all the complicated parsers and things, it'll just translate pretty much directly into machine code. |
|
|
|
|
|
#3 |
|
Senior Member
Professional user
Join Date: Aug 2004
Location: Greece
Posts: 164
|
About assembly: I thing it was the first programming language (machine language). How it was created the first pro. language(assembly)? I mean, to create a language, you need again a programming language?
|
|
|
|
|
|
#4 |
|
Member
Expert member
Join Date: Aug 2003
Location: Eslöv, Sweden
Posts: 93
|
Assebler isn't really a language, it is just instructions for the CPU to interpret. The CPU is really good at handling numbers (internally represented in binary format), it's really all it can do. Humans on the other hand arent that good at it and thus give instructions names.
Every instruction is really just representing a number and when the CPU gets that number it knows what to do. Example of concept: Say the instructions mova corresponds to opcode 1, movb corresponds to 2 and sub to 3. Code:
mova 5 ; Put 5 in register a movb 3 ; Put 3 in register b sub ;; reg a = reg a - reg b The asm above would really just be a stream of integers for the CPU to handle: 1 5 2 3 3 |
|
|
|
|
|
#5 |
|
Member
Advanced member
Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 39
|
Indeed. If you're as old as me you'll remember a ZX Sepctrum game called Ant Attack. On the author's homepage he's got information about the game, including how he wrote the game without an assembler by compiling the assembly language instructions down to machine code by hand. Rather him than me!
http://sandywhite.co.uk/fun/ants/AAsource.htm |
|
|
|
|
|
#6 |
|
Member
Expert member
Join Date: Aug 2003
Location: Eslöv, Sweden
Posts: 93
|
In the really old days programmers used punch-cards to program.
A hole/no hole in the card could represent a binary digit, and consequently the "assembler" of those days could simply be a human with a small pointy stick and a good sense of math. http://www.fourmilab.ch/documents/univac/cards.html |
|
|
|
|
|
#7 |
|
Junior Member
Member
Join Date: Oct 2004
Posts: 23
|
Well actualy it start with a need ;-)
..lex and Yack do a nice job to understand how to make... (reading it itself already does ;-) The rest is upto the intepreter and compiler.. Not that difficult the crazy part starts with complex objects and optimalization... Norman.
__________________
--- set vertex $cornflakes |
|
|
|
|
|
#8 |
|
Junior Member
Junior member
Join Date: Jun 2005
Posts: 5
|
Research Fortran, it was the first "high level" language....
__________________
God is real unless integer I speak Engrish |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|