From 9c2e03466d80a7c1af2a5a9dbaa6acfa426f8a03 Mon Sep 17 00:00:00 2001 From: izydorst Date: Sat, 6 Mar 2004 13:35:29 +0000 Subject: [PATCH] - a new sample program (GetID is a Hello World in GEOS :) git-svn-id: svn://svn.cc65.org/cc65/trunk@2900 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- samples/geos/getid.c | 37 +++++++++++++++++++++++++++++++++++++ samples/geos/getidres.grc | 6 ++++++ 2 files changed, 43 insertions(+) create mode 100644 samples/geos/getid.c create mode 100644 samples/geos/getidres.grc diff --git a/samples/geos/getid.c b/samples/geos/getid.c new file mode 100644 index 000000000..efcbc7221 --- /dev/null +++ b/samples/geos/getid.c @@ -0,0 +1,37 @@ + +/* + This is an example program for GEOS. + It reads GEOS serial number and prints it on the screen. + + Maciej 'YTM/Elysium' Witkowiak + 05.03.2004 +*/ + +#include +#include +#include + +const graphicStr Table = { + NEWPATTERN(0), MOVEPENTO(0,0), RECTANGLETO(320,199), GSTR_END }; + +void Exit(void) { + exit(0); +} + +void Menu = { + (char)0, (char)14, (int)0, (int)28, (char)(HORIZONTAL|1), + CBOLDON "quit", (char)MENU_ACTION, &Exit }; + +int main(void) { + + dispBufferOn = ST_WR_FORE; + + GraphicsString(&Table); + cputsxy(0,3,CBOLDON "Your Serial Number is:"); + cputhex16(GetSerialNumber()); + + DoMenu(&Menu); + MainLoop(); + // will never reach this point... + return 0; +} diff --git a/samples/geos/getidres.grc b/samples/geos/getidres.grc new file mode 100644 index 000000000..d2d60ad33 --- /dev/null +++ b/samples/geos/getidres.grc @@ -0,0 +1,6 @@ +HEADER APPLICATION "getid" "GetId" "V1.0" { +mode any +dostype USR +author "Maciej Witkowiak" +info "This is an example." +}