forked from KolibriOS/kolibrios
1) The function 18/19 - to get/set mouse features
2) The application SETUP is changed for operation from functions 18/19, also instead of functions 6 and 33 the function 70 is used. git-svn-id: svn://kolibrios.org@120 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
df2e1aa3a9
commit
28e25be617
File diff suppressed because it is too large
Load Diff
@ -925,6 +925,54 @@ Remarks:
|
|||||||
* See also subfunction 2 - terminate
|
* See also subfunction 2 - terminate
|
||||||
process/thread by given slot.
|
process/thread by given slot.
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
====================== Function 18, subfunction 19 =====================
|
||||||
|
======================= Get/set mouse features. ======================
|
||||||
|
======================================================================
|
||||||
|
Parameters:
|
||||||
|
* eax = 18 - function number
|
||||||
|
* ebx = 19 - subfunction number
|
||||||
|
* ecx = subsubfunction number
|
||||||
|
|
||||||
|
ecx = 0 - get mouse speed
|
||||||
|
Returned value:
|
||||||
|
* eax = current mouse speed
|
||||||
|
|
||||||
|
ecx = 1 - set mouse speed
|
||||||
|
edx = selected value of speed
|
||||||
|
Returned value:
|
||||||
|
* function does not return value
|
||||||
|
|
||||||
|
ecx = 2 - get mouse delay
|
||||||
|
Returned value:
|
||||||
|
* eax = current mouse delay
|
||||||
|
|
||||||
|
ecx = 3 - set mouse delay
|
||||||
|
edx = selected value of delay
|
||||||
|
Returned value:
|
||||||
|
* function does not return value
|
||||||
|
|
||||||
|
ecx = 4 - set mouse pointer position
|
||||||
|
edx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
||||||
|
Returned value:
|
||||||
|
* function does not return value
|
||||||
|
|
||||||
|
Remarks:
|
||||||
|
* Recommended speed of the mouse (in subfunction 1) from 1 up to 9.
|
||||||
|
The installed value is not inspected by the code of a kernel, on this use
|
||||||
|
cautiously, at incorrect value the cursor can "freeze".
|
||||||
|
Speed of mouse can be regulated through the application SETUP.
|
||||||
|
* Recommended delay of the mouse (in subfunction 3) = 10. Lower value
|
||||||
|
is not handled COM by mice. At the very large values the movement of
|
||||||
|
the mouse on 1 pixel is impossible and the cursor will jump
|
||||||
|
on the value of the installed speed (subfunction 1).
|
||||||
|
The installed value is not inspected by the code of a kernel.
|
||||||
|
* In subfunction 4 the installed value is not inspected by
|
||||||
|
the code of a kernel. Before usage it is necessary to find out current
|
||||||
|
screen resolution and at installation of a position to watch,
|
||||||
|
that the value of a position should do not fall outside
|
||||||
|
the limits the screen.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
============ Function 19 - start application from ramdisk. ===========
|
============ Function 19 - start application from ramdisk. ===========
|
||||||
======================================================================
|
======================================================================
|
||||||
@ -2086,11 +2134,11 @@ Remarks:
|
|||||||
* Structure of the color table is described in the standard
|
* Structure of the color table is described in the standard
|
||||||
include file 'macros.inc' as 'system_colors'; for example,
|
include file 'macros.inc' as 'system_colors'; for example,
|
||||||
it is possible to write:
|
it is possible to write:
|
||||||
sc system_colors ; variable declaration
|
sc system_colors ; variable declaration
|
||||||
... ; somewhere one must call
|
... ; somewhere one must call
|
||||||
; this function with ecx=sc
|
; this function with ecx=sc
|
||||||
mov ecx, [sc.work_button_text] ; read text color on
|
mov ecx, [sc.work_button_text] ; read text color on
|
||||||
; buttin in working area
|
; buttin in working area
|
||||||
* A program itself desides to use or not to use color table.
|
* A program itself desides to use or not to use color table.
|
||||||
For usage program must simply at calls to drawing functions select
|
For usage program must simply at calls to drawing functions select
|
||||||
color taken from the table.
|
color taken from the table.
|
||||||
@ -3240,11 +3288,11 @@ Remarks:
|
|||||||
The data of the graphics screen (the memory area which displays
|
The data of the graphics screen (the memory area which displays
|
||||||
screen contents) are accessible to a program directly, without
|
screen contents) are accessible to a program directly, without
|
||||||
any system calls, through the selector gs:
|
any system calls, through the selector gs:
|
||||||
mov eax, [gs:0]
|
mov eax, [gs:0]
|
||||||
places in eax the first dword of the buffer, which contains
|
places in eax the first dword of the buffer, which contains
|
||||||
information on color of the left upper point (and, possibly, colors
|
information on color of the left upper point (and, possibly, colors
|
||||||
of several following).
|
of several following).
|
||||||
mov [gs:0], eax
|
mov [gs:0], eax
|
||||||
by work in VESA modes with LFB sets color of the left upper point
|
by work in VESA modes with LFB sets color of the left upper point
|
||||||
(and, possibly, colors of several following).
|
(and, possibly, colors of several following).
|
||||||
To interpret the data of graphics screen program needs to know
|
To interpret the data of graphics screen program needs to know
|
||||||
@ -3806,7 +3854,7 @@ Remarks:
|
|||||||
and at arrival of new message the system will wait.
|
and at arrival of new message the system will wait.
|
||||||
For synchronization frame all work with the buffer by operations
|
For synchronization frame all work with the buffer by operations
|
||||||
lock/unlock
|
lock/unlock
|
||||||
neg [bufsize]
|
neg [bufsize]
|
||||||
* Data in the buffer are considered as array of items with variable
|
* Data in the buffer are considered as array of items with variable
|
||||||
length - messages. Format of a message is explained in
|
length - messages. Format of a message is explained in
|
||||||
general description.
|
general description.
|
||||||
@ -4372,3 +4420,4 @@ Application start functions can return also following errors:
|
|||||||
* 30 = 0x1E = not enough memory
|
* 30 = 0x1E = not enough memory
|
||||||
* 31 = 0x1F = file is not executable
|
* 31 = 0x1F = file is not executable
|
||||||
* 32 = 0x20 = too many processes
|
* 32 = 0x20 = too many processes
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ MouseByteNumber DB 0
|
|||||||
FirstByte DB 0
|
FirstByte DB 0
|
||||||
SecondByte DB 0
|
SecondByte DB 0
|
||||||
ThirdByte DB 0
|
ThirdByte DB 0
|
||||||
|
timer_ticks_com dd 0
|
||||||
;***************************************
|
;***************************************
|
||||||
;* ÍÎÂÛÉ ÎÁÐÀÁÎÒ×ÈÊ ÏÐÅÐÛÂÀÍÈß ÎÒ ÌÛØÈ *
|
;* ÍÎÂÛÉ ÎÁÐÀÁÎÒ×ÈÊ ÏÐÅÐÛÂÀÍÈß ÎÒ ÌÛØÈ *
|
||||||
;***************************************
|
;***************************************
|
||||||
@ -68,7 +68,7 @@ check_mouse_data_com1:
|
|||||||
shl AL,6
|
shl AL,6
|
||||||
or AL,[SecondByte]
|
or AL,[SecondByte]
|
||||||
cbw
|
cbw
|
||||||
shl ax,1
|
call mouse_acceleration_com1
|
||||||
add AX,[0xFB0A] ;[XCoordinate]
|
add AX,[0xFB0A] ;[XCoordinate]
|
||||||
; Êóðñîð íå äîëæåí âûõîäèòü çà ëåâóþ èëè
|
; Êóðñîð íå äîëæåí âûõîäèòü çà ëåâóþ èëè
|
||||||
; ïðàâóþ ãðàíèöó ýêðàíà
|
; ïðàâóþ ãðàíèöó ýêðàíà
|
||||||
@ -90,7 +90,7 @@ check_mouse_data_com1:
|
|||||||
shl AL,4
|
shl AL,4
|
||||||
or AL,[ThirdByte]
|
or AL,[ThirdByte]
|
||||||
cbw
|
cbw
|
||||||
shl ax,1
|
call mouse_acceleration_com1
|
||||||
add AX,[0xFB0C] ;[YCoordinate]
|
add AX,[0xFB0C] ;[YCoordinate]
|
||||||
; Êóðñîð íå äîëæåí âûõîäèòü çà âåðõíþþ èëè
|
; Êóðñîð íå äîëæåí âûõîäèòü çà âåðõíþþ èëè
|
||||||
; íèæíþþ ãðàíèöó ýêðàíà
|
; íèæíþþ ãðàíèöó ýêðàíà
|
||||||
@ -106,6 +106,8 @@ check_mouse_data_com1:
|
|||||||
xor AX,AX
|
xor AX,AX
|
||||||
@@Y2:
|
@@Y2:
|
||||||
mov [0xFB0C],AX ;[YCoordinate]
|
mov [0xFB0C],AX ;[YCoordinate]
|
||||||
|
mov eax,[timer_ticks]
|
||||||
|
mov [timer_ticks_com],eax
|
||||||
jmp @@EndMouseInterrupt
|
jmp @@EndMouseInterrupt
|
||||||
|
|
||||||
@@Error:
|
@@Error:
|
||||||
@ -116,3 +118,13 @@ check_mouse_data_com1:
|
|||||||
call ready_for_next_irq
|
call ready_for_next_irq
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
mouse_acceleration_com1:
|
||||||
|
push eax
|
||||||
|
mov eax,[timer_ticks]
|
||||||
|
sub eax,[timer_ticks_com]
|
||||||
|
cmp eax,[mouse_delay]
|
||||||
|
pop eax
|
||||||
|
ja @f
|
||||||
|
shl ax,1
|
||||||
|
@@:
|
||||||
|
ret
|
||||||
|
@ -4,7 +4,7 @@ MouseByteNumber_1 DB 0
|
|||||||
FirstByte_1 DB 0
|
FirstByte_1 DB 0
|
||||||
SecondByte_1 DB 0
|
SecondByte_1 DB 0
|
||||||
ThirdByte_1 DB 0
|
ThirdByte_1 DB 0
|
||||||
|
timer_ticks_com_1 dd 0
|
||||||
;***************************************
|
;***************************************
|
||||||
;* ÍÎÂÛÉ ÎÁÐÀÁÎÒ×ÈÊ ÏÐÅÐÛÂÀÍÈß ÎÒ ÌÛØÈ *
|
;* ÍÎÂÛÉ ÎÁÐÀÁÎÒ×ÈÊ ÏÐÅÐÛÂÀÍÈß ÎÒ ÌÛØÈ *
|
||||||
;***************************************
|
;***************************************
|
||||||
@ -68,7 +68,7 @@ check_mouse_data_com2:
|
|||||||
shl AL,6
|
shl AL,6
|
||||||
or AL,[SecondByte_1]
|
or AL,[SecondByte_1]
|
||||||
cbw
|
cbw
|
||||||
shl ax,1
|
call mouse_acceleration_com2
|
||||||
add AX,[0xFB0A] ;[XCoordinate]
|
add AX,[0xFB0A] ;[XCoordinate]
|
||||||
; Êóðñîð íå äîëæåí âûõîäèòü çà ëåâóþ èëè
|
; Êóðñîð íå äîëæåí âûõîäèòü çà ëåâóþ èëè
|
||||||
; ïðàâóþ ãðàíèöó ýêðàíà
|
; ïðàâóþ ãðàíèöó ýêðàíà
|
||||||
@ -90,7 +90,7 @@ check_mouse_data_com2:
|
|||||||
shl AL,4
|
shl AL,4
|
||||||
or AL,[ThirdByte_1]
|
or AL,[ThirdByte_1]
|
||||||
cbw
|
cbw
|
||||||
shl ax,1
|
call mouse_acceleration_com2
|
||||||
add AX,[0xFB0C] ;[YCoordinate]
|
add AX,[0xFB0C] ;[YCoordinate]
|
||||||
; Êóðñîð íå äîëæåí âûõîäèòü çà âåðõíþþ èëè
|
; Êóðñîð íå äîëæåí âûõîäèòü çà âåðõíþþ èëè
|
||||||
; íèæíþþ ãðàíèöó ýêðàíà
|
; íèæíþþ ãðàíèöó ýêðàíà
|
||||||
@ -106,6 +106,8 @@ check_mouse_data_com2:
|
|||||||
xor AX,AX
|
xor AX,AX
|
||||||
@@Y2_1:
|
@@Y2_1:
|
||||||
mov [0xFB0C],AX ;[YCoordinate]
|
mov [0xFB0C],AX ;[YCoordinate]
|
||||||
|
mov eax,[timer_ticks]
|
||||||
|
mov [timer_ticks_com_1],eax
|
||||||
jmp @@EndMouseInterrupt_1
|
jmp @@EndMouseInterrupt_1
|
||||||
|
|
||||||
@@Error_1:
|
@@Error_1:
|
||||||
@ -116,3 +118,13 @@ check_mouse_data_com2:
|
|||||||
call ready_for_next_irq
|
call ready_for_next_irq
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
mouse_acceleration_com2:
|
||||||
|
push eax
|
||||||
|
mov eax,[timer_ticks]
|
||||||
|
sub eax,[timer_ticks_com_1]
|
||||||
|
cmp eax,[mouse_delay]
|
||||||
|
pop eax
|
||||||
|
ja @f
|
||||||
|
shl ax,1
|
||||||
|
@@:
|
||||||
|
ret
|
||||||
|
@ -4,6 +4,7 @@ MouseByteNumber_2 DB 0
|
|||||||
FirstByte_2 DB 0
|
FirstByte_2 DB 0
|
||||||
SecondByte_2 DB 0
|
SecondByte_2 DB 0
|
||||||
ThirdByte_2 DB 0
|
ThirdByte_2 DB 0
|
||||||
|
timer_ticks_ps2 dd 0
|
||||||
|
|
||||||
;**************************************
|
;**************************************
|
||||||
;* ОБРАБОТЧИК ПРЕРЫВАНИЯ ОТ МЫШИ PS/2 *
|
;* ОБРАБОТЧИК ПРЕРЫВАНИЯ ОТ МЫШИ PS/2 *
|
||||||
@ -53,7 +54,7 @@ check_mouse_data_ps2:
|
|||||||
; Занести в AL младший байт
|
; Занести в AL младший байт
|
||||||
@@M0:
|
@@M0:
|
||||||
mov AL,[SecondByte_2]
|
mov AL,[SecondByte_2]
|
||||||
shl ax,1
|
call mouse_acceleration_ps2
|
||||||
; Вычислить новое значение координаты
|
; Вычислить новое значение координаты
|
||||||
; курсора по X
|
; курсора по X
|
||||||
add AX,[0xFB0A] ;[XCoordinate]
|
add AX,[0xFB0A] ;[XCoordinate]
|
||||||
@ -79,7 +80,7 @@ check_mouse_data_ps2:
|
|||||||
; Занести в AL младший байт
|
; Занести в AL младший байт
|
||||||
@@M3:
|
@@M3:
|
||||||
mov AL,[ThirdByte_2]
|
mov AL,[ThirdByte_2]
|
||||||
shl ax,1
|
call mouse_acceleration_ps2
|
||||||
; Вычислить новое значение координаты курсора
|
; Вычислить новое значение координаты курсора
|
||||||
; по Y (Y-координата мыши PS/2 направлена
|
; по Y (Y-координата мыши PS/2 направлена
|
||||||
; противоположно экранной)
|
; противоположно экранной)
|
||||||
@ -98,6 +99,8 @@ check_mouse_data_ps2:
|
|||||||
mov [0xFB0C],AX ;[YCoordinate]
|
mov [0xFB0C],AX ;[YCoordinate]
|
||||||
|
|
||||||
; Показать курсор в новой позиции
|
; Показать курсор в новой позиции
|
||||||
|
mov eax,[timer_ticks]
|
||||||
|
mov [timer_ticks_ps2],eax
|
||||||
jmp @@EndMouseInterrupt_2
|
jmp @@EndMouseInterrupt_2
|
||||||
|
|
||||||
; Обнаружен сбой в порядке передачи информации от мыши
|
; Обнаружен сбой в порядке передачи информации от мыши
|
||||||
@ -108,6 +111,16 @@ check_mouse_data_ps2:
|
|||||||
call ready_for_next_irq_1
|
call ready_for_next_irq_1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
mouse_acceleration_ps2:
|
||||||
|
push eax
|
||||||
|
mov eax,[timer_ticks]
|
||||||
|
sub eax,[timer_ticks_ps2]
|
||||||
|
cmp eax,[mouse_delay]
|
||||||
|
pop eax
|
||||||
|
ja @f
|
||||||
|
imul ax,[mouse_speed_factor]
|
||||||
|
@@:
|
||||||
|
ret
|
||||||
;***********************************************
|
;***********************************************
|
||||||
;* ОЖИДАНИЕ ОЧИСТКИ ВХОДНОГО БУФЕРА I8042 *
|
;* ОЖИДАНИЕ ОЧИСТКИ ВХОДНОГО БУФЕРА I8042 *
|
||||||
;* При выходе из процедуры: *
|
;* При выходе из процедуры: *
|
||||||
|
@ -16,6 +16,9 @@ uglobal
|
|||||||
mousedata dd 0x0
|
mousedata dd 0x0
|
||||||
endg
|
endg
|
||||||
|
|
||||||
|
mouse_delay dd 10
|
||||||
|
mouse_speed_factor dw 3
|
||||||
|
|
||||||
include 'm_ps2.inc'
|
include 'm_ps2.inc'
|
||||||
include 'm_com1.inc'
|
include 'm_com1.inc'
|
||||||
include 'm_com2.inc'
|
include 'm_com2.inc'
|
||||||
|
@ -1972,7 +1972,9 @@ sys_system_table:
|
|||||||
dd sysfn_centermouse ; 15 = center mouse cursor
|
dd sysfn_centermouse ; 15 = center mouse cursor
|
||||||
dd sysfn_getfreemem ; 16 = get free memory size
|
dd sysfn_getfreemem ; 16 = get free memory size
|
||||||
dd sysfn_getallmem ; 17 = get total memory size
|
dd sysfn_getallmem ; 17 = get total memory size
|
||||||
dd sysfn_terminate2 ; 18 = terminate thread using PID instead of slot
|
dd sysfn_terminate2 ; 18 = terminate thread using PID
|
||||||
|
; instead of slot
|
||||||
|
dd sysfn_mouse_acceleration; 19 = set/get mouse acceleration
|
||||||
sysfn_num = ($ - sys_system_table)/4
|
sysfn_num = ($ - sys_system_table)/4
|
||||||
endg
|
endg
|
||||||
|
|
||||||
@ -2170,6 +2172,39 @@ sysfn_centermouse: ; 18.15 = mouse centered
|
|||||||
mov [esp+36],dword 0
|
mov [esp+36],dword 0
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
sysfn_mouse_acceleration: ; 18.19 = set/get mouse features
|
||||||
|
cmp ebx,0 ; get mouse speed factor
|
||||||
|
jnz .set_mouse_acceleration
|
||||||
|
xor eax,eax
|
||||||
|
mov ax,[mouse_speed_factor]
|
||||||
|
mov [esp+36],eax
|
||||||
|
ret
|
||||||
|
.set_mouse_acceleration:
|
||||||
|
cmp ebx,1 ; set mouse speed factor
|
||||||
|
jnz .get_mouse_delay
|
||||||
|
mov [mouse_speed_factor],cx
|
||||||
|
ret
|
||||||
|
.get_mouse_delay:
|
||||||
|
cmp ebx,2 ; get mouse delay
|
||||||
|
jnz .set_mouse_delay
|
||||||
|
mov eax,[mouse_delay]
|
||||||
|
mov [esp+36],eax
|
||||||
|
ret
|
||||||
|
.set_mouse_delay:
|
||||||
|
cmp ebx,3 ; set mouse delay
|
||||||
|
jnz .set_pointer_position
|
||||||
|
mov [mouse_delay],ecx
|
||||||
|
ret
|
||||||
|
.set_pointer_position:
|
||||||
|
cmp ebx,4 ; set mouse pointer position
|
||||||
|
jnz .end
|
||||||
|
mov [0xFB0C],cx ;y
|
||||||
|
ror ecx,16
|
||||||
|
mov [0xFB0A],cx ;x
|
||||||
|
rol ecx,16
|
||||||
|
.end:
|
||||||
|
ret
|
||||||
|
|
||||||
sysfn_getfreemem:
|
sysfn_getfreemem:
|
||||||
mov eax,[MEM_FreeSpace]
|
mov eax,[MEM_FreeSpace]
|
||||||
shl eax,2
|
shl eax,2
|
||||||
|
@ -11,15 +11,15 @@
|
|||||||
|
|
||||||
;******************************************************************************
|
;******************************************************************************
|
||||||
use32
|
use32
|
||||||
org 0x0
|
org 0x0
|
||||||
db 'MENUET01' ; 8 byte identifier
|
db 'MENUET01' ; 8 byte identifier
|
||||||
dd 0x01 ; header version
|
dd 0x01 ; header version
|
||||||
dd START ; pointer to program start
|
dd START ; pointer to program start
|
||||||
dd I_END ; size of image
|
dd I_END ; size of image
|
||||||
dd 0x4000 ; reguired amount of memory
|
dd 0x4000 ; reguired amount of memory
|
||||||
dd 0x4000 ; stack pointer (esp)
|
dd 0x4000 ; stack pointer (esp)
|
||||||
dd I_PARAM,0 ; parameters, reserved
|
dd I_PARAM,0 ; parameters, reserved
|
||||||
include 'lang.inc'
|
; include 'lang.inc'
|
||||||
include 'macros.inc'
|
include 'macros.inc'
|
||||||
;******************************************************************************
|
;******************************************************************************
|
||||||
|
|
||||||
@ -29,21 +29,14 @@ BBB equ 25
|
|||||||
;******************************************************************************
|
;******************************************************************************
|
||||||
apply_all:
|
apply_all:
|
||||||
|
|
||||||
mov eax,6 ; load saved settings from SETUP.DAT
|
|
||||||
mov ebx,filename
|
|
||||||
xor ecx,ecx
|
|
||||||
or edx,-1
|
|
||||||
mov esi,keyboard
|
|
||||||
int 0x40
|
|
||||||
|
|
||||||
call _midibase ;1
|
call _midibase ;1
|
||||||
call _sound_dma ;10
|
call _sound_dma ;10
|
||||||
call _pci_acc ;12
|
call _pci_acc ;12
|
||||||
call _sb16 ;4
|
call _sb16 ;4
|
||||||
call _wssp ;6
|
call _wssp ;6
|
||||||
call _syslang ;5
|
call _syslang ;5
|
||||||
call _keyboard ;2
|
call _keyboard ;2
|
||||||
|
call _mouse
|
||||||
call get_disk_info
|
call get_disk_info
|
||||||
cmp [cd],0
|
cmp [cd],0
|
||||||
jne no_cd
|
jne no_cd
|
||||||
@ -53,7 +46,7 @@ apply_all:
|
|||||||
jne no_hd
|
jne no_hd
|
||||||
call _lba_read ;11
|
call _lba_read ;11
|
||||||
call _hdbase ;7
|
call _hdbase ;7
|
||||||
call _f32p ;8
|
call _f32p ;8
|
||||||
no_hd:
|
no_hd:
|
||||||
ret
|
ret
|
||||||
;-------------------------------------------------------------------------------
|
;-------------------------------------------------------------------------------
|
||||||
@ -68,7 +61,7 @@ get_disk_info:
|
|||||||
mov al,[table_area+1]
|
mov al,[table_area+1]
|
||||||
shr al,6
|
shr al,6
|
||||||
cmp al,0
|
cmp al,0
|
||||||
je ide_1
|
je ide_1
|
||||||
cmp al,01b
|
cmp al,01b
|
||||||
jnz ide_0_cd
|
jnz ide_0_cd
|
||||||
mov [hdbase],1
|
mov [hdbase],1
|
||||||
@ -81,74 +74,74 @@ get_disk_info:
|
|||||||
mov [cdbase],1
|
mov [cdbase],1
|
||||||
mov [cd],0
|
mov [cd],0
|
||||||
cmp [hd],0
|
cmp [hd],0
|
||||||
je all_device
|
je all_device
|
||||||
|
|
||||||
ide_1:
|
ide_1:
|
||||||
mov al,[table_area+1]
|
mov al,[table_area+1]
|
||||||
shl al,2
|
shl al,2
|
||||||
shr al,6
|
shr al,6
|
||||||
cmp al,0
|
cmp al,0
|
||||||
je ide_2
|
je ide_2
|
||||||
cmp al,01b
|
cmp al,01b
|
||||||
jnz ide_1_cd
|
jnz ide_1_cd
|
||||||
cmp [hd],0
|
cmp [hd],0
|
||||||
je ide_11
|
je ide_11
|
||||||
mov [hdbase],2
|
mov [hdbase],2
|
||||||
mov [hd],0
|
mov [hd],0
|
||||||
ide_11:
|
ide_11:
|
||||||
cmp [cd],0
|
cmp [cd],0
|
||||||
je all_device
|
je all_device
|
||||||
jmp ide_2
|
jmp ide_2
|
||||||
|
|
||||||
ide_1_cd:
|
ide_1_cd:
|
||||||
cmp al,10b
|
cmp al,10b
|
||||||
jnz ide_2
|
jnz ide_2
|
||||||
cmp [cd],0
|
cmp [cd],0
|
||||||
je ide_11_cd
|
je ide_11_cd
|
||||||
mov [cdbase],2
|
mov [cdbase],2
|
||||||
mov [cd],0
|
mov [cd],0
|
||||||
ide_11_cd:
|
ide_11_cd:
|
||||||
cmp [hd],0
|
cmp [hd],0
|
||||||
je all_device
|
je all_device
|
||||||
|
|
||||||
ide_2:
|
ide_2:
|
||||||
mov al,[table_area+1]
|
mov al,[table_area+1]
|
||||||
shl al,4
|
shl al,4
|
||||||
shr al,6
|
shr al,6
|
||||||
cmp al,0
|
cmp al,0
|
||||||
je ide_3
|
je ide_3
|
||||||
cmp al,01b
|
cmp al,01b
|
||||||
jnz ide_2_cd
|
jnz ide_2_cd
|
||||||
cmp [hd],0
|
cmp [hd],0
|
||||||
je ide_21
|
je ide_21
|
||||||
mov [hdbase],3
|
mov [hdbase],3
|
||||||
mov [hd],0
|
mov [hd],0
|
||||||
ide_21:
|
ide_21:
|
||||||
cmp [cd],0
|
cmp [cd],0
|
||||||
je all_device
|
je all_device
|
||||||
jmp ide_3
|
jmp ide_3
|
||||||
|
|
||||||
ide_2_cd:
|
ide_2_cd:
|
||||||
cmp al,10b
|
cmp al,10b
|
||||||
jnz ide_3
|
jnz ide_3
|
||||||
cmp [cd],0
|
cmp [cd],0
|
||||||
je ide_21_cd
|
je ide_21_cd
|
||||||
mov [cdbase],3
|
mov [cdbase],3
|
||||||
mov [cd],0
|
mov [cd],0
|
||||||
ide_21_cd:
|
ide_21_cd:
|
||||||
cmp [hd],0
|
cmp [hd],0
|
||||||
je all_device
|
je all_device
|
||||||
|
|
||||||
ide_3:
|
ide_3:
|
||||||
mov al,[table_area+1]
|
mov al,[table_area+1]
|
||||||
shl al,6
|
shl al,6
|
||||||
shr al,6
|
shr al,6
|
||||||
cmp al,0
|
cmp al,0
|
||||||
je not_device
|
je not_device
|
||||||
cmp al,01b
|
cmp al,01b
|
||||||
jnz ide_3_cd
|
jnz ide_3_cd
|
||||||
cmp [hd],0
|
cmp [hd],0
|
||||||
je ide_31
|
je ide_31
|
||||||
mov [hdbase],4
|
mov [hdbase],4
|
||||||
mov [hd],0
|
mov [hd],0
|
||||||
ide_31:
|
ide_31:
|
||||||
@ -159,7 +152,7 @@ get_disk_info:
|
|||||||
cmp al,10b
|
cmp al,10b
|
||||||
jnz not_device
|
jnz not_device
|
||||||
cmp [cd],0
|
cmp [cd],0
|
||||||
je all_device
|
je all_device
|
||||||
mov [cdbase],4
|
mov [cdbase],4
|
||||||
mov [cd],0
|
mov [cd],0
|
||||||
|
|
||||||
@ -171,6 +164,7 @@ hd db 0
|
|||||||
cd db 0
|
cd db 0
|
||||||
;******************************************************************************
|
;******************************************************************************
|
||||||
apply_all_and_exit:
|
apply_all_and_exit:
|
||||||
|
mcall 70,read_fileinfo
|
||||||
call apply_all
|
call apply_all
|
||||||
jmp close
|
jmp close
|
||||||
|
|
||||||
@ -185,7 +179,7 @@ set_language_and_exit:
|
|||||||
; xor eax,eax
|
; xor eax,eax
|
||||||
;@@: mov [keyboard],eax
|
;@@: mov [keyboard],eax
|
||||||
cmp eax,1
|
cmp eax,1
|
||||||
je russian
|
je russian
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
set_lang_now:
|
set_lang_now:
|
||||||
mov [keyboard],eax
|
mov [keyboard],eax
|
||||||
@ -201,7 +195,7 @@ set_syslanguage_and_exit:
|
|||||||
; mov ecx,9
|
; mov ecx,9
|
||||||
int 0x40
|
int 0x40
|
||||||
cmp eax,4
|
cmp eax,4
|
||||||
jne temp ;@f
|
jne temp ;@f
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
;@@: inc eax
|
;@@: inc eax
|
||||||
temp: inc eax
|
temp: inc eax
|
||||||
@ -250,29 +244,24 @@ get_other:
|
|||||||
mov [lba_read],eax
|
mov [lba_read],eax
|
||||||
mcall 26,12
|
mcall 26,12
|
||||||
mov [pci_acc],eax
|
mov [pci_acc],eax
|
||||||
|
mcall 18,19,0
|
||||||
|
mov [mouse_speed],eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
;******************************************************************************
|
;******************************************************************************
|
||||||
|
|
||||||
START:
|
START:
|
||||||
cmp [I_PARAM], 'SLAN'
|
cmp [I_PARAM], 'SLAN'
|
||||||
je set_syslanguage_and_exit
|
je set_syslanguage_and_exit
|
||||||
|
|
||||||
cmp [I_PARAM], 'LANG'
|
cmp [I_PARAM], 'LANG'
|
||||||
je set_language_and_exit
|
je set_language_and_exit
|
||||||
|
|
||||||
; mov eax,6 ; load saved settings from SETUP.DAT
|
|
||||||
; mov ebx,filename
|
|
||||||
; xor ecx,ecx
|
|
||||||
; or edx,-1
|
|
||||||
; mov esi,keyboard
|
|
||||||
; int 0x40
|
|
||||||
|
|
||||||
cmp [I_PARAM], 'BOOT'
|
cmp [I_PARAM], 'BOOT'
|
||||||
je apply_all_and_exit
|
je apply_all_and_exit
|
||||||
|
|
||||||
call loadtxt
|
|
||||||
call get_setup_values
|
call get_setup_values
|
||||||
|
call loadtxt
|
||||||
red:
|
red:
|
||||||
call draw_window
|
call draw_window
|
||||||
|
|
||||||
@ -280,36 +269,36 @@ still:
|
|||||||
|
|
||||||
cmp word [blinkpar],0
|
cmp word [blinkpar],0
|
||||||
jne blinker
|
jne blinker
|
||||||
mov eax,29 ;get system date
|
mov eax,29 ;get system date
|
||||||
int 0x40
|
int 0x40
|
||||||
cmp eax,[date]
|
cmp eax,[date]
|
||||||
je gettime
|
je gettime
|
||||||
mov [date],eax
|
mov [date],eax
|
||||||
gettime:
|
gettime:
|
||||||
mov eax,3 ;get system time
|
mov eax,3 ;get system time
|
||||||
int 0x40
|
int 0x40
|
||||||
cmp ax,[time]
|
cmp ax,[time]
|
||||||
je sysevent
|
je sysevent
|
||||||
mov [time],ax
|
mov [time],ax
|
||||||
call drawtime
|
call drawtime
|
||||||
|
|
||||||
sysevent:
|
sysevent:
|
||||||
mov eax,23
|
mov eax,23
|
||||||
mov ebx,8 ; wait here for event with timeout
|
mov ebx,8 ; wait here for event with timeout
|
||||||
int 0x40
|
int 0x40
|
||||||
|
|
||||||
cmp eax,1
|
cmp eax,1
|
||||||
jz red
|
jz red
|
||||||
cmp eax,2
|
cmp eax,2
|
||||||
jz key
|
jz key
|
||||||
cmp eax,3
|
cmp eax,3
|
||||||
jz button
|
jz button
|
||||||
|
|
||||||
jmp still
|
jmp still
|
||||||
|
|
||||||
blinker:
|
blinker:
|
||||||
cmp byte [count],6
|
cmp byte [count],6
|
||||||
jb noblink
|
jb noblink
|
||||||
btc dword [blinkpar],16
|
btc dword [blinkpar],16
|
||||||
mov byte [count],0
|
mov byte [count],0
|
||||||
call drawtime
|
call drawtime
|
||||||
@ -319,19 +308,19 @@ still:
|
|||||||
|
|
||||||
incdectime:
|
incdectime:
|
||||||
cmp byte [blinkpar],0
|
cmp byte [blinkpar],0
|
||||||
je still
|
je still
|
||||||
mov esi,time
|
mov esi,time
|
||||||
mov bl,0x23 ;border
|
mov bl,0x23 ;border
|
||||||
cmp byte [blinkpar],1
|
cmp byte [blinkpar],1
|
||||||
je hours
|
je hours
|
||||||
mov bl,0x59 ;minutes
|
mov bl,0x59 ;minutes
|
||||||
inc esi
|
inc esi
|
||||||
hours:
|
hours:
|
||||||
mov al,byte [esi]
|
mov al,byte [esi]
|
||||||
cmp ah,112
|
cmp ah,112
|
||||||
je dectime
|
je dectime
|
||||||
cmp al,bl
|
cmp al,bl
|
||||||
je noinctime
|
je noinctime
|
||||||
inc al
|
inc al
|
||||||
daa
|
daa
|
||||||
jmp incdectime1
|
jmp incdectime1
|
||||||
@ -342,7 +331,7 @@ incdectime:
|
|||||||
jmp still
|
jmp still
|
||||||
dectime:
|
dectime:
|
||||||
cmp al,0
|
cmp al,0
|
||||||
je nodectime
|
je nodectime
|
||||||
dec al
|
dec al
|
||||||
das
|
das
|
||||||
jmp incdectime1
|
jmp incdectime1
|
||||||
@ -352,12 +341,12 @@ incdectime:
|
|||||||
|
|
||||||
incdecdate:
|
incdecdate:
|
||||||
cmp byte [blinkpar+1],0
|
cmp byte [blinkpar+1],0
|
||||||
je still
|
je still
|
||||||
mov esi,date
|
mov esi,date
|
||||||
mov bl,0 ;border of years
|
mov bl,0 ;border of years
|
||||||
cmp byte [blinkpar+1],1
|
cmp byte [blinkpar+1],1
|
||||||
jne days
|
jne days
|
||||||
mov bl,0x12 ;months
|
mov bl,0x12 ;months
|
||||||
inc esi
|
inc esi
|
||||||
days:
|
days:
|
||||||
cmp byte [blinkpar+1],2
|
cmp byte [blinkpar+1],2
|
||||||
@ -367,9 +356,9 @@ incdecdate:
|
|||||||
nodays:
|
nodays:
|
||||||
mov al,byte [esi]
|
mov al,byte [esi]
|
||||||
cmp ah,122
|
cmp ah,122
|
||||||
je decdate
|
je decdate
|
||||||
cmp al,bl
|
cmp al,bl
|
||||||
je noincdate
|
je noincdate
|
||||||
inc al ;add al,1
|
inc al ;add al,1
|
||||||
daa
|
daa
|
||||||
jmp incdecdate1
|
jmp incdecdate1
|
||||||
@ -380,7 +369,7 @@ incdecdate:
|
|||||||
jmp still
|
jmp still
|
||||||
decdate:
|
decdate:
|
||||||
cmp al,1
|
cmp al,1
|
||||||
je nodecdate
|
je nodecdate
|
||||||
dec al
|
dec al
|
||||||
das
|
das
|
||||||
jmp incdecdate1
|
jmp incdecdate1
|
||||||
@ -404,13 +393,13 @@ incdecdate:
|
|||||||
int 0x40
|
int 0x40
|
||||||
|
|
||||||
cmp ah,112
|
cmp ah,112
|
||||||
je incdectime
|
je incdectime
|
||||||
cmp ah,113
|
cmp ah,113
|
||||||
je incdectime
|
je incdectime
|
||||||
cmp ah,122
|
cmp ah,122
|
||||||
je incdecdate
|
je incdecdate
|
||||||
cmp ah,123
|
cmp ah,123
|
||||||
je incdecdate
|
je incdecdate
|
||||||
cmp ah,111
|
cmp ah,111
|
||||||
jne noseltime
|
jne noseltime
|
||||||
mov al, [blinkpar]
|
mov al, [blinkpar]
|
||||||
@ -441,12 +430,7 @@ noseltime:
|
|||||||
noseldate:
|
noseldate:
|
||||||
cmp ah,99
|
cmp ah,99
|
||||||
jne nosaveall
|
jne nosaveall
|
||||||
mov eax,33
|
mcall 70,save_fileinfo
|
||||||
mov ebx,filename
|
|
||||||
mov ecx,keyboard
|
|
||||||
mov edx,48
|
|
||||||
xor esi,esi
|
|
||||||
int 0x40
|
|
||||||
call settime
|
call settime
|
||||||
mov dword [blinkpar],0
|
mov dword [blinkpar],0
|
||||||
call drawtime
|
call drawtime
|
||||||
@ -458,14 +442,14 @@ nosaveall:
|
|||||||
jmp still
|
jmp still
|
||||||
no_apply_all:
|
no_apply_all:
|
||||||
|
|
||||||
cmp ah,1 ; CLOSE APPLICATION
|
cmp ah,1 ; CLOSE APPLICATION
|
||||||
jne no_close
|
jne no_close
|
||||||
close:
|
close:
|
||||||
or eax,-1
|
or eax,-1
|
||||||
int 0x40
|
int 0x40
|
||||||
no_close:
|
no_close:
|
||||||
|
|
||||||
cmp ah,11 ; SET MIDI BASE
|
cmp ah,11 ; SET MIDI BASE
|
||||||
jnz nosetbase1
|
jnz nosetbase1
|
||||||
call _midibase
|
call _midibase
|
||||||
nosetbase1:
|
nosetbase1:
|
||||||
@ -481,11 +465,11 @@ close:
|
|||||||
nomp:
|
nomp:
|
||||||
|
|
||||||
|
|
||||||
cmp ah,4 ; SET KEYBOARD
|
cmp ah,4 ; SET KEYBOARD
|
||||||
jnz nokm
|
jnz nokm
|
||||||
mov eax,[keyboard]
|
mov eax,[keyboard]
|
||||||
test eax,eax
|
test eax,eax
|
||||||
je downuplbl
|
je downuplbl
|
||||||
dec eax
|
dec eax
|
||||||
jmp nodownup
|
jmp nodownup
|
||||||
downuplbl:
|
downuplbl:
|
||||||
@ -498,7 +482,7 @@ close:
|
|||||||
jnz nokp
|
jnz nokp
|
||||||
mov eax,[keyboard]
|
mov eax,[keyboard]
|
||||||
cmp eax,4
|
cmp eax,4
|
||||||
je updownlbl
|
je updownlbl
|
||||||
inc eax
|
inc eax
|
||||||
jmp noupdown
|
jmp noupdown
|
||||||
updownlbl:
|
updownlbl:
|
||||||
@ -509,7 +493,7 @@ close:
|
|||||||
nokp:
|
nokp:
|
||||||
|
|
||||||
|
|
||||||
cmp ah,22 ; SET CD BASE
|
cmp ah,22 ; SET CD BASE
|
||||||
jnz nocm
|
jnz nocm
|
||||||
mov eax,[cdbase]
|
mov eax,[cdbase]
|
||||||
sub eax,2
|
sub eax,2
|
||||||
@ -531,7 +515,7 @@ close:
|
|||||||
call _cdbase
|
call _cdbase
|
||||||
nocs:
|
nocs:
|
||||||
|
|
||||||
cmp ah,62 ; SET HD BASE
|
cmp ah,62 ; SET HD BASE
|
||||||
jnz hnocm
|
jnz hnocm
|
||||||
mov eax,[hdbase]
|
mov eax,[hdbase]
|
||||||
sub eax,2
|
sub eax,2
|
||||||
@ -553,7 +537,7 @@ close:
|
|||||||
call _hdbase
|
call _hdbase
|
||||||
hnocs:
|
hnocs:
|
||||||
|
|
||||||
cmp ah,82 ; SET SOUND DMA
|
cmp ah,82 ; SET SOUND DMA
|
||||||
jne no_sdma_d
|
jne no_sdma_d
|
||||||
mov eax,[sound_dma]
|
mov eax,[sound_dma]
|
||||||
dec eax
|
dec eax
|
||||||
@ -575,7 +559,7 @@ close:
|
|||||||
jmp still
|
jmp still
|
||||||
no_set_sound_dma:
|
no_set_sound_dma:
|
||||||
|
|
||||||
cmp ah,92 ; SET LBA READ
|
cmp ah,92 ; SET LBA READ
|
||||||
jne no_lba_d
|
jne no_lba_d
|
||||||
slbal:
|
slbal:
|
||||||
btc [lba_read],0
|
btc [lba_read],0
|
||||||
@ -593,7 +577,7 @@ close:
|
|||||||
no_set_lba_read:
|
no_set_lba_read:
|
||||||
|
|
||||||
|
|
||||||
cmp ah,102 ; SET PCI ACCESS
|
cmp ah,102 ; SET PCI ACCESS
|
||||||
jne no_pci_d
|
jne no_pci_d
|
||||||
pcip:
|
pcip:
|
||||||
btc [pci_acc],0
|
btc [pci_acc],0
|
||||||
@ -612,13 +596,13 @@ close:
|
|||||||
|
|
||||||
|
|
||||||
set_partition:
|
set_partition:
|
||||||
cmp ah,72 ; SET FAT32 PARTITION
|
cmp ah,72 ; SET FAT32 PARTITION
|
||||||
jnz .nominus
|
jnz .nominus
|
||||||
mov eax,[f32p]
|
mov eax,[f32p]
|
||||||
sub eax,2
|
sub eax,2
|
||||||
; and eax,15 ; 3 - four partitions, 7 - eight p., 15 - sixteen, etc.
|
; and eax,15 ; 3 - four partitions, 7 - eight p., 15 - sixteen, etc.
|
||||||
cmp eax,15
|
cmp eax,15
|
||||||
jb @f
|
jb @f
|
||||||
mov eax,14
|
mov eax,14
|
||||||
@@:
|
@@:
|
||||||
inc eax
|
inc eax
|
||||||
@ -630,7 +614,7 @@ close:
|
|||||||
mov eax,[f32p]
|
mov eax,[f32p]
|
||||||
; and eax,15 ; 3 - four partitions, 7 - eight p., 15 - sixteen, etc.
|
; and eax,15 ; 3 - four partitions, 7 - eight p., 15 - sixteen, etc.
|
||||||
cmp eax,15
|
cmp eax,15
|
||||||
jb @f
|
jb @f
|
||||||
mov eax,0
|
mov eax,0
|
||||||
@@:
|
@@:
|
||||||
inc eax
|
inc eax
|
||||||
@ -642,7 +626,7 @@ close:
|
|||||||
call _f32p
|
call _f32p
|
||||||
.noapply:
|
.noapply:
|
||||||
|
|
||||||
cmp ah,32 ; SET SOUND BLASTER 16 BASE
|
cmp ah,32 ; SET SOUND BLASTER 16 BASE
|
||||||
jnz nosbm
|
jnz nosbm
|
||||||
sub [sb16],2
|
sub [sb16],2
|
||||||
call draw_infotext
|
call draw_infotext
|
||||||
@ -657,7 +641,7 @@ close:
|
|||||||
call _sb16
|
call _sb16
|
||||||
nosbs:
|
nosbs:
|
||||||
|
|
||||||
cmp ah,52 ; SET WINDOWS SOUND SYSTEM BASE
|
cmp ah,52 ; SET WINDOWS SOUND SYSTEM BASE
|
||||||
jnz nowssm
|
jnz nowssm
|
||||||
mov eax,[wss]
|
mov eax,[wss]
|
||||||
sub eax,2
|
sub eax,2
|
||||||
@ -679,11 +663,11 @@ close:
|
|||||||
call _wssp
|
call _wssp
|
||||||
nowsss:
|
nowsss:
|
||||||
|
|
||||||
cmp ah,42 ; SET SYSTEM LANGUAGE BASE
|
cmp ah,42 ; SET SYSTEM LANGUAGE BASE
|
||||||
jnz nosysm
|
jnz nosysm
|
||||||
mov eax,[syslang]
|
mov eax,[syslang]
|
||||||
dec eax
|
dec eax
|
||||||
jz still
|
jz still
|
||||||
mov [syslang],eax
|
mov [syslang],eax
|
||||||
call draw_infotext
|
call draw_infotext
|
||||||
nosysm:
|
nosysm:
|
||||||
@ -691,7 +675,7 @@ close:
|
|||||||
jnz nosysp
|
jnz nosysp
|
||||||
mov eax,[syslang]
|
mov eax,[syslang]
|
||||||
cmp eax,4
|
cmp eax,4
|
||||||
je nosysp
|
je nosysp
|
||||||
inc eax
|
inc eax
|
||||||
mov [syslang],eax
|
mov [syslang],eax
|
||||||
call draw_infotext
|
call draw_infotext
|
||||||
@ -704,8 +688,34 @@ close:
|
|||||||
call draw_window
|
call draw_window
|
||||||
call drawtime
|
call drawtime
|
||||||
nosyss:
|
nosyss:
|
||||||
|
cmp ah,132 ; SET MOUSE SPEED
|
||||||
cmp ah,3 ; SET KEYMAP
|
jnz .nominus
|
||||||
|
mov eax,[mouse_speed]
|
||||||
|
sub eax,2
|
||||||
|
cmp eax,9
|
||||||
|
jb @f
|
||||||
|
mov eax,8
|
||||||
|
@@:
|
||||||
|
inc eax
|
||||||
|
mov [mouse_speed],eax
|
||||||
|
call draw_infotext
|
||||||
|
.nominus:
|
||||||
|
cmp ah,133
|
||||||
|
jnz .noplus
|
||||||
|
mov eax,[mouse_speed]
|
||||||
|
cmp eax,9
|
||||||
|
jb @f
|
||||||
|
mov eax,0
|
||||||
|
@@:
|
||||||
|
inc eax
|
||||||
|
mov [mouse_speed],eax
|
||||||
|
call draw_infotext
|
||||||
|
.noplus:
|
||||||
|
cmp ah,131
|
||||||
|
jnz .noapply
|
||||||
|
call _mouse
|
||||||
|
.noapply:
|
||||||
|
cmp ah,3 ; SET KEYMAP
|
||||||
jne still
|
jne still
|
||||||
call _keyboard
|
call _keyboard
|
||||||
jmp still
|
jmp still
|
||||||
@ -779,7 +789,7 @@ close:
|
|||||||
mov edx,4
|
mov edx,4
|
||||||
int 0x40
|
int 0x40
|
||||||
nosetkeylru:
|
nosetkeylru:
|
||||||
cmp [keyboard],4 ;french
|
cmp [keyboard],4 ;french
|
||||||
jnz nosetkeylfr
|
jnz nosetkeylfr
|
||||||
mov eax,21
|
mov eax,21
|
||||||
mov ebx,2
|
mov ebx,2
|
||||||
@ -847,12 +857,12 @@ draw_window:
|
|||||||
mov ebx,1
|
mov ebx,1
|
||||||
int 0x40
|
int 0x40
|
||||||
|
|
||||||
xor eax,eax ; DRAW WINDOW
|
xor eax,eax ; DRAW WINDOW
|
||||||
mov ebx,40*65536+355+BBB
|
mov ebx,40*65536+355+BBB
|
||||||
mov ecx,40*65536+300
|
mov ecx,40*65536+310
|
||||||
mov edx,0x82111199
|
mov edx,0x83111199
|
||||||
mov esi,0x805588dd
|
; mov esi,0x805588dd
|
||||||
mov edi,0x005588dd
|
; mov edi,0x005588dd
|
||||||
int 0x40
|
int 0x40
|
||||||
|
|
||||||
mov eax,4
|
mov eax,4
|
||||||
@ -860,24 +870,26 @@ draw_window:
|
|||||||
mov ecx,0x10ffffff
|
mov ecx,0x10ffffff
|
||||||
mov edx,labelt
|
mov edx,labelt
|
||||||
cmp [syslang],4
|
cmp [syslang],4
|
||||||
je ruslabel
|
je ruslabel
|
||||||
add edx,20
|
add edx,20
|
||||||
ruslabel:
|
ruslabel:
|
||||||
mov esi,26
|
mov esi,19 ;26
|
||||||
int 0x40
|
int 0x40
|
||||||
|
|
||||||
mov eax,8 ; CLOSE BUTTON
|
; mov eax,8 ; CLOSE BUTTON
|
||||||
mov ebx,(355+BBB-19)*65536+12
|
; mov ebx,(355+BBB-19)*65536+12
|
||||||
mov ecx,5*65536+12
|
; mov ecx,5*65536+12
|
||||||
mov edx,1
|
; mov edx,1
|
||||||
|
; mov esi,0x005588dd
|
||||||
|
; int 0x40
|
||||||
|
|
||||||
|
mov eax,8 ; APPLY ALL
|
||||||
|
mov ebx,(350-79)*65536+100
|
||||||
|
mov ecx,266*65536+12
|
||||||
|
mov edx,100
|
||||||
mov esi,0x005588dd
|
mov esi,0x005588dd
|
||||||
int 0x40
|
int 0x40
|
||||||
; APPLY ALL
|
add ecx,16*65536 ; SAVE ALL
|
||||||
mov ebx,(350-79)*65536+100
|
|
||||||
mov ecx,251*65536+12
|
|
||||||
mov edx,100
|
|
||||||
int 0x40
|
|
||||||
add ecx,16*65536 ; SAVE ALL
|
|
||||||
dec edx
|
dec edx
|
||||||
int 0x40
|
int 0x40
|
||||||
|
|
||||||
@ -935,6 +947,10 @@ draw_window:
|
|||||||
mov ecx,43+24*8 ; 24
|
mov ecx,43+24*8 ; 24
|
||||||
call draw_buttons
|
call draw_buttons
|
||||||
|
|
||||||
|
mov edx,131
|
||||||
|
mov ecx,43+26*8 ; 26
|
||||||
|
call draw_buttons
|
||||||
|
|
||||||
call draw_infotext
|
call draw_infotext
|
||||||
|
|
||||||
mov eax,12
|
mov eax,12
|
||||||
@ -950,7 +966,7 @@ draw_infotext:
|
|||||||
|
|
||||||
pusha
|
pusha
|
||||||
|
|
||||||
mov eax,[keyboard] ; KEYBOARD
|
mov eax,[keyboard] ; KEYBOARD
|
||||||
test eax,eax
|
test eax,eax
|
||||||
jnz noen
|
jnz noen
|
||||||
mov [text00+LLL*10+28],dword 'ENGL'
|
mov [text00+LLL*10+28],dword 'ENGL'
|
||||||
@ -978,7 +994,7 @@ draw_infotext:
|
|||||||
nofr:
|
nofr:
|
||||||
|
|
||||||
|
|
||||||
mov eax,[syslang] ; SYSTEM LANGUAGE
|
mov eax,[syslang] ; SYSTEM LANGUAGE
|
||||||
dec eax
|
dec eax
|
||||||
test eax,eax
|
test eax,eax
|
||||||
jnz noen5
|
jnz noen5
|
||||||
@ -1009,15 +1025,15 @@ draw_infotext:
|
|||||||
|
|
||||||
mov eax,[midibase]
|
mov eax,[midibase]
|
||||||
mov esi,text00+LLL*0+32
|
mov esi,text00+LLL*0+32
|
||||||
call hexconvert ; MIDI BASE
|
call hexconvert ; MIDI BASE
|
||||||
|
|
||||||
|
|
||||||
mov eax,[sb16] ; SB16 BASE
|
mov eax,[sb16] ; SB16 BASE
|
||||||
mov esi,text00+LLL*2+32
|
mov esi,text00+LLL*2+32
|
||||||
call hexconvert
|
call hexconvert
|
||||||
|
|
||||||
|
|
||||||
mov eax,[wss] ; WSS BASE
|
mov eax,[wss] ; WSS BASE
|
||||||
cmp eax,1
|
cmp eax,1
|
||||||
jnz nowss1
|
jnz nowss1
|
||||||
mov [wssp],dword 0x530
|
mov [wssp],dword 0x530
|
||||||
@ -1039,7 +1055,7 @@ draw_infotext:
|
|||||||
mov esi,text00+LLL*12+32
|
mov esi,text00+LLL*12+32
|
||||||
call hexconvert
|
call hexconvert
|
||||||
|
|
||||||
mov eax,[cdbase] ; CD BASE
|
mov eax,[cdbase] ; CD BASE
|
||||||
cmp eax,1
|
cmp eax,1
|
||||||
jnz noe1
|
jnz noe1
|
||||||
mov [text00+LLL*4+28],dword 'PRI.'
|
mov [text00+LLL*4+28],dword 'PRI.'
|
||||||
@ -1066,7 +1082,7 @@ draw_infotext:
|
|||||||
nog2:
|
nog2:
|
||||||
|
|
||||||
|
|
||||||
mov eax,[hdbase] ; HD BASE
|
mov eax,[hdbase] ; HD BASE
|
||||||
cmp eax,1
|
cmp eax,1
|
||||||
jnz hnoe1
|
jnz hnoe1
|
||||||
mov [text00+LLL*6+28],dword 'PRI.'
|
mov [text00+LLL*6+28],dword 'PRI.'
|
||||||
@ -1093,25 +1109,29 @@ draw_infotext:
|
|||||||
hnog2:
|
hnog2:
|
||||||
|
|
||||||
|
|
||||||
mov eax,[f32p] ; FAT32 PARTITION
|
mov eax,[f32p] ; FAT32 PARTITION
|
||||||
add al,48
|
add al,48
|
||||||
mov [text00+LLL*14+28],al
|
mov [text00+LLL*14+28],al
|
||||||
|
|
||||||
mov eax,[sound_dma] ; SOUND DMA
|
mov eax,[sound_dma] ; SOUND DMA
|
||||||
add eax,48
|
add eax,48
|
||||||
mov [text00+LLL*16+28],al
|
mov [text00+LLL*16+28],al
|
||||||
|
|
||||||
mov eax,[lba_read]
|
mov eax,[lba_read]
|
||||||
call onoff ; LBA READ
|
call onoff ; LBA READ
|
||||||
mov [text00+LLL*18+28],ebx
|
mov [text00+LLL*18+28],ebx
|
||||||
|
|
||||||
mov eax,[pci_acc]
|
mov eax,[pci_acc]
|
||||||
call onoff ; PCI ACCESS
|
call onoff ; PCI ACCESS
|
||||||
mov [text00+LLL*20+28],ebx
|
mov [text00+LLL*20+28],ebx
|
||||||
|
|
||||||
|
mov eax,[mouse_speed] ; MOUSE ACSELERATION
|
||||||
|
add al,48
|
||||||
|
mov [text00+LLL*26+28],al
|
||||||
|
|
||||||
mov eax,13
|
mov eax,13
|
||||||
mov ebx,175*65536+85
|
mov ebx,175*65536+85
|
||||||
mov ecx,40*65536+205
|
mov ecx,40*65536+225
|
||||||
mov edx,0x80111199-19
|
mov edx,0x80111199-19
|
||||||
int 0x40
|
int 0x40
|
||||||
|
|
||||||
@ -1131,31 +1151,31 @@ draw_infotext:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
drawtime:
|
drawtime:
|
||||||
mov ax,[time] ;hours 22
|
mov ax,[time] ;hours 22
|
||||||
mov cl,1
|
mov cl,1
|
||||||
call unpacktime
|
call unpacktime
|
||||||
mov [text00+LLL*22+28],word bx
|
mov [text00+LLL*22+28],word bx
|
||||||
mov al,ah ;minutes
|
mov al,ah ;minutes
|
||||||
inc cl
|
inc cl
|
||||||
call unpacktime
|
call unpacktime
|
||||||
mov [text00+LLL*22+31],word bx
|
mov [text00+LLL*22+31],word bx
|
||||||
mov eax,[date]
|
mov eax,[date]
|
||||||
mov ch,3
|
mov ch,3
|
||||||
call unpackdate
|
call unpackdate
|
||||||
mov [text00+LLL*24+34],word bx ;year 24
|
mov [text00+LLL*24+34],word bx ;year 24
|
||||||
mov al,ah
|
mov al,ah
|
||||||
mov ch,1
|
mov ch,1
|
||||||
call unpackdate
|
call unpackdate
|
||||||
mov [text00+LLL*24+28],word bx ;month
|
mov [text00+LLL*24+28],word bx ;month
|
||||||
bswap eax
|
bswap eax
|
||||||
mov al,ah
|
mov al,ah
|
||||||
inc ch
|
inc ch
|
||||||
call unpackdate
|
call unpackdate
|
||||||
mov [text00+LLL*24+31],word bx ;day
|
mov [text00+LLL*24+31],word bx ;day
|
||||||
|
|
||||||
mov eax,13
|
mov eax,13
|
||||||
mov ebx,175*65536+85
|
mov ebx,175*65536+85
|
||||||
mov ecx,40*65536+205
|
mov ecx,40*65536+225
|
||||||
mov edx,0x80111199-19
|
mov edx,0x80111199-19
|
||||||
int 0x40
|
int 0x40
|
||||||
|
|
||||||
@ -1173,7 +1193,7 @@ draw_infotext:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
unpacktime:
|
unpacktime:
|
||||||
cmp byte [blinkpar],cl ;translate packed number to ascii
|
cmp byte [blinkpar],cl ;translate packed number to ascii
|
||||||
jne unpack1
|
jne unpack1
|
||||||
chkblink:
|
chkblink:
|
||||||
bt dword [blinkpar],16
|
bt dword [blinkpar],16
|
||||||
@ -1182,7 +1202,7 @@ draw_infotext:
|
|||||||
ret
|
ret
|
||||||
unpackdate:
|
unpackdate:
|
||||||
cmp byte [blinkpar+1],ch
|
cmp byte [blinkpar+1],ch
|
||||||
je chkblink
|
je chkblink
|
||||||
unpack1:
|
unpack1:
|
||||||
xor bx,bx
|
xor bx,bx
|
||||||
mov bh,al
|
mov bh,al
|
||||||
@ -1192,7 +1212,7 @@ draw_infotext:
|
|||||||
add bx,0x3030
|
add bx,0x3030
|
||||||
ret
|
ret
|
||||||
|
|
||||||
hexconvert: ;converting dec to hex in ascii
|
hexconvert: ;converting dec to hex in ascii
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov bl,al
|
mov bl,al
|
||||||
and bl,15
|
and bl,15
|
||||||
@ -1222,13 +1242,13 @@ onoff:
|
|||||||
jne norus1
|
jne norus1
|
||||||
mov ebx,'„€ '
|
mov ebx,'„€ '
|
||||||
cmp eax,1
|
cmp eax,1
|
||||||
je exitsub
|
je exitsub
|
||||||
mov ebx,'<27>…’ '
|
mov ebx,'<27>…’ '
|
||||||
ret
|
ret
|
||||||
norus1:
|
norus1:
|
||||||
mov ebx,'ON '
|
mov ebx,'ON '
|
||||||
cmp eax,1
|
cmp eax,1
|
||||||
je exitsub
|
je exitsub
|
||||||
mov ebx,'OFF '
|
mov ebx,'OFF '
|
||||||
exitsub:
|
exitsub:
|
||||||
ret
|
ret
|
||||||
@ -1303,10 +1323,18 @@ _syslang:
|
|||||||
int 0x40
|
int 0x40
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
_mouse:
|
||||||
|
mov eax,18
|
||||||
|
mov ebx,19
|
||||||
|
mov ecx,1
|
||||||
|
mov edx,[mouse_speed]
|
||||||
|
int 0x40
|
||||||
|
ret
|
||||||
|
|
||||||
loadtxt:
|
loadtxt:
|
||||||
cld
|
cld
|
||||||
mov edi,text00
|
mov edi,text00
|
||||||
mov ecx,428
|
mov ecx,458 ;28
|
||||||
cmp [syslang],4
|
cmp [syslang],4
|
||||||
jne norus
|
jne norus
|
||||||
mov esi,textrus
|
mov esi,textrus
|
||||||
@ -1330,31 +1358,31 @@ settime:
|
|||||||
mov dx,0x70
|
mov dx,0x70
|
||||||
call startstopclk
|
call startstopclk
|
||||||
dec dx
|
dec dx
|
||||||
mov al,2 ;set minutes
|
mov al,2 ;set minutes
|
||||||
out dx,al
|
out dx,al
|
||||||
inc dx
|
inc dx
|
||||||
mov al,byte [time+1]
|
mov al,byte [time+1]
|
||||||
out dx,al
|
out dx,al
|
||||||
dec dx
|
dec dx
|
||||||
mov al,4 ;set hours
|
mov al,4 ;set hours
|
||||||
out dx,al
|
out dx,al
|
||||||
inc dx
|
inc dx
|
||||||
mov al,byte [time]
|
mov al,byte [time]
|
||||||
out dx,al
|
out dx,al
|
||||||
dec dx
|
dec dx
|
||||||
mov al,7 ;set day
|
mov al,7 ;set day
|
||||||
out dx,al
|
out dx,al
|
||||||
inc dx
|
inc dx
|
||||||
mov al,byte [date+2]
|
mov al,byte [date+2]
|
||||||
out dx,al
|
out dx,al
|
||||||
dec dx
|
dec dx
|
||||||
mov al,8 ;set month
|
mov al,8 ;set month
|
||||||
out dx,al
|
out dx,al
|
||||||
inc dx
|
inc dx
|
||||||
mov al,byte [date+1]
|
mov al,byte [date+1]
|
||||||
out dx,al
|
out dx,al
|
||||||
dec dx
|
dec dx
|
||||||
mov al,9 ;set year
|
mov al,9 ;set year
|
||||||
out dx,al
|
out dx,al
|
||||||
inc dx
|
inc dx
|
||||||
mov al,byte [date]
|
mov al,byte [date]
|
||||||
@ -1367,18 +1395,16 @@ startstopclk:
|
|||||||
mov al,0x0b
|
mov al,0x0b
|
||||||
out dx,al
|
out dx,al
|
||||||
inc dx
|
inc dx
|
||||||
in al,dx
|
in al,dx
|
||||||
btc ax,7
|
btc ax,7
|
||||||
out dx,al
|
out dx,al
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; DATA AREA
|
; DATA AREA
|
||||||
count: db 0x0
|
count: db 0x0
|
||||||
blinkpar: dd 0x0
|
blinkpar: dd 0x0
|
||||||
time: dw 0x0
|
time: dw 0x0
|
||||||
date: dd 0x0
|
date: dd 0x0
|
||||||
|
|
||||||
filename: db 'SETUP DAT',0
|
|
||||||
|
|
||||||
textrus:
|
textrus:
|
||||||
|
|
||||||
@ -1408,8 +1434,10 @@ textrus:
|
|||||||
db ' '
|
db ' '
|
||||||
db '‘¨á⥬ ï ¤ â (¬,¤,£) : 00/00/00 - + ‚ë¡®à '
|
db '‘¨á⥬ ï ¤ â (¬,¤,£) : 00/00/00 - + ‚ë¡®à '
|
||||||
db ' '
|
db ' '
|
||||||
|
db '‘ª®à®áâì ªãàá®à ¬ëè¨ : 1 - + <20>ਬ¥¨âì'
|
||||||
|
db ' '
|
||||||
db '‚<>ˆŒ€<C592>ˆ…: <20>ਬ¥¨âì ¢á¥ '
|
db '‚<>ˆŒ€<C592>ˆ…: <20>ਬ¥¨âì ¢á¥ '
|
||||||
db 'ˆ‘<CB86>Ž‹œ‡“‰’… „Ž‘’“<E28099> Š FAT-32 Ž‘’Ž<E28099>Ž†<C5BD>Ž! '
|
db 'ˆ‘<CB86>Ž‹œ‡“‰’… „Ž‘’“<E28099> Š FAT ‘ Ž‘’Ž<E28099>Ž†<C5BD>Ž‘’œž! '
|
||||||
db '<27>… ‡€<E280A1>“„œ’… ‘Ž•<C5BD>€<EFBFBD>ˆ’œ <20>€‘’<E28098>Ž‰Šˆ ‘®åà ¨âì ¢á¥ '
|
db '<27>… ‡€<E280A1>“„œ’… ‘Ž•<C5BD>€<EFBFBD>ˆ’œ <20>€‘’<E28098>Ž‰Šˆ ‘®åà ¨âì ¢á¥ '
|
||||||
db 'x'
|
db 'x'
|
||||||
|
|
||||||
@ -1441,15 +1469,17 @@ texteng:
|
|||||||
db ' '
|
db ' '
|
||||||
db 'SYSTEM DATE (M,D,Y) : 00/00/00 - + SELECT '
|
db 'SYSTEM DATE (M,D,Y) : 00/00/00 - + SELECT '
|
||||||
db ' '
|
db ' '
|
||||||
|
db 'Mouse pointer speed : 1 - + APPLY '
|
||||||
|
db ' '
|
||||||
db 'NOTE: APPLY ALL '
|
db 'NOTE: APPLY ALL '
|
||||||
db 'TEST FAT32 FUNCTIONS WITH EXTREME CARE '
|
db 'TEST FAT FUNCTIONS WITH EXTREME CARE '
|
||||||
db 'SAVE YOUR SETTINGS BEFORE QUIT MENUET SAVE ALL '
|
db 'SAVE YOUR SETTINGS BEFORE QUIT MENUET SAVE ALL '
|
||||||
db 'x'
|
db 'x'
|
||||||
|
|
||||||
labelt:
|
labelt:
|
||||||
db '<27>€‘’<E28098>Ž‰Š€ “‘’<E28098>Ž‰‘’‚ MENUET DEVICE SETUP '
|
db '<27>€‘’<E28098>Ž‰Š€ “‘’<E28098>Ž‰‘’‚ DEVICE SETUP '
|
||||||
|
|
||||||
hex db '0123456789ABCDEF'
|
hex db '0123456789ABCDEF'
|
||||||
|
|
||||||
alt_general:
|
alt_general:
|
||||||
|
|
||||||
@ -1628,21 +1658,38 @@ ru_keymap_shift:
|
|||||||
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
||||||
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
||||||
|
|
||||||
|
read_fileinfo:
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
dd 52
|
||||||
|
dd keyboard
|
||||||
|
db 0
|
||||||
|
dd file_name
|
||||||
|
|
||||||
|
save_fileinfo:
|
||||||
|
dd 2
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
dd 52
|
||||||
|
dd keyboard
|
||||||
|
file_name: db '/rd/1/setup.dat',0
|
||||||
|
|
||||||
I_PARAM dd 0
|
I_PARAM dd 0
|
||||||
|
|
||||||
keyboard dd 0x0
|
keyboard dd 0x0
|
||||||
midibase dd 0x320
|
midibase dd 0x320
|
||||||
cdbase dd 0x2
|
cdbase dd 0x2
|
||||||
sb16 dd 0x220
|
sb16 dd 0x220
|
||||||
syslang dd 0x1
|
syslang dd 0x1
|
||||||
wss dd 0x1
|
wss dd 0x1
|
||||||
wssp dd 0x0
|
wssp dd 0x0
|
||||||
hdbase dd 0x1
|
hdbase dd 0x1
|
||||||
f32p dd 0x1
|
f32p dd 0x1
|
||||||
sound_dma dd 0x1
|
sound_dma dd 0x1
|
||||||
lba_read dd 0x1
|
lba_read dd 0x1
|
||||||
pci_acc dd 0x1
|
pci_acc dd 0x1
|
||||||
|
mouse_speed dd 0x3
|
||||||
text00:
|
text00:
|
||||||
|
|
||||||
I_END:
|
I_END:
|
||||||
|
Loading…
Reference in New Issue
Block a user