]> git.sur5r.net Git - cc65/blob - samples/geos/getid.c
New feature missing_char_term
[cc65] / samples / geos / getid.c
1
2 /*
3     This is an example program for GEOS.
4     It reads GEOS serial number and prints it on the screen.
5
6     Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl>
7     05.03.2004
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     exit(0);
19 }
20
21 void Menu = {
22     (char)0, (char)14, (int)0, (int)28, (char)(HORIZONTAL|1),
23     CBOLDON "quit", (char)MENU_ACTION, &Exit };
24
25 int main(void) {
26
27     dispBufferOn = ST_WR_FORE;
28
29     GraphicsString(&Table);
30     cputsxy(0,3,CBOLDON "Your Serial Number is:");
31     cputhex16(GetSerialNumber());
32
33     DoMenu(&Menu);
34     MainLoop();
35     // will never reach this point...
36     return 0;
37 }