Advertisement
ds84182

bootloader.c

Jul 19th, 2013
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. #pragma CRT ZCRT
  2. #include <drivers/drv_fs.c>
  3. #include <drivers/drv_ccterm.c>
  4.  
  5. void main()
  6. {
  7.     preserve EBX
  8.     term_clear();
  9.     //Load Initial code from filesystem. Put the code after __PROGRAMSIZE__ in another page. Remap page 0 and jump to code.
  10.     MOV *(FS+5), "main.bin"
  11.     term_write("LAWL")
  12.     MOV *(FS+1), EBX
  13.     register float emptyPage;
  14.     emptyPage = __PROGRAMSIZE__/128;
  15.     fceil emptyPage;
  16.     mov *(FS+6),emptyPage*128
  17.     SMAP 0,emptyPage
  18.     jmp 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement