Rev 7774 | Rev 8954 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3866 | punk_joker | 1 | #define MEMSIZE 0xA0000 |
3067 | leency | 2 | #include "..\lib\kolibri.h" |
5482 | leency | 3 | #include "..\lib\mem.h" |
4 | #include "..\lib\strings.h" |
||
7219 | leency | 5 | #include "..\lib\fs.h" |
3067 | leency | 6 | |
3109 | leency | 7 | #ifndef AUTOBUILD |
8 | #include "lang.h--" |
||
9 | #endif |
||
3067 | leency | 10 | |
11 | ///////////////////////////////////////////////////////////////////////////////////////// |
||
3975 | leency | 12 | ///////////////////////// Program data //////////////////// |
3067 | leency | 13 | ///////////////////////////////////////////////////////////////////////////////////////// |
14 | |||
15 | struct ioctl_struct |
||
16 | { |
||
17 | dword handle; |
||
18 | dword io_code; |
||
19 | dword input; |
||
20 | dword inp_size; |
||
21 | dword output; |
||
22 | dword out_size; |
||
23 | }; |
||
24 | |||
25 | #define DEV_ADD_DISK 1 //input = structure add_disk_struc |
||
26 | #define DEV_DEL_DISK 2 //input = structure del_disk_struc |
||
27 | |||
28 | struct add_disk_struc |
||
29 | { |
||
30 | dword DiskSize; // in sectors, 1 sector = 512 bytes. Include FAT service data |
||
31 | unsigned char DiskId; // from 0 to 9 |
||
32 | }; |
||
33 | |||
34 | struct del_disk_struc |
||
35 | { |
||
36 | unsigned char DiskId; //from 0 to 9 |
||
37 | }; |
||
38 | |||
39 | |||
40 | ioctl_struct ioctl; |
||
41 | add_disk_struc add_disk; |
||
42 | del_disk_struc del_disk; |
||
43 | |||
44 | int driver_handle; |
||
45 | |||
46 | ///////////////////////////////////////////////////////////////////////////////////////// |
||
3975 | leency | 47 | ///////////////////////// Code //////////////////// |
3067 | leency | 48 | ///////////////////////////////////////////////////////////////////////////////////////// |
49 | #include "t_console.c" |
||
5482 | leency | 50 | #include "t_gui.c" |
3067 | leency | 51 | |
52 | |||
53 | void main() |
||
54 | { |
||
7985 | leency | 55 | if (! driver_handle = LoadDriver("tmpdisk")) |
3067 | leency | 56 | { |
7774 | leency | 57 | notify("'TmpDisk\nError: /rd/1/drivers/tmpdisk.obj driver loading failed\nVirtual disk wouldn't be added' -tE"); |
3067 | leency | 58 | ExitProcess(); |
59 | } |
||
3440 | leency | 60 | |
3067 | leency | 61 | if (param) |
62 | Console_Work(); |
||
63 | else |
||
64 | Main_Window(); |
||
65 | |||
66 | ExitProcess(); |
||
67 | } |
||
68 | |||
69 | stop: |