This wiki is being migrated to http://www.github.com/z88dk/z88dk/wiki

User Tools

Site Tools


examples:snippets:world

Hello World example

Note the character code 12 used to clear the screen.

/*
 *	Hello World
 */

#include <stdio.h>

main()
{
	printf("%cHello world!\n",12);
}

Running on the ZX Spectrum

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:

Running on the ZX 81 in FAST mode

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:

Running on the MSX

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/world.txt · Last modified: 2007/11/28 08:24 (external edit)