If you want to collaborate with this project you can add new tools and classes.
This is an automatic translation. If you want to help improve the documentation and translate please contact the author. Thank you.
The ccZ80++ language allows you to write programs for computers based on the Zilog microprocessor Z80, such as Amstrad CPC, Amstrad PCW, Spectrum and MSX among the most popular.
Can be used from Windows or also from Linux using WINE or Mono or from Mac using Mono. You need to have installed Microsoft .NET 4 Client Profile or other higher version.
It can be viewed as an evolution of the language ccz80, but ccZ80++ adds definition of classes, use of objects and a syntax closest to the C++ language to allow a more rapid learning.
Main features
Use from Windows, from Linux with WINE or Mono and from Mac with Mono.
Use of Microsoft .NET 4 Client Profile.
Use from the command line.
Allows you to generate code ccz80, assembler and machine code.
Definition of classes and statement and use of objects.
Class inheritance.
Function overload.
Private and public visibility to the members of the classes.
Definition of static members and non-static in the classes.
Use of multiple files for a program.
Management of 8-bit values, 16-bit values and character strings.
Treatment of tables of one or several dimensions of numeric values, strings of text and objects.
Automatic call to init functions of objects.
Allows variable declaration in stack and in static memory.
Using constants of type numeric and text string.
Sentences for structured programming.
Integration with assembler code, directly and through functions.
For more extensive and detailed information of the characteristics refer to the specifications in the downloads section.
The ccz80 + + version of "Hello world" might be the following:
include Text.ccz80++
class Program
{
static void main()
{
Text.PrintString("Hello World");
}
}
An example that uses a definition of class and instance an object:
class Ball
{
const minX = 1, maxX = 32;
const minY = 1, maxY = 24;
short coordX, coordY;
public void SetPosicion(short newX, short newY)
{
if (newX >= minX && newX <= maxX) coordX = newX;
if (newY >= minY && newY <= maxY) coordY = newY;
}
public void MoveLeft()
{
MoveLeft(1);
}
public void MoveLeft(short positions)
{
if (coordX - positions >= minX) coordX -= positions;
else coordX = minX;
}
}
class Main
{
static void main()
{
Ball ball;
ball.SetPosition(10, 12);
ball.MoveLeft();
ball.MoveLeft(3);
}
}
Classes provided
In the downloads section you can obtain a set of classes for use in the programs ccZ80++. These classes include the functions that are provided with the compiler ccz80.
When using one of these classes in a program it is recommended that you observe if at the beginning of your code uses the include statement to use other classes; in that case it will be necessary to download these classes also.
Use licence
The compiler can be used freely for personal use and non-profit organization.
For use in the creation of commercial programs consult with the author of ccZ80++.