My "hello world" code in a file named hellogfx.c is:
Code: Select all
#include <stdio.h>
#include <graphics.h>
int main(void)
{
clg();
printf("%cH", 27); // ESC H = VT100 cursor home
printf("\n\n graphics demo");
plot(360, 128);
draw(10, 10, 710, 10);
drawto(710, 250);
drawto(10, 250);
drawto(10, 10);
circle(360, 128, 80, 10);
getchar();
clg();
printf("%c1", 27); // ESC 1 = switch on status bar
printf("%ce", 27); // ESC e = show cursor
return 0;
}
Code: Select all
@echo off
set files=hellogfx.c
zcc +cpm -subtype=pcw80 -create-app %files% -o hellogfx.com