Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 710 → Rev 711

/programs/develop/open watcom/trunk/clib/h/kolibri.h
99,8 → 99,29
 
#endif
 
typedef struct
{ unsigned attr;
unsigned flags;
unsigned cr_time;
unsigned cr_date;
unsigned acc_time;
unsigned acc_date;
unsigned mod_time;
unsigned mod_date;
unsigned size;
unsigned size_high;
} FILEINFO;
 
 
unsigned init_heap(void);
void *user_alloc(unsigned size);
unsigned user_free(void *);
 
int create_file(const char *name);
int get_fileinfo(const char *name,FILEINFO* pinfo);
int read_file (const char *name,void *buff, unsigned offset, unsigned count,unsigned *reads);
int write_file(const char *name,const void *buff,unsigned offset,unsigned count,unsigned *writes);
 
#pragma aux init_heap = \
"mov EAX, 68" \
"mov EBX, 11" \
108,10 → 129,6
value [EAX] \
modify [ EBX ];
 
void *user_alloc(unsigned size);
 
void *user_alloc(unsigned size);
 
#pragma aux user_alloc = \
"mov EAX, 68" \
"mov EBX, 12" \
119,8 → 136,6
parm [ ECX ] value [EAX] \
modify [ EBX ];
 
unsigned user_free(void *);
 
#pragma aux user_free = \
"mov EAX, 68" \
"mov EBX, 13" \
128,6 → 143,78
parm [ ECX ] value [EAX] \
modify [ EBX ];
 
#pragma aux create_file = \
"push 0" \
"push 0" \
"mov [esp+1], eax" \
"push 0" \
"push 0" \
"push 0" \
"push 0" \
"push 2" \
"mov ebx, esp" \
"mov eax, 70" \
"int 0x40" \
"add esp, 28" \
parm [EAX] value [EAX] \
modify [ EBX ];
 
#pragma aux get_fileinfo = \
"push 0" \
"push 0" \
"mov [esp+1], eax" \
"push ebx" \
"push 0" \
"push 0" \
"push 0" \
"push 5" \
"mov ebx, esp" \
"mov eax, 70" \
"int 0x40" \
"add esp, 28" \
parm [EAX] [ebx] value [EAX] \
modify [ EBX ];
 
#pragma aux read_file = \
"push 0" \
"push 0" \
"mov [esp+1], eax" \
"push ebx" \
"push edx" \
"push 0" \
"push ecx" \
"push 0" \
"mov ebx, esp" \
"mov eax, 70" \
"int 0x40" \
"test esi, esi" \
"jz skip" \
"mov [esi], ebx" \
"skip:" \
"add esp, 28" \
parm [EAX] [EBX] [ECX] [EDX] [ESI] value [EAX] \
modify [ EBX ];
 
#pragma aux write_file = \
"push 0" \
"push 0" \
"mov [esp+1], eax" \
"push ebx" \
"push edx" \
"push 0" \
"push ecx" \
"push 3" \
"mov ebx, esp" \
"mov eax, 70" \
"int 0x40" \
"test esi, esi" \
"jz skip" \
"mov [esi], ebx" \
"skip:" \
"add esp, 28" \
parm [EAX] [EBX] [ECX] [EDX] [ESI] value [EAX] \
modify [ EBX ];
 
#ifdef __cplusplus
extern "C"
}