Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1085 | pj | 1 | -------------------------------------- |
2 | DOS_fXXX Demo |
||
3 | |||
4 | by |
||
5 | |||
6 | Paolo Gai pj@sssup.it |
||
7 | and |
||
8 | Gabriele Bolognini gabrieleb@sssup.it |
||
9 | 2001 |
||
10 | |||
11 | -------------------------------------- |
||
12 | |||
13 | The DOS_fXXX functions provided into ll/i386/x-dos.h are a few |
||
14 | shortcuts that can be used to call INT21's DOS calls. |
||
15 | |||
16 | These functions can be used to read and write files before/after |
||
17 | the kernel goes into i386 protected mode. |
||
18 | |||
19 | THEY CANNOT BE USED IF YOU BOOT WITH GRUB. |
||
20 | |||
21 | -------------------------------------- |
||
22 | |||
23 | The demo is composed by: |
||
24 | |||
25 | MAKEFILE The makefile used to compile the application; |
||
26 | dosfs is the rule to compile the application |
||
27 | README.TXT This file |
||
28 | INITFILE.C The init file (only RR) |
||
29 | DOSFS.C The DOS_fread and DOS_fwrite demo |
||
30 | |||
31 | -------------------------------------- |
||
32 | |||
33 | The demo works as follows: |
||
34 | - Into __kernel_register_levels__() the demo reads up to 1000 bytes from |
||
35 | myfile.txt |
||
36 | - Then, into the main() function it prints the contents of the buffer at |
||
37 | screen |
||
38 | - Finally, at the end of the system it writes a file called myfile.out |
||
39 | with up to 30 of the first bytes of the buffer |
||
40 | |||
41 | The demo should work on any processor speed, and does not use keyboard or |
||
42 | graphics. |
||
43 | |||
44 | Bug: at the moment (01 Jun 2001) sometimes the demo hangs when using |
||
45 | the one-shot timer. |
||
46 |