MikroC vs. MikroPascal

Discuss about beta versions of mikroC compiler.
Post Reply
Author
Message
yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

MikroC vs. MikroPascal

#1 Post by yo2lio » 10 Jul 2007 08:09

Hi,

I have a question: What is the difference between MikroC and MikroPascal compiler?

Are they the same, like Pascal and Basic so you do only a syntax conversion?

Do you achieve a better code (faster) with C? A better memory footprint with C?

Why do you develop all the libraries in C?

Best regards, Florin Medrea.

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: MikroC vs. MikroPascal

#2 Post by zristic » 10 Jul 2007 10:02

yo2lio wrote: I have a question: What is the difference between MikroC and MikroPascal compiler?
In essence, they are the same compiler. What is different is the parsing engine, which reads language code. Optimizer, linker, code generator, simulator, ICD etc. are indetical. The differences in resulting HEX arise because parsing C is generating a different optimizer tree than parsing Pascal or Basic. We are working on this, so in near future we shall equalize them even in this detail.
Are they the same, like Pascal and Basic so you do only a syntax conversion?
Yes, they are, as I said.
Do you achieve a better code (faster) with C? A better memory footprint with C?
You can test it and see it that the differences are minor.
Why do you develop all the libraries in C?
We do not. All libraries exist in Pascal and in C. We keep them in both languages for the sake of testing. Which is firstly written depends on humidity in the air.

Be aware of the fact that C is the industry standard. It is very easy to find implementation for what you need in C language. Often, when we search for resources for our libs, we find lots of code in C. Then we modify such codes for our compiler and finally, translate the resulting lib into Pascal.

Initially, all libraries originated from mikroPascal, today we have no rule. One who writes the new lib is obliged to give the source in both languages.

The only exception was Realtek Ethernet library, which originated in C, but it was impossible to translate it into Pascal since it used ellipses and anonyomous unions which do not exist in Pascal. However, MCL was compatible and the library appeared in mP and mB as well.

mikroBasic is the youngest child in the family and we unfortunately have no time to tranlsate libs into Basic. Fortunately, MCLs are compatible, so we easily add new libs. All the same, testing of mC and mP guarantees that mB will behave the same (it is the same compiler engine, after all).

yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

#3 Post by yo2lio » 10 Jul 2007 10:29

Thanks Zoran !

Post Reply

Return to “mikroC Beta testing”