Subversion Repositories Kolibri OS

Rev

Rev 5598 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5598 Rev 5621
1
//Asper
1
//Asper
2
#ifndef INCLUDE_LIBIO_H
2
#ifndef INCLUDE_LIBIO_H
3
#define INCLUDE_LIBIO_H
3
#define INCLUDE_LIBIO_H
4
 
4
 
5
#ifndef INCLUDE_KOLIBRI_H
5
#ifndef INCLUDE_KOLIBRI_H
6
#include "../lib/kolibri.h"
6
#include "../lib/kolibri.h"
7
#endif
7
#endif
8
 
8
 
9
#ifndef INCLUDE_DLL_H
9
#ifndef INCLUDE_DLL_H
10
#include "../lib/dll.h"
10
#include "../lib/dll.h"
11
#endif
11
#endif
12
 
12
 
13
//library
13
//library
14
dword libio = #alibio;
14
dword libio = #alibio;
15
char alibio[21] = "/sys/lib/libio.obj\0"; //"libio.obj\0";
15
char alibio[21] = "/sys/lib/libio.obj\0"; //"libio.obj\0";
-
 
16
?define LIB_IO_LOAD_ERR "Error while loading library /rd/1/lib/libio.obj"
16
 
17
 
17
dword libio_init = #alibio_init;
18
dword libio_init = #alibio_init;
18
dword file_size  = #afile_size;
19
dword file_size  = #afile_size;
19
dword file_open = #afile_open;
20
dword file_open = #afile_open;
20
dword file_read  = #afile_read;
21
dword file_read  = #afile_read;
21
dword file_close = #afile_close;
22
dword file_close = #afile_close;
22
$DD 2 dup 0
23
$DD 2 dup 0
23
 
24
 
24
 
25
 
25
//import  libio                     , \
26
//import  libio                     , \
26
char alibio_init[9] = "lib_init\0";
27
char alibio_init[9] = "lib_init\0";
27
char afile_size[11]  = "file_size\0";
28
char afile_size[11]  = "file_size\0";
28
char afile_open[12] = "file_open\0";
29
char afile_open[12] = "file_open\0";
29
char afile_read[11]  = "file_read\0";
30
char afile_read[11]  = "file_read\0";
30
char afile_close[12] = "file_close\0";
31
char afile_close[12] = "file_close\0";
31
 
32
 
32
//align 4
33
//align 4
33
//dword fh=0;
34
//dword fh=0;
34
 
35
 
35
#define O_BINARY  0
36
#define O_BINARY  0
36
#define O_READ    1
37
#define O_READ    1
37
#define O_WRITE   2
38
#define O_WRITE   2
38
#define O_CREATE  4
39
#define O_CREATE  4
39
#define O_SHARE   8
40
#define O_SHARE   8
40
#define O_TEXT    16
41
#define O_TEXT    16
41
 
42
 
42
#define SEEK_SET  0
43
#define SEEK_SET  0
43
#define SEEK_CUR  1
44
#define SEEK_CUR  1
44
#define SEEK_END  2
45
#define SEEK_END  2
45
 
46
 
46
#endif
47
#endif