📄 file.c
字号:
#include"../include/os.h"
struct file_window *set_file(int fd,
union memory_call_parameter *par)
{
struct file_window *f;
par->open_file_window.file_window_id=fd;
f=&(par->open_file_window.file_window);
f->file.file.server_processor=0;
f->file.file.server_process=2;
f->file.file.file_handler=0;
f->file.proxy.processor=0;
f->file.proxy.process=((fd&0x01)==0)?2:2;
f->file.open_window_id=fd;
f->file.window_base_1=0;
f->file.window_base_2=0;
f->file.window_length=512*1024*1024;
f->file.memory_process=0;
f->file.right=READ_WRITE;
RESET_CAPABILITY(f->file.capability);
RESET_CAPABILITY(par->open_file_window.process_capability);
f->file.read_in_flag=TRUE;
f->file.swap_out_flag=TRUE;
return f;
}
void init_file(void )
{
int i;
REG r;
for(i=0;i<48;i++){
set_file(i,get_memory_parameter());
r.ax=0;r.bx=0;
call_memory(&r);
print("\n open file",i);
print(",memory processor process result is ",
r.cx);
r.ax=0;r.bx=11;r.cx=OPEN_FILE;r.dx=i;
RESET_CAPABILITY(get_memory_parameter()
->control_file_system.capability);
call_memory(&r);
print("\n file system result is ",r.ax);
}
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -