From 3a448579305f60d3486ed2e8242ccf447c4d84c0 Mon Sep 17 00:00:00 2001 From: "SPraid (simba)" Date: Wed, 21 Mar 2007 18:36:27 +0000 Subject: [PATCH] git-svn-id: svn://kolibrios.org@424 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/boot/bootcode.inc | 4 +++ kernel/trunk/boot/shutdown.inc | 12 ++++++-- kernel/trunk/gui/skincode.inc | 28 ++++++++++++++++++- kernel/trunk/gui/skindata.inc | 2 +- kernel/trunk/kernel.asm | 51 ++++++++++++++++++++++++---------- kernel/trunk/kernel16.inc | 6 ++++ kernel/trunk/vmodeld.inc | 17 ++++++++---- 7 files changed, 96 insertions(+), 24 deletions(-) diff --git a/kernel/trunk/boot/bootcode.inc b/kernel/trunk/boot/bootcode.inc index 89bd7134eb..dc4f2e7f30 100644 --- a/kernel/trunk/boot/bootcode.inc +++ b/kernel/trunk/boot/bootcode.inc @@ -301,6 +301,10 @@ start_of_code: @@: ; \end{diamond}[02.12.2005] + + mov word [cs:bx_from_load - 0x10000], bx ; {SPraid}[13.03.2007] + + ; set up stack mov ax, 3000h mov ss, ax diff --git a/kernel/trunk/boot/shutdown.inc b/kernel/trunk/boot/shutdown.inc index 6ae25c081f..61a389b1aa 100644 --- a/kernel/trunk/boot/shutdown.inc +++ b/kernel/trunk/boot/shutdown.inc @@ -114,7 +114,7 @@ system_shutdown: ; shut down the system jnz newsdt ; 3) load & display rose.txt - mov eax,rosef ; load rose.txt + mov eax,rosef-std_application_base_address ; load rose.txt xor ebx,ebx push 2 pop ecx @@ -123,7 +123,12 @@ system_shutdown: ; shut down the system push 12 pop esi push edi ; may be destroyed - call fileread + + pushad + push eax + call file_system_lfn ; by SPraid fileread + pop eax + popad pop edi pop ecx @@ -530,5 +535,6 @@ shutdowntext: db '4) KERNEL NEU STARTEN ' end if rosef: - db 'ROSE TXT' + dd 0,0,0,1024,0x90000-std_application_base_address + db '/rd/1/ROSE.TXT',0 endg diff --git a/kernel/trunk/gui/skincode.inc b/kernel/trunk/gui/skincode.inc index f25a4995bd..efd43a9660 100644 --- a/kernel/trunk/gui/skincode.inc +++ b/kernel/trunk/gui/skincode.inc @@ -8,9 +8,35 @@ load_skin_file: mov ebx,1 or ecx,-1 mov esi,12 - call fileread +; call fileread + + pushad + push eax + sub edx,std_application_base_address + mov [skin_to_load.adr],edx + + ;sub eax,std_application_base_address + ;mov [skin_to_load.stradr],eax + mov [skin_to_load.stradr],_skin_file_default - std_application_base_address + mov eax,skin_to_load - std_application_base_address + call file_system_lfn + ;call fileread + pop eax + popad ret + + ret + + +skin_to_load: + dd 0,0,0 + dd 64*1024 + .adr dd 0 + db 0 + .stradr dd 0 + + struct SKIN_HEADER .ident dd ? .version dd ? diff --git a/kernel/trunk/gui/skindata.inc b/kernel/trunk/gui/skindata.inc index 5faffc1b88..46df646811 100644 --- a/kernel/trunk/gui/skindata.inc +++ b/kernel/trunk/gui/skindata.inc @@ -3,7 +3,7 @@ ; iglobal - _skin_file_default db 'DEFAULT SKN',0 + _skin_file_default db '/rd/1/DEFAULT.SKN',0 endg struct SKIN_DATA diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 1c7524a1d1..916b5a4488 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -231,12 +231,26 @@ boot_log: iglobal firstapp db '/rd/1/LAUNCHER',0 - char db 'FONTS/CHAR.MT',0 - char2 db 'FONTS/CHAR2.MT',0 + vrr_m db '/rd/1/VRR_M',0 + + char dd 0,0,0 + dd 2560 + dd 0x3F600 - std_application_base_address + db '/RD/1/FONTS/CHAR.MT',0 + char2 dd 0,0,0 + dd 2560 + dd 0x3EC00 - std_application_base_address + db '/RD/1/FONTS/CHAR2.MT',0 + + ;char db 'FONTS/CHAR.MT',0 + ;char2 db 'FONTS/CHAR2.MT',0 bootpath db '/KOLIBRI ' bootpath2 db 0 - vmode db 'drivers/VMODE.MDR',0 - vrr_m db '/rd/1/VRR_M',0 +; vmode db 'drivers/VMODE.MDR',0 + vmode dd 0,0,0 + dd 0x8000 + dd 0x760000 - std_application_base_address + db '/RD/1/drivers/VMODE.MDR',0 endg @@ -509,17 +523,26 @@ include 'vmodeld.inc' mov [TASK_COUNT],dword 1 mov [TASK_BASE],dword TASK_DATA - mov esi,char - xor ebx,ebx - mov ecx,2560;26000 - mov edx,FONT_I - call fs_RamdiskRead + pushad + push eax + mov eax,char - std_application_base_address + call file_system_lfn + mov eax,char2 - std_application_base_address + call file_system_lfn + pop eax + popad - mov esi,char2 - xor ebx,ebx - mov ecx,2560;26000 - mov edx,FONT_II - call fs_RamdiskRead +; mov esi,char +; xor ebx,ebx +; mov ecx,2560;26000 +; mov edx,FONT_I +; call fs_RamdiskRead + +; mov esi,char2 +; xor ebx,ebx +; mov ecx,2560;26000 +; mov edx,FONT_II +; call fs_RamdiskRead mov esi,boot_fonts call boot_log diff --git a/kernel/trunk/kernel16.inc b/kernel/trunk/kernel16.inc index e69bd79df8..633c16f7ab 100644 --- a/kernel/trunk/kernel16.inc +++ b/kernel/trunk/kernel16.inc @@ -31,6 +31,12 @@ include "boot/et.inc" ; Estonian font else include "boot/ru.inc" ; Russian font end if + +; сюда данные записываются в 16 разрядном режиме, читаются в 32 разрядном +bx_from_load: ; структура для хранения параметров- откуда гашрузились, берется ниже из bx ; {SPraid}[13.03.2007] +.from_disc db 0 ; a,b,c,d - винчестеры, r - рам диск +.from_part db 0,0 ; # диска... символ, а не байт. '1', а не 1 + org $-0x10000 include "boot/bootcode.inc" ; 16 bit system boot code diff --git a/kernel/trunk/vmodeld.inc b/kernel/trunk/vmodeld.inc index 46b0dc710b..1e943450d3 100644 --- a/kernel/trunk/vmodeld.inc +++ b/kernel/trunk/vmodeld.inc @@ -16,8 +16,15 @@ mov [OS_BASE+0x760000],eax ; mov [OS_BASE+0x760100],byte 0xC3 ; Instruction RETN - driver loop - mov esi, vmode - xor ebx, ebx - mov ecx, 0x8000 ; size of memory area for driver - mov edx, OS_BASE+0x760000 ; Memory position of driver - call fs_RamdiskRead + pushad + push eax + mov eax, vmode - std_application_base_address + call file_system_lfn + pop eax + popad + +; mov esi, vmode +; xor ebx, ebx +; mov ecx, 0x8000 ; size of memory area for driver +; mov edx, OS_BASE+0x760000 ; Memory position of driver +; call fs_RamdiskRead