Autor
| New programming language ccz80
|
Dinoneno msx novice Mensajes: 19 | Publicado: Abril 03 2008, 19:08   |
Now released the ccz80 compiler version 2.0.0 with integrated assembler (for generate directly a executable file for Z80, without an external croos assembler) and inline funcions for maximum speed in small functions with none or one arguments.
|
|
PingPong msx professional Mensajes: 834 | Publicado: Abril 05 2008, 13:42   |
inline functions, very good for the slow z80....
|
|
ARTRAG msx master Mensajes: 1563 | Publicado: Abril 05 2008, 14:56   |
Actually, i'd like to know more on this compiler/language before investing time on it.
Or you state something like: "ultra super optimized asm code" or "full support of advanced graphic/music/SFX libraries"
or you risk to not attract a lot of developers.
|
|
Dinoneno msx novice Mensajes: 19 | Publicado: Abril 05 2008, 22:16   |
ccz80 is a generic language for Z80. It has not specialitation for graphics, sound, ... and for nothing specific computer (Spectrum, Amstrad, MSX, ...). The libraries included in the web for MSX and others computers are also generic. There is not difficult write some functions for any kind of develop (game, graphics, ...) in hard assembler if the exists functions aren't useful (they are open source for modifications and adaptations if necessary). My idea is that each community of each computer or each programmer work for build functions.
About speed I invite to review the assembler code generate for a simple program and try write in assembler directly the a program with the same function, and compare.
Actually, I don't like this type of marketing for ccz80: "ultra super optimized asm code" or "full support of advanced graphic/music/SFX libraries", it's too . I prefeer everybody use a little the ccz80, and if a person thinks that is good, the same person can say her idea about ccz80.
Thanks for your sugerences and I hope more ideas.  |
|
ARTRAG msx master Mensajes: 1563 | Publicado: Abril 06 2008, 15:13   |
After having passed 40mins on the manual i can conclude that ccz80 is sort of low level C
that has only 2 types (char and int) and that supports (only) explicit control on loops and array.
More than a macro assembler, but less than bare C (by bare i mean without float and libraries).
Consider that modern C cross compiler pass parameters using de and bc, not only on the stack.
(by modern i mean hitech c 7 years old, while coross compilers like IAR can use all undocumented
instructions and register, including ixh ect, for processing).
I like the * and ** operators, but array support with [] would improve readability of the code.
ps
actually ** is equivalent to *(int*) in C
|
|
Dinoneno msx novice Mensajes: 19 | Publicado: Abril 06 2008, 16:59   |
Yes Artrag, it's correct. The ccz80 is a language adapted to Z80 microprocessor. As Z80 has only register of 8 and 16 bits, ccz80 only works with variables of this sizes. The ccz80 it's not C and don't want be C. Only implements the loops, conditions, etc. with the syntax of C, that is very flexible and easy to implement in a compiler, but ccz80 don't want be C, there are some goods compiler of C for Z80, as z88dk or sdcc (and others that a don't rememeber now). The syntax of ccz80 could be based in Pascal, Basic or another language, but I prefer C.
About the pass of parameter, also the inline functions I think to implement functions of type "register", for pass the parameter in registers directly (more speed, of course), with some conditions (a limited number of parameters, by example). It's a excelent idea, thanks Artrag.
For the undocumented instructions can be another improvement to compiler and integrate assembler.
For the support of arrays with [] I decided not. It's because the programmers (I'm the first) can use the arrays in this mode, and the code generated is less optimized that if the programmer use pointers directly. I prefer force the programmer to use pointers.
It's true, the ** operator is equivalent to *(int *) in C, good observation.
Another time, thanks for your ideas, I will work in them.
|
|
Tanni msx addict Mensajes: 298 | Publicado: Abril 07 2008, 16:59   |
Quote:
| The ccz80 it's not C and don't want be C. Only implements the loops, conditions, etc. with the syntax of C, that is very flexible and easy to implement in a compiler, but ccz80 don't want be C, ... The syntax of ccz80 could be based in Pascal, Basic or another language, but I prefer C.
... the code generated is less optimized that if the programmer use pointers directly. I prefer force the programmer to use pointers.
|
Hello Denoneno!
Its always fine if somebody invents a new programming language.
But why do you prefer C if ''the ccz80 it's not C and dont't want to be C''? If the syntax and the semantics are C (I don't know if the semantics of ccz80 are according to C), then you just reinvented or reimplemented C, giving it the C like looking name ccz80 (reminds me somewhat to ''cease z80''?); if the syntax is like C, but the semantics are not, this could be very confusing to a possible user of your language. One reason for going beyond the machine language level is for increasing the reliability and convenience for the programmer.
Prefering to force someone doesn't sound good either. But regardless of that, it is a well known beginners mistake in C coding to use too many pointers even if you would do better with call by value.
|
|
Dinoneno msx novice Mensajes: 19 | Publicado: Abril 07 2008, 18:13   |
Hello Tanni. Thanks for your interest for ccz80. Excuse me, maybe it's because my English I can't explain my ideas.
The ccz80 ([C]ross [C]ompiler for [Z80]) want be a compiler for the Z80, and so, the data types are equivalent to Z80 register, and the structures are equivalents to the structures that the set of Z80 instructions can be create: conditions, loops, ... As Artrag says, ccz80 is a level over a macroassembler, but it's not a high level compiler. It's a programming languge designed for the Z80. The syntax is based in C, but can be based in Pascal, by example. If the syntax is based in C I write for a assignment "a = 3", if the syntax is based in Pascal I write "a := 3", and if the syntax is based in Basic I write "LET a = 3" (or seemed); but with any syntax the object code generated in assembler is the same. This idea is like the idea of plataform .NET (Visual Basic, C#, J#, etc.) generate the same object code with diferent syntax. From all the syntax I know I choose C.
The objetive of ccz80 is programmer for Z80, with a certain level of abstraction over the machine code, but without be too far of Z80 instructions, because if we are too far the code generated can be innefective. This is also the cause for force using pointer and not operator [], avoid another data type out the 8 and 16 bits, avoid the local variables and the functions in ccz80 code (only in assembler code) with arguments that must be obtained from stack many times, ... and others "bizarre" characteristics of this little language.
Well, I hope my dictionary help me to explain your questions. Thanks.
|
|
LeandroCorreia msx addict Mensajes: 439 | Publicado: Abril 07 2008, 22:36   |
I am interested in a high-level compiled language for creating MSX games in ROM format. Needless to say that I´d need commands for joystick/keyboard input, PSG and graphics. Are there any libraries for these or would I have to use inline assembly to start programming these things?
|
|
nikodr msx addict Mensajes: 446 | Publicado: Abril 08 2008, 04:38   |
Unless there are libraries available that can help with the use and initilization of joy/keyboard psg or vdp stuff,
I would advice you to get tniasm.All you have to do is have this at start of your program
db 0feh
dw startaddress,endadr,executionaddress
org address
and you can easily have bin files.For rom files i think the method is similar
you just supply the rom "header" information ,(the "AB" i think plus whatever is needed.)
ccz80 seems VERY interesting and powerful,but unfortunately i cant follow it easily.I am a very newbie in asm and i would find it difficult to follow the way of mixing c and asm.Maybe later when i advance more i will definitely try it.
Congratulations though to those people that created it the manual seems to be well written,and it seems to have lots of features.
|
|
Dinoneno msx novice Mensajes: 19 | Publicado: Abril 08 2008, 08:50   |
Hello Leandro Correia. The library MSX included in the ccz80 web is very basic. I don't know too the MSX system and I can't make a very well set of functions for it. You can see the MSX library documentation (in downloads section) and evaluate if there are useful for you. Of course, if you know assembler you can write more functions for your purpose or improve the functions in library (they are open source). You can too view the library functions in UnAz page (in links section of ccz80 web).
|
|
Dinoneno msx novice Mensajes: 19 | Publicado: Abril 08 2008, 08:50   |
Hello Nikodr. I am happy you like ccz80. Maybe, if you know functions libraries in assembler for MSX you could adapte them to ccz80. If I can help you, you can contact at mail or forum in contact section in ccz80 web, or this forum if you prefer.
|
|
Dinoneno msx novice Mensajes: 19 | Publicado: Abril 28 2008, 14:51   |
Version 2.0.2 released. It's include some corrections in command line parameters and expressions evaluation.
|
|
snout
 msx legend Mensajes: 4991 | Publicado: Junio 24 2008, 22:52   |
is it me or is the ccz80 site down now?
|
|
cesco msx freak Mensajes: 248 | Publicado: Junio 25 2008, 07:38   |
Quote:
| is it me or is the ccz80 site down now?
|
Yes, I also tried to open it yesterday and it gives a 404 Error code written in Spanish... I used to access the website via the URL www.ccz80.tk
However the forum is still alive ( http://ccz80.foroactivo.com/ccz80-f1/) |
|
|
|
|