Rev 3306 | Rev 3866 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3306 | leency | 1 | #define MEMSIZE 0x8E80 |
3067 | leency | 2 | #include "..\lib\kolibri.h" |
3 | #include "..\lib\strings.h" |
||
4 | #include "..\lib\file_system.h" |
||
5 | |||
3109 | leency | 6 | #ifndef AUTOBUILD |
7 | #include "lang.h--" |
||
8 | #endif |
||
3067 | leency | 9 | |
10 | ///////////////////////////////////////////////////////////////////////////////////////// |
||
11 | ///////////////////////// область данных //////////////////// |
||
12 | ///////////////////////////////////////////////////////////////////////////////////////// |
||
13 | |||
14 | struct ioctl_struct |
||
15 | { |
||
16 | dword handle; |
||
17 | dword io_code; |
||
18 | dword input; |
||
19 | dword inp_size; |
||
20 | dword output; |
||
21 | dword out_size; |
||
22 | }; |
||
23 | |||
24 | #define DEV_ADD_DISK 1 //input = structure add_disk_struc |
||
25 | #define DEV_DEL_DISK 2 //input = structure del_disk_struc |
||
26 | |||
27 | struct add_disk_struc |
||
28 | { |
||
29 | dword DiskSize; // in sectors, 1 sector = 512 bytes. Include FAT service data |
||
30 | unsigned char DiskId; // from 0 to 9 |
||
31 | }; |
||
32 | |||
33 | struct del_disk_struc |
||
34 | { |
||
35 | unsigned char DiskId; //from 0 to 9 |
||
36 | }; |
||
37 | |||
38 | |||
39 | ioctl_struct ioctl; |
||
40 | add_disk_struc add_disk; |
||
41 | del_disk_struc del_disk; |
||
42 | |||
43 | int driver_handle; |
||
44 | |||
45 | ///////////////////////////////////////////////////////////////////////////////////////// |
||
46 | ///////////////////////// код //////////////////// |
||
47 | ///////////////////////////////////////////////////////////////////////////////////////// |
||
48 | #include "t_console.c" |
||
49 | #include "t_window.c" |
||
50 | |||
51 | |||
52 | void main() |
||
53 | { |
||
3306 | leency | 54 | debug("========= tmpdisk 0.45 ========="); |
3067 | leency | 55 | driver_handle = LoadDriver("tmpdisk"); |
56 | if (driver_handle==0) |
||
57 | { |
||
3440 | leency | 58 | notify("error: /rd1/1/drivers/tmpdisk.obj driver loading failed"); |
3067 | leency | 59 | notify("program terminated"); |
60 | ExitProcess(); |
||
61 | } |
||
3440 | leency | 62 | |
3067 | leency | 63 | |
64 | if (param) |
||
65 | Console_Work(); |
||
66 | else |
||
67 | Main_Window(); |
||
68 | |||
69 | |||
70 | ExitProcess(); |
||
71 | } |
||
72 | |||
73 | stop: |