Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3358 → Rev 3359

/kernel/branches/net/vmodeint.inc
File deleted
Property changes:
Deleted: svn:keywords
-Revision
\ No newline at end of property
Deleted: svn:mergeinfo
/kernel/branches/net/vmodeld.inc
File deleted
Property changes:
Deleted: svn:keywords
-Revision
\ No newline at end of property
Deleted: svn:mergeinfo
/kernel/branches/net/blkdev/disk.inc
459,7 → 459,9
stdcall disk_call_driver
; 3b. Free the structure.
xchg eax, esi
push ebx
call free
pop ebx
; 4. Return.
.nothing:
ret
/kernel/branches/net/blkdev/disk_cache.inc
629,7 → 629,9
mov [hdd_appl_data], 0
call write_cache
mov [hdd_appl_data], 1
jmp write_cache
call write_cache
mov eax, [hd_error]
ret
@@:
; The algorithm is straightforward.
push esi
/kernel/branches/net/blkdev/hd_drv.inc
340,7 → 340,11
; call clear_application_table_status
; mov esi,hd_timeout_str
; call sys_msg_board_str
if lang eq sp
DEBUGF 1,"K : FS - HD tiempo de espera agotado\n"
else
DEBUGF 1,"K : FS - HD timeout\n"
end if
 
mov [hd_error], 1
pop eax
352,7 → 356,11
; call clear_application_table_status
; mov esi,hd_read_str
; call sys_msg_board_str
if lang eq sp
DEBUGF 1,"K : FS - HD error de lectura\n"
else
DEBUGF 1,"K : FS - HD read error\n"
end if
pop edx eax
ret
 
362,7 → 370,11
; call clear_application_table_status
; mov esi,hd_write_str
; call sys_msg_board_str
if lang eq sp
DEBUGF 1,"K : FS - HD error de escritura\n"
else
DEBUGF 1,"K : FS - HD write error\n"
end if
ret
 
hd_write_error_dma:
370,7 → 382,11
; call clear_application_table_status
; mov esi, hd_write_str
; call sys_msg_board_str
DEBUGF 1,"K : FS - HD read error\n"
if lang eq sp
DEBUGF 1,"K : FS - HD error de escritura\n"
else
DEBUGF 1,"K : FS - HD write error\n"
end if
pop esi
ret
 
379,7 → 395,11
; call clear_application_table_status
; mov esi,hd_lba_str
; call sys_msg_board_str
if lang eq sp
DEBUGF 1,"K : FS - HD error en LBA\n"
else
DEBUGF 1,"K : FS - HD LBA error\n"
end if
jmp LBA_read_ret
 
 
/kernel/branches/net/blkdev/rdsave.inc
24,7 → 24,7
mov ebx, saverd_fileinfo
mov [saverd_fileinfo.name], ecx
pushad
call file_system_lfn ;in ebx
call file_system_lfn_protected ;in ebx
popad
mov [esp+32], eax
ret
/kernel/branches/net/boot/booteng.inc
File deleted
Property changes:
Deleted: svn:keywords
-Rev
\ No newline at end of property
Deleted: svn:mergeinfo
/kernel/branches/net/boot/bootcode.inc
91,6 → 91,7
inc si
cmp si, 10
jb @b
sayerr_badsect:
mov si, badsect
sayerr_plain:
call printplain
145,9 → 146,120
;=========================================================================
 
include 'bootvesa.inc' ;Include source for boot vesa
if defined extended_primary_loader
include 'parsers.inc'
end if
 
start_of_code:
 
if defined extended_primary_loader
; save data from primary loader
mov word [cs:bootcallback], si
mov word [cs:bootcallback+2], ds
push cs
pop ds
mov [bootdevice], ax
mov [bootfs], bx
 
; set up stack
mov ax, 3000h
mov ss, ax
mov sp, 0EC00h
 
; try to load configuration file
mov ax, 1
mov di, config_file_struct
call [bootcallback]
cld
push cs
pop es
; bx=0 - ok, bx=1 - part of file loaded, assume this is ok
cmp bx, 1
ja .config_bad
; configuration file was loaded, parse
; if length is too big, use first 0FFFFh bytes
test dx, dx
jz @f
mov ax, 0FFFFh
@@:
; ds:si will be pointer to current data, dx = limit
xchg ax, dx
push 4000h
pop ds
xor si, si
.parse_loop:
; skip spaces
cmp si, dx
jae .parse_done
lodsb
cmp al, ' '
jbe .parse_loop
dec si
; loop over all possible configuration values
mov bx, config_file_variables
.find_variant:
; get length
mov cx, [es:bx]
; zero length = end of list
jecxz .find_newline
; skip over length
inc bx
inc bx
mov di, bx
; skip over string
add bx, cx
; test whether we have at least cx symbols left
mov ax, cx
add ax, si
jc .next_variant1
cmp ax, dx
jae .next_variant1
; save current position
push si
; compare strings
repz cmpsb
jnz .next_variant2
; strings are equal; look for "=" with possible spaces before and after
@@:
cmp si, dx
jae .next_variant2
lodsb
cmp al, ' '
jbe @b
cmp al, '='
jnz .next_variant2
; ok, we found the true variant
; ignore saved position on the stack
pop ax
; call the parser
call word [es:bx]
; line parsed, find next
.find_newline:
cmp si, dx
jae .parse_done
lodsb
cmp al, 13
jz .parse_loop
cmp al, 10
jz .parse_loop
jmp .find_newline
.next_variant2:
; continue to the next variant, restoring current position
pop si
.next_variant1:
; continue to the next variant
; skip over the parser
inc bx
inc bx
jmp .find_variant
.parse_done:
.config_bad:
 
; set up segment registers
push cs
pop ds
else
cld
; \begin{diamond}[02.12.2005]
; if bootloader sets ax = 'KL', then ds:si points to loader block
cmp ax, 'KL'
175,6 → 287,7
pop ds
push cs
pop es
end if
 
; set videomode
mov ax, 3
378,6 → 491,7
apm_end:
_setcursor d80x25_top_num, 0
 
if ~ defined extended_primary_loader
;CHECK current of code
cmp [cfgmanager.loader_block], -1
jz noloaderblock
387,6 → 501,7
jnz sayerr
push 0
pop es
end if
 
noloaderblock:
; DISPLAY VESA INFORMATION
404,7 → 519,9
; d) preboot_device = from what boot?
 
; determine default settings
if ~ defined extended_primary_loader
mov [.bSettingsChanged], 0
end if
 
;.preboot_gr_end:
mov di, preboot_device
412,6 → 529,12
; set it to use this preloaded image
cmp byte [di], 0
jnz .preboot_device_inited
if defined extended_primary_loader
inc byte [di]
cmp byte [bootdevice], 'f' ; floppy?
jz .preboot_device_inited
inc byte [di]
else
cmp [.loader_block], -1
jz @f
les bx, [.loader_block]
422,6 → 545,7
@@:
; otherwise, set [preboot_device] to 1 (default value - boot from floppy)
mov byte [di], 1
end if
.preboot_device_inited:
; following 4 lines set variables to 1 if its current value is 0
cmp byte [di+preboot_dma-preboot_device], 1
428,11 → 552,11
adc byte [di+preboot_dma-preboot_device], 0
cmp byte [di+preboot_biosdisk-preboot_device], 1
adc byte [di+preboot_biosdisk-preboot_device], 0
; default value for VRR is OFF
cmp byte [di+preboot_vrrm-preboot_device], 0
jnz @f
mov byte [di+preboot_vrrm-preboot_device], 2
@@:
;; default value for VRR is OFF
; cmp byte [di+preboot_vrrm-preboot_device], 0
; jnz @f
; mov byte [di+preboot_vrrm-preboot_device], 2
;@@:
; notify user
_setcursor 5,2
 
460,13 → 584,17
mov si, usebd_msg
cmp [preboot_biosdisk], 1
call .say_on_off
mov si, vrrm_msg
cmp [preboot_vrrm], 1
call .say_on_off
; mov si, vrrm_msg
; cmp [preboot_vrrm], 1
; call .say_on_off
mov si, preboot_device_msg
call print
mov al, [preboot_device]
if defined extended_primary_loader
and eax, 3
else
and eax, 7
end if
mov si, [preboot_device_msgs+eax*2]
call printplain
.show_remarks:
546,19 → 674,25
jz .change_a
cmp al, 'b'
jz .change_b
cmp al, 'c'
jz .change_c
cmp al, 'd'
; cmp al, 'c'
; jz .change_c
cmp al, 'c' ; 'd'
jnz .show_remarks
_setcursor 15,0
mov si, bdev
call print
if defined extended_primary_loader
mov bx, '12'
else
mov bx, '14'
end if
call getkey
mov [preboot_device], al
_setcursor 13,0
.d:
if ~ defined extended_primary_loader
mov [.bSettingsChanged], 1
end if
call clear_vmodes_table ;clear vmodes_table
jmp .printcfg
.change_a:
578,7 → 712,8
sub word [cursor_pos],size_of_step
jmp .loops
 
.down: cmp ah,0x50;x,0x50E0 ; down
.down:
cmp ah, 0x50;x,0x50E0 ; down
jne .pgup
cmp word[es:si+10],-1
je .loops
585,7 → 720,8
add word [cursor_pos],size_of_step
jmp .loops
 
.pgup: cmp ah,0x49 ; page up
.pgup:
cmp ah, 0x49 ; page up
jne .pgdn
sub si, size_of_step*long_v_table
cmp si, modes_table
602,7 → 738,8
mov word [home_cursor], si
jmp .loops
 
.pgdn: cmp ah,0x51 ; page down
.pgdn:
cmp ah, 0x51 ; page down
jne .enter
mov ax, [end_cursor]
add si, size_of_step*long_v_table
622,7 → 759,8
mov word [home_cursor], si
jmp .loops
 
.enter: cmp al,0x0D;x,0x1C0D ; enter
.enter:
cmp al, 0x0D;x,0x1C0D ; enter
jne .loops
push word [cursor_pos]
pop bp
650,15 → 788,15
mov [preboot_biosdisk], al
_setcursor 11,0
jmp .d
.change_c:
_setcursor 15,0
mov si, vrrmprint
call print
mov bx, '12'
call getkey
mov [preboot_vrrm], al
_setcursor 12,0
jmp .d
;.change_c:
; _setcursor 15,0
; mov si, vrrmprint
; call print
; mov bx, '12'
; call getkey
; mov [preboot_vrrm], al
; _setcursor 12,0
; jmp .d
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.say_on_off:
pushf
667,15 → 805,20
popf
jz @f
mov si, off_msg
@@: jmp printplain
@@:
jmp printplain
; novesa and vervesa strings are not used at the moment of executing this code
virtual at novesa
.oldtimer dd ?
.starttime dd ?
if ~ defined extended_primary_loader
.bSettingsChanged db ?
end if
.timer dd ?
end virtual
if ~ defined extended_primary_loader
.loader_block dd -1
end if
.gettime:
mov ah, 0
int 1Ah
692,7 → 835,11
pushad
call .gettime
sub eax, [.starttime]
if defined extended_primary_loader
sub ax, [preboot_timeout]
else
sub ax, 18*5
end if
jae .timergo
neg ax
add ax, 18-1
708,7 → 855,8
mov cl, 'ã'
jz @f
mov cl, 'ë'
@@: mov [time_str+9], cl
@@:
mov [time_str+9], cl
else if lang eq et
cmp al, 1
ja @f
715,6 → 863,14
mov [time_str+9], ' '
mov [time_str+10],' '
@@:
else if lang eq sp
; esperar 5/4/3/2 segundos, 1 segundo
cmp al, 1
mov cl, 's'
ja @f
mov cl, ' '
@@:
mov [time_str+10], cl
else
; wait 5/4/3/2 seconds, 1 second
cmp al, 1
721,7 → 877,8
mov cl, 's'
ja @f
mov cl, ' '
@@: mov [time_str+9], cl
@@:
mov [time_str+9], cl
end if
add al, '0'
mov [time_str+1], al
748,6 → 905,7
mov si, loading_msg
call print
_setcursor 15,0
if ~ defined extended_primary_loader
cmp [.bSettingsChanged], 0
jz .load
cmp [.loader_block], -1
788,6 → 946,7
call printplain
_setcursor 15,0
.load:
end if
; \end{diamond}[02.12.2005]
 
; ASK GRAPHICS MODE
796,19 → 955,18
 
; GRAPHICS ACCELERATION
; force yes
mov [es:0x901C], byte 1
mov [es:BOOT_MTRR], byte 1
 
; DMA ACCESS TO HD
 
mov al, [preboot_dma]
mov [es:0x901F], al
mov [es:BOOT_DMA], al
 
; VRR_M USE
;; VRR_M USE
;
; mov al,[preboot_vrrm]
; mov [es:0x9030], al
 
mov al,[preboot_vrrm]
mov [es:0x9030], al
mov [es:0x901E], byte 1
 
; BOOT DEVICE
 
mov al, [preboot_device]
967,6 → 1125,7
mov dx, 0x3f2
mov al, 0
out dx, al
sayerr_memmove:
mov si, memmovefailed
jmp sayerr_plain
@@:
1145,6 → 1304,40
mov al, 0
out dx, al
 
if defined extended_primary_loader
cmp [boot_dev], 1
jne no_sys_from_primary
; load kolibri.img using callback from primary loader
and word [movedesc + 24 + 2], 0
mov byte [movedesc + 24 + 4], 10h
; read in blocks of 64K until file is fully loaded
mov ax, 1
.repeat:
mov di, image_file_struct
call [bootcallback]
push cs
pop ds
push cs
pop es
cmp bx, 1
ja sayerr_badsect
push bx
mov si, movedesc
and word [si + 16 + 2], 0
mov byte [si + 16 + 4], 4
mov ah, 87h
mov cx, 8000h
int 15h
pop bx
test ah, ah
jnz sayerr_memmove
inc byte [si + 24 + 4]
test bx, bx
jz no_sys_from_primary
mov ax, 2
jmp .repeat
no_sys_from_primary:
end if
 
; SET GRAPHICS
 
/kernel/branches/net/boot/booten.inc
0,0 → 1,101
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
;======================================================================
;
; BOOT DATA
;
;======================================================================
 
$Revision: 2455 $
 
 
d80x25_bottom:
db 186,' KolibriOS is based on MenuetOS and comes with ABSOLUTELY '
db 'NO WARRANTY ',186
db 186,' See file COPYING for details '
db ' ',186
line_full_bottom
d80x25_bottom_num = 3
 
msg_apm db " APM x.x ", 0
novesa db "Display: EGA/CGA",13,10,0
s_vesa db "Version of VESA: "
.ver db "?.?",13,10,0
 
gr_mode db "Select a videomode: ",13,10,0
 
ask_bd db "Add disks visible by BIOS emulated in V86-mode? [1-yes, 2-no]: ",0
 
if defined extended_primary_loader
bdev db "Load ramdisk from [1-floppy; 2-kolibri.img]: ",0
else
bdev db "Load ramdisk from [1-floppy; 2-C:\kolibri.img (FAT32);"
db 13,10,186," "
db "3-use preloaded ram-image from kernel restart;"
db 13,10,186," "
db "4-create blank image]: ",0
end if
 
prnotfnd db "Fatal - Videomode not found.",0
 
not386 db "Fatal - CPU 386+ required.",0
fatalsel db "Fatal - Graphics mode not supported by hardware.",0
pres_key db "Press any key to choose a new videomode.",0
badsect db 13,10,186," Fatal - Bad sector. Replace floppy.",0
memmovefailed db 13,10,186," Fatal - Int 0x15 move failed.",0
okt db " ... OK"
linef db 13,10,0
diskload db "Loading diskette: 00 %",8,8,8,8,0
pros db "00"
backspace2 db 8,8,0
boot_dev db 0 ; 0=floppy, 1=hd
start_msg db "Press [abcd] to change settings, press [Enter] to continue booting",13,10,0
time_msg db " or wait "
time_str db " 5 seconds"
db " before automatical continuation",13,10,0
current_cfg_msg db "Current settings:",13,10,0
curvideo_msg db " [a] Videomode: ",0
 
mode0 db "320x200, EGA/CGA 256 colors",13,10,0
mode9 db "640x480, VGA 16 colors",13,10,0
 
usebd_msg db " [b] Add disks visible by BIOS:",0
on_msg db " on",13,10,0
off_msg db " off",13,10,0
 
preboot_device_msg db " [c] Floppy image: ",0
 
if defined extended_primary_loader
preboot_device_msgs dw 0,pdm1,pdm2,0
pdm1 db "real floppy",13,10,0
pdm2 db "C:\kolibri.img (FAT32)",13,10,0
else
preboot_device_msgs dw 0,pdm1,pdm2,pdm3
pdm1 db "real floppy",13,10,0
pdm2 db "C:\kolibri.img (FAT32)",13,10,0
pdm3 db "use already loaded image",13,10,0
pdm4 db "create blank image",13,10,0
end if
 
loading_msg db "Loading KolibriOS...",0
 
if ~ defined extended_primary_loader
save_quest db "Remember current settings? [y/n]: ",0
loader_block_error db "Bootloader data invalid, I cannot continue. Stopped.",0
end if
 
_st db 186,' ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ¿',13,10,0
_r1 db 186,' ³ 320x200 EGA/CGA 256 colors ³ ³',13,10,0
_r2 db 186,' ³ 640x480 VGA 16 colors ³ ³',13,10,0
_rs db 186,' ³ ????x????@?? SVGA VESA ³ ³',13,10,0
_bt db 186,' ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÙ',13,10,0
 
remark1 db "Default values were selected to match most of configurations, but not all.",0
remark2 db "If the system does not boot, try to disable the item [b].",0
remarks dw remark1, remark2
num_remarks = 2
/kernel/branches/net/boot/bootet.inc
15,58 → 15,37
 
 
d80x25_bottom:
db 186,' KolibriOS based on MenuetOS and comes with ABSOLUTELY '
db 'NO WARRANTY ',186
db 186,' See file COPYING for details '
db 186,' KolibriOS pohineb MenuetOS ja kaasas IGASUGUSE GARANTI'
db 'ITA ',186
db 186,' Naha faili COPYING detailid '
db ' ',186
line_full_bottom
d80x25_bottom_num = 3
 
msg_apm db " APM x.x ", 0
novesa db "Ekraan: EGA/CGA",13,10,0
vervesa db "Vesa versioon: Vesa x.x",13,10,0
vervesa_off=20
msg_apm db " APM x.x ", 0
gr_mode db 186," Vesa 2.0+ 16 M LFB: [1] 640x480, [2] 800x600, "
db "[3] 1024x768, [4] 1280x1024",13,10
db 186," Vesa 1.2 16 M Bnk: [5] 640x480, [6] 800x600, "
db "[7] 1024x768, [8] 1280x1024",13,10
db 186," EGA/CGA 256 värvi: [9] 320x200, "
db "VGA 16 värvi: [0] 640x480",13,10
db 186," Vali reziim: ",0
bt24 db "Bitti pikseli kohta: 24",13,10,0
bt32 db "Bitti pikseli kohta: 32",13,10,0
vrrmprint db "Kinnita VRR? (ekraani sagedus suurem kui 60Hz"
db " ainult:",13,10
db 186," 1024*768->800*600 ja 800*600->640*480) [1-jah,2-ei]:",0
;askmouse db " Hiir:"
; db " [1] PS/2 (USB), [2] Com1, [3] Com2."
; db " Vali port [1-3]: ",0
;no_com1 db 13,10,186, " No COM1 mouse",0
;no_com2 db 13,10,186, " No COM2 mouse",0
;ask_dma db "Use DMA for HDD access? [1-yes, 2-only for reading, 3-no]: ",0
ask_bd db "Add disks visible by BIOS emulated in V86-mode? [1-yes, 2-no]: ",0
;gr_direct db 186," Use direct LFB writing? "
; db "[1-yes/2-no] ? ",0
;mem_model db 13,10,186," Motherboard memory [1-16 Mb / 2-32 Mb / "
; db "3-64Mb / 4-128 Mb / 5-256 Mb] ? ",0
;bootlog db 13,10,186," After bootlog display [1-continue/2-pause] ? ",0
s_vesa db "Vesa versioon: "
.ver db "?.?",13,10,0
 
gr_mode db "Vali videomode: ",13,10,0
 
ask_bd db "Lisa kettad nahtavaks BIOS reziim V86? [1-jah, 2-no]: ",0
 
if defined extended_primary_loader
bdev db "Paigalda mäluketas [1-diskett; 2-kolibri.img]: ",0
else
bdev db "Paigalda mäluketas [1-diskett; 2-C:\kolibri.img (FAT32);"
db 13,10,186," "
db "3-kasuta eellaaditud mäluketast kerneli restardist;"
db 13,10,186," "
db "4-loo tühi pilt]: ",0
probetext db 13,10,13,10,186," Kasuta standartset graafika reziimi? [1-jah, "
db "2-leia biosist (Vesa 3.0)]: ",0
;memokz256 db 13,10,186," RAM 256 Mb",0
;memokz128 db 13,10,186," RAM 128 Mb",0
;memokz64 db 13,10,186," RAM 64 Mb",0
;memokz32 db 13,10,186," RAM 32 Mb",0
;memokz16 db 13,10,186," RAM 16 Mb",0
end if
 
prnotfnd db "Fataalne - Videoreziimi ei leitud.",0
;modena db "Fataalne - VBE 0x112+ on vajalik.",0
 
not386 db "Fataalne - CPU 386+ on vajalik.",0
btns db "Fataalne - Ei suuda värvisügavust määratleda.",0
fatalsel db "Fataalne - Graafilist reziimi riistvara ei toeta.",0
pres_key db "Vajutage suvalist klahvi, et valida uus videomode.",0
badsect db 13,10,186," Fataalne - Vigane sektor. Asenda diskett.",0
memmovefailed db 13,10,186," Fataalne - Int 0x15 liigutamine ebaõnnestus.",0
okt db " ... OK"
81,35 → 60,42
db " automaatseks jätkamiseks",13,10,0
current_cfg_msg db "Praegused seaded:",13,10,0
curvideo_msg db " [a] Videoreziim: ",0
mode1 db "640x480",0
mode2 db "800x600",0
mode3 db "1024x768",0
mode4 db "1280x1024",0
modes_msg dw mode4,mode1,mode2,mode3
modevesa20 db " koos LFB",0
modevesa12 db ", VESA 1.2 Bnk",0
mode9 db "320x200, EGA/CGA 256 värvi",0
mode10 db "640x480, VGA 16 värvi",0
probeno_msg db " (standard reziim)",0
probeok_msg db " (kontrolli ebastandardseid reziime)",0
;dma_msg db " [b] Kasuta DMA'd HDD juurdepääsuks:",0
usebd_msg db " [b] Add disks visible by BIOS:",0
 
mode0 db "320x200, EGA/CGA 256 värvi",0
mode9 db "640x480, VGA 16 värvi",0
 
usebd_msg db " [b] Lisa kettad nahtavaks BIOS:",0
on_msg db " sees",13,10,0
off_msg db " väljas",13,10,0
;readonly_msg db " ainult lugemiseks",13,10,0
vrrm_msg db " [c] Kasuta VRR:",0
preboot_device_msg db " [d] Disketi kujutis: ",0
 
preboot_device_msg db " [c] Disketi kujutis: ",0
 
if defined extended_primary_loader
preboot_device_msgs dw 0,pdm1,pdm2,0
pdm1 db "reaalne diskett",13,10,0
pdm2 db "kolibri.img",13,10,0
else
preboot_device_msgs dw 0,pdm1,pdm2,pdm3
pdm1 db "reaalne diskett",13,10,0
pdm2 db "C:\kolibri.img (FAT32)",13,10,0
pdm3 db "kasuta juba laaditud kujutist",13,10,0
pdm4 db "loo tühi pilt",13,10,0
end if
 
loading_msg db "Laadin KolibriOS...",0
 
if ~ defined extended_primary_loader
save_quest db "Jäta meelde praegused seaded? [y/n]: ",0
loader_block_error db "Alglaaduri andmed vigased, ei saa jätkata. Peatatud.",0
end if
 
remark1 db "Default values were selected to match most of configurations, but not all.",0
remark2 db "If you have CRT-monitor, enable VRR in the item [c].",0
remark3 db "If the system does not boot, try to disable the item [b].",0
remarks dw remark1, remark2, remark3
num_remarks = 3
_st db 186,' ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ¿',13,10,0
_r1 db 186,' ³ 320x200 EGA/CGA 256 colors ³ ³',13,10,0
_r2 db 186,' ³ 640x480 VGA 16 colors ³ ³',13,10,0
_rs db 186,' ³ ????x????@?? SVGA VESA ³ ³',13,10,0
_bt db 186,' ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÙ',13,10,0
 
remark1 db "Vaikimisi maaratud vaartused on valitud mugavuse enamikes, kuid mitte koik.",0
remark2 db "Kui susteem ei kaivitu, proovige lulitada kirje [b].",0
remarks dw remark1, remark2
num_remarks = 2
/kernel/branches/net/boot/bootge.inc
15,11 → 15,6
 
 
d80x25_bottom:
; db 186,' KolibriOS based on MenuetOS and comes with ABSOLUTELY '
; db 'NO WARRANTY ',186
; db 186,' See file COPYING for details '
; db ' ',186
 
db 186,' KolibriOS basiert auf MenuetOS und wird ohne jegliche '
db ' Garantie vertrieben ',186
db 186,' Details stehen in der Datei COPYING '
27,51 → 22,30
line_full_bottom
d80x25_bottom_num = 3
 
msg_apm db " APM x.x ", 0
novesa db "Anzeige: EGA/CGA ",13,10,0
vervesa db "Vesa-Version: Vesa ",13,10,0
vervesa_off=22
msg_apm db " APM x.x ", 0
gr_mode db 186," Vesa 2.0+ 16 M LFB: [1] 640x480, [2] 800x600, "
db "[3] 1024x768, [4] 1280x1024",13,10
db 186," Vesa 1.2 16 M Bnk: [5] 640x480, [6] 800x600, "
db "[7] 1024x768, [8] 1280x1024",13,10
db 186," EGA/CGA 256 Farben: [9] 320x200, "
db "VGA 16 Farben: [0] 640x480",13,10
db 186," Waehle Modus: ",0
bt24 db "Bits Per Pixel: 24",13,10,0
bt32 db "Bits Per Pixel: 32",13,10,0
vrrmprint db "VRR verwenden? (Monitorfrequenz groesser als 60Hz"
db " only for transfers:",13,10
db 186," 1024*768->800*600 und 800*600->640*480) [1-ja,2-nein]:",0
;askmouse db " Maus angeschlossen an:"
; db " [1] PS/2 (USB), [2] Com1, [3] Com2."
; db " Waehle Port [1-3]: ",0
;no_com1 db 13,10,186, " Keine COM1 Maus",0
;no_com2 db 13,10,186, " Keine COM2 Maus",0
;ask_dma db "Nutze DMA zum HDD Zugriff? [1-ja, 2-allein fur Lesen, 3-nein]: ",0
ask_bd db "Add disks visible by BIOS emulated in V86-mode? [1-yes, 2-no]: ",0
;gr_direct db 186," Benutze direct LFB? "
; db "[1-ja/2-nein] ? ",0
;mem_model db 13,10,186," Hauptspeicher [1-16 Mb / 2-32 Mb / "
; db "3-64Mb / 4-128 Mb / 5-256 Mb] ? ",0
;bootlog db 13,10,186," After bootlog display [1-continue/2-pause] ? ",0
s_vesa db "Vesa-Version: "
.ver db "?.?",13,10,0
 
gr_mode db "Wahlen Sie einen videomode: ",13,10,0
 
ask_bd db "Add-Festplatten sichtbar BIOS in V86-Modus emuliert? [1-ja, 2 nein]: ",0
 
if defined extended_primary_loader
bdev db "Lade die Ramdisk von [1-Diskette; 2-kolibri.img]: ",0
else
bdev db "Lade die Ramdisk von [1-Diskette; 2-C:\kolibri.img (FAT32);"
db 13,10,186," "
db "3-benutze ein bereits geladenes Kernel image;"
db 13,10,186," "
db "4-create blank image]: ",0
probetext db 13,10,13,10,186," Nutze Standardgrafikmodi? [1-ja, "
db "2-BIOS Test (Vesa 3.0)]: ",0
;memokz256 db 13,10,186," RAM 256 Mb",0
;memokz128 db 13,10,186," RAM 128 Mb",0
;memokz64 db 13,10,186," RAM 64 Mb",0
;memokz32 db 13,10,186," RAM 32 Mb",0
;memokz16 db 13,10,186," RAM 16 Mb",0
end if
 
prnotfnd db "Fatal - Videomodus nicht gefunden.",0
;modena db "Fatal - VBE 0x112+ required.",0
 
not386 db "Fatal - CPU 386+ benoetigt.",0
btns db "Fatal - konnte Farbtiefe nicht erkennen.",0
fatalsel db "Fatal - Grafikmodus nicht unterstuetzt.",0
pres_key db "Drucken Sie eine beliebige Taste, um eine neue videomode wahlen.",0
badsect db 13,10,186," Fatal - Sektorfehler, Andere Diskette neutzen.",0
memmovefailed db 13,10,186," Fatal - Int 0x15 Fehler.",0
okt db " ... OK"
86,35 → 60,42
db " bis zum automatischen Start",13,10,0
current_cfg_msg db "Aktuelle Einstellungen:",13,10,0
curvideo_msg db " [a] Videomodus: ",0
mode1 db "640x480",0
mode2 db "800x600",0
mode3 db "1024x768",0
mode4 db "1280x1024",0
modes_msg dw mode4,mode1,mode2,mode3
modevesa20 db " mit LFB",0
modevesa12 db ", VESA 1.2 Bnk",0
mode9 db "320x200, EGA/CGA 256 colors",0
mode10 db "640x480, VGA 16 colors",0
probeno_msg db " (Standard Modus)",0
probeok_msg db " (teste nicht-standard Modi)",0
;dma_msg db " [b] Nutze DMA zum HDD Aufschreiben:",0
usebd_msg db " [b] Add disks visible by BIOS:",0
 
mode0 db "320x200, EGA/CGA 256 colors",13,10,0
mode9 db "640x480, VGA 16 colors",13,10,0
 
usebd_msg db " [b] Add-Festplatten sichtbar durch das BIOS:",0
on_msg db " an",13,10,0
off_msg db " aus",13,10,0
;readonly_msg db " fur Lesen",13,10,0
vrrm_msg db " [c] Nutze VRR:",0
preboot_device_msg db " [d] Diskettenimage: ",0
 
preboot_device_msg db " [c] Diskettenimage: ",0
 
if defined extended_primary_loader
preboot_device_msgs dw 0,pdm1,pdm2,0
pdm1 db "Echte Diskette",13,10,0
pdm2 db "kolibri.img",13,10,0
else
preboot_device_msgs dw 0,pdm1,pdm2,pdm3
pdm1 db "Echte Diskette",13,10,0
pdm2 db "C:\kolibri.img (FAT32)",13,10,0
pdm3 db "Nutze bereits geladenes Image",13,10,0
pdm4 db "create blank image",13,10,0
end if
 
loading_msg db "Lade KolibriOS...",0
 
if ~ defined extended_primary_loader
save_quest db "Aktuelle Einstellungen speichern? [y/n]: ",0
loader_block_error db "Bootloader Daten ungueltig, Kann nicht fortfahren. Angehalten.",0
end if
 
remark1 db "Default values were selected to match most of configurations, but not all.",0
remark2 db "If you have CRT-monitor, enable VRR in the item [c].",0
remark3 db "If the system does not boot, try to disable the item [b].",0
remarks dw remark1, remark2, remark3
num_remarks = 3
_st db 186,' ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ¿',13,10,0
_r1 db 186,' ³ 320x200 EGA/CGA 256 colors ³ ³',13,10,0
_r2 db 186,' ³ 640x480 VGA 16 colors ³ ³',13,10,0
_rs db 186,' ³ ????x????@?? SVGA VESA ³ ³',13,10,0
_bt db 186,' ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÙ',13,10,0
 
remark1 db "Die Standardwerte sind fur die meisten gewahlt, aber nicht fur jedermann.",0
remark2 db "Wenn das System nicht bootet, versuchen, das Element [b] deaktivieren.",0
remarks dw remark1, remark2
num_remarks = 2
/kernel/branches/net/boot/bootru.inc
15,8 → 15,8
 
 
d80x25_bottom:
db 186,' Kolibri OS ®á­®¢ ­  ­  Menuet OS ¨ ­¥ ¯à¥¤®áâ ¢«ï¥â '
db '­¨ª ª¨å £ àa­â¨©. ',186
db 186,' KolibriOS ®á­®¢ ­  ­  MenuetOS ¨ … …„Ž‘’€‚‹Ÿ…’ ˆ'
db 'Š€Šˆ• ƒ€A’ˆ‰. ',186
db 186,' ®¤à®¡­¥¥ ᬮâà¨â¥ ¢ ä ©«¥ COPYING.TXT '
db ' ',186
line_full_bottom
28,17 → 28,21
.ver db "?.?",13,10,0
 
gr_mode db "‚ë¡¥à¨â¥ ¢¨¤¥®à¥¦¨¬: ",13,10,0
vrrmprint db "ˆá¯®«ì§®¢ âì VRR? (ç áâ®â  ª ¤à®¢ ¢ëè¥ 60 ƒæ"
db " ⮫쪮 ¤«ï ¯¥à¥å®¤®¢:",13,10
db 186," 1024*768>800*600 ¨ 800*600>640*480) [1-¤ , 2-­¥â]: ",0
;ask_dma db "ˆá¯®«ì§®¢ âì DMA ¤«ï ¤®áâ㯠 ª HDD? [1-¤ , 2-⮫쪮 ç⥭¨¥, 3-­¥â]: ",0
 
ask_bd db "„®¡ ¢¨âì ¤¨áª¨, ¢¨¤¨¬ë¥ ç¥à¥§ BIOS ¢ ०¨¬¥ V86? [1-¤ , 2-­¥â]: ",0
 
if defined extended_primary_loader
bdev db "‡ £à㧨âì ®¡à § ¨§ [1-¤¨áª¥â ; 2-kolibri.img ¨§ ¯ ¯ª¨ § £à㧪¨]: ",0
else
bdev db "‡ £à㧨âì ®¡à § ¨§ [1-¤¨áª¥â ; 2-C:\kolibri.img (FAT32);"
db 13,10,186," "
db "3-¨á¯®«ì§®¢ âì 㦥 § £à㦥­­ë© ®¡à §;"
db 13,10,186," "
db "4-ᮧ¤ âì ç¨áâë© ®¡à §]: ",0
end if
 
prnotfnd db "Žè¨¡ª  - ‚¨¤¥®à¥¦¨¬ ­¥ ­ ©¤¥­.",0
 
not386 db "Žè¨¡ª  - ’ॡã¥âáï ¯à®æ¥áá®à 386+.",0
fatalsel db "Žè¨¡ª  - ‚ë¡à ­­ë© ¢¨¤¥®à¥¦¨¬ ­¥ ¯®¤¤¥à¦¨¢ ¥âáï.",0
pres_key db " ¦¨¬¨â¥ «î¡ãî ª« ¢¨èã, ¤«ï ¯¥à¥å®¤  ¢ ¢ë¡®à ०¨¬®¢.",0
57,7 → 61,6
current_cfg_msg db "’¥ªã騥 ­ áâனª¨:",13,10,0
curvideo_msg db " [a] ‚¨¤¥®à¥¦¨¬: ",0
 
 
mode0 db "320x200, EGA/CGA 256 梥⮢",13,10,0
mode9 db "640x480, VGA 16 梥⮢",13,10,0
 
64,19 → 67,28
usebd_msg db " [b] „®¡ ¢¨âì ¤¨áª¨, ¢¨¤¨¬ë¥ ç¥à¥§ BIOS:",0
on_msg db " ¢ª«",13,10,0
off_msg db " ¢ëª«",13,10,0
readonly_msg db " ⮫쪮 ç⥭¨¥",13,10,0
vrrm_msg db " [c] ˆá¯®«ì§®¢ ­¨¥ VRR:",0
preboot_device_msg db " [d] Ž¡à § ¤¨áª¥âë: ",0
 
preboot_device_msg db " [c] Ž¡à § ¤¨áª¥âë: ",0
 
if defined extended_primary_loader
preboot_device_msgs dw 0,pdm1,pdm2,0
pdm1 db "­ áâ®ïé ï ¤¨áª¥â ",13,10,0
pdm2 db "kolibri.img ¨§ ¯ ¯ª¨ § £à㧪¨",13,10,0
else
preboot_device_msgs dw 0,pdm1,pdm2,pdm3,pdm4
pdm1 db "­ áâ®ïé ï ¤¨áª¥â ",13,10,0
pdm2 db "C:\kolibri.img (FAT32)",13,10,0
pdm3 db "¨á¯®«ì§®¢ âì 㦥 § £à㦥­­ë© ®¡à §",13,10,0
pdm4 db "ᮧ¤ âì ç¨áâë© ®¡à §",13,10,0
end if
 
loading_msg db "ˆ¤ñâ § £à㧪  KolibriOS...",0
 
if ~ defined extended_primary_loader ; saving not supported in this case
save_quest db "‡ ¯®¬­¨âì ⥪ã騥 ­ áâனª¨? [y/n]: ",0
loader_block_error db "Žè¨¡ª  ¢ ¤ ­­ëå ­ ç «ì­®£® § £àã§ç¨ª , ¯à®¤®«¦¥­¨¥ ­¥¢®§¬®¦­®.",0
end if
 
 
_st db 186,' ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ¿ ',13,10,0
_r1 db 186,' ³ 320x200 EGA/CGA 256 梥⮢ ³ ³ ',13,10,0
_r2 db 186,' ³ 640x480 VGA 16 梥⮢ ³ ³ ',13,10,0
83,9 → 95,7
_rs db 186,' ³ ????x????@?? SVGA VESA ³ ³ ',13,10,0
_bt db 186,' ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÙ ',13,10,0
 
 
remark1 db "‡­ ç¥­¨ï ¯® 㬮«ç ­¨î ¢ë¡à ­ë ¤«ï 㤮¡á⢠ ¡®«ì設á⢠, ­® ­¥ ¢á¥å.",0
remark2 db "…᫨ 㠂 á ‹’-¬®­¨â®à, ¢ª«îç¨â¥ VRR ¢ ¯ã­ªâ¥ [c].",0
remark3 db "…᫨ 㠂 á ­¥ £à㧨âáï á¨á⥬ , ¯®¯à®¡ã©â¥ ®âª«îç¨âì ¯ã­ªâ [b].",0
remarks dw remark1, remark2, remark3
num_remarks = 3
remark2 db "…᫨ 㠂 á ­¥ £à㧨âáï á¨á⥬ , ¯®¯à®¡ã©â¥ ®âª«îç¨âì ¯ã­ªâ [b].",0
remarks dw remark1, remark2
num_remarks = 2
/kernel/branches/net/boot/bootsp.inc
0,0 → 1,103
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
;======================================================================
;
; BOOT DATA
;
;======================================================================
 
; Para modificar ‚ste archivo es necesario abrirlo con codificaci¢n CP850
 
$Revision: 2455 $
 
 
d80x25_bottom:
db 186,' KolibriOS est  basado en MenuetOS y viene ABSOLUTAMENTE '
db 'SIN GARANT¡A ',186
db 186,' Lee el archivo COPYING por m s detalles '
db ' ',186
line_full_bottom
d80x25_bottom_num = 3
 
msg_apm db " APM x.x ", 0
novesa db "Monitor: EGA/CGA",13,10,0
s_vesa db "Versi¢n de VESA: "
.ver db "?.?",13,10,0
 
gr_mode db "Selecciona un modo de video: ",13,10,0
 
ask_bd db "¨Agregar discos visibles por el BIOS emulados en modo V86? [1-si, 2-no]: ",0
 
if defined extended_primary_loader
bdev db "Cargar unidad ram desde [1-disquete; 2-kolibri.img]: ",0
else
bdev db "Cargar unidad ram desde [1-disquete; 2-C:\kolibri.img (FAT32);"
db 13,10,186," "
db "3-usar imagen precargada en el reinicio del n£cleo;"
db 13,10,186," "
db "4-crear imagen vac¡a]: ",0
end if
 
prnotfnd db "Fatal - Modo de video no encontrado.",0
 
not386 db "Fatal - CPU 386+ requerido.",0
fatalsel db "Fatal - Modo de gr ficos no soportado por hardware.",0
pres_key db "Presiona una tecla para seleccionar otro modo de video.",0
badsect db 13,10,186," Fatal - Sector mal. Reemplaze el disquete.",0
memmovefailed db 13,10,186," Fatal - Int 0x15 move failed.",0
okt db " ... BIEN"
linef db 13,10,0
diskload db "Cargando disquete: 00 %",8,8,8,8,0
pros db "00"
backspace2 db 8,8,0
boot_dev db 0 ; 0=floppy, 1=hd
start_msg db "Presiona [abcd] para cambiar la configuraci¢n, [Enter] para continuar",13,10,0
time_msg db " o espera "
time_str db " 5 segundos"
db " para que inicie autom ticamente",13,10,0
current_cfg_msg db "Configuraci¢n actual:",13,10,0
curvideo_msg db " [a] Modo de video: ",0
 
mode0 db "320x200, EGA/CGA 256 colores",13,10,0
mode9 db "640x480, VGA 16 colores",13,10,0
 
usebd_msg db " [b] Agregar discos visibles por el BIOS:",0
on_msg db " activado",13,10,0
off_msg db " desactivado",13,10,0
 
preboot_device_msg db " [c] Imagen de disquete: ",0
 
if defined extended_primary_loader
preboot_device_msgs dw 0,pdm1,pdm2,0
pdm1 db "disquete real",13,10,0
pdm2 db "C:\kolibri.img (FAT32)",13,10,0
else
preboot_device_msgs dw 0,pdm1,pdm2,pdm3
pdm1 db "disquete real",13,10,0
pdm2 db "C:\kolibri.img (FAT32)",13,10,0
pdm3 db "usar imagen ya cargada",13,10,0
pdm4 db "crear imagen vac¡a",13,10,0
end if
 
loading_msg db "Cargando KolibriOS...",0
 
if ~ defined extended_primary_loader
save_quest db "¨Recordar configuraci¢n actual? [s/n]: ",0
loader_block_error db "Bootloader inv lido, no puedo continuar. Detenido.",0
end if
 
_st db 186,' ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ¿',13,10,0
_r1 db 186,' ³ 320x200 EGA/CGA 256 colores ³ ³',13,10,0
_r2 db 186,' ³ 640x480 VGA 16 colores ³ ³',13,10,0
_rs db 186,' ³ ????x????@?? SVGA VESA ³ ³',13,10,0
_bt db 186,' ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÙ',13,10,0
 
remark1 db "Los valores por defecto puede que no funcionen en algunas configuraciones.",0
remark2 db "Si el sistema no inicia, prueba deshabilitar la opci¢n [b].",0
remarks dw remark1, remark2
num_remarks = 2
/kernel/branches/net/boot/bootstr.inc
42,7 → 42,8
store byte ' ' at d80x25_top+cur_line_pos
store dword ' SVN' at d80x25_top+cur_line_pos-4
 
space_msg: line_space
space_msg:
line_space
verstr:
; line_space
; version string
/kernel/branches/net/boot/bootvesa.inc
94,7 → 94,8
push edx
call int2str
pop eax
@@: or al,0x30
@@:
or al, 0x30
mov [ds:di],al
inc di
ret
107,7 → 108,8
push edx
call int2strnz
pop eax
@@: or al,0x30
@@:
or al, 0x30
mov [es:di],al
inc di
ret
245,7 → 247,8
jb @f ; We do not use Vesa 1.2 mode is now
 
or cx, 0x4000 ; use LFB
.lp1: mov [es:bx+6],cx ; +6 : mode number
.lp1:
mov [es:bx+6], cx ; +6 : mode number
movzx ax,byte [es:mi.BitsPerPixel]
mov word [es:bx+8],ax ; +8 : bits per pixel
add bx,size_of_step ; size of record
315,7 → 318,11
cmp word [es:si+6],0x13
je .no_vesa_0x13
 
if defined extended_primary_loader
mov di, config_file_variables
else
mov di,loader_block_error
end if
movzx eax,word[es:si+0]
mov ecx,10
call int2strnz
328,7 → 335,11
movzx eax,word[es:si+8]
call int2strnz
mov dword[es:di],0x00000d0a
if defined extended_primary_loader
mov si, config_file_variables
else
mov si,loader_block_error
end if
push ds
push es
pop ds
345,9 → 356,35
ret
;-----------------------------------------------------------------------------
check_first_parm:
if defined extended_primary_loader
mov cx, [number_vm]
jcxz .novbemode
mov si, modes_table
.findvbemode:
cmp [es:si+6], cx
jnz @f
cmp word [es:si+8], 32
je .ok_found_mode
cmp word [es:si+8], 24
je .ok_found_mode
@@:
add si, size_of_step
cmp word [es:si], -1
jnz .findvbemode
.novbemode:
mov ax, [x_save]
test ax, ax
jz .zerro
mov bx, [y_save]
mov si, modes_table
call .loops
test ax, ax
jz .ok_found_mode
else
mov si,word [preboot_graph]
test si,si
jnz .no_zero ;if no zero
end if
.zerro:
; mov ax,modes_table
; mov word [cursor_pos],ax
375,6 → 412,7
jz .ok_found_mode
 
mov si,modes_table
if ~ defined extended_primary_loader
jmp .ok_found_mode
 
 
395,6 → 433,7
; jb .zerro ;check on correct if bellow
; cmp ax,word [end_cursor]
; ja .zerro ;check on correct if anymore
end if
 
.ok_found_mode:
mov word [home_cursor],si
404,7 → 443,8
 
mov ecx,long_v_table
 
.loop: add ax,size_of_step
.loop:
add ax, size_of_step
cmp ax,word [end_cursor]
jae .next_step
loop .loop
437,13 → 477,16
je .ok
cmp word [es:si+8],24
je .ok
.next: add si,size_of_step
.next:
add si, size_of_step
cmp word [es:si],-1
je .exit
jmp .loops
.ok: xor ax,ax
.ok:
xor ax, ax
ret
.exit: or ax,-1
.exit:
or ax, -1
ret
 
 
486,7 → 529,8
jmp .ok
 
 
.low: sub cx,size_of_step
.low:
sub cx, size_of_step
cmp cx,modes_table
jb .ok
push cx
/kernel/branches/net/boot/parsers.inc
0,0 → 1,170
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2011. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
$Revision: 2288 $
 
; All parsers are called with ds:si -> value of the variable,
; possibly with spaces before, and dx = limit of config file.
 
; Three subroutines parse_char, parse_number and parse_bool set CF
; if something has failed, otherwise return the value in al/ax.
 
parse_timeout:
; timeout is a number not greater than 9
call parse_number
jc .nothing
cmp ax, 9
jbe @f
mov ax, 9
@@:
imul ax, 18
mov [es:preboot_timeout], ax
.nothing:
ret
 
parse_resolution:
; resolution is <width>*<height>, 'x' can be used instead of '*'
; parse width
call parse_number
jc .nothing
; save width
xchg ax, bx
; test for 'x' or '*'
call parse_char
cmp al, 'x'
jz @f
cmp al, '*'
jnz .nothing
@@:
; parse height
call parse_number
jc .nothing
; write width and height
mov [es:x_save], bx
mov [es:y_save], ax
.nothing:
ret
 
parse_vbemode:
; vbemode is a number
call parse_number
jc .nothing
mov [es:number_vm], ax
.nothing:
ret
 
;parse_vrr:
;; vrr is a boolean setting
; call parse_bool
; jc .nothing
;; convert 0 to 2, 1 to 1
; inc ax
; xor al, 3
; mov [es:preboot_vrrm], al
;.nothing:
; ret
 
parse_biosdisks:
; using biosdisks is a boolean setting
call parse_bool
jc .nothing
; convert 0 to 2, 1 to 1
inc ax
xor al, 3
mov [es:preboot_biosdisk], al
.nothing:
ret
 
parse_imgfrom:
; boot device (1-floppy 2-kolibri.img using primary loader)
call parse_number
jc .nothing
cmp al, 1
jb .nothing
cmp al, 2
ja .nothing
mov [es:preboot_device], al
.nothing:
ret
 
parse_char:
; skip spaces and return the next character or CF if EOF.
cmp si, dx
jae .eof
lodsb
cmp al, ' '
jbe parse_char
ret
.eof:
stc
ret
 
parse_number:
; initialize high part of ax to zero
xor ax, ax
; skip spaces
call parse_char
jc .bad
; al should be a digit
sub al, '0'
cmp al, 9
ja .bad
; accumulate the value in cx
xchg cx, ax
@@:
cmp si, dx
jae .eof
lodsb
sub al, '0'
cmp al, 9
ja .end
imul cx, 10
add cx, ax
jmp @b
; if the end is caused by non-digit, unwind the last character
.end:
dec si
.eof:
xchg cx, ax
clc
ret
.bad:
stc
ret
 
parse_bool:
; skip spaces
call parse_char
jc .bad
; Boolean false can be represented as 0=no=off,
; boolean true can be represented as 1=yes=on.
cmp al, '0'
jz .false
cmp al, '1'
jz .true
mov ah, al
cmp si, dx
jae .bad
lodsb
cmp ax, 'n'*256 + 'o'
jz .false
cmp ax, 'o'*256 + 'f'
jz .false
cmp ax, 'y'*256 + 'e'
jz .true
cmp ax, 'o'*256 + 'n'
jz .true
.bad:
stc
ret
.true:
xor ax, ax
inc ax
ret
.false:
xor ax, ax
ret
/kernel/branches/net/boot/preboot.inc
23,7 → 23,7
number_vm dw 0 ;
;pixel_save dw 0 ; per to pixel
preboot_gprobe db 0 ; probe vesa3 videomodes (1-no, 2-yes)
preboot_vrrm db 0 ; use VRR_M (1-yes, 2- no)
;preboot_vrrm db 0 ; use VRR_M (1-yes, 2- no)
preboot_dma db 0 ; use DMA for access to HDD (1-always, 2-only for read, 3-never)
preboot_device db 0 ; boot device
; (1-floppy 2-harddisk 3-kernel restart 4-format ram disk)
30,9 → 30,13
;!!!! 0 - autodetect !!!!
preboot_blogesc = 0 ; start immediately after bootlog
preboot_biosdisk db 0 ; use V86 to access disks through BIOS (1-yes, 2-no)
if defined extended_primary_loader
preboot_timeout dw 5*18 ; timeout in 1/18th of second for config settings screen
end if
 
if $>0x200
ERROR: prebooting parameters must fit in first sector!!!
ERROR:
prebooting parameters must fit in first sector!!!
end if
hdsysimage db 'KOLIBRI IMG' ; load from
image_save db 'KOLIBRI IMG' ; save to
hdsysimage db 'KOLIBRI.IMG',0 ; load from
image_save db 'KOLIBRI.IMG',0 ; save to
/kernel/branches/net/boot/rdload.inc
103,7 → 103,7
read_image:
mov ebx, read_image_fsinfo
pushad
call file_system_lfn
call file_system_lfn_protected
popad
ret
 
/kernel/branches/net/boot/shutdown.inc
98,8 → 98,10
jmp $
no_apm_off:
 
if ~ defined extended_primary_loader ; kernel restarting is not supported
dec ax ; 3 = reboot
jnz restart_kernel ; 4 = restart kernel
end if
push 0x40
pop ds
mov word[0x0072],0x1234
150,6 → 152,7
;!!!!!!!!!!!!!!!!!!!!!!!!
ret
 
if ~ defined extended_primary_loader
restart_kernel:
 
mov ax,0x0003 ; set text mode for screen
205,5 → 208,5
mov si, kernel_restart_bootblock
mov ax, 'KL'
jmp 0x1000:0000
end if
 
 
/kernel/branches/net/core/apic.inc
371,6 → 371,33
ret
endp
 
proc disable_irq stdcall, irq_line:dword
mov ebx, [irq_line]
cmp [irq_mode], IRQ_APIC
je .APIC
 
mov edx, 0x21
cmp ebx, 8
jb @F
 
mov edx, 0xA1
sub ebx, 8
@@:
in al, dx
bts eax, ebx
out dx, al
ret
.APIC:
shl ebx, 1
add ebx, 0x10
mov eax, ebx
call IOAPIC_read
or eax, 0x10000; bit 16
xchg eax, ebx
call IOAPIC_write
ret
endp
 
align 4
pci_irq_fixup:
 
/kernel/branches/net/core/conf_lib-sp.inc
0,0 → 1,11
; ste archivo debe ser editado con codificaci¢n CP866
 
ugui_mouse_speed db 'velocidad del rat¢n',0
ugui_mouse_delay db 'demora del rat¢n',0
 
udev db 'disp',0
unet db 'red',0
unet_active db 'activa',0
unet_addr db 'direc',0
unet_mask db 'm sc',0
unet_gate db 'puer',0
/kernel/branches/net/core/conf_lib.inc
67,16 → 67,27
endp
iglobal
ugui db 'gui',0
ugui_mouse_speed db 'mouse_speed',0
ugui_mouse_speed_def db '2',0
ugui_mouse_delay db 'mouse_delay',0
ugui_mouse_delay_def db '0x00A',0
 
udev db 'dev',0
udev_midibase db 'midibase',0
udev_midibase_def db '0x320',0
endg
 
iglobal
if lang eq sp
include 'core/conf_lib-sp.inc'
else
ugui_mouse_speed db 'mouse_speed',0
ugui_mouse_delay db 'mouse_delay',0
udev db 'dev',0
unet db 'net',0
unet_active db 'active',0
unet_addr db 'addr',0
unet_mask db 'mask',0
unet_gate db 'gate',0
end if
unet_def db 0
endg
; convert string to DWord
proc strtoint stdcall,strs
pushad
/kernel/branches/net/core/dll.inc
369,7 → 369,7
 
pushad
lea ebx, [cmd]
call file_system_lfn
call file_system_lfn_protected
popad
ret
endp
/kernel/branches/net/core/heap.inc
440,6 → 440,7
cmp edx, [edx]
jne .add_block
btr [mem_block_mask], ecx
 
.add_block:
bts [mem_block_mask], eax
lea edx, [mem_block_list+eax*8]
758,11 → 759,13
inc ebx
dec eax
jnz .fill
 
.second_nofill:
sub ecx, edx
jz .nothird
or cl, FREE_BLOCK
mov [page_tabs+ebx*4], ecx
 
.nothird:
 
mov edx, [current_slot]
822,6 → 825,7
inc esi
dec ecx
jnz .release
 
.released:
push edi
 
/kernel/branches/net/core/sys32-sp.inc
0,0 → 1,4
; ste archivo debe ser editado con codificaci¢n CP866
 
msg_sel_ker db "n£cleo", 0
msg_sel_app db "aplicaci¢n", 0
/kernel/branches/net/core/sys32.inc
75,8 → 75,12
msg_exc_d db "General protection fault", 0
msg_exc_e db "Page fault", 0
 
if lang eq sp
include 'core/sys32-sp.inc'
else
msg_sel_ker db "kernel", 0
msg_sel_app db "application", 0
end if
 
endg
 
219,7 → 223,11
pop ebx
.no_ud:
mov edx, [TASK_BASE];not scratched below
DEBUGF 1, "K : Process - forced terminate PID: %x\n", [edx+TASKDATA.pid]
if lang eq sp
DEBUGF 1, "K : Proceso - terminado forzado PID: %x [%s]\n", [edx+TASKDATA.pid], [current_slot]
else
DEBUGF 1, "K : Process - forced terminate PID: %x [%s]\n", [edx+TASKDATA.pid], [current_slot]
end if
cmp bl, 0x08
jb .l0
cmp bl, 0x0e
713,3 → 721,78
; mov esi,boot_sched_2
; call boot_log
; ret
 
; Three following procedures are used to guarantee that
; some part of kernel code will not be terminated from outside
; while it is running.
; Note: they do not protect a thread from terminating due to errors inside
; the thread; accessing a nonexisting memory would still terminate it.
 
; First two procedures must be used in pair by thread-to-be-protected
; to signal the beginning and the end of an important part.
; It is OK to have nested areas.
 
; The last procedure must be used by outside wanna-be-terminators;
; if it is safe to terminate the given thread immediately, it returns eax=1;
; otherwise, it returns eax=0 and notifies the target thread that it should
; terminate itself when leaving a critical area (the last critical area if
; they are nested).
 
; Implementation. Those procedures use one dword in APPDATA for the thread,
; APPDATA.terminate_protection.
; * The upper bit is 1 during normal operations and 0 when terminate is requested.
; * Other bits form a number = depth of critical regions,
; plus 1 if the upper bit is 1.
; * When this dword goes to zero, the thread should be destructed,
; and the procedure in which it happened becomes responsible for destruction.
 
; Enter critical area. Called by thread which wants to be protected.
proc protect_from_terminate
mov edx, [current_slot]
; Atomically increment depth of critical areas and get the old value.
mov eax, 1
lock xadd [edx+APPDATA.terminate_protection], eax
; If the old value was zero, somebody has started to terminate us,
; so we are destructing and cannot do anything protected.
; Otherwise, return to the caller.
test eax, eax
jz @f
ret
@@:
; Wait for somebody to finish us.
call change_task
jmp @b
endp
 
; Leave critical area. Called by thread which wants to be protected.
proc unprotect_from_terminate
mov edx, [current_slot]
; Atomically decrement depth of critical areas.
lock dec [edx+APPDATA.terminate_protection]
; If the result of decrement is zero, somebody has requested termination,
; but at that moment we were inside a critical area; terminate now.
jz sys_end
; Otherwise, return to the caller.
ret
endp
 
; Request termination of thread identified by edx = SLOT_BASE + slot*256.
; Called by anyone.
proc request_terminate
xor eax, eax ; set return value
; Atomically clear the upper bit. If it was already zero, then
; somebody has requested termination before us, so just exit.
lock btr [edx+APPDATA.terminate_protection], 31
jnc .unsafe
; Atomically decrement depth of critical areas.
lock dec [edx+APPDATA.terminate_protection]
; If the result of decrement is nonzero, the target thread is inside a
; critical area; leave termination to leaving that area.
jnz .unsafe
; Otherwise, it is safe to kill the target now and the caller is responsible
; for this. Return eax=1.
inc eax
.unsafe:
ret
endp
 
/kernel/branches/net/core/syscall.inc
38,9 → 38,13
pushad
cld
 
movzx eax, al
call protect_from_terminate
 
movzx eax, byte [esp+28]
mov edx, dword [esp+20]
call dword [servetable2 + eax * 4]
 
call unprotect_from_terminate
popad
;------------------
xchg ecx, [ss:esp] ; â âåðøèí ñòåêà - app ecx, ecx - app esp + 4
62,8 → 66,11
i40:
pushad
cld
movzx eax, al
call protect_from_terminate
movzx eax, byte [esp+28]
mov edx, dword [esp+20]
call dword [servetable2 + eax * 4]
call unprotect_from_terminate
popad
iretd
 
85,10 → 92,13
;------------------
pushad
cld
call protect_from_terminate
 
movzx eax, al
movzx eax, byte [esp+28]
mov edx, dword [esp+20]
call dword [servetable2 + eax * 4]
 
call unprotect_from_terminate
popad
;------------------
mov ecx, [ss:esp+4]
125,7 → 135,7
dd sys_getkey ; 2-GetKey
dd sys_clock ; 3-GetTime
dd syscall_writetext ; 4-WriteText
dd delay_hs ; 5-DelayHs
dd delay_hs_unprotected ; 5-DelayHs
dd syscall_openramdiskfile ; 6-OpenRamdiskFile
dd syscall_putimage ; 7-PutImage
dd syscall_button ; 8-DefineButton
/kernel/branches/net/core/taskman.inc
307,7 → 307,6
.failed:
mov eax, [save_cr3]
call set_cr3
 
.err:
.err_hdr:
stdcall kernel_free, [file_base]
1076,6 → 1075,7
mov [eax+SLOT_BASE+APPDATA.fpu_state], edi
mov [eax+SLOT_BASE+APPDATA.exc_handler], 0
mov [eax+SLOT_BASE+APPDATA.except_mask], 0
mov [eax+SLOT_BASE+APPDATA.terminate_protection], 80000001h
 
;set default io permission map
mov ecx, [SLOT_BASE+256+APPDATA.io_map]
1200,6 → 1200,14
mov eax, [esi+0x08] ;app_eip
mov [ebx+REG_EIP], eax;app_entry
mov [ebx+REG_CS], dword app_code
mov eax, [CURRENT_TASK]
shl eax, 8 ; created by kernel?
cmp [SLOT_BASE+eax+APPDATA.dir_table], sys_pgdir - OS_BASE
jnz @f
cmp [app_path], 0 ; it is a thread?
jnz @f
mov [ebx+REG_CS], dword os_code ; kernel thread
@@:
mov [ebx+REG_EFLAGS], dword EFL_IOPL1+EFL_IF
 
mov eax, [esi+0x0C] ;app_esp
/kernel/branches/net/data32.inc
87,6 → 87,8
if preboot_blogesc
boot_tasking db '‚ᥠ£®â®¢® ¤«ï § ¯ã᪠, ­ ¦¬¨âॠESC ¤«ï áâ àâ ',0
end if
else if lang eq sp
include 'data32sp.inc'
else
boot_initirq db 'Initialize IRQ',0
boot_picinit db 'Initialize PIC',0
131,8 → 133,10
 
msg_unresolved db 'unresolved ',0
msg_module db 'in module ',0
if ~ lang eq sp
msg_version db 'incompatible driver version',13,10,0
msg_www db 'please visit www.kolibrios.org',13,10,0
end if
msg_CR db 13,10,0
 
intel_str db "GenuineIntel",0
155,7 → 159,7
notifyapp db '@notify',0
if lang eq ru
ud_user_message db 'Žè¨¡ª : ­¥¯®¤¤¥à¦¨¢ ¥¬ ï ¨­áâàãªæ¨ï ¯à®æ¥áá®à ',0
else
else if ~ lang eq sp
ud_user_message db 'Error: unsupported processor instruction',0
end if
 
/kernel/branches/net/data32sp.inc
0,0 → 1,40
boot_initirq db 'Inicializar IRQ',0
boot_picinit db 'Inicializar PIC',0
boot_v86machine db 'Inicializar sistema V86',0
boot_inittimer db 'Inicializar reloj del sistema (IRQ0)',0
boot_initapic db 'Prueba inicializar APIC',0
boot_enableirq db 'Habilitar interrupciones 2, 6, 13, 14, 15',0
boot_enablint_ide db 'Habiliar interrupciones en controladores IDE',0
boot_detectfloppy db 'Buscar unidades de disquete',0
boot_detecthdcd db 'Buscar discos duros y unidades ATAPI',0
boot_getcache db 'Tomar memoria para cach‚',0
boot_detectpart db 'Buscar particiones en discos',0
boot_init_sys db 'Inicializar directorio del sistema /sys',0
boot_loadlibs db 'Cargando librer¡as (.obj)',0
boot_memdetect db 'Determinando cantidad de memoria',0
boot_tss db 'Configurando TSSs',0
boot_cpuid db 'Leyendo CPUIDs',0
; boot_devices db 'Detectando dispositivos',0
boot_setmouse db 'Configurando el rat¢n',0
boot_windefs db 'Setting window defaults',0
boot_bgr db 'Calculating background',0
boot_resirqports db 'Reservando IRQs y puertos',0
boot_setostask db 'Configurando tarea OS',0
boot_allirqs db 'Desenmascarando IRQs',0
boot_tsc db 'Leyendo TSC',0
boot_cpufreq db 'La frequencia del CPU es ',' ',' MHz',0
boot_pal_ega db 'Configurando paleta EGA/CGA 320x200',0
boot_pal_vga db 'Configurando paleta VGA 640x480',0
boot_failed db 'Fallo al iniciar la primer aplicaci¢n',0
boot_mtrr db 'Configurando MTRR',0
 
boot_APIC_found db 'APIC habilitado', 0
boot_APIC_nfound db 'APIC no encontrado', 0
if preboot_blogesc
boot_tasking db 'Todo configurado - presiona ESC para iniciar',0
end if
 
msg_version db 'versi¢n incompatible del controlador',13,10,0
msg_www db 'por favor, visita www.kolibrios.org',13,10,0
 
ud_user_message db 'Error: instrucci¢n no soportada por el procesador',0
/kernel/branches/net/fs/ext2.inc
450,7 → 450,7
mov ebx, [ext2_data.ext2_temp_block]
call ext2_get_block
test eax, eax
jz @F ;если не было ошибки
jnz @F ;если не было ошибки
 
mov ecx, [ebx + ecx*4] ;заносим результат
@@:
895,15 → 895,13
jae .size_great_great
 
.size_great_less:
push 1
; or [EXT2_files_in_folder], 1 ;читаем по границе размера
push 1 ;читаем по границе размера
mov ecx, [ebp + EXT2_INODE_STRUC.i_size]
sub ecx, [esi] ;(размер - старт) = сколько читать
jmp @F
 
.size_great_great:
push 0
; and [EXT2_files_in_folder], 0 ;читаем столько сколько запросили
push 0 ;читаем столько сколько запросили
 
@@:
;здесь мы точно знаем сколько байт читать - ecx
919,7 → 917,7
mov eax, [esi]
div [ext2_data.block_size]
 
push eax ;номер блока запоминаем
push eax ;счетчик блоков ложим в стек
push ecx
mov ecx, eax
949,7 → 947,7
 
.zero_start:
mov eax, ecx
push 0 ;счетчик блоков
push 0 ;счетчик блоков ложим в стек
;теперь в eax кол-во оставшихся байт для чтения
.calc_blocks_count:
mov ebx, edi ;чтение блока прям в ->ebx
982,7 → 980,7
inc ecx
call ext2_get_inode_block
test eax, eax
jz .error_at_finish_block
jnz .error_at_finish_block
 
mov edi, ebx
mov eax, ecx
994,9 → 992,13
mov ecx, edx
mov esi, ebx
rep movsb ;кусок last блока
jmp @F
 
.end_read:
pop ebx
pop eax
pop ecx ;счетчик блоков, который хранился в стеке
@@:
pop ebx ;количество считанных байт
pop eax ; 1 или 0 - достигли ли конца файла
test eax, eax
jz @F
 
1009,7 → 1011,6
.only_one_block:
mov esi, ebx
rep movsb ;кусок last блока
pop eax
jmp .end_read
.error_at_first_block:
1132,11 → 1133,11
sub eax, [ext2_data.count_block_in_block]
jle .not_found
push eax
inc ecx
jmp .folder_block_cycle
 
.not_found:
pop ebx
mov eax, ERROR_FILE_NOT_FOUND
ret
 
/kernel/branches/net/fs/fs-sp.inc
0,0 → 1,13
dir0:
db 'DISCO DURO '
db 'UNIDAD RAM '
db 'DISQUETE '
db 0
 
dir1:
db 'PRIMERO '
db 'SEGUNDO '
db 'TERCERO '
db 'CUARTO '
db 0
 
/kernel/branches/net/fs/fs.inc
21,6 → 21,10
 
 
iglobal
 
if lang eq sp
include 'fs/fs-sp.inc'
else
dir0:
db 'HARDDISK '
db 'RAMDISK '
33,6 → 37,7
db 'THIRD '
db 'FOURTH '
db 0
end if
 
not_select_IDE db 0
 
/kernel/branches/net/fs/fs_lfn.inc
134,6 → 134,15
 
endg
 
file_system_lfn_protected:
pushad
call protect_from_terminate
call file_system_lfn
call unprotect_from_terminate
popad
mov [image_of_eax], eax
mov [image_of_ebx], ebx
ret
 
file_system_lfn:
; in: ebx->fileinfo block
/kernel/branches/net/gui/event.inc
467,9 → 467,11
;--------------------------------------
align 4
sys_wait_event_timeout: ;; f23
call unprotect_from_terminate
mov edx, get_event_for_app; wait_test
call Wait_events_ex ; ebx - timeout
mov [esp+32], eax
call protect_from_terminate
ret
;-----------------------------------------------------------------------------
align 4
/kernel/branches/net/hid/keyboard.inc
17,6 → 17,8
VKEY_CAPSLOCK = 0000000001000000b
VKEY_NUMLOCK = 0000000010000000b
VKEY_SCRLOCK = 0000000100000000b
VKEY_LWIN = 0000001000000000b
VKEY_RWIN = 0000010000000000b
 
VKEY_SHIFT = 0000000000000011b
VKEY_CONTROL = 0000000000001100b
224,7 → 226,30
xchg cl, [ext_code]
and al, 0x7F
mov bh, 1
;--------------------------------------
@@:
cmp al, 0x5B
jne @f
cmp cl, 0xE0
jne @f
mov eax, VKEY_LWIN
mov bh, 0
jmp .modifier
;--------------------------------------
@@:
cmp al, 0x5C
jne @f
cmp cl, 0xE0
jne @f
mov eax, VKEY_RWIN
mov bh, 0
jmp .modifier
;--------------------------------------
@@:
cmp al, 0x2A
jne @f
359,9 → 384,6
xor [kb_state], eax
xor [kb_lights], bl
push ecx
call set_lights
pop ecx
.writekey:
pushad
; test for system hotkeys
495,10 → 517,12
ret
 
ps2_set_lights:
stdcall disable_irq, 1
mov al, 0xED
call kb_write
mov al, [esp+8]
call kb_write
stdcall enable_irq, 1
ret 8
 
;// mike.dld ]
/kernel/branches/net/kernel.asm
77,7 → 77,7
USE_COM_IRQ equ 1 ; make irq 3 and irq 4 available for PCI devices
 
; Enabling the next line will enable serial output console
;debug_com_base equ 0x2f8 ; 0x3f8 is com1, 0x2f8 is com2, 0x3e8 is com3, 0x2e8 is com4, no irq's are used
;debug_com_base equ 0x3f8 ; 0x3f8 is com1, 0x2f8 is com2, 0x3e8 is com3, 0x2e8 is com4, no irq's are used
 
include "proc32.inc"
include "kglobals.inc"
133,13 → 133,19
org 0x0
jmp start_of_code
 
version db 'Kolibri OS network branch ',13,10,13,10,0
if lang eq sp
include "kernelsp.inc" ; spanish kernel messages
else
version db 'Kolibri OS version 0.7.7.0+ ',13,10,13,10,0
end if
 
include "boot/bootstr.inc" ; language-independent boot messages
include "boot/preboot.inc"
 
if lang eq en
include "boot/booteng.inc" ; english system boot messages
if lang eq ge
include "boot/bootge.inc" ; german system boot messages
else if lang eq sp
include "boot/bootsp.inc" ; spanish system boot messages
else if lang eq ru
include "boot/bootru.inc" ; russian system boot messages
include "boot/ru.inc" ; Russian font
147,7 → 153,7
include "boot/bootet.inc" ; estonian system boot messages
include "boot/et.inc" ; Estonian font
else
include "boot/bootge.inc" ; german system boot messages
include "boot/booten.inc" ; english system boot messages
end if
 
include "boot/bootcode.inc" ; 16 bit system boot code
608,6 → 614,52
mov [mem_BACKGROUND], 4
mov [img_background], static_background_data
 
; SET UP OS TASK
 
mov esi, boot_setostask
call boot_log
 
xor eax, eax
mov dword [SLOT_BASE+APPDATA.fpu_state], fpu_data
mov dword [SLOT_BASE+APPDATA.exc_handler], eax
mov dword [SLOT_BASE+APPDATA.except_mask], eax
 
; name for OS/IDLE process
 
mov dword [SLOT_BASE+256+APPDATA.app_name], dword 'OS/I'
mov dword [SLOT_BASE+256+APPDATA.app_name+4], dword 'DLE '
mov edi, [os_stack_seg]
mov dword [SLOT_BASE+256+APPDATA.pl0_stack], edi
add edi, 0x2000-512
mov dword [SLOT_BASE+256+APPDATA.fpu_state], edi
mov dword [SLOT_BASE+256+APPDATA.saved_esp0], edi; just for case
mov dword [SLOT_BASE+256+APPDATA.terminate_protection], 80000001h
 
mov esi, fpu_data
mov ecx, 512/4
cld
rep movsd
 
mov dword [SLOT_BASE+256+APPDATA.exc_handler], eax
mov dword [SLOT_BASE+256+APPDATA.except_mask], eax
 
mov ebx, SLOT_BASE+256+APP_OBJ_OFFSET
mov dword [SLOT_BASE+256+APPDATA.fd_obj], ebx
mov dword [SLOT_BASE+256+APPDATA.bk_obj], ebx
 
mov dword [SLOT_BASE+256+APPDATA.cur_dir], sysdir_path
mov dword [SLOT_BASE+256+APPDATA.tls_base], eax
 
; task list
mov dword [TASK_DATA+TASKDATA.mem_start], eax; process base address
inc eax
mov dword [CURRENT_TASK], eax
mov dword [TASK_COUNT], eax
mov [current_slot], SLOT_BASE+256
mov [TASK_BASE], dword TASK_DATA
mov byte[TASK_DATA+TASKDATA.wnd_number], al ; on screen number
mov dword [TASK_DATA+TASKDATA.pid], eax ; process id number
 
mov [SLOT_BASE + 256 + APPDATA.dir_table], sys_pgdir - OS_BASE
 
; REDIRECT ALL IRQ'S TO INT'S 0x20-0x2f
718,6 → 770,8
movzx ecx, word [boot_y]
if lang eq ru
or ecx, (10+30*6) shl 16
else if lang eq sp
or ecx, (10+33*6) shl 16
else
or ecx, (10+29*6) shl 16
end if
739,7 → 793,6
 
mov [pci_access_enabled], 1
 
 
; SET PRELIMINARY WINDOW STACK AND POSITIONS
 
mov esi, boot_windefs
759,52 → 812,6
call boot_log
call reserve_irqs_ports
 
; SET UP OS TASK
 
mov esi, boot_setostask
call boot_log
 
xor eax, eax
mov dword [SLOT_BASE+APPDATA.fpu_state], fpu_data
mov dword [SLOT_BASE+APPDATA.exc_handler], eax
mov dword [SLOT_BASE+APPDATA.except_mask], eax
 
; name for OS/IDLE process
 
mov dword [SLOT_BASE+256+APPDATA.app_name], dword 'OS/I'
mov dword [SLOT_BASE+256+APPDATA.app_name+4], dword 'DLE '
mov edi, [os_stack_seg]
mov dword [SLOT_BASE+256+APPDATA.pl0_stack], edi
add edi, 0x2000-512
mov dword [SLOT_BASE+256+APPDATA.fpu_state], edi
mov dword [SLOT_BASE+256+APPDATA.saved_esp0], edi; just for case
; [SLOT_BASE+256+APPDATA.io_map] was set earlier
 
mov esi, fpu_data
mov ecx, 512/4
cld
rep movsd
 
mov dword [SLOT_BASE+256+APPDATA.exc_handler], eax
mov dword [SLOT_BASE+256+APPDATA.except_mask], eax
 
mov ebx, SLOT_BASE+256+APP_OBJ_OFFSET
mov dword [SLOT_BASE+256+APPDATA.fd_obj], ebx
mov dword [SLOT_BASE+256+APPDATA.bk_obj], ebx
 
mov dword [SLOT_BASE+256+APPDATA.cur_dir], sysdir_path
mov dword [SLOT_BASE+256+APPDATA.tls_base], eax
 
; task list
mov dword [TASK_DATA+TASKDATA.mem_start], eax; process base address
inc eax
mov dword [CURRENT_TASK], eax
mov dword [TASK_COUNT], eax
mov [current_slot], SLOT_BASE+256
mov [TASK_BASE], dword TASK_DATA
mov byte[TASK_DATA+TASKDATA.wnd_number], al ; on screen number
mov dword [TASK_DATA+TASKDATA.pid], eax ; process id number
 
call init_display
mov eax, [def_cursor]
mov [SLOT_BASE+APPDATA.cursor], eax
841,6 → 848,8
movzx ecx, word [boot_y]
if lang eq ru
add ecx, (10+19*6) shl 16 - 10 ; 'Determining amount of memory'
else if lang eq sp
add ecx, (10+25*6) shl 16 - 10 ; 'Determining amount of memory'
else
add ecx, (10+17*6) shl 16 - 10 ; 'Determining amount of memory'
end if
912,8 → 921,8
call fs_execute_from_sysdir
 
; cmp eax,2 ; continue if a process has been loaded
sub eax, 2
jz first_app_found
test eax, eax
jns first_app_found
 
mov esi, boot_failed
call boot_log
2089,17 → 2098,21
push ecx
cmp ecx, 2
jb noprocessterminate
 
cmp ecx, [TASK_COUNT]
mov edx, [TASK_COUNT]
cmp ecx, edx
ja noprocessterminate
 
mov eax, [TASK_COUNT]
shl ecx, 5
mov eax, [TASK_COUNT]
mov edx, [ecx+CURRENT_TASK+TASKDATA.pid]
 
add ecx, CURRENT_TASK+TASKDATA.state
cmp byte [ecx], 9
jz noprocessterminate
push ecx edx
lea edx, [(ecx-(CURRENT_TASK and 1FFFFFFFh)-TASKDATA.state)*8+SLOT_BASE]
call request_terminate
pop edx ecx
test eax, eax
jz noprocessterminate
;--------------------------------------
; terminate all network sockets it used
pusha
3476,15 → 3489,31
mov edx, [shutdown_processes]
 
cmp [SYS_SHUTDOWN], dl
jne no_mark_system_shutdown
jne noshutdown
 
lea ecx, [edx-1]
mov edx, OS_BASE+0x3040
jecxz @f
jecxz no_mark_system_shutdown
;--------------------------------------
align 4
markz:
push ecx edx
cmp [edx+TASKDATA.state], 9
jz .nokill
lea edx, [(edx-(CURRENT_TASK and 1FFFFFFFh))*8+SLOT_BASE]
cmp [edx+APPDATA.dir_table], sys_pgdir - OS_BASE
jz .nokill
call request_terminate
jmp .common
.nokill:
dec byte [SYS_SHUTDOWN]
xor eax, eax
.common:
pop edx ecx
test eax, eax
jz @f
mov [edx+TASKDATA.state], byte 3
@@:
add edx, 0x20
loop markz
;--------------------------------------
3504,11 → 3533,20
newct:
mov cl, [ebx]
cmp cl, byte 3
jz terminate
jz .terminate
 
cmp cl, byte 4
jz terminate
jnz .noterminate
.terminate:
pushad
call terminate
popad
cmp byte [SYS_SHUTDOWN], 0
jz .noterminate
dec byte [SYS_SHUTDOWN]
je system_shutdown
 
.noterminate:
add ebx, 0x20
inc esi
dec eax
3718,6 → 3756,15
mov [esp+32], eax ; return old mask value
ret
;-----------------------------------------------------------------------------
 
; this is for syscall
proc delay_hs_unprotected
call unprotect_from_terminate
call delay_hs
call protect_from_terminate
ret
endp
 
align 4
delay_hs: ; delay in 1/100 secs
; ebx = delay time
5606,4 → 5653,6
__REV__ = __REV
 
uglobals_size = $ - endofcode
if ~ lang eq sp
diff16 "end of kernel code",0,$
end if
/kernel/branches/net/kernel32.inc
137,7 → 137,7
ipc_size dd ?
event_mask dd ?
debugger_slot dd ?
dd ?
terminate_protection dd ?
keyboard_mode db ?
rb 3
dir_table dd ?
/kernel/branches/net/kernelsp.inc
0,0 → 1,4
; ste archivo debe ser editado con codificaci¢n CP866
 
version db 'Kolibri OS versi¢n 0.7.7.0+ ',13,10,13,10,0
diff16 "fin del c¢digo del kernel",0,$
/kernel/branches/net/network/stack.inc
291,11 → 291,15
align 4
NET_link_changed:
 
ret
 
DEBUGF 1,"NET_link_changed: %x\n", ebx
 
align 4
NET_send_event:
 
ret
 
DEBUGF 1,"NET_send_event\n"
 
; Send event to all applications
330,8 → 334,7
 
DEBUGF 1,"NET_Add_Device: %x\n", ebx ;;; TODO: use mutex to lock net device list
 
mov eax, [NET_RUNNING]
cmp eax, MAX_NET_DEVICES
cmp [NET_RUNNING], MAX_NET_DEVICES
jae .error
 
;----------------------------------