Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3358 → Rev 3359

/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