Browse Source

Fixed some hardcoded things

master
Jørn Guldberg 5 years ago
parent
commit
0a6c743d81
  1. 15
      main.c
  2. 277
      main.s

15
main.c

@ -1,6 +1,5 @@
#include "main.h" #include "main.h"
int main(selector, pointer_parameter_segment, pointer_parameter_struct) int main(selector, pointer_parameter_segment, pointer_parameter_struct)
int selector; int selector;
void* pointer_parameter_segment; void* pointer_parameter_segment;
@ -13,7 +12,7 @@ void* pointer_parameter_struct;
Service_Action service_action; Service_Action service_action;
Directory_Table current_table; Directory_Table current_table;
Parameter_Struct parameter_struct; Parameter_Struct parameter_struct;
int local_segment = 0x7e0; int* local_segment; /* = 0x7e0; */
unsigned int heap_start = 0x2200; unsigned int heap_start = 0x2200;
unsigned int heap_end = 0xffff; unsigned int heap_end = 0xffff;
int stack_segment = 0x8fc0; int stack_segment = 0x8fc0;
@ -21,7 +20,7 @@ void* pointer_parameter_struct;
long index_as_long = 0; long index_as_long = 0;
char *local_path = 0; char *local_path = 0;
FSCI *fsci = 0x2000; FSCI *fsci = global_heap_start - 0x200;
service_action = selector; service_action = selector;
switch (service_action) switch (service_action)
@ -32,13 +31,19 @@ void* pointer_parameter_struct;
What do we need to know: What do we need to know:
Index of FSCI Index of FSCI
*/ */
memcpy(&parameter_struct, stack_segment, pointer_parameter_struct, pointer_parameter_segment, sizeof(Parameter_Struct));
/*fsci = parameter_struct.buffer_segment; */
local_segment = parameter_struct.buffer_segment;
heap_start = parameter_struct.buffer_address + 0x200;
heap_end = parameter_struct.buffer_size;
index_as_long = parameter_struct.data_length;
set_heap_settings(heap_start, heap_end); set_heap_settings(heap_start, heap_end);
index_as_long = pointer_parameter_struct; fsci = global_heap_start - 0x200;
disk_service_read_data_from_disk(index_as_long, (long) 1, fsci, local_segment); disk_service_read_data_from_disk(index_as_long, (long) 1, fsci, local_segment);
print("File System has been loaded: "); print("File System has been loaded: ");
print_newline(); print_newline();
print(fsci->filesystem_information); print(fsci->filesystem_information);
print("16-bit implementation "); print("16-bit implementation v0.2.1");
print_newline(); print_newline();
} break; } break;
case SERVICE_FIND_ENTRY: case SERVICE_FIND_ENTRY:

277
main.s

@ -2577,62 +2577,57 @@ ret
!BCC_EOS !BCC_EOS
! 271 ! 271
! 272 } ! 272 }
! 273 # 4 "main.c" ! 273 # 3 "main.c"
! 4 int main(selector, pointer_parameter_segment, pointer_parameter_struct) ! 3 int main(selector, pointer_parameter_segment, pointer_parameter_struct)
! Register BX used in function lsfs_disk_read_data_from_file ! Register BX used in function lsfs_disk_read_data_from_file
! 5 int selector; ! 4 int selector;
export _main export _main
_main: _main:
!BCC_EOS !BCC_EOS
! 6 void* pointer_parameter_segment; ! 5 void* pointer_parameter_segment;
!BCC_EOS !BCC_EOS
! 7 void* pointer_parameter_struct; ! 6 void* pointer_parameter_struct;
!BCC_EOS !BCC_EOS
! 8 { ! 7 {
! 8
! 9 ! 9
! 10 ! 10
! 11 ! 11
! 12 ! 12 Service_Action service_action;
! 13 Service_Action service_action;
!BCC_EOS !BCC_EOS
! 14 Directory_Table current_table; ! 13 Directory_Table current_table;
!BCC_EOS !BCC_EOS
! 15 Parameter_Struct parameter_struct; ! 14 Parameter_Struct parameter_struct;
!BCC_EOS !BCC_EOS
! 16 int local_segment = 0x7e0; ! 15 int* local_segment;
!BCC_EOS
! 16 unsigned int heap_start = 0x2200;
push bp push bp
mov bp,sp mov bp,sp
push di push di
push si push si
add sp,#-$1014 add sp,#-$1016
! Debug: eq int = const $7E0 to int local_segment = [S+$101A-$101A] (used reg = )
mov ax,#$7E0
mov -$1018[bp],ax
!BCC_EOS
! 17 unsigned int heap_start = 0x2200;
dec sp
dec sp
! Debug: eq int = const $2200 to unsigned int heap_start = [S+$101C-$101C] (used reg = ) ! Debug: eq int = const $2200 to unsigned int heap_start = [S+$101C-$101C] (used reg = )
mov ax,#$2200 mov ax,#$2200
mov -$101A[bp],ax mov -$101A[bp],ax
!BCC_EOS !BCC_EOS
! 18 unsigned int heap_end = 0xffff; ! 17 unsigned int heap_end = 0xffff;
dec sp dec sp
dec sp dec sp
! Debug: eq unsigned int = const $FFFF to unsigned int heap_end = [S+$101E-$101E] (used reg = ) ! Debug: eq unsigned int = const $FFFF to unsigned int heap_end = [S+$101E-$101E] (used reg = )
mov ax,#$FFFF mov ax,#$FFFF
mov -$101C[bp],ax mov -$101C[bp],ax
!BCC_EOS !BCC_EOS
! 19 int stack_segment = 0x8fc0; ! 18 int stack_segment = 0x8fc0;
dec sp dec sp
dec sp dec sp
! Debug: eq unsigned int = const $8FC0 to int stack_segment = [S+$1020-$1020] (used reg = ) ! Debug: eq unsigned int = const $8FC0 to int stack_segment = [S+$1020-$1020] (used reg = )
mov ax,#$8FC0 mov ax,#$8FC0
mov -$101E[bp],ax mov -$101E[bp],ax
!BCC_EOS !BCC_EOS
! 20 int path_length; ! 19 int path_length;
!BCC_EOS !BCC_EOS
! 21 long index_as_long = 0; ! 20 long index_as_long = 0;
add sp,*-6 add sp,*-6
! Debug: eq int = const 0 to long index_as_long = [S+$1026-$1026] (used reg = ) ! Debug: eq int = const 0 to long index_as_long = [S+$1026-$1026] (used reg = )
xor ax,ax xor ax,ax
@ -2640,39 +2635,83 @@ xor bx,bx
mov -$1024[bp],ax mov -$1024[bp],ax
mov -$1022[bp],bx mov -$1022[bp],bx
!BCC_EOS !BCC_EOS
! 22 ! 21
! 23 char *local_path = 0; ! 22 char *local_path = 0;
dec sp dec sp
dec sp dec sp
! Debug: eq int = const 0 to * char local_path = [S+$1028-$1028] (used reg = ) ! Debug: eq int = const 0 to * char local_path = [S+$1028-$1028] (used reg = )
xor ax,ax xor ax,ax
mov -$1026[bp],ax mov -$1026[bp],ax
!BCC_EOS !BCC_EOS
! 24 FSCI *fsci = 0x2000; ! 23 FSCI *fsci = global_heap_start - 0x200;
dec sp dec sp
dec sp dec sp
! Debug: eq int = const $2000 to * struct File_System_Control_Information fsci = [S+$102A-$102A] (used reg = ) ! Debug: sub int = const $200 to unsigned int = [global_heap_start+0] (used reg = )
mov ax,#$2000 mov ax,[_global_heap_start]
! Debug: eq unsigned int = ax-$200 to * struct File_System_Control_Information fsci = [S+$102A-$102A] (used reg = )
add ax,#-$200
mov -$1028[bp],ax mov -$1028[bp],ax
!BCC_EOS !BCC_EOS
! 25 service_action = selector; ! 24 service_action = selector;
! Debug: eq int selector = [S+$102A+2] to int service_action = [S+$102A-8] (used reg = ) ! Debug: eq int selector = [S+$102A+2] to int service_action = [S+$102A-8] (used reg = )
mov ax,4[bp] mov ax,4[bp]
mov -6[bp],ax mov -6[bp],ax
!BCC_EOS !BCC_EOS
! 26 ! 25
! 27 switch (service_action) ! 26 switch (service_action)
mov ax,-6[bp] mov ax,-6[bp]
! 28 { ! 27 {
br .5B br .5B
! 29 case SERIVCE_LOAD_DISK: ! 28 case SERIVCE_LOAD_DISK:
! 30 { ! 29 {
.5C: .5C:
! 30
! 31 ! 31
! 32 ! 32
! 33 ! 33
! 34 ! 34 memcpy(&parameter_struct, stack_segment, pointer_parameter_struct, pointer_parameter_segment, sizeof(Parameter_Struct));
! 35 set_heap_settings(heap_start, heap_end); ! Debug: list int = const $10 (used reg = )
mov ax,*$10
push ax
! Debug: list * void pointer_parameter_segment = [S+$102C+4] (used reg = )
push 6[bp]
! Debug: list * void pointer_parameter_struct = [S+$102E+6] (used reg = )
push 8[bp]
! Debug: list int stack_segment = [S+$1030-$1020] (used reg = )
push -$101E[bp]
! Debug: list * struct Parameter_Struct parameter_struct = S+$1032-$1018 (used reg = )
lea bx,-$1016[bp]
push bx
! Debug: func () void = memcpy+0 (used reg = )
call _memcpy
add sp,*$A
!BCC_EOS
! 35
! 36 local_segment = parameter_struct.buffer_segment;
! Debug: eq unsigned int parameter_struct = [S+$102A-$1014] to * int local_segment = [S+$102A-$101A] (used reg = )
mov bx,-$1012[bp]
mov -$1018[bp],bx
!BCC_EOS
! 37 heap_start = parameter_struct.buffer_address + 0x200;
! Debug: add int = const $200 to unsigned int parameter_struct = [S+$102A-$1012] (used reg = )
mov ax,-$1010[bp]
! Debug: eq unsigned int = ax+$200 to unsigned int heap_start = [S+$102A-$101C] (used reg = )
add ax,#$200
mov -$101A[bp],ax
!BCC_EOS
! 38 heap_end = parameter_struct.buffer_size;
! Debug: eq unsigned int parameter_struct = [S+$102A-$1010] to unsigned int heap_end = [S+$102A-$101E] (used reg = )
mov ax,-$100E[bp]
mov -$101C[bp],ax
!BCC_EOS
! 39 index_as_long = parameter_struct.data_length;
! Debug: eq unsigned int parameter_struct = [S+$102A-$100E] to long index_as_long = [S+$102A-$1026] (used reg = )
mov ax,-$100C[bp]
xor bx,bx
mov -$1024[bp],ax
mov -$1022[bp],bx
!BCC_EOS
! 40 set_heap_settings(heap_start, heap_end);
! Debug: list unsigned int heap_end = [S+$102A-$101E] (used reg = ) ! Debug: list unsigned int heap_end = [S+$102A-$101E] (used reg = )
push -$101C[bp] push -$101C[bp]
! Debug: list unsigned int heap_start = [S+$102C-$101C] (used reg = ) ! Debug: list unsigned int heap_start = [S+$102C-$101C] (used reg = )
@ -2681,15 +2720,15 @@ push -$101A[bp]
call _set_heap_settings call _set_heap_settings
add sp,*4 add sp,*4
!BCC_EOS !BCC_EOS
! 36 index_as_long = pointer_parameter_struct; ! 41 fsci = global_heap_start - 0x200;
! Debug: eq * void pointer_parameter_struct = [S+$102A+6] to long index_as_long = [S+$102A-$1026] (used reg = ) ! Debug: sub int = const $200 to unsigned int = [global_heap_start+0] (used reg = )
mov ax,8[bp] mov ax,[_global_heap_start]
xor bx,bx ! Debug: eq unsigned int = ax-$200 to * struct File_System_Control_Information fsci = [S+$102A-$102A] (used reg = )
mov -$1024[bp],ax add ax,#-$200
mov -$1022[bp],bx mov -$1028[bp],ax
!BCC_EOS !BCC_EOS
! 37 disk_service_read_data_from_disk(index_as_long, (long) 1, fsci, local_segment); ! 42 disk_service_read_data_from_disk(index_as_long, (long) 1, fsci, local_segment);
! Debug: list int local_segment = [S+$102A-$101A] (used reg = ) ! Debug: list * int local_segment = [S+$102A-$101A] (used reg = )
push -$1018[bp] push -$1018[bp]
! Debug: list * struct File_System_Control_Information fsci = [S+$102C-$102A] (used reg = ) ! Debug: list * struct File_System_Control_Information fsci = [S+$102C-$102A] (used reg = )
push -$1028[bp] push -$1028[bp]
@ -2705,7 +2744,7 @@ push -$1024[bp]
call _disk_service_read_data_from_disk call _disk_service_read_data_from_disk
add sp,*$C add sp,*$C
!BCC_EOS !BCC_EOS
! 38 print("File System has been loaded: "); ! 43 print("File System has been loaded: ");
! Debug: list * char = .5D+0 (used reg = ) ! Debug: list * char = .5D+0 (used reg = )
mov bx,#.5D mov bx,#.5D
push bx push bx
@ -2714,11 +2753,11 @@ call _print
inc sp inc sp
inc sp inc sp
!BCC_EOS !BCC_EOS
! 39 print_newline(); ! 44 print_newline();
! Debug: func () void = print_newline+0 (used reg = ) ! Debug: func () void = print_newline+0 (used reg = )
call _print_newline call _print_newline
!BCC_EOS !BCC_EOS
! 40 print(fsci->filesystem_information); ! 45 print(fsci->filesystem_information);
! Debug: cast * char = const 0 to [$100] char fsci = [S+$102A-$102A] (used reg = ) ! Debug: cast * char = const 0 to [$100] char fsci = [S+$102A-$102A] (used reg = )
! Debug: list * char fsci = [S+$102A-$102A] (used reg = ) ! Debug: list * char fsci = [S+$102A-$102A] (used reg = )
push -$1028[bp] push -$1028[bp]
@ -2727,7 +2766,8 @@ call _print
inc sp inc sp
inc sp inc sp
!BCC_EOS !BCC_EOS
! 41 print("16-bit implementation "); ! 46 p
! 46 rint("16-bit implementation v0.2.1");
! Debug: list * char = .5E+0 (used reg = ) ! Debug: list * char = .5E+0 (used reg = )
mov bx,#.5E mov bx,#.5E
push bx push bx
@ -2736,23 +2776,23 @@ call _print
inc sp inc sp
inc sp inc sp
!BCC_EOS !BCC_EOS
! 42 print_newline(); ! 47 print_newline();
! Debug: func () void = print_newline+0 (used reg = ) ! Debug: func () void = print_newline+0 (used reg = )
call _print_newline call _print_newline
!BCC_EOS !BCC_EOS
! 43 } break; ! 48 } break;
br .59 br .59
!BCC_EOS !BCC_EOS
! 44 case SERVICE_FIND_ENTRY: ! 49 case SERVICE_FIND_ENTRY:
! 45 { ! 50 {
.5F: .5F:
! 46 String_Array *path_array; ! 51 String_Array *path_array;
!BCC_EOS !BCC_EOS
! 47 lsfs_file* find_file; ! 52 lsfs_file* find_file;
!BCC_EOS !BCC_EOS
! 48 int i; ! 53 int i;
!BCC_EOS !BCC_EOS
! 49 disk_service_read_data_from_disk(fsci->master_table_index[0], (long) 8 , &current_table, stack_segment); ! 54 disk_service_read_data_from_disk(fsci->master_table_index[0], (long) 8 , &current_table, stack_segment);
! Debug: list int stack_segment = [S+$1030-$1020] (used reg = ) ! Debug: list int stack_segment = [S+$1030-$1020] (used reg = )
push -$101E[bp] push -$101E[bp]
! Debug: list * struct Directory_Table current_table = S+$1032-$1008 (used reg = ) ! Debug: list * struct Directory_Table current_table = S+$1032-$1008 (used reg = )
@ -2772,11 +2812,10 @@ push $100[bx]
call _disk_service_read_data_from_disk call _disk_service_read_data_from_disk
add sp,*$C add sp,*$C
!BCC_EOS !BCC_EOS
! 50 # 59 ! 55 # 64
! 59 ! 64
! 60 ! 65
! 61 memcpy(&parameter_struct ! 66 memcpy(&parameter_struct, stack_segment, pointer_parameter_struct, pointer_parameter_segment, sizeof(Parameter_Struct));
! 61 , stack_segment, pointer_parameter_struct, pointer_parameter_segment, sizeof(Parameter_Struct));
! Debug: list int = const $10 (used reg = ) ! Debug: list int = const $10 (used reg = )
mov ax,*$10 mov ax,*$10
push ax push ax
@ -2793,7 +2832,7 @@ push bx
call _memcpy call _memcpy
add sp,*$A add sp,*$A
!BCC_EOS !BCC_EOS
! 62 path_length = strlen(parameter_struct.path, pointer_parameter_segment); ! 67 path_length = strlen(parameter_struct.path, pointer_parameter_segment);
! Debug: list * void pointer_parameter_segment = [S+$1030+4] (used reg = ) ! Debug: list * void pointer_parameter_segment = [S+$1030+4] (used reg = )
push 6[bp] push 6[bp]
! Debug: list * char parameter_struct = [S+$1032-$1018] (used reg = ) ! Debug: list * char parameter_struct = [S+$1032-$1018] (used reg = )
@ -2804,7 +2843,7 @@ add sp,*4
! Debug: eq int = ax+0 to int path_length = [S+$1030-$1022] (used reg = ) ! Debug: eq int = ax+0 to int path_length = [S+$1030-$1022] (used reg = )
mov -$1020[bp],ax mov -$1020[bp],ax
!BCC_EOS !BCC_EOS
! 63 local_path = malloc(256); ! 68 local_path = malloc(256);
! Debug: list int = const $100 (used reg = ) ! Debug: list int = const $100 (used reg = )
mov ax,#$100 mov ax,#$100
push ax push ax
@ -2815,14 +2854,14 @@ inc sp
! Debug: eq * void = ax+0 to * char local_path = [S+$1030-$1028] (used reg = ) ! Debug: eq * void = ax+0 to * char local_path = [S+$1030-$1028] (used reg = )
mov -$1026[bp],ax mov -$1026[bp],ax
!BCC_EOS !BCC_EOS
! 64 memcpy(local_path, local_segment, parameter_struct.path, pointer_parameter_segment, path_length); ! 69 memcpy(local_path, local_segment, parameter_struct.path, pointer_parameter_segment, path_length);
! Debug: list int path_length = [S+$1030-$1022] (used reg = ) ! Debug: list int path_length = [S+$1030-$1022] (used reg = )
push -$1020[bp] push -$1020[bp]
! Debug: list * void pointer_parameter_segment = [S+$1032+4] (used reg = ) ! Debug: list * void pointer_parameter_segment = [S+$1032+4] (used reg = )
push 6[bp] push 6[bp]
! Debug: list * char parameter_struct = [S+$1034-$1018] (used reg = ) ! Debug: list * char parameter_struct = [S+$1034-$1018] (used reg = )
push -$1016[bp] push -$1016[bp]
! Debug: list int local_segment = [S+$1036-$101A] (used reg = ) ! Debug: list * int local_segment = [S+$1036-$101A] (used reg = )
push -$1018[bp] push -$1018[bp]
! Debug: list * char local_path = [S+$1038-$1028] (used reg = ) ! Debug: list * char local_path = [S+$1038-$1028] (used reg = )
push -$1026[bp] push -$1026[bp]
@ -2830,7 +2869,7 @@ push -$1026[bp]
call _memcpy call _memcpy
add sp,*$A add sp,*$A
!BCC_EOS !BCC_EOS
! 65 local_path[path_length] = 0; ! 70 local_path[path_length] = 0;
! Debug: ptradd int path_length = [S+$1030-$1022] to * char local_path = [S+$1030-$1028] (used reg = ) ! Debug: ptradd int path_length = [S+$1030-$1022] to * char local_path = [S+$1030-$1028] (used reg = )
mov ax,-$1020[bp] mov ax,-$1020[bp]
add ax,-$1026[bp] add ax,-$1026[bp]
@ -2839,7 +2878,7 @@ mov bx,ax
xor al,al xor al,al
mov [bx],al mov [bx],al
!BCC_EOS !BCC_EOS
! 66 print("Read file: "); ! 71 print("Read file: ");
! Debug: list * char = .60+0 (used reg = ) ! Debug: list * char = .60+0 (used reg = )
mov bx,#.60 mov bx,#.60
push bx push bx
@ -2848,7 +2887,7 @@ call _print
inc sp inc sp
inc sp inc sp
!BCC_EOS !BCC_EOS
! 67 print(local_path); ! 72 print(local_path);
! Debug: list * char local_path = [S+$1030-$1028] (used reg = ) ! Debug: list * char local_path = [S+$1030-$1028] (used reg = )
push -$1026[bp] push -$1026[bp]
! Debug: func () void = print+0 (used reg = ) ! Debug: func () void = print+0 (used reg = )
@ -2856,12 +2895,12 @@ call _print
inc sp inc sp
inc sp inc sp
!BCC_EOS !BCC_EOS
! 68 print_newline(); ! 73 print_newline();
! Debug: func () void = print_newline+0 (used reg = ) ! Debug: func () void = print_newline+0 (used reg = )
call _print_newline call _print_newline
!BCC_EOS !BCC_EOS
! 69 ! 74
! 70 path_array = string_split_c(local_path, '/', 0); ! 75 path_array = string_split_c(local_path, '/', 0);
! Debug: list int = const 0 (used reg = ) ! Debug: list int = const 0 (used reg = )
xor ax,ax xor ax,ax
push ax push ax
@ -2876,8 +2915,8 @@ add sp,*6
! Debug: eq * struct String_Array = ax+0 to * struct String_Array path_array = [S+$1030-$102C] (used reg = ) ! Debug: eq * struct String_Array = ax+0 to * struct String_Array path_array = [S+$1030-$102C] (used reg = )
mov -$102A[bp],ax mov -$102A[bp],ax
!BCC_EOS !BCC_EOS
! 71 ! 76
! 72 find_file = calloc(sizeof(lsfs_file), 1); ! 77 find_file = calloc(sizeof(lsfs_file), 1);
! Debug: list int = const 1 (used reg = ) ! Debug: list int = const 1 (used reg = )
mov ax,*1 mov ax,*1
push ax push ax
@ -2890,7 +2929,7 @@ add sp,*4
! Debug: eq * void = ax+0 to * struct lsfs_file find_file = [S+$1030-$102E] (used reg = ) ! Debug: eq * void = ax+0 to * struct lsfs_file find_file = [S+$1030-$102E] (used reg = )
mov -$102C[bp],ax mov -$102C[bp],ax
!BCC_EOS !BCC_EOS
! 73 if ( !lsfs_disk_getattr(find_file, local_path, fsci) ) ! 78 if ( !lsfs_disk_getattr(find_file, local_path, fsci) )
! Debug: list * struct File_System_Control_Information fsci = [S+$1030-$102A] (used reg = ) ! Debug: list * struct File_System_Control_Information fsci = [S+$1030-$102A] (used reg = )
push -$1028[bp] push -$1028[bp]
! Debug: list * char local_path = [S+$1032-$1028] (used reg = ) ! Debug: list * char local_path = [S+$1032-$1028] (used reg = )
@ -2903,8 +2942,8 @@ add sp,*6
test ax,ax test ax,ax
jne .61 jne .61
.62: .62:
! 74 { ! 79 {
! 75 print("File not found"); ! 80 print("File not found");
! Debug: list * char = .63+0 (used reg = ) ! Debug: list * char = .63+0 (used reg = )
mov bx,#.63 mov bx,#.63
push bx push bx
@ -2913,16 +2952,16 @@ call _print
inc sp inc sp
inc sp inc sp
!BCC_EOS !BCC_EOS
! 76 print_newline(); ! 81 print_newline();
! Debug: func () void = print_newline+0 (used reg = ) ! Debug: func () void = print_newline+0 (used reg = )
call _print_newline call _print_newline
!BCC_EOS !BCC_EOS
! 77 } ! 82 }
! 78 else ! 83 else
! 79 { ! 84 {
jmp .64 jmp .64
.61: .61:
! 80 print("File has been read"); ! 85 print("File has been read");
! Debug: list * char = .65+0 (used reg = ) ! Debug: list * char = .65+0 (used reg = )
mov bx,#.65 mov bx,#.65
push bx push bx
@ -2931,14 +2970,14 @@ call _print
inc sp inc sp
inc sp inc sp
!BCC_EOS !BCC_EOS
! 81 print_newline(); ! 86 print_newline();
! Debug: func () void = print_newline+0 (used reg = ) ! Debug: func () void = print_newline+0 (used reg = )
call _print_newline call _print_newline
!BCC_EOS !BCC_EOS
! 82 } ! 87 }
! 83 # 90 ! 88 # 95
! 90 ! 95
! 91 lsfs_disk_read_data_from_file(find_file, parameter_struct.buffer_size, parameter_struct.buffer_address, (long) 0x0, parameter_struct.buffer_segment); ! 96 lsfs_disk_read_data_from_file(find_file, parameter_struct.buffer_size, parameter_struct.buffer_address, (long) 0x0, parameter_struct.buffer_segment);
.64: .64:
! Debug: list unsigned int parameter_struct = [S+$1030-$1014] (used reg = ) ! Debug: list unsigned int parameter_struct = [S+$1030-$1014] (used reg = )
push -$1012[bp] push -$1012[bp]
@ -2957,17 +2996,17 @@ push -$102C[bp]
call _lsfs_disk_read_data_from_file call _lsfs_disk_read_data_from_file
add sp,*$C add sp,*$C
!BCC_EOS !BCC_EOS
! 92 ! 97
! 93 ! 98
! 94 } break; ! 99 } break;
jmp .59 jmp .59
!BCC_EOS !BCC_EOS
! 95 case SERIVCE_READ_DATA: ! 100 case SERIVCE_READ_DATA:
! 96 { ! 101 {
.66: .66:
! 97 # 105 ! 102 # 110
! 105 ! 110
! 106 print("Hit READ case"); ! 111 print("Hit READ case");
! Debug: list * char = .67+0 (used reg = ) ! Debug: list * char = .67+0 (used reg = )
mov bx,#.67 mov bx,#.67
push bx push bx
@ -2976,13 +3015,13 @@ call _print
inc sp inc sp
inc sp inc sp
!BCC_EOS !BCC_EOS
! 107 } break; ! 112 } break;
jmp .59 jmp .59
!BCC_EOS !BCC_EOS
! 108 case SERIVCE_WRITE_DATA: ! 113 case SERIVCE_WRITE_DATA:
! 109 { ! 114 {
.68: .68:
! 110 print("Hit WRITE case"); ! 115 print("Hit WRITE case");
! Debug: list * char = .69+0 (used reg = ) ! Debug: list * char = .69+0 (used reg = )
mov bx,#.69 mov bx,#.69
push bx push bx
@ -2991,14 +3030,14 @@ call _print
inc sp inc sp
inc sp inc sp
!BCC_EOS !BCC_EOS
! 111 } break; ! 116 } break;
jmp .59 jmp .59
!BCC_EOS !BCC_EOS
! 112 case SERIVCE_WRITE_FS_INFO: ! 117 case SERIVCE_WRITE_FS_INFO:
! 113 { ! 118 {
.6A: .6A:
! 114 ! 119
! 115 print(fsci->filesystem_information); ! 120 print(fsci->filesystem_information);
! Debug: cast * char = const 0 to [$100] char fsci = [S+$102A-$102A] (used reg = ) ! Debug: cast * char = const 0 to [$100] char fsci = [S+$102A-$102A] (used reg = )
! Debug: list * char fsci = [S+$102A-$102A] (used reg = ) ! Debug: list * char fsci = [S+$102A-$102A] (used reg = )
push -$1028[bp] push -$1028[bp]
@ -3007,15 +3046,15 @@ call _print
inc sp inc sp
inc sp inc sp
!BCC_EOS !BCC_EOS
! 116 ! 121
! 117 } break; ! 122 } break;
jmp .59 jmp .59
!BCC_EOS !BCC_EOS
! 118 ! 123
! 119 default: ! 124 default:
! 120 { ! 125 {
.6B: .6B:
! 121 print("Default case: "); ! 126 print("Default case: ");
! Debug: list * char = .6C+0 (used reg = ) ! Debug: list * char = .6C+0 (used reg = )
mov bx,#.6C mov bx,#.6C
push bx push bx
@ -3024,7 +3063,7 @@ call _print
inc sp inc sp
inc sp inc sp
!BCC_EOS !BCC_EOS
! 122 dump_ax(service_action); ! 127 dump_ax(service_action);
! Debug: list int service_action = [S+$102A-8] (used reg = ) ! Debug: list int service_action = [S+$102A-8] (used reg = )
push -6[bp] push -6[bp]
! Debug: func () void = dump_ax+0 (used reg = ) ! Debug: func () void = dump_ax+0 (used reg = )
@ -3032,10 +3071,10 @@ call _dump_ax
inc sp inc sp
inc sp inc sp
!BCC_EOS !BCC_EOS
! 123 } ! 128 }
! 124 } ! 129 }
! 125 ! 130
! 126 return 0; ! 131 return 0;
jmp .59 jmp .59
.5B: .5B:
add sp,*-6 add sp,*-6
@ -3060,9 +3099,9 @@ pop di
pop bp pop bp
ret ret
!BCC_EOS !BCC_EOS
! 127 ! 132
! 128 } ! 133 }
! 129 ! 134
! Register BX used in function main ! Register BX used in function main
.6C: .6C:
.6D: .6D:
@ -3090,7 +3129,7 @@ ret
.byte 0 .byte 0
.5E: .5E:
.73: .73:
.ascii "16-bit implementation " .ascii "16-bit implementation v0.2.1"
.byte 0 .byte 0
.5D: .5D:
.74: .74:

Loading…
Cancel
Save