seb15753

kernel.c

Jun 22nd, 2014
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. void _start(void)
  2. {
  3.         int n=1;
  4.         char *b=(char *)0x00000400; //1024*1;
  5.         char *c=(char *)0x00100400; //1024*(1024+1);
  6.         //char *c=(char*)0x01000400; // no problems with that
  7.         //char *c=(char*)0x00100401; // no problems with that
  8.  
  9.         *b=1;
  10.         *c=2;
  11.         if(*b == 2)
  12.         {
  13.                 asm volatile("jmp 0x0\n");//should never be executed. if it is executer
  14.                                           // then virtualbox will crash
  15.         }
  16.         while(1); // if all is ok my kernel does nothing but virtualbox doesn't crash
  17. }
Advertisement
Add Comment
Please, Sign In to add comment