2013-03-01 14:00:21 +01:00
|
|
|
|
#define MEMSIZE 0x8E80
|
2012-11-26 16:26:15 +01:00
|
|
|
|
#include "..\lib\kolibri.h"
|
|
|
|
|
#include "..\lib\strings.h"
|
|
|
|
|
#include "..\lib\file_system.h"
|
|
|
|
|
|
2012-12-15 01:28:00 +01:00
|
|
|
|
#ifndef AUTOBUILD
|
|
|
|
|
#include "lang.h--"
|
|
|
|
|
#endif
|
2012-11-26 16:26:15 +01:00
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
///////////////////////// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ////////////////////
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
struct ioctl_struct
|
|
|
|
|
{
|
|
|
|
|
dword handle;
|
|
|
|
|
dword io_code;
|
|
|
|
|
dword input;
|
|
|
|
|
dword inp_size;
|
|
|
|
|
dword output;
|
|
|
|
|
dword out_size;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#define DEV_ADD_DISK 1 //input = structure add_disk_struc
|
|
|
|
|
#define DEV_DEL_DISK 2 //input = structure del_disk_struc
|
|
|
|
|
|
|
|
|
|
struct add_disk_struc
|
|
|
|
|
{
|
|
|
|
|
dword DiskSize; // in sectors, 1 sector = 512 bytes. Include FAT service data
|
|
|
|
|
unsigned char DiskId; // from 0 to 9
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct del_disk_struc
|
|
|
|
|
{
|
|
|
|
|
unsigned char DiskId; //from 0 to 9
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ioctl_struct ioctl;
|
|
|
|
|
add_disk_struc add_disk;
|
|
|
|
|
del_disk_struc del_disk;
|
|
|
|
|
|
|
|
|
|
int driver_handle;
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
///////////////////////// <20><><EFBFBD> ////////////////////
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
#include "t_console.c"
|
|
|
|
|
#include "t_window.c"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void main()
|
|
|
|
|
{
|
2013-03-01 14:00:21 +01:00
|
|
|
|
debug("========= tmpdisk 0.45 =========");
|
2012-11-26 16:26:15 +01:00
|
|
|
|
driver_handle = LoadDriver("tmpdisk");
|
|
|
|
|
if (driver_handle==0)
|
|
|
|
|
{
|
|
|
|
|
notify("error: /rd1/1/lib/tmpdisk.obj driver loading failed");
|
|
|
|
|
notify("program terminated");
|
|
|
|
|
ExitProcess();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
debug("tmpdisk.obj driver loaded successfully");
|
|
|
|
|
|
|
|
|
|
if (param)
|
|
|
|
|
Console_Work();
|
|
|
|
|
else
|
|
|
|
|
Main_Window();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExitProcess();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
stop:
|