Synced net branch with trunk (#3358)
git-svn-id: svn://kolibrios.org@3359 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -459,7 +459,9 @@ disk_dereference:
|
||||
stdcall disk_call_driver
|
||||
; 3b. Free the structure.
|
||||
xchg eax, esi
|
||||
push ebx
|
||||
call free
|
||||
pop ebx
|
||||
; 4. Return.
|
||||
.nothing:
|
||||
ret
|
||||
|
@@ -629,7 +629,9 @@ disk_sync:
|
||||
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
|
||||
|
@@ -340,7 +340,11 @@ hd_timeout_error:
|
||||
; 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 @@ hd_read_error:
|
||||
; 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 @@ hd_write_error:
|
||||
; 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 @@ hd_write_error_dma:
|
||||
; 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 @@ hd_lba_error:
|
||||
; 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
|
||||
|
||||
|
||||
|
@@ -24,7 +24,7 @@ sysfn_saveramdisk: ; 18.6 = SAVE FLOPPY IMAGE (HD version only)
|
||||
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
|
||||
|
@@ -42,7 +42,7 @@ printplain:
|
||||
@@:
|
||||
call putchar
|
||||
lodsb
|
||||
test al,al
|
||||
test al, al
|
||||
jnz @b
|
||||
popa
|
||||
ret
|
||||
@@ -91,6 +91,7 @@ boot_read_floppy:
|
||||
inc si
|
||||
cmp si, 10
|
||||
jb @b
|
||||
sayerr_badsect:
|
||||
mov si, badsect
|
||||
sayerr_plain:
|
||||
call printplain
|
||||
@@ -110,18 +111,18 @@ sayerr_plain:
|
||||
; dh - head number
|
||||
conv_abs_to_THS:
|
||||
push bx
|
||||
mov bx,word [BPB_SecPerTrk]
|
||||
xor dx,dx
|
||||
mov bx, word [BPB_SecPerTrk]
|
||||
xor dx, dx
|
||||
div bx
|
||||
inc dx
|
||||
mov cl, dl ; cl = sector number
|
||||
mov bx,word [BPB_NumHeads]
|
||||
xor dx,dx
|
||||
mov bx, word [BPB_NumHeads]
|
||||
xor dx, dx
|
||||
div bx
|
||||
; !!!!!!! ax = track number, dx = head number
|
||||
mov ch,al ; ch=track number
|
||||
xchg dh,dl ; dh=head number
|
||||
mov dl,0 ; dl=0 (drive 0 (a:))
|
||||
mov ch, al ; ch=track number
|
||||
xchg dh, dl ; dh=head number
|
||||
mov dl, 0 ; dl=0 (drive 0 (a:))
|
||||
pop bx
|
||||
retn
|
||||
; needed variables
|
||||
@@ -145,8 +146,119 @@ FirstDataSector dw 0 ; begin of data
|
||||
;=========================================================================
|
||||
|
||||
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
|
||||
@@ -161,7 +273,7 @@ start_of_code:
|
||||
; (see comment to bx_from_load)
|
||||
cmp cx, 'HA'
|
||||
jnz no_hd_load
|
||||
cmp dx,'RD'
|
||||
cmp dx, 'RD'
|
||||
jnz no_hd_load
|
||||
mov word [cs:bx_from_load], bx ; {SPraid}[13.03.2007]
|
||||
no_hd_load:
|
||||
@@ -175,6 +287,7 @@ no_hd_load:
|
||||
pop ds
|
||||
push cs
|
||||
pop es
|
||||
end if
|
||||
|
||||
; set videomode
|
||||
mov ax, 3
|
||||
@@ -378,6 +491,7 @@ wait_loop: ; variant 2
|
||||
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 @@ apm_end:
|
||||
jnz sayerr
|
||||
push 0
|
||||
pop es
|
||||
end if
|
||||
|
||||
noloaderblock:
|
||||
; DISPLAY VESA INFORMATION
|
||||
@@ -404,7 +519,9 @@ cfgmanager:
|
||||
; 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 @@ cfgmanager:
|
||||
; 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,17 +545,18 @@ cfgmanager:
|
||||
@@:
|
||||
; 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
|
||||
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 @@ cfgmanager:
|
||||
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:
|
||||
@@ -509,7 +637,7 @@ cfgmanager:
|
||||
; mov [es:8*4], eax
|
||||
sti
|
||||
; wait for keypressed
|
||||
xor ax,ax
|
||||
xor ax, ax
|
||||
int 16h
|
||||
push ax
|
||||
; restore timer interrupt
|
||||
@@ -546,46 +674,54 @@ cfgmanager:
|
||||
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:
|
||||
.loops:
|
||||
call draw_vmodes_table
|
||||
_setcursor 25,0 ; out of screen
|
||||
xor ax,ax
|
||||
xor ax, ax
|
||||
int 0x16
|
||||
; call clear_table_cursor ;clear current position of cursor
|
||||
|
||||
mov si,word [cursor_pos]
|
||||
mov si, word [cursor_pos]
|
||||
|
||||
cmp ah,0x48;x,0x48E0 ; up
|
||||
cmp ah, 0x48;x,0x48E0 ; up
|
||||
jne .down
|
||||
cmp si,modes_table
|
||||
cmp si, modes_table
|
||||
jbe .loops
|
||||
sub word [cursor_pos],size_of_step
|
||||
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
|
||||
cmp word[es:si+10], -1
|
||||
je .loops
|
||||
add word [cursor_pos],size_of_step
|
||||
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 @@ cfgmanager:
|
||||
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 @@ cfgmanager:
|
||||
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
|
||||
@@ -632,7 +770,7 @@ cfgmanager:
|
||||
pop word [y_save]
|
||||
push word [es:bp+6]
|
||||
pop word [number_vm]
|
||||
mov word [preboot_graph],bp ;save choose
|
||||
mov word [preboot_graph], bp ;save choose
|
||||
|
||||
jmp .d
|
||||
|
||||
@@ -650,15 +788,15 @@ cfgmanager:
|
||||
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 @@ cfgmanager:
|
||||
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 @@ end virtual
|
||||
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,20 +855,30 @@ if lang eq ru
|
||||
mov cl, '<27>'
|
||||
jz @f
|
||||
mov cl, '<27>'
|
||||
@@: mov [time_str+9], cl
|
||||
@@:
|
||||
mov [time_str+9], cl
|
||||
else if lang eq et
|
||||
cmp al, 1
|
||||
ja @f
|
||||
mov [time_str+9], ' '
|
||||
mov [time_str+10],' '
|
||||
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
|
||||
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 @@ end if
|
||||
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 @@ end if
|
||||
call printplain
|
||||
_setcursor 15,0
|
||||
.load:
|
||||
end if
|
||||
; \end{diamond}[02.12.2005]
|
||||
|
||||
; ASK GRAPHICS MODE
|
||||
@@ -796,18 +955,17 @@ end if
|
||||
|
||||
; 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
|
||||
|
||||
mov al,[preboot_vrrm]
|
||||
mov [es:0x9030], al
|
||||
mov [es:0x901E], byte 1
|
||||
;; VRR_M USE
|
||||
;
|
||||
; mov al,[preboot_vrrm]
|
||||
; mov [es:0x9030], al
|
||||
|
||||
; BOOT DEVICE
|
||||
|
||||
@@ -820,9 +978,9 @@ include '../detect/biosmem.inc'
|
||||
|
||||
; READ DISKETTE TO MEMORY
|
||||
|
||||
cmp [boot_dev],0
|
||||
cmp [boot_dev], 0
|
||||
jne no_sys_on_floppy
|
||||
mov si,diskload
|
||||
mov si, diskload
|
||||
call print
|
||||
xor ax, ax ; reset drive
|
||||
xor dx, dx
|
||||
@@ -967,6 +1125,7 @@ sayerr_floppy:
|
||||
mov dx, 0x3f2
|
||||
mov al, 0
|
||||
out dx, al
|
||||
sayerr_memmove:
|
||||
mov si, memmovefailed
|
||||
jmp sayerr_plain
|
||||
@@:
|
||||
@@ -1145,6 +1304,40 @@ no_sys_on_floppy:
|
||||
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
|
||||
|
||||
|
@@ -11,7 +11,7 @@
|
||||
;
|
||||
;======================================================================
|
||||
|
||||
$Revision $
|
||||
$Revision: 2455 $
|
||||
|
||||
|
||||
d80x25_bottom:
|
||||
@@ -23,39 +23,27 @@ d80x25_bottom:
|
||||
d80x25_bottom_num = 3
|
||||
|
||||
msg_apm db " APM x.x ", 0
|
||||
vervesa db "Version of Vesa: Vesa x.x",13,10,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
|
||||
;s_bpp db 13,10,186," ƒ«ã¡¨ 梥â : "
|
||||
; .bpp dw "??"
|
||||
; db 13,10,0
|
||||
|
||||
vrrmprint db "Apply VRR? (picture frequency greater than 60Hz"
|
||||
db " only for transfers:",13,10
|
||||
db 186," 1024*768->800*600 and 800*600->640*480) [1-yes,2-no]:",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
|
||||
probetext db 13,10,13,10,186," Use standart graphics mode? [1-yes, "
|
||||
db "2-probe bios (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 - Videomode not found.",0
|
||||
;modena db "Fatal - VBE 0x112+ required.",0
|
||||
|
||||
not386 db "Fatal - CPU 386+ required.",0
|
||||
btns db "Fatal - Can't determine color depth.",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
|
||||
@@ -73,29 +61,33 @@ time_str db " 5 seconds"
|
||||
current_cfg_msg db "Current settings:",13,10,0
|
||||
curvideo_msg db " [a] Videomode: ",0
|
||||
|
||||
;modes_msg dw mode4,mode1,mode2,mode3
|
||||
;modevesa20 db " with LFB",0
|
||||
;modevesa12 db ", VESA 1.2 Bnk",0
|
||||
mode0 db "320x200, EGA/CGA 256 colors",13,10,0
|
||||
mode9 db "640x480, VGA 16 colors",13,10,0
|
||||
|
||||
;probeno_msg db " (standard mode)",0
|
||||
;probeok_msg db " (check nonstandard modes)",0
|
||||
;dma_msg db " [b] Use DMA for HDD access:",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
|
||||
;readonly_msg db " only for reading",13,10,0
|
||||
vrrm_msg db " [c] Use VRR:",0
|
||||
preboot_device_msg db " [d] Floppy image: ",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
|
||||
@@ -104,7 +96,6 @@ _rs db 186,'
|
||||
_bt db 186,' ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÙ',13,10,0
|
||||
|
||||
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
|
||||
remark2 db "If the system does not boot, try to disable the item [b].",0
|
||||
remarks dw remark1, remark2
|
||||
num_remarks = 2
|
@@ -15,58 +15,37 @@ $Revision$
|
||||
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
novesa db "Ekraan: EGA/CGA",13,10,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<69>gavust m<><6D>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<62>nnestus.",0
|
||||
okt db " ... OK"
|
||||
@@ -81,35 +60,42 @@ time_str db " 5 sekundit"
|
||||
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<65><70>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<EFBFBD>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,' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ',13,10,0
|
||||
_r1 db 186,' <20> 320x200 EGA/CGA 256 colors <20> <20>',13,10,0
|
||||
_r2 db 186,' <20> 640x480 VGA 16 colors <20> <20>',13,10,0
|
||||
_rs db 186,' <20> ????x????@?? SVGA VESA <20> <20>',13,10,0
|
||||
_bt db 186,' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',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
|
||||
|
@@ -15,11 +15,6 @@ $Revision$
|
||||
|
||||
|
||||
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 @@ d80x25_bottom:
|
||||
line_full_bottom
|
||||
d80x25_bottom_num = 3
|
||||
|
||||
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
|
||||
novesa db "Anzeige: EGA/CGA ",13,10,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"
|
||||
@@ -80,41 +54,48 @@ diskload db "Lade 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 "Druecke [abcd], um die Einstellungen zu aendern , druecke [Enter] zum starten",13,10,0
|
||||
start_msg db "Druecke [abcd], 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
|
||||
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,' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ',13,10,0
|
||||
_r1 db 186,' <20> 320x200 EGA/CGA 256 colors <20> <20>',13,10,0
|
||||
_r2 db 186,' <20> 640x480 VGA 16 colors <20> <20>',13,10,0
|
||||
_rs db 186,' <20> ????x????@?? SVGA VESA <20> <20>',13,10,0
|
||||
_bt db 186,' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',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
|
||||
|
@@ -15,8 +15,8 @@ $Revision$
|
||||
|
||||
|
||||
d80x25_bottom:
|
||||
db 186,' Kolibri OS <20>᭮<EFBFBD><E1ADAE><EFBFBD><EFBFBD> <20><> Menuet OS <20> <20><> <20>।<EFBFBD><EFBFBD>⠢<EFBFBD><EFBFBD><EFBFBD><EFBFBD> '
|
||||
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>a<EFBFBD>⨩. ',186
|
||||
db 186,' KolibriOS <20>᭮<EFBFBD><E1ADAE><EFBFBD><EFBFBD> <20><> MenuetOS <20> <20><> <20><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>'
|
||||
db '<27><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>A<EFBFBD><EFBFBD><EFBFBD><EFBFBD>. ',186
|
||||
db 186,' <20><><EFBFBD><EFBFBD><E0AEA1><EFBFBD> ᬮ<><E1ACAE><EFBFBD><EFBFBD><EFBFBD> <20> 䠩<><E4A0A9> COPYING.TXT '
|
||||
db ' ',186
|
||||
line_full_bottom
|
||||
@@ -28,17 +28,21 @@ s_vesa db "
|
||||
.ver db "?.?",13,10,0
|
||||
|
||||
gr_mode db "<EFBFBD>롥<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>०<EFBFBD><E0A5A6>: ",13,10,0
|
||||
vrrmprint db "<EFBFBD>ᯮ<EFBFBD>짮<EFBFBD><EFBFBD><EFBFBD><EFBFBD> VRR? (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> 60 <20><>"
|
||||
db " ⮫쪮 <20><><EFBFBD> <20><><EFBFBD><EFBFBD>室<EFBFBD><E5AEA4>:",13,10
|
||||
db 186," 1024*768>800*600 <20> 800*600>640*480) [1-<2D><>, 2-<2D><><EFBFBD>]: ",0
|
||||
;ask_dma db "<EFBFBD>ᯮ<EFBFBD>짮<EFBFBD><EFBFBD><EFBFBD><EFBFBD> DMA <20><><EFBFBD> <20><><EFBFBD><EFBFBD>㯠 <20> HDD? [1-<2D><>, 2-⮫쪮 <20>⥭<EFBFBD><E2A5AD>, 3-<2D><><EFBFBD>]: ",0
|
||||
|
||||
ask_bd db "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>᪨, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>१ BIOS <20> ०<><E0A5A6><EFBFBD> V86? [1-<2D><>, 2-<2D><><EFBFBD>]: ",0
|
||||
|
||||
if defined extended_primary_loader
|
||||
bdev db "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>㧨<EFBFBD><EFBFBD> <20><>ࠧ <20><> [1-<2D><>᪥<EFBFBD><E1AAA5>; 2-kolibri.img <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>㧪<EFBFBD>]: ",0
|
||||
else
|
||||
bdev db "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>㧨<EFBFBD><EFBFBD> <20><>ࠧ <20><> [1-<2D><>᪥<EFBFBD><E1AAA5>; 2-C:\kolibri.img (FAT32);"
|
||||
db 13,10,186," "
|
||||
db "3-<2D>ᯮ<EFBFBD>짮<EFBFBD><ECA7AE><EFBFBD><EFBFBD> 㦥 <20><><EFBFBD><EFBFBD>㦥<EFBFBD><E3A6A5><EFBFBD><EFBFBD> <20><>ࠧ;"
|
||||
db 13,10,186," "
|
||||
db "4-ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ࠧ]: ",0
|
||||
end if
|
||||
|
||||
prnotfnd db "<EFBFBD>訡<EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD>०<EFBFBD><E0A5A6> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.",0
|
||||
|
||||
not386 db "<EFBFBD>訡<EFBFBD><EFBFBD> - <20>ॡ<EFBFBD><E0A5A1><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 386+.",0
|
||||
fatalsel db "<EFBFBD>訡<EFBFBD><EFBFBD> - <20><><EFBFBD>࠭<EFBFBD><E0A0AD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>०<EFBFBD><E0A5A6> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ন<EFBFBD><E0A6A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.",0
|
||||
pres_key db "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD>室<EFBFBD> <20> <20>롮<EFBFBD> ०<><E0A5A6><EFBFBD><EFBFBD>.",0
|
||||
@@ -57,25 +61,33 @@ time_str db " 5 ᥪ㭤 "
|
||||
current_cfg_msg db "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>騥 <20><><EFBFBD><EFBFBD>ன<EFBFBD><E0AEA9>:",13,10,0
|
||||
curvideo_msg db " [a] <20><><EFBFBD><EFBFBD><EFBFBD>०<EFBFBD><E0A5A6>: ",0
|
||||
|
||||
|
||||
mode0 db "320x200, EGA/CGA 256 梥⮢",13,10,0
|
||||
mode9 db "640x480, VGA 16 梥⮢",13,10,0
|
||||
|
||||
usebd_msg db " [b] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>᪨, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>१ BIOS:",0
|
||||
on_msg db " <20><><EFBFBD>",13,10,0
|
||||
off_msg db " <20>몫",13,10,0
|
||||
readonly_msg db " ⮫쪮 <20>⥭<EFBFBD><E2A5AD>",13,10,0
|
||||
vrrm_msg db " [c] <20>ᯮ<EFBFBD>짮<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> VRR:",0
|
||||
preboot_device_msg db " [d] <20><>ࠧ <20><>᪥<EFBFBD><E1AAA5>: ",0
|
||||
|
||||
preboot_device_msg db " [c] <20><>ࠧ <EFBFBD><EFBFBD>᪥<EFBFBD><EFBFBD>: ",0
|
||||
|
||||
if defined extended_primary_loader
|
||||
preboot_device_msgs dw 0,pdm1,pdm2,0
|
||||
pdm1 db "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>᪥<EFBFBD><E1AAA5>",13,10,0
|
||||
pdm2 db "kolibri.img <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>㧪<EFBFBD>",13,10,0
|
||||
else
|
||||
preboot_device_msgs dw 0,pdm1,pdm2,pdm3,pdm4
|
||||
pdm1 db "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>᪥<EFBFBD><E1AAA5>",13,10,0
|
||||
pdm2 db "C:\kolibri.img (FAT32)",13,10,0
|
||||
pdm3 db "<EFBFBD>ᯮ<EFBFBD>짮<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㦥 <20><><EFBFBD><EFBFBD>㦥<EFBFBD><E3A6A5><EFBFBD><EFBFBD> <20><>ࠧ",13,10,0
|
||||
pdm4 db "ᮧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ࠧ",13,10,0
|
||||
end if
|
||||
|
||||
loading_msg db "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>㧪<EFBFBD> KolibriOS...",0
|
||||
|
||||
if ~ defined extended_primary_loader ; saving not supported in this case
|
||||
save_quest db "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<>騥 <20><><EFBFBD><EFBFBD>ன<EFBFBD><E0AEA9>? [y/n]: ",0
|
||||
loader_block_error db "<EFBFBD>訡<EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>砫쭮<E7A0AB><ECADAE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>稪<EFBFBD>, <20>த<EFBFBD><E0AEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.",0
|
||||
|
||||
end if
|
||||
|
||||
_st db 186,' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ ',13,10,0
|
||||
_r1 db 186,' <20> 320x200 EGA/CGA 256 梥⮢ <20> <20> ',13,10,0
|
||||
@@ -83,9 +95,7 @@ _r2 db 186,'
|
||||
_rs db 186,' <20> ????x????@?? SVGA VESA <20> <20> ',13,10,0
|
||||
_bt db 186,' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',13,10,0
|
||||
|
||||
|
||||
remark1 db "<EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD> <20><> 㬮<>砭<EFBFBD><E7A0AD> <20><><EFBFBD>࠭<EFBFBD> <20><><EFBFBD> 㤮<><E3A4AE>⢠ <20><><EFBFBD><EFBFBD>設<EFBFBD>⢠, <20><> <20><> <20><><EFBFBD><EFBFBD>.",0
|
||||
remark2 db "<EFBFBD> <20> <20><><EFBFBD> <20><><EFBFBD>-<2D><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> VRR <EFBFBD> <20>㭪<EFBFBD><EFBFBD> [c].",0
|
||||
remark3 db "<EFBFBD> <20> <20><><EFBFBD> <20><> <20><>㧨<EFBFBD><E3A7A8><EFBFBD> <20><><EFBFBD>⥬<EFBFBD>, <20><><EFBFBD><EFBFBD><E0AEA1><EFBFBD><EFBFBD> <20>⪫<EFBFBD><E2AAAB><EFBFBD><EFBFBD><EFBFBD> <20>㭪<EFBFBD> [b].",0
|
||||
remarks dw remark1, remark2, remark3
|
||||
num_remarks = 3
|
||||
remark2 db "<EFBFBD> <20> <20><><EFBFBD> <20><> <20><>㧨<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>⥬<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⪫<EFBFBD><E2AAAB><EFBFBD><EFBFBD><EFBFBD> <20>㭪<EFBFBD> [b].",0
|
||||
remarks dw remark1, remark2
|
||||
num_remarks = 2
|
||||
|
103
kernel/branches/net/boot/bootsp.inc
Normal file
103
kernel/branches/net/boot/bootsp.inc
Normal file
@@ -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 <EFBFBD>ste archivo es necesario abrirlo con codificaci<EFBFBD>n CP850
|
||||
|
||||
$Revision: 2455 $
|
||||
|
||||
|
||||
d80x25_bottom:
|
||||
db 186,' KolibriOS est<73> basado en MenuetOS y viene ABSOLUTAMENTE '
|
||||
db 'SIN GARANT<4E>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<EFBFBD>n de VESA: "
|
||||
.ver db "?.?",13,10,0
|
||||
|
||||
gr_mode db "Selecciona un modo de video: ",13,10,0
|
||||
|
||||
ask_bd db "<EFBFBD>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<61>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<67>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<63>n, [Enter] para continuar",13,10,0
|
||||
time_msg db " o espera "
|
||||
time_str db " 5 segundos"
|
||||
db " para que inicie autom<6F>ticamente",13,10,0
|
||||
current_cfg_msg db "Configuraci<EFBFBD>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<61>a",13,10,0
|
||||
end if
|
||||
|
||||
loading_msg db "Cargando KolibriOS...",0
|
||||
|
||||
if ~ defined extended_primary_loader
|
||||
save_quest db "<EFBFBD>Recordar configuraci<63>n actual? [s/n]: ",0
|
||||
loader_block_error db "Bootloader inv<6E>lido, no puedo continuar. Detenido.",0
|
||||
end if
|
||||
|
||||
_st db 186,' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ',13,10,0
|
||||
_r1 db 186,' <20> 320x200 EGA/CGA 256 colores <20> <20>',13,10,0
|
||||
_r2 db 186,' <20> 640x480 VGA 16 colores <20> <20>',13,10,0
|
||||
_rs db 186,' <20> ????x????@?? SVGA VESA <20> <20>',13,10,0
|
||||
_bt db 186,' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',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<63>n [b].",0
|
||||
remarks dw remark1, remark2
|
||||
num_remarks = 2
|
@@ -42,7 +42,8 @@ end while
|
||||
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
|
||||
|
@@ -89,26 +89,28 @@ scroll_area_size equ (long_v_table-2)
|
||||
int2str:
|
||||
dec bl
|
||||
jz @f
|
||||
xor edx,edx
|
||||
xor edx, edx
|
||||
div ecx
|
||||
push edx
|
||||
call int2str
|
||||
pop eax
|
||||
@@: or al,0x30
|
||||
mov [ds:di],al
|
||||
@@:
|
||||
or al, 0x30
|
||||
mov [ds:di], al
|
||||
inc di
|
||||
ret
|
||||
|
||||
int2strnz:
|
||||
cmp eax,ecx
|
||||
cmp eax, ecx
|
||||
jb @f
|
||||
xor edx,edx
|
||||
xor edx, edx
|
||||
div ecx
|
||||
push edx
|
||||
call int2strnz
|
||||
pop eax
|
||||
@@: or al,0x30
|
||||
mov [es:di],al
|
||||
@@:
|
||||
or al, 0x30
|
||||
mov [es:di], al
|
||||
inc di
|
||||
ret
|
||||
|
||||
@@ -119,9 +121,9 @@ v_mode_error:
|
||||
mov si, fatalsel
|
||||
call printplain
|
||||
_setcursor 20,2
|
||||
mov si,pres_key
|
||||
mov si, pres_key
|
||||
call printplain
|
||||
xor eax,eax
|
||||
xor eax, eax
|
||||
int 16h
|
||||
jmp cfgmanager.d
|
||||
;-------------------------------------------------------
|
||||
@@ -133,45 +135,45 @@ v_mode_error:
|
||||
print_vesa_info:
|
||||
_setcursor 5,2
|
||||
|
||||
mov [es:vi.VESASignature],'VBE2'
|
||||
mov ax,0x4F00
|
||||
mov di,vi ;0xa000
|
||||
mov [es:vi.VESASignature], 'VBE2'
|
||||
mov ax, 0x4F00
|
||||
mov di, vi ;0xa000
|
||||
int 0x10
|
||||
or ah,ah
|
||||
or ah, ah
|
||||
jz @f
|
||||
mov [es:vi.VESASignature],'VESA'
|
||||
mov ax,$4F00
|
||||
mov di,vi
|
||||
mov [es:vi.VESASignature], 'VESA'
|
||||
mov ax, $4F00
|
||||
mov di, vi
|
||||
int 0x10
|
||||
or ah,ah
|
||||
or ah, ah
|
||||
jnz .exit
|
||||
@@:
|
||||
cmp [es:vi.VESASignature],'VESA'
|
||||
cmp [es:vi.VESASignature], 'VESA'
|
||||
jne .exit
|
||||
cmp [es:vi.VESAVersion],0x0100
|
||||
cmp [es:vi.VESAVersion], 0x0100
|
||||
jb .exit
|
||||
jmp .vesaok2
|
||||
|
||||
.exit:
|
||||
mov si,novesa
|
||||
mov si, novesa
|
||||
call printplain
|
||||
ret
|
||||
|
||||
.vesaok2:
|
||||
mov ax,[es:vi.VESAVersion]
|
||||
add ax,'00'
|
||||
mov ax, [es:vi.VESAVersion]
|
||||
add ax, '00'
|
||||
|
||||
mov [s_vesa.ver], ah
|
||||
mov [s_vesa.ver+2], al
|
||||
mov si,s_vesa
|
||||
mov si, s_vesa
|
||||
call printplain
|
||||
|
||||
_setcursor 4,2
|
||||
mov si,word[es:vi.OemStringPtr]
|
||||
mov di,si
|
||||
mov si, word[es:vi.OemStringPtr]
|
||||
mov di, si
|
||||
|
||||
push ds
|
||||
mov ds,word[es:vi.OemStringPtr+2]
|
||||
mov ds, word[es:vi.OemStringPtr+2]
|
||||
call printplain
|
||||
pop ds
|
||||
|
||||
@@ -186,33 +188,33 @@ calc_vmodes_table:
|
||||
|
||||
lfs si, [es:vi.VideoModePtr]
|
||||
|
||||
mov bx,modes_table
|
||||
mov bx, modes_table
|
||||
;save no vesa mode of work 320x200, EGA/CGA 256 梥⮢ and 640x480, VGA 16 梥⮢
|
||||
mov word [es:bx],640
|
||||
mov word [es:bx+2],480
|
||||
mov word [es:bx+6],0x13
|
||||
mov word [es:bx], 640
|
||||
mov word [es:bx+2], 480
|
||||
mov word [es:bx+6], 0x13
|
||||
|
||||
mov word [es:bx+10],640
|
||||
mov word [es:bx+12],480
|
||||
mov word [es:bx+16],0x12
|
||||
add bx,20
|
||||
mov word [es:bx+10], 640
|
||||
mov word [es:bx+12], 480
|
||||
mov word [es:bx+16], 0x12
|
||||
add bx, 20
|
||||
.next_mode:
|
||||
mov cx,word [fs:si] ; mode number
|
||||
cmp cx,-1
|
||||
mov cx, word [fs:si]; mode number
|
||||
cmp cx, -1
|
||||
je .modes_ok.2
|
||||
|
||||
mov ax,0x4F01
|
||||
mov di,mi
|
||||
mov ax, 0x4F01
|
||||
mov di, mi
|
||||
int 0x10
|
||||
|
||||
or ah,ah
|
||||
or ah, ah
|
||||
jnz .modes_ok.2;vesa_info.exit
|
||||
|
||||
test [es:mi.ModeAttributes],00000001b ;videomode support ?
|
||||
test [es:mi.ModeAttributes], 00000001b ;videomode support ?
|
||||
jz @f
|
||||
test [es:mi.ModeAttributes],00010000b ;picture ?
|
||||
test [es:mi.ModeAttributes], 00010000b ;picture ?
|
||||
jz @f
|
||||
test [es:mi.ModeAttributes],10000000b ;LFB ?
|
||||
test [es:mi.ModeAttributes], 10000000b ;LFB ?
|
||||
jz @f
|
||||
|
||||
cmp [es:mi.BitsPerPixel], 24 ;It show only videomodes to have support 24 and 32 bpp
|
||||
@@ -226,38 +228,39 @@ calc_vmodes_table:
|
||||
|
||||
|
||||
.l0:
|
||||
cmp [es:mi.XRes],640
|
||||
cmp [es:mi.XRes], 640
|
||||
jb @f
|
||||
cmp [es:mi.YRes],480
|
||||
cmp [es:mi.YRes], 480
|
||||
jb @f
|
||||
; cmp [es:mi.BitsPerPixel],8
|
||||
; jb @f
|
||||
|
||||
mov ax,[es:mi.XRes]
|
||||
mov [es:bx+0],ax ; +0[2] : resolution X
|
||||
mov ax,[es:mi.YRes]
|
||||
mov [es:bx+2],ax ; +2[2] : resolution Y
|
||||
mov ax,[es:mi.ModeAttributes]
|
||||
mov [es:bx+4],ax ; +4[2] : attributes
|
||||
mov ax, [es:mi.XRes]
|
||||
mov [es:bx+0], ax ; +0[2] : resolution X
|
||||
mov ax, [es:mi.YRes]
|
||||
mov [es:bx+2], ax ; +2[2] : resolution Y
|
||||
mov ax, [es:mi.ModeAttributes]
|
||||
mov [es:bx+4], ax ; +4[2] : attributes
|
||||
|
||||
cmp [s_vesa.ver], '2'
|
||||
; jb .lp1
|
||||
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
|
||||
movzx ax,byte [es:mi.BitsPerPixel]
|
||||
mov word [es:bx+8],ax ; +8 : bits per pixel
|
||||
add bx,size_of_step ; size of record
|
||||
.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
|
||||
|
||||
@@:
|
||||
add si,2
|
||||
add si, 2
|
||||
jmp .next_mode
|
||||
|
||||
.modes_ok.2:
|
||||
|
||||
mov word[es:bx],-1 ;end video table
|
||||
mov word[end_cursor],bx ;save end cursor position
|
||||
mov word[es:bx], -1 ;end video table
|
||||
mov word[end_cursor], bx ;save end cursor position
|
||||
;;;;;;;;;;;;;;;;;;
|
||||
;Sort array
|
||||
; mov si,modes_table
|
||||
@@ -307,28 +310,36 @@ draw_current_vmode:
|
||||
push 0
|
||||
pop es
|
||||
|
||||
mov si,word [cursor_pos]
|
||||
mov si, word [cursor_pos]
|
||||
|
||||
cmp word [es:si+6],0x12
|
||||
cmp word [es:si+6], 0x12
|
||||
je .no_vesa_0x12
|
||||
|
||||
cmp word [es:si+6],0x13
|
||||
cmp word [es:si+6], 0x13
|
||||
je .no_vesa_0x13
|
||||
|
||||
mov di,loader_block_error
|
||||
movzx eax,word[es:si+0]
|
||||
mov ecx,10
|
||||
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
|
||||
mov byte[es:di],'x'
|
||||
mov byte[es:di], 'x'
|
||||
inc di
|
||||
movzx eax,word[es:si+2]
|
||||
movzx eax, word[es:si+2]
|
||||
call int2strnz
|
||||
mov byte[es:di],'x'
|
||||
mov byte[es:di], 'x'
|
||||
inc di
|
||||
movzx eax,word[es:si+8]
|
||||
movzx eax, word[es:si+8]
|
||||
call int2strnz
|
||||
mov dword[es:di],0x00000d0a
|
||||
mov si,loader_block_error
|
||||
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
|
||||
@@ -336,18 +347,44 @@ draw_current_vmode:
|
||||
pop ds
|
||||
ret
|
||||
.no_vesa_0x13:
|
||||
mov si,mode0
|
||||
mov si, mode0
|
||||
jmp .print
|
||||
.no_vesa_0x12:
|
||||
mov si,mode9
|
||||
mov si, mode9
|
||||
.print:
|
||||
call printplain
|
||||
ret
|
||||
;-----------------------------------------------------------------------------
|
||||
check_first_parm:
|
||||
mov si,word [preboot_graph]
|
||||
test si,si
|
||||
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
|
||||
@@ -355,69 +392,72 @@ check_first_parm:
|
||||
; mov word [preboot_graph],ax
|
||||
;SET default video of mode first probe will fined a move of work 1024x768@32
|
||||
|
||||
mov ax,1024
|
||||
mov bx,768
|
||||
mov si,modes_table
|
||||
mov ax, 1024
|
||||
mov bx, 768
|
||||
mov si, modes_table
|
||||
call .loops
|
||||
test ax,ax
|
||||
test ax, ax
|
||||
jz .ok_found_mode
|
||||
mov ax,800
|
||||
mov bx,600
|
||||
mov si,modes_table
|
||||
mov ax, 800
|
||||
mov bx, 600
|
||||
mov si, modes_table
|
||||
call .loops
|
||||
test ax,ax
|
||||
test ax, ax
|
||||
jz .ok_found_mode
|
||||
mov ax,640
|
||||
mov bx,480
|
||||
mov si,modes_table
|
||||
mov ax, 640
|
||||
mov bx, 480
|
||||
mov si, modes_table
|
||||
call .loops
|
||||
test ax,ax
|
||||
test ax, ax
|
||||
jz .ok_found_mode
|
||||
|
||||
mov si,modes_table
|
||||
mov si, modes_table
|
||||
if ~ defined extended_primary_loader
|
||||
jmp .ok_found_mode
|
||||
|
||||
|
||||
|
||||
.no_zero:
|
||||
mov bp,word [number_vm]
|
||||
cmp bp,word [es:si+6]
|
||||
mov bp, word [number_vm]
|
||||
cmp bp, word [es:si+6]
|
||||
jz .ok_found_mode
|
||||
mov ax,word [x_save]
|
||||
mov bx,word [y_save]
|
||||
mov si,modes_table
|
||||
mov ax, word [x_save]
|
||||
mov bx, word [y_save]
|
||||
mov si, modes_table
|
||||
call .loops
|
||||
test ax,ax
|
||||
test ax, ax
|
||||
jz .ok_found_mode
|
||||
|
||||
mov si,modes_table
|
||||
mov si, modes_table
|
||||
; cmp ax,modes_table
|
||||
; 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
|
||||
mov word [home_cursor], si
|
||||
; mov word [cursor_pos],si
|
||||
mov word [preboot_graph],si
|
||||
mov ax,si
|
||||
mov word [preboot_graph], si
|
||||
mov ax, si
|
||||
|
||||
mov ecx,long_v_table
|
||||
mov ecx, long_v_table
|
||||
|
||||
.loop: add ax,size_of_step
|
||||
cmp ax,word [end_cursor]
|
||||
.loop:
|
||||
add ax, size_of_step
|
||||
cmp ax, word [end_cursor]
|
||||
jae .next_step
|
||||
loop .loop
|
||||
.next_step:
|
||||
sub ax,size_of_step*long_v_table
|
||||
cmp ax,modes_table
|
||||
sub ax, size_of_step*long_v_table
|
||||
cmp ax, modes_table
|
||||
jae @f
|
||||
mov ax,modes_table
|
||||
mov ax, modes_table
|
||||
@@:
|
||||
|
||||
mov word [home_cursor],ax
|
||||
mov si,[preboot_graph]
|
||||
mov word [cursor_pos],si
|
||||
mov word [home_cursor], ax
|
||||
mov si, [preboot_graph]
|
||||
mov word [cursor_pos], si
|
||||
|
||||
push word [es:si]
|
||||
pop word [x_save]
|
||||
@@ -429,21 +469,24 @@ check_first_parm:
|
||||
ret
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
.loops:
|
||||
cmp ax,word [es:si]
|
||||
cmp ax, word [es:si]
|
||||
jne .next
|
||||
cmp bx,word [es:si+2]
|
||||
cmp bx, word [es:si+2]
|
||||
jne .next
|
||||
cmp word [es:si+8],32
|
||||
cmp word [es:si+8], 32
|
||||
je .ok
|
||||
cmp word [es:si+8],24
|
||||
cmp word [es:si+8], 24
|
||||
je .ok
|
||||
.next: add si,size_of_step
|
||||
cmp word [es:si],-1
|
||||
.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
|
||||
|
||||
|
||||
@@ -454,40 +497,41 @@ check_first_parm:
|
||||
;-----------------------------------------------------------------------------
|
||||
draw_vmodes_table:
|
||||
_setcursor 9, 2
|
||||
mov si,gr_mode
|
||||
mov si, gr_mode
|
||||
call printplain
|
||||
|
||||
mov si,_st
|
||||
mov si, _st
|
||||
call printplain
|
||||
|
||||
push word [cursor_pos]
|
||||
pop ax
|
||||
push word [home_cursor]
|
||||
pop si
|
||||
mov cx,si
|
||||
mov cx, si
|
||||
|
||||
cmp ax,si
|
||||
cmp ax, si
|
||||
je .ok
|
||||
jb .low
|
||||
|
||||
|
||||
add cx,size_of_step*long_v_table
|
||||
add cx, size_of_step*long_v_table
|
||||
|
||||
cmp ax,cx
|
||||
cmp ax, cx
|
||||
jb .ok
|
||||
|
||||
sub cx,size_of_step*long_v_table
|
||||
add cx,size_of_step
|
||||
cmp cx,word[end_cursor]
|
||||
sub cx, size_of_step*long_v_table
|
||||
add cx, size_of_step
|
||||
cmp cx, word[end_cursor]
|
||||
jae .ok
|
||||
add si,size_of_step
|
||||
add si, size_of_step
|
||||
push si
|
||||
pop word [home_cursor]
|
||||
jmp .ok
|
||||
|
||||
|
||||
.low: sub cx,size_of_step
|
||||
cmp cx,modes_table
|
||||
.low:
|
||||
sub cx, size_of_step
|
||||
cmp cx, modes_table
|
||||
jb .ok
|
||||
push cx
|
||||
push cx
|
||||
@@ -540,52 +584,52 @@ draw_vmodes_table:
|
||||
add ax, cx
|
||||
mov [scroll_end], ax
|
||||
pop si
|
||||
mov bp,long_v_table ;show rows
|
||||
mov bp, long_v_table ;show rows
|
||||
.@@_next_bit:
|
||||
;clear cursor
|
||||
mov ax,' '
|
||||
mov word[ds:_r1+21],ax
|
||||
mov word[ds:_r1+50],ax
|
||||
mov ax, ' '
|
||||
mov word[ds:_r1+21], ax
|
||||
mov word[ds:_r1+50], ax
|
||||
|
||||
mov word[ds:_r2+21],ax
|
||||
mov word[ds:_r2+45],ax
|
||||
mov word[ds:_r2+21], ax
|
||||
mov word[ds:_r2+45], ax
|
||||
|
||||
mov word[ds:_rs+21],ax
|
||||
mov word[ds:_rs+46],ax
|
||||
mov word[ds:_rs+21], ax
|
||||
mov word[ds:_rs+46], ax
|
||||
; draw string
|
||||
cmp word [es:si+6],0x12
|
||||
cmp word [es:si+6], 0x12
|
||||
je .show_0x12
|
||||
cmp word [es:si+6],0x13
|
||||
cmp word [es:si+6], 0x13
|
||||
je .show_0x13
|
||||
|
||||
movzx eax,word[es:si]
|
||||
cmp ax,-1
|
||||
movzx eax, word[es:si]
|
||||
cmp ax, -1
|
||||
je .@@_end
|
||||
mov di,_rs+23
|
||||
mov ecx,10
|
||||
mov bl,4
|
||||
mov di, _rs+23
|
||||
mov ecx, 10
|
||||
mov bl, 4
|
||||
call int2str
|
||||
movzx eax,word[es:si+2]
|
||||
movzx eax, word[es:si+2]
|
||||
inc di
|
||||
mov bl,4
|
||||
mov bl, 4
|
||||
call int2str
|
||||
|
||||
movzx eax,word[es:si+8]
|
||||
movzx eax, word[es:si+8]
|
||||
inc di
|
||||
mov bl,2
|
||||
mov bl, 2
|
||||
call int2str
|
||||
|
||||
cmp si, word [cursor_pos]
|
||||
jne .next
|
||||
;draw cursor
|
||||
mov word[ds:_rs+21],'>>'
|
||||
mov word[ds:_rs+46],'<<'
|
||||
mov word[ds:_rs+21], '>>'
|
||||
mov word[ds:_rs+46], '<<'
|
||||
|
||||
|
||||
|
||||
.next:
|
||||
push si
|
||||
mov si,_rs
|
||||
mov si, _rs
|
||||
.@@_sh:
|
||||
; add to the string pseudographics for scrollbar
|
||||
pop bx
|
||||
@@ -615,13 +659,13 @@ draw_vmodes_table:
|
||||
@@:
|
||||
call printplain
|
||||
pop si
|
||||
add si,size_of_step
|
||||
add si, size_of_step
|
||||
|
||||
dec bp
|
||||
jnz .@@_next_bit
|
||||
|
||||
.@@_end:
|
||||
mov si,_bt
|
||||
mov si, _bt
|
||||
call printplain
|
||||
ret
|
||||
.show_0x13:
|
||||
@@ -629,20 +673,20 @@ draw_vmodes_table:
|
||||
|
||||
cmp si, word [cursor_pos]
|
||||
jne @f
|
||||
mov word[ds:_r1+21],'>>'
|
||||
mov word[ds:_r1+50],'<<'
|
||||
mov word[ds:_r1+21], '>>'
|
||||
mov word[ds:_r1+50], '<<'
|
||||
@@:
|
||||
mov si,_r1
|
||||
mov si, _r1
|
||||
jmp .@@_sh
|
||||
.show_0x12:
|
||||
push si
|
||||
cmp si, word [cursor_pos]
|
||||
jne @f
|
||||
|
||||
mov word[ds:_r2+21],'>>'
|
||||
mov word[ds:_r2+45],'<<'
|
||||
mov word[ds:_r2+21], '>>'
|
||||
mov word[ds:_r2+45], '<<'
|
||||
@@:
|
||||
mov si,_r2
|
||||
mov si, _r2
|
||||
jmp .@@_sh
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
@@ -653,15 +697,15 @@ clear_vmodes_table:
|
||||
push es
|
||||
push 0xb800
|
||||
pop es
|
||||
mov di,1444
|
||||
xor ax,ax
|
||||
mov di, 1444
|
||||
xor ax, ax
|
||||
mov ah, 1*16+15
|
||||
mov cx,70
|
||||
mov bp,12
|
||||
mov cx, 70
|
||||
mov bp, 12
|
||||
.loop_start:
|
||||
rep stosw
|
||||
mov cx,70
|
||||
add di,20
|
||||
mov cx, 70
|
||||
add di, 20
|
||||
dec bp
|
||||
jns .loop_start
|
||||
pop es
|
||||
@@ -674,11 +718,11 @@ set_vmode:
|
||||
push 0 ;0;x1000
|
||||
pop es
|
||||
|
||||
mov si,word [preboot_graph] ;[preboot_graph]
|
||||
mov cx,word [es:si+6] ; number of mode
|
||||
mov si, word [preboot_graph] ;[preboot_graph]
|
||||
mov cx, word [es:si+6] ; number of mode
|
||||
|
||||
|
||||
mov ax,word [es:si+0] ; resolution X
|
||||
mov ax, word [es:si+0] ; resolution X
|
||||
mov bx, word [es:si+2] ; resolution Y
|
||||
|
||||
|
||||
@@ -688,7 +732,7 @@ set_vmode:
|
||||
|
||||
cmp cx, 0x12
|
||||
je .mode0x12_0x13
|
||||
cmp cx,0x13
|
||||
cmp cx, 0x13
|
||||
je .mode0x12_0x13
|
||||
|
||||
|
||||
@@ -697,9 +741,9 @@ set_vmode:
|
||||
|
||||
; VESA 2 and Vesa 3
|
||||
|
||||
mov ax,0x4f01
|
||||
and cx,0xfff
|
||||
mov di,mi;0xa000
|
||||
mov ax, 0x4f01
|
||||
and cx, 0xfff
|
||||
mov di, mi;0xa000
|
||||
int 0x10
|
||||
; LFB
|
||||
mov eax, [es:mi.PhysBasePtr];di+0x28]
|
||||
@@ -711,7 +755,7 @@ set_vmode:
|
||||
; BPP
|
||||
cmp [es:mi.BitsPerPixel], 16
|
||||
jne .l0
|
||||
cmp [es:mi.GreenMaskSize],5
|
||||
cmp [es:mi.GreenMaskSize], 5
|
||||
jne .l0
|
||||
mov [es:mi.BitsPerPixel], 15
|
||||
.l0:
|
||||
|
170
kernel/branches/net/boot/parsers.inc
Normal file
170
kernel/branches/net/boot/parsers.inc
Normal file
@@ -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
|
@@ -23,16 +23,20 @@ y_save dw 0 ; y
|
||||
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)
|
||||
;!!!! 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
|
||||
|
@@ -10,67 +10,67 @@ $Revision $
|
||||
|
||||
; READ RAMDISK IMAGE FROM HD
|
||||
|
||||
cmp [boot_dev+OS_BASE+0x10000],1
|
||||
cmp [boot_dev+OS_BASE+0x10000], 1
|
||||
jne no_sys_on_hd
|
||||
|
||||
test [DRIVE_DATA+1],byte 0x40
|
||||
test [DRIVE_DATA+1], byte 0x40
|
||||
jz position_2
|
||||
mov [hdbase],0x1f0
|
||||
mov [hdid],0x0
|
||||
mov [hdpos],1
|
||||
mov [fat32part],0
|
||||
mov [hdbase], 0x1f0
|
||||
mov [hdid], 0x0
|
||||
mov [hdpos], 1
|
||||
mov [fat32part], 0
|
||||
position_1_1:
|
||||
inc [fat32part]
|
||||
call search_and_read_image
|
||||
cmp [image_retrieved],1
|
||||
cmp [image_retrieved], 1
|
||||
je yes_sys_on_hd
|
||||
movzx eax,byte [DRIVE_DATA+2]
|
||||
cmp [fat32part],eax
|
||||
movzx eax, byte [DRIVE_DATA+2]
|
||||
cmp [fat32part], eax
|
||||
jle position_1_1
|
||||
position_2:
|
||||
test [DRIVE_DATA+1],byte 0x10
|
||||
test [DRIVE_DATA+1], byte 0x10
|
||||
jz position_3
|
||||
mov [hdbase],0x1f0
|
||||
mov [hdid],0x10
|
||||
mov [hdpos],2
|
||||
mov [fat32part],0
|
||||
mov [hdbase], 0x1f0
|
||||
mov [hdid], 0x10
|
||||
mov [hdpos], 2
|
||||
mov [fat32part], 0
|
||||
position_2_1:
|
||||
inc [fat32part]
|
||||
call search_and_read_image
|
||||
cmp [image_retrieved],1
|
||||
cmp [image_retrieved], 1
|
||||
je yes_sys_on_hd
|
||||
movzx eax,byte [DRIVE_DATA+3]
|
||||
cmp eax,[fat32part]
|
||||
movzx eax, byte [DRIVE_DATA+3]
|
||||
cmp eax, [fat32part]
|
||||
jle position_2_1
|
||||
position_3:
|
||||
test [DRIVE_DATA+1],byte 0x4
|
||||
test [DRIVE_DATA+1], byte 0x4
|
||||
jz position_4
|
||||
mov [hdbase],0x170
|
||||
mov [hdid],0x0
|
||||
mov [hdpos],3
|
||||
mov [fat32part],0
|
||||
mov [hdbase], 0x170
|
||||
mov [hdid], 0x0
|
||||
mov [hdpos], 3
|
||||
mov [fat32part], 0
|
||||
position_3_1:
|
||||
inc [fat32part]
|
||||
call search_and_read_image
|
||||
cmp [image_retrieved],1
|
||||
cmp [image_retrieved], 1
|
||||
je yes_sys_on_hd
|
||||
movzx eax,byte [DRIVE_DATA+4]
|
||||
cmp eax,[fat32part]
|
||||
movzx eax, byte [DRIVE_DATA+4]
|
||||
cmp eax, [fat32part]
|
||||
jle position_3_1
|
||||
position_4:
|
||||
test [DRIVE_DATA+1],byte 0x1
|
||||
test [DRIVE_DATA+1], byte 0x1
|
||||
jz no_sys_on_hd
|
||||
mov [hdbase],0x170
|
||||
mov [hdid],0x10
|
||||
mov [hdpos],4
|
||||
mov [fat32part],0
|
||||
mov [hdbase], 0x170
|
||||
mov [hdid], 0x10
|
||||
mov [hdpos], 4
|
||||
mov [fat32part], 0
|
||||
position_4_1:
|
||||
inc [fat32part]
|
||||
call search_and_read_image
|
||||
cmp [image_retrieved],1
|
||||
cmp [image_retrieved], 1
|
||||
je yes_sys_on_hd
|
||||
movzx eax,byte [DRIVE_DATA+5]
|
||||
cmp eax,[fat32part]
|
||||
movzx eax, byte [DRIVE_DATA+5]
|
||||
cmp eax, [fat32part]
|
||||
jle position_4_1
|
||||
jmp yes_sys_on_hd
|
||||
|
||||
@@ -103,7 +103,7 @@ endg
|
||||
read_image:
|
||||
mov ebx, read_image_fsinfo
|
||||
pushad
|
||||
call file_system_lfn
|
||||
call file_system_lfn_protected
|
||||
popad
|
||||
ret
|
||||
|
||||
@@ -111,24 +111,24 @@ image_retrieved db 0
|
||||
counter_of_partitions db 0
|
||||
no_sys_on_hd:
|
||||
; test_to_format_ram_disk (need if not using ram disk)
|
||||
cmp [boot_dev+OS_BASE+0x10000],3
|
||||
cmp [boot_dev+OS_BASE+0x10000], 3
|
||||
jne not_format_ram_disk
|
||||
; format_ram_disk
|
||||
mov edi, RAMDISK
|
||||
mov ecx, 0x1080
|
||||
xor eax,eax
|
||||
xor eax, eax
|
||||
@@:
|
||||
stosd
|
||||
loop @b
|
||||
|
||||
mov ecx, 0x58F7F
|
||||
mov eax,0xF6F6F6F6
|
||||
mov eax, 0xF6F6F6F6
|
||||
@@:
|
||||
stosd
|
||||
loop @b
|
||||
|
||||
mov [RAMDISK+0x200],dword 0xFFFFF0 ; fat table
|
||||
mov [RAMDISK+0x4200],dword 0xFFFFF0
|
||||
mov [RAMDISK+0x200], dword 0xFFFFF0 ; fat table
|
||||
mov [RAMDISK+0x4200], dword 0xFFFFF0
|
||||
|
||||
not_format_ram_disk:
|
||||
yes_sys_on_hd:
|
||||
|
@@ -27,67 +27,67 @@ pr_mode_exit:
|
||||
|
||||
lidt [old_ints_h]
|
||||
;remap IRQs
|
||||
mov al,0x11
|
||||
out 0x20,al
|
||||
mov al, 0x11
|
||||
out 0x20, al
|
||||
call rdelay
|
||||
out 0xA0,al
|
||||
out 0xA0, al
|
||||
call rdelay
|
||||
|
||||
mov al,0x08
|
||||
out 0x21,al
|
||||
mov al, 0x08
|
||||
out 0x21, al
|
||||
call rdelay
|
||||
mov al,0x70
|
||||
out 0xA1,al
|
||||
mov al, 0x70
|
||||
out 0xA1, al
|
||||
call rdelay
|
||||
|
||||
mov al,0x04
|
||||
out 0x21,al
|
||||
mov al, 0x04
|
||||
out 0x21, al
|
||||
call rdelay
|
||||
mov al,0x02
|
||||
out 0xA1,al
|
||||
mov al, 0x02
|
||||
out 0xA1, al
|
||||
call rdelay
|
||||
|
||||
mov al,0x01
|
||||
out 0x21,al
|
||||
mov al, 0x01
|
||||
out 0x21, al
|
||||
call rdelay
|
||||
out 0xA1,al
|
||||
out 0xA1, al
|
||||
call rdelay
|
||||
|
||||
mov al,0xB8
|
||||
out 0x21,al
|
||||
mov al, 0xB8
|
||||
out 0x21, al
|
||||
call rdelay
|
||||
mov al,0xBD
|
||||
out 0xA1,al
|
||||
mov al, 0xBD
|
||||
out 0xA1, al
|
||||
sti
|
||||
|
||||
temp_3456:
|
||||
xor ax,ax
|
||||
mov es,ax
|
||||
mov al,byte [es:0x9030]
|
||||
cmp al,1
|
||||
xor ax, ax
|
||||
mov es, ax
|
||||
mov al, byte [es:0x9030]
|
||||
cmp al, 1
|
||||
jl nbw
|
||||
cmp al,4
|
||||
cmp al, 4
|
||||
jle nbw32
|
||||
|
||||
nbw:
|
||||
in al,0x60
|
||||
cmp al,6
|
||||
in al, 0x60
|
||||
cmp al, 6
|
||||
jae nbw
|
||||
mov bl,al
|
||||
mov bl, al
|
||||
nbw2:
|
||||
in al,0x60
|
||||
cmp al,bl
|
||||
in al, 0x60
|
||||
cmp al, bl
|
||||
je nbw2
|
||||
cmp al,240 ;ax,240
|
||||
cmp al, 240;ax,240
|
||||
jne nbw31
|
||||
mov al,bl
|
||||
mov al, bl
|
||||
dec ax
|
||||
jmp nbw32
|
||||
nbw31:
|
||||
add bl,128
|
||||
cmp al,bl
|
||||
add bl, 128
|
||||
cmp al, bl
|
||||
jne nbw
|
||||
sub al,129
|
||||
sub al, 129
|
||||
|
||||
nbw32:
|
||||
|
||||
@@ -98,11 +98,13 @@ nbw32:
|
||||
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
|
||||
mov word[0x0072], 0x1234
|
||||
jmp 0xF000:0xFFF0
|
||||
|
||||
|
||||
@@ -114,45 +116,46 @@ APM_PowerOff:
|
||||
xor bx, bx
|
||||
int 15h
|
||||
;!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
mov ax,0x5300
|
||||
xor bx,bx
|
||||
mov ax, 0x5300
|
||||
xor bx, bx
|
||||
int 0x15
|
||||
push ax
|
||||
|
||||
mov ax,0x5301
|
||||
xor bx,bx
|
||||
mov ax, 0x5301
|
||||
xor bx, bx
|
||||
int 0x15
|
||||
|
||||
mov ax,0x5308
|
||||
mov bx,1
|
||||
mov cx,bx
|
||||
mov ax, 0x5308
|
||||
mov bx, 1
|
||||
mov cx, bx
|
||||
int 0x15
|
||||
|
||||
mov ax,0x530E
|
||||
xor bx,bx
|
||||
mov ax, 0x530E
|
||||
xor bx, bx
|
||||
pop cx
|
||||
int 0x15
|
||||
|
||||
mov ax,0x530D
|
||||
mov bx,1
|
||||
mov cx,bx
|
||||
mov ax, 0x530D
|
||||
mov bx, 1
|
||||
mov cx, bx
|
||||
int 0x15
|
||||
|
||||
mov ax,0x530F
|
||||
mov bx,1
|
||||
mov cx,bx
|
||||
mov ax, 0x530F
|
||||
mov bx, 1
|
||||
mov cx, bx
|
||||
int 0x15
|
||||
|
||||
mov ax,0x5307
|
||||
mov bx,1
|
||||
mov cx,3
|
||||
mov ax, 0x5307
|
||||
mov bx, 1
|
||||
mov cx, 3
|
||||
int 0x15
|
||||
;!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
ret
|
||||
|
||||
if ~ defined extended_primary_loader
|
||||
restart_kernel:
|
||||
|
||||
mov ax,0x0003 ; set text mode for screen
|
||||
mov ax, 0x0003 ; set text mode for screen
|
||||
int 0x10
|
||||
jmp 0x4000:0000
|
||||
|
||||
@@ -205,5 +208,5 @@ restart_kernel_4000:
|
||||
mov si, kernel_restart_bootblock
|
||||
mov ax, 'KL'
|
||||
jmp 0x1000:0000
|
||||
|
||||
end if
|
||||
|
||||
|
@@ -371,6 +371,33 @@ proc enable_irq stdcall, irq_line:dword
|
||||
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:
|
||||
|
||||
|
11
kernel/branches/net/core/conf_lib-sp.inc
Normal file
11
kernel/branches/net/core/conf_lib-sp.inc
Normal file
@@ -0,0 +1,11 @@
|
||||
; <EFBFBD>ste archivo debe ser editado con codificaci<EFBFBD>n CP866
|
||||
|
||||
ugui_mouse_speed db 'velocidad del rat<61>n',0
|
||||
ugui_mouse_delay db 'demora del rat<61>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
|
@@ -67,16 +67,27 @@ proc set_kernel_conf
|
||||
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
|
||||
|
@@ -369,7 +369,7 @@ proc read_file stdcall,file_name:dword, buffer:dword, off:dword,\
|
||||
|
||||
pushad
|
||||
lea ebx, [cmd]
|
||||
call file_system_lfn
|
||||
call file_system_lfn_protected
|
||||
popad
|
||||
ret
|
||||
endp
|
||||
|
@@ -440,6 +440,7 @@ proc free_kernel_space stdcall uses ebx ecx edx esi edi, base:dword
|
||||
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 @@ proc user_alloc_at stdcall, address:dword, alloc_size:dword
|
||||
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 @@ proc user_free stdcall, base:dword
|
||||
inc esi
|
||||
dec ecx
|
||||
jnz .release
|
||||
|
||||
.released:
|
||||
push edi
|
||||
|
||||
|
4
kernel/branches/net/core/sys32-sp.inc
Normal file
4
kernel/branches/net/core/sys32-sp.inc
Normal file
@@ -0,0 +1,4 @@
|
||||
; <EFBFBD>ste archivo debe ser editado con codificaci<EFBFBD>n CP866
|
||||
|
||||
msg_sel_ker db "n<EFBFBD>cleo", 0
|
||||
msg_sel_app db "aplicaci<EFBFBD>n", 0
|
@@ -75,8 +75,12 @@ iglobal
|
||||
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 @@ show_error_parameters:
|
||||
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 @@ restore .slot
|
||||
; 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
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
;; ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
$Revision $
|
||||
$Revision$
|
||||
|
||||
; Old style system call converter
|
||||
align 16
|
||||
@@ -38,9 +38,13 @@ sysenter_entry:
|
||||
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] ; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - app ecx, ecx - app esp + 4
|
||||
@@ -62,8 +66,11 @@ align 16
|
||||
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 @@ syscall_entry:
|
||||
;------------------
|
||||
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 @@ iglobal
|
||||
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
|
||||
|
@@ -5,7 +5,7 @@
|
||||
;; ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
$Revision $
|
||||
$Revision$
|
||||
|
||||
|
||||
GREEDY_KERNEL equ 0
|
||||
@@ -307,7 +307,6 @@ end if
|
||||
.failed:
|
||||
mov eax, [save_cr3]
|
||||
call set_cr3
|
||||
|
||||
.err:
|
||||
.err_hdr:
|
||||
stdcall kernel_free, [file_base]
|
||||
@@ -1076,6 +1075,7 @@ proc set_app_params stdcall,slot:dword, params:dword,\
|
||||
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 @@ proc set_app_params stdcall,slot:dword, params:dword,\
|
||||
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
|
||||
|
@@ -87,6 +87,8 @@ if lang eq ru
|
||||
if preboot_blogesc
|
||||
boot_tasking db '<27><><EFBFBD> <20><>⮢<EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>᪠, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ESC <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',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 @@ start_not_enough_memory db 'K : New Process - not enough memory',13,10,0
|
||||
|
||||
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 @@ firstapp db 'LAUNCHER',0
|
||||
notifyapp db '@notify',0
|
||||
if lang eq ru
|
||||
ud_user_message db '<27>訡<EFBFBD><E8A8A1>: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ন<EFBFBD><E0A6A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
|
||||
else
|
||||
else if ~ lang eq sp
|
||||
ud_user_message db 'Error: unsupported processor instruction',0
|
||||
end if
|
||||
|
||||
|
40
kernel/branches/net/data32sp.inc
Normal file
40
kernel/branches/net/data32sp.inc
Normal file
@@ -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<63>',0
|
||||
boot_detectpart db 'Buscar particiones en discos',0
|
||||
boot_init_sys db 'Inicializar directorio del sistema /sys',0
|
||||
boot_loadlibs db 'Cargando librer<65>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<61>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<63>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<73>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<63>n no soportada por el procesador',0
|
@@ -450,7 +450,7 @@ ext2_get_inode_block:
|
||||
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 @@ ext2_HdRead:
|
||||
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 @@ ext2_HdRead:
|
||||
mov eax, [esi]
|
||||
div [ext2_data.block_size]
|
||||
|
||||
push eax ;номер блока запоминаем
|
||||
push eax ;счетчик блоков ложим в стек
|
||||
|
||||
push ecx
|
||||
mov ecx, eax
|
||||
@@ -949,7 +947,7 @@ ext2_HdRead:
|
||||
|
||||
.zero_start:
|
||||
mov eax, ecx
|
||||
push 0 ;счетчик блоков
|
||||
push 0 ;счетчик блоков ложим в стек
|
||||
;теперь в eax кол-во оставшихся байт для чтения
|
||||
.calc_blocks_count:
|
||||
mov ebx, edi ;чтение блока прям в ->ebx
|
||||
@@ -982,7 +980,7 @@ ext2_HdRead:
|
||||
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 @@ ext2_HdRead:
|
||||
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 @@ ext2_HdRead:
|
||||
.only_one_block:
|
||||
mov esi, ebx
|
||||
rep movsb ;кусок last блока
|
||||
pop eax
|
||||
jmp .end_read
|
||||
|
||||
.error_at_first_block:
|
||||
@@ -1132,11 +1133,11 @@ ext2_find_lfn:
|
||||
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
|
||||
|
||||
|
13
kernel/branches/net/fs/fs-sp.inc
Normal file
13
kernel/branches/net/fs/fs-sp.inc
Normal file
@@ -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
|
||||
|
@@ -21,6 +21,10 @@ $Revision $
|
||||
|
||||
|
||||
iglobal
|
||||
|
||||
if lang eq sp
|
||||
include 'fs/fs-sp.inc'
|
||||
else
|
||||
dir0:
|
||||
db 'HARDDISK '
|
||||
db 'RAMDISK '
|
||||
@@ -33,6 +37,7 @@ dir1:
|
||||
db 'THIRD '
|
||||
db 'FOURTH '
|
||||
db 0
|
||||
end if
|
||||
|
||||
not_select_IDE db 0
|
||||
|
||||
|
@@ -134,6 +134,15 @@ fs_additional_handlers:
|
||||
|
||||
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
|
||||
|
@@ -467,9 +467,11 @@ sys_waitforevent: ;; f10
|
||||
;--------------------------------------
|
||||
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
|
||||
|
@@ -17,6 +17,8 @@ VKEY_RALT = 0000000000100000b
|
||||
VKEY_CAPSLOCK = 0000000001000000b
|
||||
VKEY_NUMLOCK = 0000000010000000b
|
||||
VKEY_SCRLOCK = 0000000100000000b
|
||||
VKEY_LWIN = 0000001000000000b
|
||||
VKEY_RWIN = 0000010000000000b
|
||||
|
||||
VKEY_SHIFT = 0000000000000011b
|
||||
VKEY_CONTROL = 0000000000001100b
|
||||
@@ -224,6 +226,29 @@ send_scancode:
|
||||
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 @@ send_scancode:
|
||||
|
||||
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 @@ set_lights:
|
||||
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 ]
|
||||
|
@@ -77,7 +77,7 @@ $Revision $
|
||||
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 @@ use16
|
||||
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 @@ else if lang eq et
|
||||
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 @@ no_mode_0x12:
|
||||
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 @@ end if
|
||||
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 @@ end if
|
||||
|
||||
mov [pci_access_enabled], 1
|
||||
|
||||
|
||||
; SET PRELIMINARY WINDOW STACK AND POSITIONS
|
||||
|
||||
mov esi, boot_windefs
|
||||
@@ -759,52 +812,6 @@ end if
|
||||
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 @@ end if
|
||||
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 @@ end if
|
||||
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 @@ sysfn_terminate: ; 18.2 = TERMINATE
|
||||
push ecx
|
||||
cmp ecx, 2
|
||||
jb noprocessterminate
|
||||
|
||||
cmp ecx, [TASK_COUNT]
|
||||
mov edx, [TASK_COUNT]
|
||||
cmp ecx, edx
|
||||
ja noprocessterminate
|
||||
|
||||
shl ecx, 5
|
||||
mov eax, [TASK_COUNT]
|
||||
shl ecx, 5
|
||||
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 @@ nobackgr:
|
||||
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 @@ align 4
|
||||
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 @@ set_app_param:
|
||||
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 @@ include "data32.inc"
|
||||
__REV__ = __REV
|
||||
|
||||
uglobals_size = $ - endofcode
|
||||
if ~ lang eq sp
|
||||
diff16 "end of kernel code",0,$
|
||||
end if
|
||||
|
@@ -137,7 +137,7 @@ struct APPDATA
|
||||
ipc_size dd ?
|
||||
event_mask dd ?
|
||||
debugger_slot dd ?
|
||||
dd ?
|
||||
terminate_protection dd ?
|
||||
keyboard_mode db ?
|
||||
rb 3
|
||||
dir_table dd ?
|
||||
|
4
kernel/branches/net/kernelsp.inc
Normal file
4
kernel/branches/net/kernelsp.inc
Normal file
@@ -0,0 +1,4 @@
|
||||
; <EFBFBD>ste archivo debe ser editado con codificaci<EFBFBD>n CP866
|
||||
|
||||
version db 'Kolibri OS versi<73>n 0.7.7.0+ ',13,10,13,10,0
|
||||
diff16 "fin del c<>digo del kernel",0,$
|
@@ -291,11 +291,15 @@ stack_handler:
|
||||
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 @@ NET_add_device:
|
||||
|
||||
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
|
||||
|
||||
;----------------------------------
|
||||
|
@@ -1,58 +0,0 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ;;
|
||||
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
|
||||
;; Distributed under terms of the GNU General Public License ;;
|
||||
;; ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
$Revision$
|
||||
|
||||
|
||||
;
|
||||
; Call of videomode driver's functions
|
||||
;
|
||||
; (Add in System function 21 (and/or 26) as a subfunction 13)
|
||||
;
|
||||
; Author: Trans
|
||||
; Date: 19.07.2003
|
||||
;
|
||||
; Include in MeOS kernel and compile with FASM
|
||||
;
|
||||
|
||||
uglobal
|
||||
old_screen_width dd ?
|
||||
old_screen_height dd ?
|
||||
endg
|
||||
|
||||
; cmp eax,13 ; CALL VIDEOMODE DRIVER FUNCTIONS
|
||||
dec ebx
|
||||
jnz .no_vmode_drv_access
|
||||
pushd [Screen_Max_X] [Screen_Max_Y]
|
||||
popd [old_screen_height] [old_screen_width]
|
||||
or eax,-1 ; If driver is absent then eax does not change
|
||||
call (VMODE_BASE+0x100) ; Entry point of video driver
|
||||
mov [esp+36-4],eax
|
||||
mov [esp+24-4],ebx
|
||||
mov [esp+32-4],ecx
|
||||
; mov [esp+28],edx
|
||||
mov eax,[old_screen_width]
|
||||
mov ebx,[old_screen_height]
|
||||
sub eax,[Screen_Max_X]
|
||||
jnz @f
|
||||
sub ebx,[Screen_Max_Y]
|
||||
jz .resolution_wasnt_changed
|
||||
jmp .lp1
|
||||
@@: sub ebx,[Screen_Max_Y]
|
||||
.lp1: sub [screen_workarea.right],eax
|
||||
sub [screen_workarea.bottom],ebx
|
||||
|
||||
call repos_windows
|
||||
xor eax,eax
|
||||
xor ebx,ebx
|
||||
mov ecx, [Screen_Max_X]
|
||||
mov edx, [Screen_Max_Y]
|
||||
call calculatescreen
|
||||
|
||||
.resolution_wasnt_changed:
|
||||
ret
|
||||
.no_vmode_drv_access:
|
@@ -1,35 +0,0 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; ;;
|
||||
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
|
||||
;; Distributed under terms of the GNU General Public License ;;
|
||||
;; ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
$Revision$
|
||||
|
||||
|
||||
;
|
||||
; Load of videomode driver in memory
|
||||
;
|
||||
; (driver is located at VMODE_BASE - 32kb) // if this area not occuped anything
|
||||
;
|
||||
; Author: Trans
|
||||
; Date: 19.07.2003
|
||||
;
|
||||
; Include in MeOS kernel and compile with FASM
|
||||
;
|
||||
|
||||
|
||||
; LOAD VIDEOMODE DRIVER
|
||||
; If vmode.mdr file not found
|
||||
or eax,-1 ; Driver ID = -1 (not present in system)
|
||||
mov [VMODE_BASE],eax ;
|
||||
mov [VMODE_BASE+0x100],byte 0xC3 ; Instruction RETN - driver loop
|
||||
|
||||
stdcall read_file, vmode, VMODE_BASE, 0, 0x8000 ;{SPraid.simba}
|
||||
; mov esi, vmode
|
||||
; xor ebx, ebx
|
||||
; mov ecx, 0x8000 ; size of memory area for driver
|
||||
; mov edx, VMODE_BASE ; Memory position of driver
|
||||
; xor ebp, ebp
|
||||
; call fs_RamdiskRead
|
Reference in New Issue
Block a user