world - marinus-lab/z88dk GitHub Wiki
Note the character code 12 used to clear the screen.
/*
* Hello World
*/
#include `<stdio.h>`
main()
{
printf("%cHello world!\n",12);
}
Compile it with the following command:
zcc +zx -lndos -create-app -o hello hello.c
It will make a file named "hello.tap".
When run the progam will produce the following output:
{{examples:snippets:hello.gif|}}
Compile it with the following command:
zcc +zx81 -create-app -o hello hello.c
It will produce a file named "hello.p", with the following output:
{{examples:snippets:hello81.gif|}}
Compile it with the following command:
zcc +msx -create-app hello.c
It will produce a file named "a.msx", which can be transferred onto a disk image and run:
{{examples:snippets:hello_msx.gif|}}