os161-1.99
 All Data Structures
segments.c
00001 /*
00002  * Demonstrate different segments.
00003  */
00004 #include <unistd.h>
00005 
00006 #define N   (200)
00007 
00008 int x = 0xdeadbeef;
00009 int t1;
00010 int t2;
00011 int t3;
00012 int array[4096];
00013 char const *str = "Hello World\n";
00014 const int z = 0xabcddcba;
00015 
00016 struct example {
00017   int ypos;
00018         int xpos;
00019 };
00020 
00021 int
00022 main()
00023 {
00024         int count = 0;
00025         const int value = 1;
00026         t1 = N;
00027         t2 = 2;
00028         count = x + t1;
00029         t2 = z + t2 + value;
00030 
00031         reboot(RB_POWEROFF);
00032         return 0; /* avoid compiler warnings */
00033 }
 All Data Structures