C compiler??

Página 2/4
1 | | 3 | 4

Por HansO

Paladin (672)

Imagen del HansO

24-01-2005, 22:38

The version at Hisoft webpage is 3.09 for CP/M. There is a version patched somehow for MSX-DOS 1 (still with no folder support), the 3.10. Maybe that you can find that at Funet.
Yea, its on funet. But also un the Uzix download page! Pierre Gielen started the work on MSX-DOS version and libraries.

I don't know any more libraries for C. Maybe that people thinking in C at MSX should try PASCAL as it plenty of libs to do anything, and there is a very good compiler.
Yup, Turbo Pascal 3 and 3.3 and all those include files are great!
Its my favorite for MSX hybrid development.

There is also MSX C V1.0 and 1.1 by ASCII. Not the most standard version of C, but a version especially for MSX-DOS (2).

Por Manuel

Ascended (18154)

Imagen del Manuel

24-01-2005, 23:26

We used Pierre Gielens libraries indeed. They are pretty complete and easy to extend. They are on FUNet, AFAIK. We were able to make a normal graphical game with it. Smile

Por MicroTech

Champion (385)

Imagen del MicroTech

25-01-2005, 09:29

Does anybody know if there is a good C compiler on MSX? I used to code in ASM (in the early days of UMF/ROM... ), but since i left the MSX development, i continued on C language on PC (dos/windows).

Hi Roald,
I use Ascii MSX C v1.2, I don't know the other C compilers so I can't make comparisons but I can tell you in short what I find good and bad in this compiler.

Good Smile
- generates very fast and efficent code (take a look at 3D-CUBE in download section: that's 98% C + 2% ASM)
- produces assembly output of compiled code which can be modified or just only taken as example to "look how it works"
- based on M80 and L80 so you can link together C, ASM or whatever .REL module
- libraries (with source) available (take a look at http://home.wanadoo.nl/fvu/Projects/Msx/Web/msx.htm to get an idea)

Bad :(
- function prototypes must be K&R style
- no float support, only 8 and 16 bits variables (with math library you get also 32 bits long)
- care must taken when passing arguments to functions, I don't know if function parameter checking works correctly, I simply don't use it

I say that Ascii C is sometimes a bit particular but once you learn how to work with it it can give satisfaction.


Unfortunately my ASM knowledge has left my brain ;-)

I think asm programming is like going by bike... once you learn you never forget, you must simply try a little and everything will return to your memory.

Hope this can be useful
MicroTech

Por MSi

Resident (62)

Imagen del MSi

25-01-2005, 12:47

ok thanks everybody for the information! i'm going to check everything out and see what version works best for me!!

Por pitpan

Prophet (3145)

Imagen del pitpan

25-01-2005, 17:12

I think that C or Pascal need too much extra work to produce decent things, at least, if speed is desired/required. Z80 assembler is both easy and amusing and there are now plenty of assemblers and documentations around. And if you were a asm coder, you will remember it in just a couple of weeks!

Por AuroraMSX

Paragon (1901)

Imagen del AuroraMSX

28-01-2005, 09:20

I tried the SDCC package, but after disassembling my hllwrld.c, I decided not to continue with that assembler! The only two general purpose registers it knows are A and HL and all variables / calculations are done via the stack... You'll need to do a lot of work to have SDCC generate some usefull (fast and compact) code.

SDCC uses a pretty strict stack machine approach indeed. My main problem with SDCC is that it does not use normal Z80 syntax for assembly but some weird syntax from a completely different uP.

HiTech's assembler is pretty complete, although I can't get macro's to work like they should Sad HiTech also uses a stack approach, btw, and uses IX (and IY) to refer to local variables, parameters etc. This is not the most efficient way to address variables, but it's flexible and allows interesting stuff like recursion Smile
If you definitely do not want all your variables to be on stack, you can always make them static. Not very nice, but it works...

/me would like to see a better C compiler tho.

Por HansO

Paladin (672)

Imagen del HansO

28-01-2005, 09:30

BDS C is one of the oldest and quite popular C compilers for CP/M.

It is now in the public domain including all sources and documentation and libraries from the author Leor Zolman at
http://www.bdsoft.com/resources/bdsc.html

I once (1988 or so) had a version running on MSX-DOS, I used it more on CP/M though. Abandoned it in favor of Pascal.

Worth a try since it is production quality and completely accessible.

Por AuroraMSX

Paragon (1901)

Imagen del AuroraMSX

28-01-2005, 09:56

BDS C -> K&R syntax for function headers Sad

OTOH, the source code of the compiler is there, so one can always try to code ANSI style function headers into the compiler Tongue

Por dhau

Paragon (1570)

Imagen del dhau

28-01-2005, 16:45

C sucks on micros. It doesn't make sence, just like assembler doesn't make any sence on modern PC. From what's available, Hitech C and SOLiD C are the best of the bunch. But it's only good for "proof of concept" projects. If, however, someone will come up with some sort of accelerated Z80 plug-in replacement, that runs at 50+ MHz, it might make more sence

Por pitpan

Prophet (3145)

Imagen del pitpan

28-01-2005, 19:01

That's exactly what I think, dhau. C architecture needs 16/32 bit processors and piles of RAM to work fine. Of course, a nice math coprocessor helps a lot, and several MHz also. Let's say that it is good if you are running, at least, a 80286 at 12 MHz and 640 KB RAM.

For MSX, just use plain Z80 asm. Fastest. Reliable. Fun!!!!

About asm for PC, I still think that it has its own field of use, specially for BIOS, drivers and that stuff. And also for fun, check it at http://www.robsy.net/pc.htm
Lovely SPACE INVADERS arcade emulator in only 1976 bytes. Quite fast!

Página 2/4
1 | | 3 | 4