Subversion Repositories shark

Rev

Rev 40 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 1
/* Project:     OSLib
2
 * Description: The OS Construction Kit
3
 * Date:                1.6.2000
4
 * Idea by:             Luca Abeni & Gerardo Lamastra
5
 *
6
 * OSLib is an SO project aimed at developing a common, easy-to-use
7
 * low-level infrastructure for developing OS kernels and Embedded
8
 * Applications; it partially derives from the HARTIK project but it
9
 * currently is independently developed.
10
 *
11
 * OSLib is distributed under GPL License, and some of its code has
12
 * been derived from the Linux kernel source; also some important
13
 * ideas come from studying the DJGPP go32 extender.
14
 *
15
 * We acknowledge the Linux Community, Free Software Foundation,
16
 * D.J. Delorie and all the other developers who believe in the
17
 * freedom of software and ideas.
18
 *
19
 * For legalese, check out the included GPL license.
20
 */
21
 
22
/*      Only to test if the VM include is OK... */
23
 
24
#include <ll/ll.h>
25
 
26
#define T  1000
40 pj 27
int a;          /* This must be global, otherwise the compiler optimization will
28
                   remove the division by 0...
29
                 */
2 pj 30
 
31
int main (int argc, char *argv[])
32
{
33
/*
34
    DWORD sp1, sp2;
35
    struct ll_initparms parms;
36
    struct multiboot_info *mbi;
37
 
38
    sp1 = get_SP();
39
    parms.mode = LL_PERIODIC;
40
    parms.tick = T;
41
    mbi = ll_init();
42
    event_init(&parms);
43
 
44
    if (mbi == NULL) {
45
            message("Error in LowLevel initialization code...\n");
46
            l1_exit(-1);
47
    }
48
 
49
    ll_end();
50
    sp2 = get_SP();
51
    message("End reached!\n");
52
    message("Actual stack : %lx - ", sp2);
53
    message("Begin stack : %lx\n", sp1);
54
    message("Check if same : %s\n",sp1 == sp2 ? "Ok :-)" : "No :-(");
55
 
56
    return 1;
57
*/
58
    l1_init();
40 pj 59
        a = 1 / 0;      /* Test the exception handler... */
2 pj 60
    l1_end();
61
 
62
    return 1;
63
}