Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3776 → Rev 3777

/kernel/trunk/boot/bootcode.inc
596,9 → 596,11
; settings:
; a) preboot_graph = graphical mode
; preboot_gprobe = probe this mode?
; b) preboot_dma = use DMA access?
; c) preboot_vrrm = use VRR?
; d) preboot_device = from what boot?
; b) preboot_biosdisk = use BIOS disks through V86 emulation? // (earlier was: preboot_dma = use DMA access?)
; c) preboot_debug = duplicates kernel debug output to the screen // (earlier was: preboot_vrrm = use VRR?)
; // VRR is an obsolete functionality, used only with CRT monitors: increase display frequency by reducing screen resolution
; d) preboot_launcher = start the first app (right now it's LAUNCHER) after kernel is loaded?
; e) preboot_device = from where to boot?
 
; determine default settings
if ~ defined extended_primary_loader
632,6 → 634,8
; following 4 lines set variables to 1 if its current value is 0
cmp byte [di+preboot_dma-preboot_device], 1
adc byte [di+preboot_dma-preboot_device], 0
cmp byte [di+preboot_launcher-preboot_device], 1 ; Start LAUNCHER by default
adc byte [di+preboot_launcher-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
669,6 → 673,12
; mov si, vrrm_msg
; cmp [preboot_vrrm], 1
; call .say_on_off
mov si, debug_mode_msg
cmp [preboot_debug], 1
call .say_on_off
mov si, launcher_msg
cmp [preboot_launcher], 1
call .say_on_off
mov si, preboot_device_msg
call print
mov al, [preboot_device]
752,17 → 762,20
cmp al, 13
jz .continue
or al, 20h
cmp al, 'a'
cmp al, 'a' ; select graphical mode
jz .change_a
cmp al, 'q' ; Trick to make 'A' key on azerty keyboard work
je .change_a
cmp al, 'b'
cmp al, 'b' ; use BIOS disks? // (selecting YES will make BIOS disks visible as /bd)
jz .change_b
; cmp al, 'c'
; jz .change_c
cmp al, 'c' ; 'd'
cmp al, 'c' ; load kernel in debug mode? // (earlier was: use VRR?)
jz .change_c
cmp al, 'd' ; start launcher after kernel is loaded?
jz .change_d
cmp al, 'e' ; select boot origin
jnz .show_remarks
_setcursor 15,0
; e) preboot_device = from where to boot?
_setcursor 16,0
mov si, bdev
call print
if defined extended_primary_loader
772,7 → 785,7
end if
call getkey
mov [preboot_device], al
_setcursor 13,0
_setcursor 14,0
.d:
if ~ defined extended_primary_loader
mov [.bSettingsChanged], 1
858,9 → 871,9
jmp .d
 
.change_b:
_setcursor 15,0
; mov si, ask_dma
.change_b: ; b) preboot_biosdisk = use BIOS disks through V86 emulation?
_setcursor 16,0
; mov si, ask_dma // (earlier was: preboot_dma = use DMA access?)
; call print
; mov bx, '13'
; call getkey
872,8 → 885,8
mov [preboot_biosdisk], al
_setcursor 11,0
jmp .d
;.change_c:
; _setcursor 15,0
;.change_c: ; // VRR is an obsolete functionality, used only with CRT monitors
; _setcursor 16,0
; mov si, vrrmprint
; call print
; mov bx, '12'
881,6 → 894,24
; mov [preboot_vrrm], al
; _setcursor 12,0
; jmp .d
.change_c: ; c) preboot_debug = duplicates kernel debug output to the screen
_setcursor 16,0
mov si, ask_debug
call print
mov bx, '12'
call getkey
mov [preboot_debug], al
_setcursor 12,0
jmp .d
.change_d: ; d) preboot_launcher = start the first app (right now it's LAUNCHER) after kernel is loaded?
_setcursor 16,0
mov si, ask_launcher
call print
mov bx, '12'
call getkey
mov [preboot_launcher], al
_setcursor 13,0
jmp .d
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.say_on_off:
pushf
988,7 → 1019,7
_setcursor 6,0
mov si, loading_msg
call print
_setcursor 15,0
_setcursor 16,0
if ~ defined extended_primary_loader
cmp [.bSettingsChanged], 0
jz .load
1030,9 → 1061,9
pop ds
mov si, space_msg
mov byte [si+80], 0
_setcursor 15,0
_setcursor 16,0
call printplain
_setcursor 15,0
_setcursor 16,0
.load:
end if
; \end{diamond}[02.12.2005]
1053,8 → 1084,16
;; VRR_M USE
;
; mov al,[preboot_vrrm]
; mov [es:0x9030], al
; mov [es:BOOT_VRR], al ;// 0x9030
 
; Set kernel DEBUG mode - if nonzero, duplicates debug output to the screen.
mov al, [preboot_debug]
mov [es:BOOT_DEBUG_PRINT], al ;// 0x901E
 
; Start the first app (right now it's LAUNCHER) after kernel is loaded?
mov al, [preboot_launcher]
mov [es:BOOT_LAUNCHER_START], al ;// 0x901D
 
; BOOT DEVICE
 
mov al, [preboot_device]
/kernel/trunk/boot/booten.inc
52,7 → 52,7
pros db "00"
backspace2 db 8,8,0
boot_dev db 0 ; 0=floppy, 1=hd
start_msg db "Press [abc] to change settings, press [Enter] to continue booting",13,10,0
start_msg db "Press [abcde] 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
66,8 → 66,14
on_msg db " on",13,10,0
off_msg db " off",13,10,0
 
preboot_device_msg db " [c] Floppy image: ",0
debug_mode_msg db " [c] Duplicate debug output to the screen:",0
ask_debug db "Duplicate debug output to the screen? [1-yes, 2-no]: ",0
 
launcher_msg db " [d] Start LAUNCHER after kernel is loaded:",0
ask_launcher db "Start first app (LAUNCHER) after kernel is loaded? [1-yes, 2-no]: ",0
 
preboot_device_msg db " [e] Floppy image: ",0
 
if defined extended_primary_loader
preboot_device_msgs dw 0,pdm1,pdm2,0
pdm1 db "real floppy",13,10,0
/kernel/trunk/boot/bootet.inc
52,7 → 52,7
pros: latin1 "00"
backspace2:latin1 8,8,0
boot_dev db 0 ; 0=floppy, 1=hd
start_msg:latin1 "Vajuta [abc] seadete muutmiseks, vajuta [Enter] laadimise jätkamiseks",13,10,0
start_msg:latin1 "Vajuta [abcde] seadete muutmiseks, vajuta [Enter] laadimise jätkamiseks",13,10,0
time_msg: latin1 " või oota "
time_str: latin1 " 5 sekundit"
latin1 " automaatseks jätkamiseks",13,10,0
66,8 → 66,14
on_msg: latin1 " sees",13,10,0
off_msg: latin1 " väljas",13,10,0
 
preboot_device_msg:latin1 " [c] Disketi kujutis: ",0
debug_mode_msg: latin1 " [c] Duplicate siluda väljund ekraani:",0
ask_debug: latin1 "Duplicate siluda väljund ekraani? [1-jah, 2-no]: ",0
 
launcher_msg: latin1 " [d] Alusta LAUNCHER pärast kernel on koormatud:",0
ask_launcher: latin1 "Alusta esimese taotluse (LAUNCHER) pärast kernel laetakse? [1-jah, 2-no]: ",0
 
preboot_device_msg:latin1 " [e] Disketi kujutis: ",0
 
if defined extended_primary_loader
preboot_device_msgs dw 0,pdm1,pdm2,0
pdm1: latin1 "reaalne diskett",13,10,0
/kernel/trunk/boot/bootge.inc
54,7 → 54,7
pros db "00"
backspace2 db 8,8,0
boot_dev db 0 ; 0=floppy, 1=hd
start_msg db "Druecke [abc], um die Einstellungen zu aendern, druecke [Enter] zum starten",13,10,0
start_msg db "Druecke [abcde], um die Einstellungen zu aendern, druecke [Enter] zum starten",13,10,0
time_msg db " oder warte "
time_str db " 5 Sekunden"
db " bis zum automatischen Start",13,10,0
68,8 → 68,14
on_msg db " an",13,10,0
off_msg db " aus",13,10,0
 
preboot_device_msg db " [c] Diskettenimage: ",0
debug_mode_msg db " [c] Duplizieren debuggen Ausgabe auf dem Bildschirm:",0
ask_debug db "Duplizieren debuggen Ausgabe auf dem Bildschirm? [1-ja, 2 nein]: ",0
 
launcher_msg db " [d] Start LAUNCHER nach Kernel geladen wird:",0
ask_launcher db "Starten sie die erste App (LAUNCHER) nach Kernel geladen wird? [1-ja, 2 nein]: ",0
 
preboot_device_msg db " [e] Diskettenimage: ",0
 
if defined extended_primary_loader
preboot_device_msgs dw 0,pdm1,pdm2,0
pdm1 db "Echte Diskette",13,10,0
/kernel/trunk/boot/bootru.inc
50,7 → 50,7
pros: cp866 "00"
backspace2:cp866 8,8,0
boot_dev db 0
start_msg:cp866 "Нажмите [abc] для изменения настроек, [Enter] для продолжения загрузки",13,10,0
start_msg:cp866 "Нажмите [abcde] для изменения настроек, [Enter] для продолжения загрузки",13,10,0
time_msg: cp866 " или подождите "
time_str: cp866 " 5 секунд "
cp866 " до автоматического продолжения",13,10,0
64,8 → 64,14
on_msg: cp866 " вкл",13,10,0
off_msg: cp866 " выкл",13,10,0
 
preboot_device_msg:cp866 " [c] Образ дискеты: ",0
debug_mode_msg: cp866 " [c] Дублировать дебаг-вывод на экран монитора:",0
ask_debug: cp866 "Дублировать дебаг-вывод на экран монитора? [1-да, 2-нет]: ",0
 
launcher_msg: cp866 " [d] Запустить программу LAUNCHER после загрузки ядра:",0
ask_launcher: cp866 "Запустить первую программу (LAUNCHER) после загрузки ядра? [1-да, 2-нет]: ",0
 
preboot_device_msg:cp866 " [e] Образ дискеты: ",0
 
if defined extended_primary_loader
preboot_device_msgs dw 0,pdm1,pdm2,0
pdm1: cp866 "настоящая дискета",13,10,0
/kernel/trunk/boot/bootsp.inc
56,7 → 56,7
pros: cp850 "00"
backspace2:cp850 8,8,0
boot_dev db 0 ; 0=floppy, 1=hd
start_msg:cp850 "Presiona [abc] para cambiar la configuración, [Enter] para continuar",13,10,0
start_msg:cp850 "Presiona [abcde] para cambiar la configuración, [Enter] para continuar",13,10,0
time_msg: cp850 " o espera "
time_str: cp850 " 5 segundos"
cp850 " para que inicie automáticamente",13,10,0
70,8 → 70,14
on_msg: cp850 " activado",13,10,0
off_msg: cp850 " desactivado",13,10,0
 
preboot_device_msg:cp850 " [c] Imagen de disquete: ",0
debug_mode_msg: cp850 " [c] Duplicar depurar salida a la pantalla:",0
ask_debug: cp850 "¿Duplicar depurar la salida a la pantalla? [1-si, 2-no]: ",0
 
launcher_msg: cp850 " [d] Iniciar LAUNCHER después de cargar kernel:",0
ask_launcher: cp850 "¿Inicie la primera aplicación (LAUNCHER) después de cargar el kernel? [1-si, 2-no]: ",0
 
preboot_device_msg:cp850 " [e] Imagen de disquete: ",0
 
if defined extended_primary_loader
preboot_device_msgs dw 0,pdm1,pdm2,0
pdm1: cp850 "disquete real",13,10,0
/kernel/trunk/boot/preboot.inc
24,6 → 24,8
;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_debug db 0 ; load kernel in debug mode? (1-yes, 2-no)
preboot_launcher db 0 ; start launcher after kernel is loaded? (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)
/kernel/trunk/const.inc
295,8 → 295,10
BOOT_BANK_SW equ 0x9014 ;dword Vesa 1.2 pm bank switch
BOOT_LFB equ 0x9018 ;dword Vesa 2.0 LFB address
BOOT_MTRR equ 0x901C ;byte 0 or 1 : enable MTRR graphics acceleration
BOOT_LOG equ 0x901D ;byte not used anymore (0 or 1 : enable system log display)
;BOOT_LOG equ 0x901D ;byte not used anymore (0 or 1 : enable system log display)
BOOT_LAUNCHER_START equ 0x901D ;byte (0 or 1) start the first app (right now it's LAUNCHER) after kernel is loaded?
;BOOT_DIRECT_LFB equ 0x901E ;byte 0 or 1 : enable direct lfb write, paging disabled
BOOT_DEBUG_PRINT equ 0x901E ;byte If nonzero, duplicates debug output to the screen.
BOOT_DMA equ 0x901F ;
BOOT_PCI_DATA equ 0x9020 ;8bytes pci data
BOOT_VRR equ 0x9030 ;byte VRR start enabled 1, 2-no
/kernel/trunk/kernel.asm
79,8 → 79,6
 
; Enabling the next line will enable serial output console
;debug_com_base equ 0x3f8 ; 0x3f8 is com1, 0x2f8 is com2, 0x3e8 is com3, 0x2e8 is com4, no irq's are used
; The following constant, if nonzero, duplicates debug output to the screen.
debug_direct_print equ 0
 
include "proc32.inc"
include "kglobals.inc"
88,10 → 86,17
include "encoding.inc"
 
include "const.inc"
 
iglobal
; The following variable, if equal to 1, duplicates debug output to the screen.
debug_direct_print db 0
; Start the first app (LAUNCHER) after kernel is loaded? (1=yes, 2 or 0=no)
launcher_start db 1
endg
 
max_processes equ 255
tss_step equ (128+8192) ; tss & i/o - 65535 ports, * 256=557056*4
 
 
os_stack equ (os_data_l-gdts) ; GDTs
os_code equ (os_code_l-gdts)
graph_data equ (3+graph_data_l-gdts)
471,7 → 476,10
movzx eax, byte [BOOT_VARS+BOOT_BPP] ; bpp
mov [_display.bpp], eax
mov [_display.vrefresh], 60
 
mov al, [BOOT_VARS+BOOT_DEBUG_PRINT] ; If nonzero, duplicates debug output to the screen
mov [debug_direct_print], al
mov al, [BOOT_VARS+BOOT_LAUNCHER_START] ; Start the first app (LAUNCHER) after kernel is loaded?
mov [launcher_start], al
movzx eax, word [BOOT_VARS+BOOT_X_RES]; X max
mov [_display.width], eax
mov [display_width_standard], eax
961,8 → 969,10
[SLOT_BASE+256+APPDATA.io_map+4], PG_MAP
 
; LOAD FIRST APPLICATION
cmp byte [launcher_start], 1 ; Check if starting LAUNCHER is selected on blue screen (1 = yes)
jnz @f
 
cli
 
mov ebp, firstapp
call fs_execute_from_sysdir
test eax, eax
4863,10 → 4873,12
end if
 
mov [msg_board_data+ecx], bl
if debug_direct_print
; // if debug_direct_print == 1
cmp byte [debug_direct_print], 1
jnz @f
pusha
iglobal
msg_board_pos dd 234*65536+10
msg_board_pos dd 234*65536+10 ; for printing debug output on the screen
endg
lea edx, [msg_board_data+ecx]
mov ecx, 0x40FFFFFF
4885,7 → 4897,8
jbe @f
mov word [msg_board_pos], 10
@@:
end if
; // end if
 
if 0
pusha
mov al, bl