Go Back   AC3D Forums > Other > Off topic
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 16th April 2005, 04:57 PM   #1
Malekovits
Senior Member
Professional user
 
Malekovits's Avatar
 
Join Date: Aug 2004
Location: Greece
Posts: 164
Default Creating a programming language

Hi everyone!

Does anyone knows how programming languages, like assembly, c, c++, pascal and etc, created?
Malekovits is offline   Reply With Quote
Old 19th April 2005, 09:21 PM   #2
monster
Member
Advanced member
 
Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 39
Default

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.
monster is offline   Reply With Quote
Old 8th May 2005, 07:16 AM   #3
Malekovits
Senior Member
Professional user
 
Malekovits's Avatar
 
Join Date: Aug 2004
Location: Greece
Posts: 164
Default

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?
Malekovits is offline   Reply With Quote
Old 11th May 2005, 03:36 PM   #4
PerFnurt
Member
Expert member
 
Join Date: Aug 2003
Location: Eslöv, Sweden
Posts: 93
Default

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
__________________
/Per

www.perfnurt.se
PerFnurt is offline   Reply With Quote
Old 12th May 2005, 11:37 PM   #5
monster
Member
Advanced member
 
Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 39
Default

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
monster is offline   Reply With Quote
Old 16th May 2005, 10:11 AM   #6
PerFnurt
Member
Expert member
 
Join Date: Aug 2003
Location: Eslöv, Sweden
Posts: 93
Default

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
__________________
/Per

www.perfnurt.se
PerFnurt is offline   Reply With Quote
Old 25th May 2005, 03:59 PM   #7
acdep
Junior Member
Member
 
Join Date: Oct 2004
Posts: 23
Default

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
acdep is offline   Reply With Quote
Old 17th June 2005, 03:05 AM   #8
Shockwaveworld
Junior Member
Junior member
 
Join Date: Jun 2005
Posts: 5
Default

Research Fortran, it was the first "high level" language....
__________________
God is real unless integer

I speak Engrish
Shockwaveworld is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 04:14 PM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
(C) Inivis Limited 2010