[fpc-pascal] Freepascal 2.0 for cygwin

Marc Santhoff M.Santhoff at t-online.de
Mon Aug 22 14:58:33 CEST 2005


Am Montag, den 22.08.2005, 14:12 +0200 schrieb Anton Tichawa:
> Marc Santhoff wrote:
> 
> >Am Sonntag, den 21.08.2005, 16:19 -0700 schrieb L505:
> >  
> >
> >>>The first compilers were written in assembly language. This allowed
> >>>      
> >>>
> >>for
> >>    
> >>
> >>>the next generation compilers to be written in a high level language.
> >>>      
> >>>
> >>And the assembly language was just magically inserted into the memory
> >>with that magic script?
> >>
> >>At some point it comes to a hardware etching level, I'm guessing.
> >>    
> >>
> >
> >Yes, "assembling" is the task of translating mnemonic codes to
> >hexadecimal byte codes that are what is called "machine language". The
> >programs doing this automatically are called assemblers.
> >
> >  
> >
> In fact, it's translating mnemonics and syntactical constructs to 
> -binary- codes; hexadecimal is just a notation often used in object 
> files and by monitor programs.

You're right, lousy or inadequate expression - hex is only a form of
presentation for binary data. Facts are clear to me, I had to learn
programming by manually assembling 8080 codes. =:)

> >The machine language has to be put in the program memory of the machine
> >in question. That can be done via burning an EPROM or similar, by poking
> >bytes in hex in via the system monitor, ...
> >
> >Often the first compilers (and interpreters) ported to a new machine
> >in that ancient times were forth engines, because the core of such thing
> >is only a few kilobytes big. An it can compile compilers and anything
> >else.
> >
> >  
> >
> Assembler, often considered "low-level", introduces symbolic 
> programming, i. e. assigning names and syntax to binary patterns. Isn't 
> that a bigger invention (or abstraction) than that of high-level 
> languages? I mean, isn't the step from binary programming to assembler 
> larger than the step from assembler to HLLs?

That depends on the language given for comparison. If you compare simple
languages there no big diference to using a macro assembler (that's
another step in abstraction, isn't it?), but some are really far away
from mnemonics.

The biggest gap between assembler mnemonics and a so called high level
language is the abstraction from the underlying machine, you're free to
use and maybe define abstract data types. The next step was object
orientation, comparing Wirths Pascal to Smalltalk makes clear what I
want to say with that.

> >Is all this forgotten nowadays? 
> >
> >Marc
> >  
> >
> Every year, new layers, APIs etc. are built on top of old ones, sinking 
> them into the almost unconscious. It's not yet completely forgotten, but 
> doesn't it seem to become an esoteric science? Most programmers today 
> see some API or platform as their working base, which is IMHO like 
> standing on a cloud - they don't see the transistors etc.

I hope you're wrong with this assumption. Having understood some basic
thing like Flip-Flops and the like really helps in writing efficient
programs.

>  Would they be 
> capable to build a computer from scratch? A mechanical cash register? A 
> hydraulic-based computer?
> 
> But you can't make money with that comprehensive knowledge.

That depends, too. I'm involved in bringing small embedded systems "to
life", even if programming is done in C I couldn't make them run without
some deeper knowledge.

>  And, the 
> advance in electronics hides the disadvantages of current software 
> structure with it's many layers, wasting time and memory, and 
> sacrificing simple, understandable structures. A computer with 2 GHz, 
> booting in 2 minutes, spends 240 000 000 000 cycles, doing almost 
> nothing in a terribly complicated way. That's crazy if you see the whole 
> thing. But who cares?

Some people do. Power "consumption" really is a topic.

Current developement is moving away from rare frequency to multi
processing system. So it's going slower but even more complicated. ;)

IMHO developers would do good in improving overall performance of their
programmes, but Intel and AMD and others are happy the way it is.

> There will be, in a few years, a stop in the increase of hardware 
> performance, dictated by quantum theory. How will that change the 
> software development process?

The pure computing power expected from quantum computers will surely
help solving some mathematical problems eating up todays CPUs in dozens.
We'll see, I'm looking forward to it.

Marc






More information about the fpc-pascal mailing list