Save work

This commit is contained in:
Jørn Guldberg committed 2019-06-25 21:58:35 +02:00
1 parent a5ac220a12
commit ded978bb38
6 files changed
+120 -45

No files matched your search

+51 -16
View File
@@ -18,6 +18,7 @@
#define NUM_DATA_POINTERS 27
void dump_ax(input);
void print_stack(argument);
typedef struct Directory_Table Directory_Table;
typedef struct struct_table_entry struct_table_entry;
@@ -40,16 +41,16 @@ int selector;
struct File_System_Control_Information
{
char filesystem_information[256];
long master_table_index[2];
long this_partition_offset_on_disk[2];
long next_free_sector[2];
long next_uniqe_id[2]; // both files and directories gets this.
long next_sector_reuse_pointer[2];
long last_sector_index_on_partition[2];
long maximum_sectors_on_disk[2];
long sector_size_on_disk[2];
long not_used[48];
char filesystem_information[256];
long master_table_index[2];
long this_partition_offset_on_disk[2];
long next_free_sector[2];
long next_uniqe_id[2]; // both files and directories gets this.
long next_sector_reuse_pointer[2];
long last_sector_index_on_partition[2];
long maximum_sectors_on_disk[2];
long sector_size_on_disk[2];
long not_used[48];
};
@@ -62,8 +63,9 @@ struct test
int argument;
void print(argument);
int main(selector, path, path_segment)
int main(selector, path, path_segment, fsci_lba_index)
int path_segment;
int fsci_lba_index;
char path[256];
{
// selectot should be a "selector" for which disk service
@@ -73,8 +75,10 @@ char path[256];
int local_segment = 0x7e0;
char* local_path = "Hello world\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
struct test my_struct;
char *hello = "LessSimpleFileSystem";
char *fs_info;
char *hello = "LessSimpleFileSystem_Hello";
char *yes = "Read file: ";
int nubmer;
my_struct.first = hello;
@@ -86,10 +90,19 @@ char path[256];
FSCI fsci;
print(my_struct.first);
print(my_struct.second);
strcpy(local_path, local_segment, path, path_segment);
//strcpy(local_path, local_segment, path, path_segment);
print(local_path);
fsci.master_table_index[0] = 32;
dump_ax(fsci.master_table_index[0]);
fsci.master_table_index[0] = 42;
nubmer = 0x55;
//dump_ax(fsci.master_table_index[0]);
dump_ax(nubmer);
fsci.filesystem_information[0] = 'i';
fsci.filesystem_information[1] = '\0';
stub(fsci_lba_index, 1, &fsci, 0x8fc0);
fs_info = fsci.filesystem_information;
//dump_ax(&fsci);
print_stack( fs_info );
//dump_ax(fsci.master_table_index[0]);
}
else
{
@@ -106,12 +119,31 @@ void print(argument)
#asm
push bp
mov bp,sp
mov si,4[bp]
mov si,4[bp]
call 0x0000:0x7C47
pop bp
#endasm
}
void print_stack(argument)
{
#asm
push bp
mov bp,sp
push ds
push ax
mov ax, ss
mov ds, ax
mov si,4[bp]
call 0x0000:0x7C47
pop ax
pop ds
pop bp
#endasm
}
dump_ax_return(input)
void* input;
{
@@ -124,6 +156,9 @@ void* input;
// Force the variable in ax
dump_ax_return(input)
#asm
push bp
mov bp,sp
call 0x000:0x7C2A
pop bp
#endasm
}