]> git.sur5r.net Git - cc65/blob - samples/geos/getid.c
goto.c warning fix for implicit truncation
[cc65] / samples / geos / getid.c
1 /*
2     This is an example program for GEOS.
3     It reads GEOS serial number and prints it on the screen.
4
5     Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl>
6     05.03.2004
7 */
8
9
10 #include <stdlib.h>
11 #include <geos.h>
12 #include <conio.h>
13
14 const graphicStr Table = {
15     NEWPATTERN(0), MOVEPENTO(0, 0), RECTANGLETO(320, 199), GSTR_END };
16
17 void Exit(void)
18 {
19     exit(0);
20 }
21
22 void Menu = {
23     (char)0, (char)14, (int)0, (int)28, (char)(HORIZONTAL|1),
24     CBOLDON "quit", (char)MENU_ACTION, &Exit };
25
26 int main(void)
27 {
28     dispBufferOn = ST_WR_FORE;
29
30     GraphicsString(&Table);
31     cputsxy(0, 3, CBOLDON "Your Serial Number is:");
32     cputhex16(GetSerialNumber());
33
34     DoMenu(&Menu);
35     MainLoop();
36
37     // will never reach this point...
38     return 0;
39 }