forked from KolibriOS/kolibrios
acpi: merge trank
git-svn-id: svn://kolibrios.org@2987 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
8a78e14dc9
commit
9ebd3255c3
@ -350,8 +350,10 @@ disk_add:
|
|||||||
inc eax
|
inc eax
|
||||||
cmp byte [ebx+eax-1], 0
|
cmp byte [ebx+eax-1], 0
|
||||||
jnz @b
|
jnz @b
|
||||||
; 2b. Call the heap manager.
|
; 2b. Call the heap manager. Note that it can change ebx.
|
||||||
|
push ebx
|
||||||
call malloc
|
call malloc
|
||||||
|
pop ebx
|
||||||
; 2c. Check the result. If allocation failed, go to 7.
|
; 2c. Check the result. If allocation failed, go to 7.
|
||||||
pop esi ; restore allocated pointer to DISK
|
pop esi ; restore allocated pointer to DISK
|
||||||
test eax, eax
|
test eax, eax
|
||||||
@ -418,7 +420,7 @@ disk_del:
|
|||||||
push esi ; save used registers to be stdcall
|
push esi ; save used registers to be stdcall
|
||||||
; 1. Force media to be removed. If the media is already removed, the
|
; 1. Force media to be removed. If the media is already removed, the
|
||||||
; call does nothing.
|
; call does nothing.
|
||||||
mov esi, [esp+4+8] ; esi = handle of the disk
|
mov esi, [esp+4+4] ; esi = handle of the disk
|
||||||
stdcall disk_media_changed, esi, 0
|
stdcall disk_media_changed, esi, 0
|
||||||
; 2. Delete the structure from the global list.
|
; 2. Delete the structure from the global list.
|
||||||
; 2a. Acquire the mutex.
|
; 2a. Acquire the mutex.
|
||||||
@ -975,15 +977,33 @@ virtual at ebp+8
|
|||||||
.start dq ?
|
.start dq ?
|
||||||
.length dq ?
|
.length dq ?
|
||||||
end virtual
|
end virtual
|
||||||
; Currently no file systems are supported, so just allocate the PARTITION
|
; When disk_add_partition is called, ebx contains a pointer to
|
||||||
|
; a two-sectors-sized buffer. This function saves ebx in the stack
|
||||||
|
; immediately before ebp.
|
||||||
|
virtual at ebp-4
|
||||||
|
.buffer dd ?
|
||||||
|
end virtual
|
||||||
|
; 1. Read the bootsector to the buffer.
|
||||||
|
mov al, DISKFUNC.read
|
||||||
|
mov ebx, [.buffer]
|
||||||
|
add ebx, 512
|
||||||
|
push 1
|
||||||
|
stdcall disk_call_driver, ebx, dword [.start], dword [.start+4], esp
|
||||||
|
; 2. Run tests for all supported filesystems. If at least one test succeeded,
|
||||||
|
; go to 4.
|
||||||
|
; For tests: qword [ebp+8] = partition start, qword [ebp+10h] = partition
|
||||||
|
; length, [esp] = 0 if reading bootsector failed or 1 if succeeded,
|
||||||
|
; ebx points to the buffer for bootsector.
|
||||||
|
call fat_create_partition
|
||||||
|
test eax, eax
|
||||||
|
jnz .success
|
||||||
|
; 3. No file system has recognized the volume, so just allocate the PARTITION
|
||||||
; structure without extra fields.
|
; structure without extra fields.
|
||||||
; 1. Allocate and check result.
|
|
||||||
push sizeof.PARTITION
|
push sizeof.PARTITION
|
||||||
pop eax
|
pop eax
|
||||||
call malloc
|
call malloc
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .nothing
|
jz .nothing
|
||||||
; 2. Fill the common fields: copy .start and .length.
|
|
||||||
mov edx, dword [.start]
|
mov edx, dword [.start]
|
||||||
mov dword [eax+PARTITION.FirstSector], edx
|
mov dword [eax+PARTITION.FirstSector], edx
|
||||||
mov edx, dword [.start+4]
|
mov edx, dword [.start+4]
|
||||||
@ -992,8 +1012,12 @@ end virtual
|
|||||||
mov dword [eax+PARTITION.Length], edx
|
mov dword [eax+PARTITION.Length], edx
|
||||||
mov edx, dword [.length+4]
|
mov edx, dword [.length+4]
|
||||||
mov dword [eax+PARTITION.Length+4], edx
|
mov dword [eax+PARTITION.Length+4], edx
|
||||||
|
mov [eax+PARTITION.Disk], esi
|
||||||
|
and [eax+PARTITION.FSUserFunctions], 0
|
||||||
|
.success:
|
||||||
.nothing:
|
.nothing:
|
||||||
; 3. Return with eax = pointer to PARTITION or NULL.
|
; 4. Return with eax = pointer to PARTITION or NULL.
|
||||||
|
pop ecx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; This function is called from file_system_lfn.
|
; This function is called from file_system_lfn.
|
||||||
@ -1061,6 +1085,7 @@ dyndisk_handler:
|
|||||||
; 6. Now we are sure that the DISK structure is not going to die at least
|
; 6. Now we are sure that the DISK structure is not going to die at least
|
||||||
; while we are working with it, so release the global mutex.
|
; while we are working with it, so release the global mutex.
|
||||||
call mutex_unlock
|
call mutex_unlock
|
||||||
|
pop ecx ; pop from the stack saved value of esi
|
||||||
; 7. Acquire the mutex for media object.
|
; 7. Acquire the mutex for media object.
|
||||||
pop edi ; restore edi
|
pop edi ; restore edi
|
||||||
lea ecx, [ebx+DISK.MediaLock]
|
lea ecx, [ebx+DISK.MediaLock]
|
||||||
@ -1175,15 +1200,36 @@ fs_dyndisk:
|
|||||||
.main:
|
.main:
|
||||||
cmp ecx, [edx+DISK.NumPartitions]
|
cmp ecx, [edx+DISK.NumPartitions]
|
||||||
jae .notfound
|
jae .notfound
|
||||||
mov dword [esp+32], ERROR_UNKNOWN_FS
|
mov eax, [edx+DISK.Partitions]
|
||||||
|
mov eax, [eax+ecx*4]
|
||||||
|
mov edi, [eax+PARTITION.FSUserFunctions]
|
||||||
|
test edi, edi
|
||||||
|
jz .nofs
|
||||||
|
mov ecx, [ebx]
|
||||||
|
cmp [edi], ecx
|
||||||
|
jbe .unsupported
|
||||||
|
push edx
|
||||||
|
push ebp
|
||||||
|
mov ebp, eax
|
||||||
|
call dword [edi+4+ecx*4]
|
||||||
|
pop ebp
|
||||||
|
pop edx
|
||||||
|
mov dword [esp+32], eax
|
||||||
|
mov dword [esp+20], ebx
|
||||||
.cleanup:
|
.cleanup:
|
||||||
mov esi, edx
|
mov esi, edx
|
||||||
call disk_media_dereference
|
call disk_media_dereference
|
||||||
call disk_dereference
|
call disk_dereference
|
||||||
ret
|
ret
|
||||||
|
.nofs:
|
||||||
|
mov dword [esp+32], ERROR_UNKNOWN_FS
|
||||||
|
jmp .cleanup
|
||||||
.notfound:
|
.notfound:
|
||||||
mov dword [esp+32], ERROR_FILE_NOT_FOUND
|
mov dword [esp+32], ERROR_FILE_NOT_FOUND
|
||||||
jmp .cleanup
|
jmp .cleanup
|
||||||
|
.unsupported:
|
||||||
|
mov dword [esp+32], ERROR_UNSUPPORTED_FS
|
||||||
|
jmp .cleanup
|
||||||
.nomedia:
|
.nomedia:
|
||||||
test ecx, ecx
|
test ecx, ecx
|
||||||
jnz .notfound
|
jnz .notfound
|
||||||
@ -1192,7 +1238,6 @@ fs_dyndisk:
|
|||||||
; if the driver does not support insert notifications and we are the only fs
|
; if the driver does not support insert notifications and we are the only fs
|
||||||
; operation with this disk, issue the fake insert notification; if media is
|
; operation with this disk, issue the fake insert notification; if media is
|
||||||
; still not inserted, 'disk_media_changed' will detect this and do nothing
|
; still not inserted, 'disk_media_changed' will detect this and do nothing
|
||||||
;;; push ebx
|
|
||||||
lea ecx, [edx+DISK.MediaLock]
|
lea ecx, [edx+DISK.MediaLock]
|
||||||
call mutex_lock
|
call mutex_lock
|
||||||
cmp [edx+DISK.MediaRefCount], 1
|
cmp [edx+DISK.MediaRefCount], 1
|
||||||
|
@ -18,9 +18,11 @@ fs_read32_sys:
|
|||||||
; this request should be processed by hd_read.
|
; this request should be processed by hd_read.
|
||||||
cmp [ebp+PARTITION.Disk], 'old'
|
cmp [ebp+PARTITION.Disk], 'old'
|
||||||
jnz @f
|
jnz @f
|
||||||
|
add eax, dword [ebp+PARTITION.FirstSector]
|
||||||
mov [hdd_appl_data], 0
|
mov [hdd_appl_data], 0
|
||||||
call hd_read
|
call hd_read
|
||||||
mov [hdd_appl_data], 1 ; restore to default state
|
mov [hdd_appl_data], 1 ; restore to default state
|
||||||
|
mov eax, [hd_error]
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
; In the normal case, save ecx, set ecx to SysCache and let the common part
|
; In the normal case, save ecx, set ecx to SysCache and let the common part
|
||||||
@ -41,8 +43,11 @@ fs_read32_app:
|
|||||||
; this request should be processed by hd_read.
|
; this request should be processed by hd_read.
|
||||||
cmp [ebp+PARTITION.Disk], 'old'
|
cmp [ebp+PARTITION.Disk], 'old'
|
||||||
jnz @f
|
jnz @f
|
||||||
|
add eax, dword [ebp+PARTITION.FirstSector]
|
||||||
mov [hdd_appl_data], 1
|
mov [hdd_appl_data], 1
|
||||||
jmp hd_read
|
call hd_read
|
||||||
|
mov eax, [hd_error]
|
||||||
|
ret
|
||||||
@@:
|
@@:
|
||||||
; In the normal case, save ecx, set ecx to AppCache and let the common part
|
; In the normal case, save ecx, set ecx to AppCache and let the common part
|
||||||
; do its work.
|
; do its work.
|
||||||
@ -63,7 +68,7 @@ fs_read32_common:
|
|||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
; 2. Get the absolute sector on the disk.
|
; 2. Get the absolute sector on the disk.
|
||||||
push edx
|
push edx esi
|
||||||
xor edx, edx
|
xor edx, edx
|
||||||
add eax, dword [ebp+PARTITION.FirstSector]
|
add eax, dword [ebp+PARTITION.FirstSector]
|
||||||
adc edx, dword [ebp+PARTITION.FirstSector+4]
|
adc edx, dword [ebp+PARTITION.FirstSector+4]
|
||||||
@ -75,15 +80,16 @@ fs_read32_common:
|
|||||||
push edx ; startsector
|
push edx ; startsector
|
||||||
push eax ; startsector
|
push eax ; startsector
|
||||||
push ebx ; buffer
|
push ebx ; buffer
|
||||||
|
mov esi, [ebp+PARTITION.Disk]
|
||||||
mov al, DISKFUNC.read
|
mov al, DISKFUNC.read
|
||||||
call disk_call_driver
|
call disk_call_driver
|
||||||
pop ecx
|
pop ecx
|
||||||
pop edx
|
pop esi edx
|
||||||
pop ecx
|
pop ecx
|
||||||
ret
|
ret
|
||||||
.scancache:
|
.scancache:
|
||||||
; 4. Scan the cache.
|
; 4. Scan the cache.
|
||||||
push esi edi ecx ; scan cache
|
push edi ecx ; scan cache
|
||||||
push edx eax
|
push edx eax
|
||||||
virtual at esp
|
virtual at esp
|
||||||
.sector_lo dd ?
|
.sector_lo dd ?
|
||||||
@ -183,9 +189,11 @@ fs_write32_sys:
|
|||||||
; this request should be processed by hd_write.
|
; this request should be processed by hd_write.
|
||||||
cmp [ebp+PARTITION.Disk], 'old'
|
cmp [ebp+PARTITION.Disk], 'old'
|
||||||
jnz @f
|
jnz @f
|
||||||
|
add eax, dword [ebp+PARTITION.FirstSector]
|
||||||
mov [hdd_appl_data], 0
|
mov [hdd_appl_data], 0
|
||||||
call hd_write
|
call hd_write
|
||||||
mov [hdd_appl_data], 1 ; restore to default state
|
mov [hdd_appl_data], 1 ; restore to default state
|
||||||
|
mov eax, [hd_error]
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
; In the normal case, save ecx, set ecx to SysCache and let the common part
|
; In the normal case, save ecx, set ecx to SysCache and let the common part
|
||||||
@ -206,8 +214,11 @@ fs_write32_app:
|
|||||||
; this request should be processed by hd_write.
|
; this request should be processed by hd_write.
|
||||||
cmp [ebp+PARTITION.Disk], 'old'
|
cmp [ebp+PARTITION.Disk], 'old'
|
||||||
jnz @f
|
jnz @f
|
||||||
|
add eax, dword [ebp+PARTITION.FirstSector]
|
||||||
mov [hdd_appl_data], 1
|
mov [hdd_appl_data], 1
|
||||||
jmp hd_write
|
call hd_write
|
||||||
|
mov eax, [hd_error]
|
||||||
|
ret
|
||||||
@@:
|
@@:
|
||||||
; In the normal case, save ecx, set ecx to AppCache and let the common part
|
; In the normal case, save ecx, set ecx to AppCache and let the common part
|
||||||
; do its work.
|
; do its work.
|
||||||
@ -227,7 +238,7 @@ fs_write32_common:
|
|||||||
pop ecx
|
pop ecx
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
push edx
|
push edx esi
|
||||||
; 2. Get the absolute sector on the disk.
|
; 2. Get the absolute sector on the disk.
|
||||||
xor edx, edx
|
xor edx, edx
|
||||||
add eax, dword [ebp+PARTITION.FirstSector]
|
add eax, dword [ebp+PARTITION.FirstSector]
|
||||||
@ -240,15 +251,16 @@ fs_write32_common:
|
|||||||
push edx ; startsector
|
push edx ; startsector
|
||||||
push eax ; startsector
|
push eax ; startsector
|
||||||
push ebx ; buffer
|
push ebx ; buffer
|
||||||
|
mov esi, [ebp+PARTITION.Disk]
|
||||||
mov al, DISKFUNC.write
|
mov al, DISKFUNC.write
|
||||||
call disk_call_driver
|
call disk_call_driver
|
||||||
pop ecx
|
pop ecx
|
||||||
pop edx
|
pop esi edx
|
||||||
pop ecx
|
pop ecx
|
||||||
ret
|
ret
|
||||||
.scancache:
|
.scancache:
|
||||||
; 4. Scan the cache.
|
; 4. Scan the cache.
|
||||||
push esi edi ecx ; scan cache
|
push edi ecx ; scan cache
|
||||||
push edx eax
|
push edx eax
|
||||||
virtual at esp
|
virtual at esp
|
||||||
.sector_lo dd ?
|
.sector_lo dd ?
|
||||||
@ -348,7 +360,7 @@ find_empty_slot64:
|
|||||||
jb .found_slot ; it's empty or read
|
jb .found_slot ; it's empty or read
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz .search_for_empty
|
jnz .search_for_empty
|
||||||
call write_cache64 ; no empty slots found, write all
|
stdcall write_cache64, [ebp+PARTITION.Disk] ; no empty slots found, write all
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jne .found_slot_access_denied
|
jne .found_slot_access_denied
|
||||||
jmp .search_again ; and start again
|
jmp .search_again ; and start again
|
||||||
@ -359,7 +371,7 @@ find_empty_slot64:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
; This function is intended to replace the old 'write_cache' function.
|
; This function is intended to replace the old 'write_cache' function.
|
||||||
proc write_cache64 uses ecx edx esi edi
|
proc write_cache64 uses ecx edx esi edi, disk:dword
|
||||||
locals
|
locals
|
||||||
cache_chain_started dd ?
|
cache_chain_started dd ?
|
||||||
cache_chain_size dd ?
|
cache_chain_size dd ?
|
||||||
@ -432,8 +444,7 @@ endl
|
|||||||
test eax, eax
|
test eax, eax
|
||||||
jnz .nothing
|
jnz .nothing
|
||||||
.flush:
|
.flush:
|
||||||
mov esi, [ebp]
|
mov esi, [disk]
|
||||||
mov esi, [esi+PARTITION.Disk]
|
|
||||||
mov al, DISKFUNC.flush
|
mov al, DISKFUNC.flush
|
||||||
call disk_call_driver
|
call disk_call_driver
|
||||||
.nothing:
|
.nothing:
|
||||||
@ -590,3 +601,26 @@ disk_free_cache:
|
|||||||
stdcall kernel_free, eax
|
stdcall kernel_free, eax
|
||||||
.nothing:
|
.nothing:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
; This function flushes all modified data from both caches for the given DISK.
|
||||||
|
; esi = pointer to DISK
|
||||||
|
disk_sync:
|
||||||
|
; Compatibility hack: if PARTITION.Disk is 'old', there is no DISK structure,
|
||||||
|
; this request should be processed by write_cache.
|
||||||
|
cmp esi, 'old'
|
||||||
|
jnz @f
|
||||||
|
mov [hdd_appl_data], 0
|
||||||
|
call write_cache
|
||||||
|
mov [hdd_appl_data], 1
|
||||||
|
jmp write_cache
|
||||||
|
@@:
|
||||||
|
; The algorithm is straightforward.
|
||||||
|
push esi
|
||||||
|
push esi ; for second write_cache64
|
||||||
|
push esi ; for first write_cache64
|
||||||
|
add esi, DISK.SysCache
|
||||||
|
call write_cache64
|
||||||
|
add esi, DISK.AppCache - DISK.SysCache
|
||||||
|
call write_cache64
|
||||||
|
pop esi
|
||||||
|
ret
|
||||||
|
@ -945,3 +945,83 @@ int13_call:
|
|||||||
@@:
|
@@:
|
||||||
ret
|
ret
|
||||||
; \end{diamond}
|
; \end{diamond}
|
||||||
|
|
||||||
|
reserve_hd1:
|
||||||
|
|
||||||
|
cli
|
||||||
|
cmp [hd1_status], 0
|
||||||
|
je reserve_ok1
|
||||||
|
|
||||||
|
sti
|
||||||
|
call change_task
|
||||||
|
jmp reserve_hd1
|
||||||
|
|
||||||
|
reserve_ok1:
|
||||||
|
|
||||||
|
push eax
|
||||||
|
mov eax, [CURRENT_TASK]
|
||||||
|
shl eax, 5
|
||||||
|
mov eax, [eax+CURRENT_TASK+TASKDATA.pid]
|
||||||
|
mov [hd1_status], eax
|
||||||
|
pop eax
|
||||||
|
sti
|
||||||
|
ret
|
||||||
|
;********************************************
|
||||||
|
|
||||||
|
uglobal
|
||||||
|
hd_in_cache db ?
|
||||||
|
endg
|
||||||
|
|
||||||
|
reserve_hd_channel:
|
||||||
|
; BIOS disk accesses are protected with common mutex hd1_status
|
||||||
|
; This must be modified when hd1_status will not be valid!
|
||||||
|
cmp [hdpos], 0x80
|
||||||
|
jae .ret
|
||||||
|
cmp [hdbase], 0x1F0
|
||||||
|
jne .IDE_Channel_2
|
||||||
|
.IDE_Channel_1:
|
||||||
|
cli
|
||||||
|
cmp [IDE_Channel_1], 0
|
||||||
|
je .reserve_ok_1
|
||||||
|
sti
|
||||||
|
call change_task
|
||||||
|
jmp .IDE_Channel_1
|
||||||
|
.IDE_Channel_2:
|
||||||
|
cli
|
||||||
|
cmp [IDE_Channel_2], 0
|
||||||
|
je .reserve_ok_2
|
||||||
|
sti
|
||||||
|
call change_task
|
||||||
|
jmp .IDE_Channel_2
|
||||||
|
.reserve_ok_1:
|
||||||
|
mov [IDE_Channel_1], 1
|
||||||
|
push eax
|
||||||
|
mov al, 1
|
||||||
|
jmp @f
|
||||||
|
.reserve_ok_2:
|
||||||
|
mov [IDE_Channel_2], 1
|
||||||
|
push eax
|
||||||
|
mov al, 3
|
||||||
|
@@:
|
||||||
|
cmp [hdid], 1
|
||||||
|
sbb al, -1
|
||||||
|
mov [hd_in_cache], al
|
||||||
|
pop eax
|
||||||
|
sti
|
||||||
|
.ret:
|
||||||
|
ret
|
||||||
|
|
||||||
|
free_hd_channel:
|
||||||
|
; see comment at reserve_hd_channel
|
||||||
|
cmp [hdpos], 0x80
|
||||||
|
jae .ret
|
||||||
|
cmp [hdbase], 0x1F0
|
||||||
|
jne .IDE_Channel_2
|
||||||
|
.IDE_Channel_1:
|
||||||
|
mov [IDE_Channel_1], 0
|
||||||
|
.ret:
|
||||||
|
ret
|
||||||
|
.IDE_Channel_2:
|
||||||
|
mov [IDE_Channel_2], 0
|
||||||
|
ret
|
||||||
|
;********************************************
|
||||||
|
@ -137,8 +137,6 @@ found_slot_access_denied:
|
|||||||
;--------------------------------------------------------------------
|
;--------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
clear_hd_cache:
|
clear_hd_cache:
|
||||||
mov [fat_in_cache], -1
|
|
||||||
mov [fat_change], 0
|
|
||||||
ret
|
ret
|
||||||
;--------------------------------------------------------------------
|
;--------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
|
@ -38,5 +38,5 @@ end if
|
|||||||
ERROR:
|
ERROR:
|
||||||
prebooting parameters must fit in first sector!!!
|
prebooting parameters must fit in first sector!!!
|
||||||
end if
|
end if
|
||||||
hdsysimage db 'KOLIBRI IMG' ; load from
|
hdsysimage db 'KOLIBRI.IMG',0 ; load from
|
||||||
image_save db 'KOLIBRI IMG' ; save to
|
image_save db 'KOLIBRI.IMG',0 ; save to
|
||||||
|
@ -89,13 +89,22 @@ $Revision$
|
|||||||
mov [image_retrieved], 1
|
mov [image_retrieved], 1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
iglobal
|
||||||
|
align 4
|
||||||
|
read_image_fsinfo:
|
||||||
|
dd 0 ; function: read
|
||||||
|
dq 0 ; offset: zero
|
||||||
|
dd 1474560/512 ; size
|
||||||
|
dd RAMDISK ; buffer
|
||||||
|
db 0
|
||||||
|
dd hdsysimage+OS_BASE+0x10000
|
||||||
|
endg
|
||||||
|
|
||||||
read_image:
|
read_image:
|
||||||
mov eax, hdsysimage+OS_BASE+0x10000
|
mov ebx, read_image_fsinfo
|
||||||
mov ebx, 1474560/512
|
pushad
|
||||||
mov ecx, RAMDISK
|
call file_system_lfn
|
||||||
mov esi, 0
|
popad
|
||||||
mov edi, 12
|
|
||||||
call file_read
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
image_retrieved db 0
|
image_retrieved db 0
|
||||||
|
@ -189,7 +189,6 @@ TASK_BASE equ (OS_BASE+0x0003010)
|
|||||||
TASK_DATA equ (OS_BASE+0x0003020)
|
TASK_DATA equ (OS_BASE+0x0003020)
|
||||||
TASK_EVENT equ (OS_BASE+0x0003020)
|
TASK_EVENT equ (OS_BASE+0x0003020)
|
||||||
|
|
||||||
d_width_calc_area equ (OS_BASE+0x0005000)
|
|
||||||
mouseunder equ (OS_BASE+0x0006900)
|
mouseunder equ (OS_BASE+0x0006900)
|
||||||
CDDataBuf equ (OS_BASE+0x0007000)
|
CDDataBuf equ (OS_BASE+0x0007000)
|
||||||
FLOPPY_BUFF equ (OS_BASE+0x0008000)
|
FLOPPY_BUFF equ (OS_BASE+0x0008000)
|
||||||
@ -256,7 +255,7 @@ SYS_SHUTDOWN equ (OS_BASE+0x000FF00)
|
|||||||
TASK_ACTIVATE equ (OS_BASE+0x000FF01)
|
TASK_ACTIVATE equ (OS_BASE+0x000FF01)
|
||||||
|
|
||||||
REDRAW_BACKGROUND equ (OS_BASE+0x000FFF0)
|
REDRAW_BACKGROUND equ (OS_BASE+0x000FFF0)
|
||||||
BACKGROUND_CHANGED equ (OS_BASE+0x000FFF1)
|
|
||||||
BANK_RW equ (OS_BASE+0x000FFF2)
|
BANK_RW equ (OS_BASE+0x000FFF2)
|
||||||
MOUSE_BACKGROUND equ (OS_BASE+0x000FFF4)
|
MOUSE_BACKGROUND equ (OS_BASE+0x000FFF4)
|
||||||
DONT_DRAW_MOUSE equ (OS_BASE+0x000FFF5)
|
DONT_DRAW_MOUSE equ (OS_BASE+0x000FFF5)
|
||||||
@ -264,9 +263,6 @@ DONT_SWITCH equ (OS_BASE+0x000FFFF)
|
|||||||
|
|
||||||
TMP_STACK_TOP equ 0x006CC00
|
TMP_STACK_TOP equ 0x006CC00
|
||||||
|
|
||||||
FONT_II equ (OS_BASE+0x006DC00)
|
|
||||||
FONT_I equ (OS_BASE+0x006E600)
|
|
||||||
|
|
||||||
sys_pgdir equ (OS_BASE+0x006F000)
|
sys_pgdir equ (OS_BASE+0x006F000)
|
||||||
|
|
||||||
DRIVE_DATA equ (OS_BASE+0x0070000)
|
DRIVE_DATA equ (OS_BASE+0x0070000)
|
||||||
@ -290,7 +286,11 @@ BgrAuxTable equ (OS_BASE+0x0298000)
|
|||||||
SB16Buffer equ (OS_BASE+0x02A0000)
|
SB16Buffer equ (OS_BASE+0x02A0000)
|
||||||
SB16_Status equ (OS_BASE+0x02B0000)
|
SB16_Status equ (OS_BASE+0x02B0000)
|
||||||
|
|
||||||
BUTTON_INFO equ (OS_BASE+0x02C0000)
|
BUTTON_INFO equ (OS_BASE+0x02B3FEE)
|
||||||
|
|
||||||
|
BPSLine_calc_area equ (OS_BASE+0x02C4000)
|
||||||
|
d_width_calc_area equ (OS_BASE+0x02CA000)
|
||||||
|
|
||||||
RESERVED_PORTS equ (OS_BASE+0x02D0000)
|
RESERVED_PORTS equ (OS_BASE+0x02D0000)
|
||||||
BOOT_VAR equ (OS_BASE+0x02E0000)
|
BOOT_VAR equ (OS_BASE+0x02E0000)
|
||||||
|
|
||||||
|
@ -437,10 +437,19 @@ proc load_file stdcall, file_name:dword
|
|||||||
jz .cleanup
|
jz .cleanup
|
||||||
|
|
||||||
mov [file2], eax
|
mov [file2], eax
|
||||||
pushfd
|
|
||||||
cli
|
pushad
|
||||||
|
mov ecx, unpack_mutex
|
||||||
|
call mutex_lock
|
||||||
|
popad
|
||||||
|
|
||||||
stdcall unpack, [file], eax
|
stdcall unpack, [file], eax
|
||||||
popfd
|
|
||||||
|
pushad
|
||||||
|
mov ecx, unpack_mutex
|
||||||
|
call mutex_unlock
|
||||||
|
popad
|
||||||
|
|
||||||
stdcall kernel_free, [file]
|
stdcall kernel_free, [file]
|
||||||
mov eax, [file2]
|
mov eax, [file2]
|
||||||
mov ebx, [file_size]
|
mov ebx, [file_size]
|
||||||
@ -470,6 +479,11 @@ proc load_file stdcall, file_name:dword
|
|||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
|
uglobal
|
||||||
|
align 4
|
||||||
|
unpack_mutex MUTEX
|
||||||
|
endg
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
proc get_proc_ex stdcall, proc_name:dword, imports:dword
|
proc get_proc_ex stdcall, proc_name:dword, imports:dword
|
||||||
|
|
||||||
|
@ -72,6 +72,9 @@ iglobal
|
|||||||
szLoadFile db 'LoadFile',0
|
szLoadFile db 'LoadFile',0
|
||||||
szSendEvent db 'SendEvent',0
|
szSendEvent db 'SendEvent',0
|
||||||
szSetMouseData db 'SetMouseData',0
|
szSetMouseData db 'SetMouseData',0
|
||||||
|
szSetKeyboardData db 'SetKeyboardData',0
|
||||||
|
szRegKeyboard db 'RegKeyboard',0
|
||||||
|
szDelKeyboard db 'DelKeyboard',0
|
||||||
szSleep db 'Sleep',0
|
szSleep db 'Sleep',0
|
||||||
szGetTimerTicks db 'GetTimerTicks',0
|
szGetTimerTicks db 'GetTimerTicks',0
|
||||||
|
|
||||||
@ -154,6 +157,9 @@ kernel_export:
|
|||||||
dd szLoadFile , load_file ;retval eax, ebx
|
dd szLoadFile , load_file ;retval eax, ebx
|
||||||
dd szSendEvent , send_event ;see EVENT.inc for specification
|
dd szSendEvent , send_event ;see EVENT.inc for specification
|
||||||
dd szSetMouseData , set_mouse_data ;stdcall
|
dd szSetMouseData , set_mouse_data ;stdcall
|
||||||
|
dd szSetKeyboardData , set_keyboard_data
|
||||||
|
dd szRegKeyboard , register_keyboard
|
||||||
|
dd szDelKeyboard , delete_keyboard
|
||||||
dd szSleep , delay_ms
|
dd szSleep , delay_ms
|
||||||
dd szGetTimerTicks , get_timer_ticks
|
dd szGetTimerTicks , get_timer_ticks
|
||||||
|
|
||||||
|
@ -442,72 +442,83 @@ endp
|
|||||||
align 4
|
align 4
|
||||||
proc new_mem_resize stdcall, new_size:dword
|
proc new_mem_resize stdcall, new_size:dword
|
||||||
|
|
||||||
mov ecx, pg_data.mutex
|
push ebx
|
||||||
call mutex_lock
|
push esi
|
||||||
|
push edi
|
||||||
|
|
||||||
|
mov edx, [current_slot]
|
||||||
|
cmp [edx+APPDATA.heap_base], 0
|
||||||
|
jne .exit
|
||||||
|
|
||||||
mov edi, [new_size]
|
mov edi, [new_size]
|
||||||
add edi, 4095
|
add edi, 4095
|
||||||
and edi, not 4095
|
and edi, not 4095
|
||||||
mov [new_size], edi
|
mov [new_size], edi
|
||||||
|
|
||||||
mov edx, [current_slot]
|
|
||||||
cmp [edx+APPDATA.heap_base], 0
|
|
||||||
jne .exit
|
|
||||||
|
|
||||||
mov esi, [edx+APPDATA.mem_size]
|
mov esi, [edx+APPDATA.mem_size]
|
||||||
add esi, 4095
|
add esi, 4095
|
||||||
and esi, not 4095
|
and esi, not 4095
|
||||||
|
|
||||||
cmp edi, esi
|
cmp edi, esi
|
||||||
jae .expand
|
ja .expand
|
||||||
|
je .exit
|
||||||
|
|
||||||
|
mov ebx, edi
|
||||||
shr edi, 12
|
shr edi, 12
|
||||||
shr esi, 12
|
shr esi, 12
|
||||||
|
|
||||||
|
mov ecx, pg_data.mutex
|
||||||
|
call mutex_lock
|
||||||
@@:
|
@@:
|
||||||
mov eax, [app_page_tabs+edi*4]
|
mov eax, [app_page_tabs+edi*4]
|
||||||
test eax, 1
|
test eax, 1
|
||||||
jz .next
|
jz .next
|
||||||
mov dword [app_page_tabs+edi*4], 2
|
|
||||||
mov ebx, edi
|
mov dword [app_page_tabs+edi*4], 0
|
||||||
shl ebx, 12
|
|
||||||
push eax
|
|
||||||
invlpg [ebx]
|
invlpg [ebx]
|
||||||
pop eax
|
|
||||||
call free_page
|
call free_page
|
||||||
|
|
||||||
.next:
|
.next:
|
||||||
add edi, 1
|
inc edi
|
||||||
|
add ebx, 0x1000
|
||||||
cmp edi, esi
|
cmp edi, esi
|
||||||
jb @B
|
jb @B
|
||||||
|
|
||||||
.update_size:
|
|
||||||
mov ebx, [new_size]
|
|
||||||
call update_mem_size
|
|
||||||
|
|
||||||
mov ecx, pg_data.mutex
|
mov ecx, pg_data.mutex
|
||||||
call mutex_unlock
|
call mutex_unlock
|
||||||
|
|
||||||
|
.update_size:
|
||||||
|
mov edx, [current_slot]
|
||||||
|
mov ebx, [new_size]
|
||||||
|
call update_mem_size
|
||||||
|
.exit:
|
||||||
|
pop edi
|
||||||
|
pop esi
|
||||||
|
pop ebx
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.expand:
|
.expand:
|
||||||
|
|
||||||
push esi
|
mov ecx, pg_data.mutex
|
||||||
push edi
|
call mutex_lock
|
||||||
|
|
||||||
|
xchg esi, edi
|
||||||
|
|
||||||
|
push esi ;new size
|
||||||
|
push edi ;old size
|
||||||
|
|
||||||
add edi, 0x3FFFFF
|
add edi, 0x3FFFFF
|
||||||
and edi, not(0x3FFFFF)
|
and edi, not(0x3FFFFF)
|
||||||
add esi, 0x3FFFFF
|
add esi, 0x3FFFFF
|
||||||
and esi, not(0x3FFFFF)
|
and esi, not(0x3FFFFF)
|
||||||
|
|
||||||
cmp esi, edi
|
cmp edi, esi
|
||||||
jae .grow
|
jae .grow
|
||||||
|
@@:
|
||||||
xchg esi, edi
|
|
||||||
|
|
||||||
@@:
|
|
||||||
call alloc_page
|
call alloc_page
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .exit_pop
|
jz .exit_fail
|
||||||
|
|
||||||
stdcall map_page_table, edi, eax
|
stdcall map_page_table, edi, eax
|
||||||
|
|
||||||
@ -524,51 +535,38 @@ proc new_mem_resize stdcall, new_size:dword
|
|||||||
cmp edi, esi
|
cmp edi, esi
|
||||||
jb @B
|
jb @B
|
||||||
.grow:
|
.grow:
|
||||||
;//-
|
pop edi ;old size
|
||||||
pop edi
|
pop ecx ;new size
|
||||||
push edi
|
|
||||||
mov esi, [pg_data.pages_free]
|
|
||||||
sub esi, 1
|
|
||||||
shr edi, 12
|
|
||||||
cmp esi, edi
|
|
||||||
jle .out_of_memory
|
|
||||||
;//-
|
|
||||||
pop edi
|
|
||||||
pop esi
|
|
||||||
@@:
|
|
||||||
call alloc_page
|
|
||||||
test eax, eax
|
|
||||||
jz .exit
|
|
||||||
stdcall map_page, esi, eax, dword PG_UW
|
|
||||||
|
|
||||||
push edi
|
shr edi, 10
|
||||||
mov edi, esi
|
shr ecx, 10
|
||||||
xor eax, eax
|
sub ecx, edi
|
||||||
mov ecx, 1024
|
shr ecx, 2 ;pages count
|
||||||
cld
|
mov eax, 2
|
||||||
|
|
||||||
|
add edi, app_page_tabs
|
||||||
rep stosd
|
rep stosd
|
||||||
pop edi
|
|
||||||
|
|
||||||
add esi, 0x1000
|
|
||||||
cmp esi, edi
|
|
||||||
jb @B
|
|
||||||
|
|
||||||
jmp .update_size
|
|
||||||
;//-
|
|
||||||
.exit_pop:
|
|
||||||
.out_of_memory:
|
|
||||||
;//-
|
|
||||||
pop edi
|
|
||||||
pop esi
|
|
||||||
.exit:
|
|
||||||
mov ecx, pg_data.mutex
|
mov ecx, pg_data.mutex
|
||||||
call mutex_unlock
|
call mutex_unlock
|
||||||
|
|
||||||
|
jmp .update_size
|
||||||
|
|
||||||
|
.exit_fail:
|
||||||
|
mov ecx, pg_data.mutex
|
||||||
|
call mutex_unlock
|
||||||
|
|
||||||
|
add esp, 8
|
||||||
|
pop edi
|
||||||
|
pop esi
|
||||||
|
pop ebx
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
inc eax
|
inc eax
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
|
|
||||||
|
align 4
|
||||||
update_mem_size:
|
update_mem_size:
|
||||||
; in: edx = slot base
|
; in: edx = slot base
|
||||||
; ebx = new memory size
|
; ebx = new memory size
|
||||||
@ -1253,7 +1251,7 @@ f68:
|
|||||||
cmp ecx, OS_BASE
|
cmp ecx, OS_BASE
|
||||||
jae .fail
|
jae .fail
|
||||||
|
|
||||||
cmp ebx, OS_BASE
|
cmp edx, OS_BASE
|
||||||
jae .fail
|
jae .fail
|
||||||
|
|
||||||
mov edi, edx
|
mov edi, edx
|
||||||
@ -1459,7 +1457,7 @@ proc set_mtrr stdcall, base:dword,size:dword,mem_type:dword
|
|||||||
mov ebx, [size]
|
mov ebx, [size]
|
||||||
dec ebx
|
dec ebx
|
||||||
mov eax, 0xFFFFFFFF
|
mov eax, 0xFFFFFFFF
|
||||||
mov edx, 0x00000000
|
mov edx, 0x0000000F
|
||||||
sub eax, ebx
|
sub eax, ebx
|
||||||
sbb edx, 0
|
sbb edx, 0
|
||||||
or eax, 0x800
|
or eax, 0x800
|
||||||
|
@ -425,6 +425,17 @@ term9:
|
|||||||
add eax, 16
|
add eax, 16
|
||||||
cmp eax, hotkey_list+256*16
|
cmp eax, hotkey_list+256*16
|
||||||
jb .loop
|
jb .loop
|
||||||
|
; get process PID
|
||||||
|
mov eax, esi
|
||||||
|
shl eax, 5
|
||||||
|
mov eax, [eax+CURRENT_TASK+TASKDATA.pid]
|
||||||
|
; compare current lock input with process PID
|
||||||
|
cmp eax, [PID_lock_input]
|
||||||
|
jne @f
|
||||||
|
|
||||||
|
xor eax, eax
|
||||||
|
mov [PID_lock_input], eax
|
||||||
|
@@:
|
||||||
; remove hotkeys in buffer
|
; remove hotkeys in buffer
|
||||||
mov eax, hotkey_buffer
|
mov eax, hotkey_buffer
|
||||||
.loop2:
|
.loop2:
|
||||||
@ -677,24 +688,22 @@ term9:
|
|||||||
ret
|
ret
|
||||||
restore .slot
|
restore .slot
|
||||||
|
|
||||||
iglobal
|
;iglobal
|
||||||
if lang eq ru
|
;if lang eq ru
|
||||||
boot_sched_1 db '‘®§¤ ¨¥ GDT TSS 㪠§ ⥫ï',0
|
; boot_sched_1 db '‘®§¤ ¨¥ GDT TSS 㪠§ ⥫ï',0
|
||||||
boot_sched_2 db '‘®§¤ ¨¥ IDT â ¡«¨æë',0
|
; boot_sched_2 db '‘®§¤ ¨¥ IDT â ¡«¨æë',0
|
||||||
else
|
;else
|
||||||
boot_sched_1 db 'Building gdt tss pointer',0
|
; boot_sched_1 db 'Building gdt tss pointer',0
|
||||||
boot_sched_2 db 'Building IDT table',0
|
; boot_sched_2 db 'Building IDT table',0
|
||||||
end if
|
;end if
|
||||||
endg
|
;endg
|
||||||
|
|
||||||
|
|
||||||
build_scheduler:
|
;build_scheduler:
|
||||||
|
; mov esi, boot_sched_1
|
||||||
|
; call boot_log
|
||||||
|
; call build_process_gdt_tss_pointer
|
||||||
|
|
||||||
mov esi, boot_sched_1
|
; mov esi,boot_sched_2
|
||||||
call boot_log
|
; call boot_log
|
||||||
; call build_process_gdt_tss_pointer
|
; ret
|
||||||
|
|
||||||
; mov esi,boot_sched_2
|
|
||||||
; call boot_log
|
|
||||||
|
|
||||||
ret
|
|
||||||
|
@ -145,7 +145,7 @@ iglobal
|
|||||||
dd sys_settime ; 22-setting date,time,clock and alarm-clock
|
dd sys_settime ; 22-setting date,time,clock and alarm-clock
|
||||||
dd sys_wait_event_timeout ; 23-TimeOutWaitForEvent
|
dd sys_wait_event_timeout ; 23-TimeOutWaitForEvent
|
||||||
dd syscall_cdaudio ; 24-PlayCdTrack,StopCd and GetCdPlaylist
|
dd syscall_cdaudio ; 24-PlayCdTrack,StopCd and GetCdPlaylist
|
||||||
dd undefined_syscall ; 25-reserved
|
dd syscall_putarea_backgr ; 25-Put Area to background
|
||||||
dd sys_getsetup ; 26-GetMidiBase,GetKeymap,GetShiftKeymap,.
|
dd sys_getsetup ; 26-GetMidiBase,GetKeymap,GetShiftKeymap,.
|
||||||
dd undefined_syscall ; 27-reserved
|
dd undefined_syscall ; 27-reserved
|
||||||
dd undefined_syscall ; 28-reserved
|
dd undefined_syscall ; 28-reserved
|
||||||
@ -154,7 +154,7 @@ iglobal
|
|||||||
dd undefined_syscall ; 31-reserved
|
dd undefined_syscall ; 31-reserved
|
||||||
dd undefined_syscall ; 32-reserved
|
dd undefined_syscall ; 32-reserved
|
||||||
dd undefined_syscall ; 33-reserved
|
dd undefined_syscall ; 33-reserved
|
||||||
dd undefined_syscall ; 34-reserved
|
dd syscall_getpixel_WinMap ; 34-GetPixel WinMap
|
||||||
dd syscall_getpixel ; 35-GetPixel
|
dd syscall_getpixel ; 35-GetPixel
|
||||||
dd syscall_getarea ; 36-GetArea
|
dd syscall_getarea ; 36-GetArea
|
||||||
dd readmousepos ; 37-GetMousePosition_ScreenRelative,.
|
dd readmousepos ; 37-GetMousePosition_ScreenRelative,.
|
||||||
|
@ -72,6 +72,7 @@ proc fs_execute
|
|||||||
slot_base dd ?
|
slot_base dd ?
|
||||||
file_base dd ?
|
file_base dd ?
|
||||||
file_size dd ?
|
file_size dd ?
|
||||||
|
handle dd ? ;temp. for default cursor handle for curr. thread
|
||||||
;app header data
|
;app header data
|
||||||
hdr_cmdline dd ? ;0x00
|
hdr_cmdline dd ? ;0x00
|
||||||
hdr_path dd ? ;0x04
|
hdr_path dd ? ;0x04
|
||||||
@ -83,6 +84,15 @@ proc fs_execute
|
|||||||
|
|
||||||
pushad
|
pushad
|
||||||
|
|
||||||
|
cmp [SCR_MODE], word 0x13
|
||||||
|
jbe @f
|
||||||
|
pushad
|
||||||
|
stdcall set_cursor, [def_cursor_clock]
|
||||||
|
mov [handle], eax
|
||||||
|
mov [redrawmouse_unconditional], 1
|
||||||
|
call __sys_draw_pointer
|
||||||
|
popad
|
||||||
|
@@:
|
||||||
mov [flags], edx
|
mov [flags], edx
|
||||||
|
|
||||||
; [ebp] pointer to filename
|
; [ebp] pointer to filename
|
||||||
@ -113,7 +123,8 @@ proc fs_execute
|
|||||||
.bigfilename:
|
.bigfilename:
|
||||||
popad
|
popad
|
||||||
mov eax, -ERROR_FILE_NOT_FOUND
|
mov eax, -ERROR_FILE_NOT_FOUND
|
||||||
ret
|
|
||||||
|
jmp .final
|
||||||
|
|
||||||
.namecopied:
|
.namecopied:
|
||||||
|
|
||||||
@ -127,6 +138,7 @@ proc fs_execute
|
|||||||
@@:
|
@@:
|
||||||
lea eax, [filename]
|
lea eax, [filename]
|
||||||
stdcall load_file, eax
|
stdcall load_file, eax
|
||||||
|
|
||||||
mov esi, -ERROR_FILE_NOT_FOUND
|
mov esi, -ERROR_FILE_NOT_FOUND
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .err_file
|
jz .err_file
|
||||||
@ -175,7 +187,7 @@ proc fs_execute
|
|||||||
jnz @F
|
jnz @F
|
||||||
lea esi, [filename]
|
lea esi, [filename]
|
||||||
@@:
|
@@:
|
||||||
mov ecx, 8; 8 chars for name
|
mov ecx, 11 ; 11 chars for name! 8 - is old value!
|
||||||
mov edi, [slot_base]
|
mov edi, [slot_base]
|
||||||
.copy_process_name_loop:
|
.copy_process_name_loop:
|
||||||
lodsb
|
lodsb
|
||||||
@ -237,7 +249,9 @@ end if
|
|||||||
xor ebx, ebx
|
xor ebx, ebx
|
||||||
mov [application_table_status], ebx;unlock application_table_status mutex
|
mov [application_table_status], ebx;unlock application_table_status mutex
|
||||||
mov eax, [process_number];set result
|
mov eax, [process_number];set result
|
||||||
ret
|
|
||||||
|
jmp .final
|
||||||
|
|
||||||
.failed:
|
.failed:
|
||||||
mov eax, [save_cr3]
|
mov eax, [save_cr3]
|
||||||
call set_cr3
|
call set_cr3
|
||||||
@ -248,6 +262,15 @@ end if
|
|||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov [application_table_status], eax
|
mov [application_table_status], eax
|
||||||
mov eax, esi
|
mov eax, esi
|
||||||
|
.final:
|
||||||
|
cmp [SCR_MODE], word 0x13
|
||||||
|
jbe @f
|
||||||
|
pushad
|
||||||
|
stdcall set_cursor, [handle]
|
||||||
|
mov [redrawmouse_unconditional], 1
|
||||||
|
call __sys_draw_pointer
|
||||||
|
popad
|
||||||
|
@@:
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
|
@ -49,11 +49,23 @@ keymap_alt:
|
|||||||
|
|
||||||
|
|
||||||
if lang eq ru
|
if lang eq ru
|
||||||
boot_fonts db '˜à¨äâë § £à㦥ë',0
|
boot_initirq db 'ˆ¨æ¨ «¨§ æ¨ï IRQ',0
|
||||||
|
boot_picinit db 'ˆ¨æ¨ «¨§ æ¨ï PIC',0
|
||||||
|
boot_v86machine db 'ˆ¨æ¨ «¨§ æ¨ï á¨á⥬ë V86 ¬ è¨ë',0
|
||||||
|
boot_inittimer db 'ˆ¨æ¨ «¨§ æ¨ï á¨á⥬®£® â ©¬¥à (IRQ0)',0
|
||||||
|
boot_initapic db '<27>®¯ë⪠¨¨æ¨ «¨§ 樨 APIC',0
|
||||||
|
boot_enableirq db '‚ª«îç¨âì ¯à¥àë¢ ¨ï 2, 6, 13, 14, 15',0
|
||||||
|
boot_enablint_ide db '<27> §à¥è¥¨¥ ¯à¥àë¢ ¨© ¢ ª®â஫«¥à¥ IDE',0
|
||||||
|
boot_detectfloppy db '<27>®¨áª floppy ¤¨áª®¢®¤®¢',0
|
||||||
|
boot_detecthdcd db '<27>®¨áª ¦¥áâª¨å ¤¨áª®¢ ¨ ATAPI ¯à¨¢®¤®¢',0
|
||||||
|
boot_getcache db '<27>®«ã票¥ ¯ ¬ï⨠¤«ï ªíè ',0
|
||||||
|
boot_detectpart db '<27>®¨áª à §¤¥«®¢ ¤¨áª®¢ëå ãáâனá⢠å',0
|
||||||
|
boot_init_sys db 'ˆ¨æ¨ «¨§ æ¨ï á¨á⥬®£® ª â «®£ /sys',0
|
||||||
|
boot_loadlibs db '‡ £à㧪 ¡¨¡«¨®â¥ª (.obj)',0
|
||||||
boot_memdetect db 'Š®«¨ç¥á⢮ ®¯¥à ⨢®© ¯ ¬ïâ¨',' ',' Œ¡',0
|
boot_memdetect db 'Š®«¨ç¥á⢮ ®¯¥à ⨢®© ¯ ¬ïâ¨',' ',' Œ¡',0
|
||||||
boot_tss db '“áâ ®¢ª TSSs',0
|
boot_tss db '“áâ ®¢ª TSSs',0
|
||||||
boot_cpuid db '—⥨¥ CPUIDs',0
|
boot_cpuid db '—⥨¥ CPUIDs',0
|
||||||
boot_devices db '<27>®¨áª ãáâனáâ¢',0
|
; boot_devices db '<27>®¨áª ãáâனáâ¢',0
|
||||||
boot_timer db '“áâ ®¢ª â ©¬¥à ',0
|
boot_timer db '“áâ ®¢ª â ©¬¥à ',0
|
||||||
boot_irqs db '<27>¥à¥®¯à¥¤¥«¥¨¥ IRQ',0
|
boot_irqs db '<27>¥à¥®¯à¥¤¥«¥¨¥ IRQ',0
|
||||||
boot_setmouse db '“áâ ®¢ª ¬ëè¨',0
|
boot_setmouse db '“áâ ®¢ª ¬ëè¨',0
|
||||||
@ -69,15 +81,30 @@ if lang eq ru
|
|||||||
boot_pal_vga db '“áâ ®¢ª VGA 640x480 ¯ «¨âàë',0
|
boot_pal_vga db '“áâ ®¢ª VGA 640x480 ¯ «¨âàë',0
|
||||||
boot_failed db '‡ £à㧪 ¯¥à¢®£® ¯à¨«®¦¥¨ï ¥ 㤠« áì',0
|
boot_failed db '‡ £à㧪 ¯¥à¢®£® ¯à¨«®¦¥¨ï ¥ 㤠« áì',0
|
||||||
boot_mtrr db '“áâ ®¢ª MTRR',0
|
boot_mtrr db '“áâ ®¢ª MTRR',0
|
||||||
|
|
||||||
|
boot_APIC_found db 'APIC ¢ª«îç¥', 0
|
||||||
|
boot_APIC_nfound db 'APIC ¥ ©¤¥', 0
|
||||||
if preboot_blogesc
|
if preboot_blogesc
|
||||||
boot_tasking db '‚ᥠ£®â®¢® ¤«ï § ¯ã᪠, ¦¬¨âॠESC ¤«ï áâ àâ ',0
|
boot_tasking db '‚ᥠ£®â®¢® ¤«ï § ¯ã᪠, ¦¬¨âॠESC ¤«ï áâ àâ ',0
|
||||||
end if
|
end if
|
||||||
else
|
else
|
||||||
boot_fonts db 'Fonts loaded',0
|
boot_initirq db 'Initialize IRQ',0
|
||||||
|
boot_picinit db 'Initialize PIC',0
|
||||||
|
boot_v86machine db 'Initialize system V86 machine',0
|
||||||
|
boot_inittimer db 'Initialize system timer (IRQ0)',0
|
||||||
|
boot_initapic db 'Try to initialize APIC',0
|
||||||
|
boot_enableirq db 'Enable interrupts 2, 6, 13, 14, 15',0
|
||||||
|
boot_enablint_ide db 'Enable interrupts in IDE controller',0
|
||||||
|
boot_detectfloppy db 'Search floppy drives',0
|
||||||
|
boot_detecthdcd db 'Search hard drives and ATAPI drives',0
|
||||||
|
boot_getcache db 'Get memory for cache',0
|
||||||
|
boot_detectpart db 'Search partitions on disk devices',0
|
||||||
|
boot_init_sys db 'Initialize system directory /sys',0
|
||||||
|
boot_loadlibs db 'Loading librares (.obj)',0
|
||||||
boot_memdetect db 'Determining amount of memory',0
|
boot_memdetect db 'Determining amount of memory',0
|
||||||
boot_tss db 'Setting TSSs',0
|
boot_tss db 'Setting TSSs',0
|
||||||
boot_cpuid db 'Reading CPUIDs',0
|
boot_cpuid db 'Reading CPUIDs',0
|
||||||
boot_devices db 'Detecting devices',0
|
; boot_devices db 'Detecting devices',0
|
||||||
boot_setmouse db 'Setting mouse',0
|
boot_setmouse db 'Setting mouse',0
|
||||||
boot_windefs db 'Setting window defaults',0
|
boot_windefs db 'Setting window defaults',0
|
||||||
boot_bgr db 'Calculating background',0
|
boot_bgr db 'Calculating background',0
|
||||||
@ -90,14 +117,14 @@ else
|
|||||||
boot_pal_vga db 'Setting VGA 640x480 palette',0
|
boot_pal_vga db 'Setting VGA 640x480 palette',0
|
||||||
boot_failed db 'Failed to start first app',0
|
boot_failed db 'Failed to start first app',0
|
||||||
boot_mtrr db 'Setting MTRR',0
|
boot_mtrr db 'Setting MTRR',0
|
||||||
|
|
||||||
|
boot_APIC_found db 'APIC enabled', 0
|
||||||
|
boot_APIC_nfound db 'APIC not found', 0
|
||||||
if preboot_blogesc
|
if preboot_blogesc
|
||||||
boot_tasking db 'All set - press ESC to start',0
|
boot_tasking db 'All set - press ESC to start',0
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
boot_APIC_found db 'APIC enabled', 0
|
|
||||||
boot_APIC_nfound db 'APIC not found', 0
|
|
||||||
|
|
||||||
;new_process_loading db 'K : New Process - loading',13,10,0
|
;new_process_loading db 'K : New Process - loading',13,10,0
|
||||||
;new_process_running db 'K : New Process - done',13,10,0
|
;new_process_running db 'K : New Process - done',13,10,0
|
||||||
start_not_enough_memory db 'K : New Process - not enough memory',13,10,0
|
start_not_enough_memory db 'K : New Process - not enough memory',13,10,0
|
||||||
@ -135,9 +162,6 @@ else
|
|||||||
ud_user_message db 'Error: unsupported processor instruction',0
|
ud_user_message db 'Error: unsupported processor instruction',0
|
||||||
end if
|
end if
|
||||||
|
|
||||||
char db '/sys/FONTS/CHAR.MT',0
|
|
||||||
char2 db '/sys/FONTS/CHAR2.MT',0
|
|
||||||
|
|
||||||
bootpath db '/KOLIBRI '
|
bootpath db '/KOLIBRI '
|
||||||
bootpath2 db 0
|
bootpath2 db 0
|
||||||
vmode db '/sys/drivers/VMODE.MDR',0
|
vmode db '/sys/drivers/VMODE.MDR',0
|
||||||
@ -333,6 +357,7 @@ _WinMapAddress rd 1
|
|||||||
_WinMapSize rd 1
|
_WinMapSize rd 1
|
||||||
|
|
||||||
def_cursor rd 1
|
def_cursor rd 1
|
||||||
|
def_cursor_clock rd 1
|
||||||
current_cursor rd 1
|
current_cursor rd 1
|
||||||
hw_cursor rd 1
|
hw_cursor rd 1
|
||||||
cur_saved_base rd 1
|
cur_saved_base rd 1
|
||||||
|
@ -133,6 +133,10 @@ end_search_partitions_bd:
|
|||||||
loop start_search_partitions_bd
|
loop start_search_partitions_bd
|
||||||
jmp end_search_partitions
|
jmp end_search_partitions
|
||||||
|
|
||||||
|
problem_partition db 0 ; used for partitions search
|
||||||
|
|
||||||
|
include '../fs/part_set.inc'
|
||||||
|
|
||||||
partition_data_transfer:
|
partition_data_transfer:
|
||||||
mov edi, [transfer_adress]
|
mov edi, [transfer_adress]
|
||||||
mov esi, PARTITION_START ;start of file_system_data
|
mov esi, PARTITION_START ;start of file_system_data
|
||||||
|
@ -197,16 +197,21 @@
|
|||||||
<EFBFBD> à ¬¥âàë:
|
<EFBFBD> à ¬¥âàë:
|
||||||
* eax = 4 - ®¬¥à äãªæ¨¨
|
* eax = 4 - ®¬¥à äãªæ¨¨
|
||||||
* ebx = [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y]
|
* ebx = [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y]
|
||||||
* ecx = 0xX0RRGGBB, £¤¥
|
* ecx = 0xXYRRGGBB, £¤¥
|
||||||
* RR, GG, BB § ¤ îâ 梥â ⥪áâ
|
* RR, GG, BB § ¤ îâ 梥â ⥪áâ
|
||||||
* X=ABnn (¡¨âë):
|
* X=ABnn (¡¨âë):
|
||||||
* nn § ¤ ¥â ¨á¯®«ì§ã¥¬ë© èà¨äâ: 0=á¨áâ¥¬ë© ¬®®è¨à¨ë©,
|
* nn § ¤ ¥â ¨á¯®«ì§ã¥¬ë© èà¨äâ: 0=á¨áâ¥¬ë© ¬®®è¨à¨ë©,
|
||||||
1=á¨áâ¥¬ë© èà¨äâ ¯¥à¥¬¥®© è¨à¨ë
|
1=á¨áâ¥¬ë© èà¨äâ ¯¥à¥¬¥®© è¨à¨ë
|
||||||
* A=0 - ¢ë¢®¤¨âì esi ᨬ¢®«®¢, A=1 - ¢ë¢®¤¨âì ASCIIZ-áâபã
|
* A=0 - ¢ë¢®¤¨âì esi ᨬ¢®«®¢, A=1 - ¢ë¢®¤¨âì ASCIIZ-áâபã
|
||||||
* B=1 - § ªà 訢 âì ä® æ¢¥â®¬ edi
|
* B=1 - § ªà 訢 âì ä® æ¢¥â®¬ edi
|
||||||
|
* Y=Cnnn (¡¨âë):
|
||||||
|
* C=1 ¯¥à¥ ¯à ¢¨âì ¢ë¢®¤ ¢ ®¡« áâì ¯®«ì§®¢ ⥫ï, § ¤ ® ¢ edi
|
||||||
|
* nnn - ¥ ¨á¯®«ì§ã¥âáï ¢ ⥪ã饬 ¢¨¤¥, ¤®«¦® ¡ëâì 0 (zero)
|
||||||
* edx = 㪠§ ⥫ì ç «® áâப¨
|
* edx = 㪠§ ⥫ì ç «® áâப¨
|
||||||
* esi = ¤«ï A=0 ¤«¨ áâப¨, ¤®«¦ ¡ëâì ¥ ¡®«ìè¥ 255;
|
* esi = ¤«ï A=0 ¤«¨ áâப¨, ¤®«¦ ¡ëâì ¥ ¡®«ìè¥ 255;
|
||||||
¤«ï A=1 ¨£®à¨àã¥âáï
|
¤«ï A=1 ¨£®à¨àã¥âáï
|
||||||
|
* edi = 梥⠤«ï § ªà ᪨ ä® , ¥á«¨ B=1
|
||||||
|
* edi = 㪠§ â¥«ì ®¡« áâì ¯®«ì§®¢ ⥫ï, ¥á«¨ C=1
|
||||||
‚®§¢à é ¥¬®¥ § 票¥:
|
‚®§¢à é ¥¬®¥ § 票¥:
|
||||||
* äãªæ¨ï ¥ ¢®§¢à é ¥â § 票ï
|
* äãªæ¨ï ¥ ¢®§¢à é ¥â § 票ï
|
||||||
‡ ¬¥ç ¨ï:
|
‡ ¬¥ç ¨ï:
|
||||||
@ -214,7 +219,12 @@
|
|||||||
¢â®à®© - ¨§ char2.mt.
|
¢â®à®© - ¨§ char2.mt.
|
||||||
* Ž¡ èà¨äâ ¨¬¥îâ ¢ëá®âã 9 ¯¨ªá¥«¥©, è¨à¨ ¬®®è¨à¨®£® èà¨äâ
|
* Ž¡ èà¨äâ ¨¬¥îâ ¢ëá®âã 9 ¯¨ªá¥«¥©, è¨à¨ ¬®®è¨à¨®£® èà¨äâ
|
||||||
à ¢ 6 ¯¨ªá¥«¥©.
|
à ¢ 6 ¯¨ªá¥«¥©.
|
||||||
|
* C=1, £«ã¡¨ â®çª¨ = 32 ¡¨â , ®¡« áâì ¯®«ì§®¢ â¥«ï ¢ë£«ï¤¨â â ª:
|
||||||
|
dword Xsize
|
||||||
|
dword Ysize
|
||||||
|
®áâ ⮪ ®¡« á⨠= Xsize * Y size * 4
|
||||||
|
* <20>¥«ì§ï ®¤®¢à¥¬¥® ¨á¯®«ì§®¢ âì B=1 ¨ C=1, ¯®áª®«ìªã ¢ ®¡®¨å
|
||||||
|
á«ãç ïå ¨á¯®«ì§®¢ ॣ¨áâà edi ¤«ï à §ëå 楫¥©.
|
||||||
======================================================================
|
======================================================================
|
||||||
========================= ”ãªæ¨ï 5 - ¯ 㧠. =========================
|
========================= ”ãªæ¨ï 5 - ¯ 㧠. =========================
|
||||||
======================================================================
|
======================================================================
|
||||||
@ -330,7 +340,7 @@
|
|||||||
¢ ¯®§¨æ¨¨ ecx
|
¢ ¯®§¨æ¨¨ ecx
|
||||||
* +8: word: § १¥à¢¨à®¢ ®
|
* +8: word: § १¥à¢¨à®¢ ®
|
||||||
* +10 = +0xA: 11 ¡ ©â: ¨¬ï ¯à®æ¥áá
|
* +10 = +0xA: 11 ¡ ©â: ¨¬ï ¯à®æ¥áá
|
||||||
(¨¬ï ᮮ⢥âáâ¢ãî饣® ¨á¯®«ï¥¬®£® ä ©« ¢ ä®à¬ ⥠8+3)
|
(¨¬ï § ¯ã饮£® ä ©« - ¨á¯®«ï¥¬ë© ä ©« ¡¥§ à áè¨à¥¨ï)
|
||||||
* +21 = +0x15: byte: § १¥à¢¨à®¢ ®, íâ®â ¡ ©â ¥ ¨§¬¥ï¥âáï
|
* +21 = +0x15: byte: § १¥à¢¨à®¢ ®, íâ®â ¡ ©â ¥ ¨§¬¥ï¥âáï
|
||||||
* +22 = +0x16: dword: ¤à¥á ¯à®æ¥áá ¢ ¯ ¬ïâ¨
|
* +22 = +0x16: dword: ¤à¥á ¯à®æ¥áá ¢ ¯ ¬ïâ¨
|
||||||
* +26 = +0x1A: dword: à §¬¥à ¨á¯®«ì§ã¥¬®© ¯ ¬ï⨠- 1
|
* +26 = +0x1A: dword: à §¬¥à ¨á¯®«ì§ã¥¬®© ¯ ¬ï⨠- 1
|
||||||
@ -608,6 +618,39 @@
|
|||||||
‚®§¢à é ¥¬®¥ § 票¥:
|
‚®§¢à é ¥¬®¥ § 票¥:
|
||||||
* eax = 1 ¯à¨ ãᯥå¥, 0 ¯à¨ ®è¨¡ª¥
|
* eax = 1 ¯à¨ ãᯥå¥, 0 ¯à¨ ®è¨¡ª¥
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
====================== ”ãªæ¨ï 15, ¯®¤äãªæ¨ï 8 ======================
|
||||||
|
=========== <20>®«ãç¨âì ª®®à¤¨ âë ¯®á«¥¤¥© ®âà¨á®¢ª¨ ä® . ============
|
||||||
|
======================================================================
|
||||||
|
<EFBFBD> à ¬¥âàë:
|
||||||
|
* eax = 15 - ®¬¥à äãªæ¨¨
|
||||||
|
* ebx = 8 - ®¬¥à ¯®¤äãªæ¨¨
|
||||||
|
‚®§¢à é ¥¬®¥ § 票¥:
|
||||||
|
* eax = [left]*65536 + [right]
|
||||||
|
* ebx = [top]*65536 + [bottom]
|
||||||
|
‡ ¬¥ç ¨ï:
|
||||||
|
* (left,top) - ª®®à¤¨ âë «¥¢®£® ¢¥à奣® 㣫 ,
|
||||||
|
(right,bottom) - ª®®à¤¨ âë ¯à ¢®£® ¨¦¥£®.
|
||||||
|
* „«ï ¯®«ãç¥¨ï ¡®«¥¥ ¤®á⮢¥àëå ᢥ¤¥¨©, ¥®¡å®¤¨¬® ¢ë§¢ âì
|
||||||
|
äãªæ¨î áà §ã ¯®á«¥ ¯®«ã票ï ᮡëâ¨ï:
|
||||||
|
5 = § ¢¥à訫 áì ¯¥à¥à¨á®¢ª ä® à ¡®ç¥£® á⮫
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
====================== ”ãªæ¨ï 15, ¯®¤äãªæ¨ï 9 ======================
|
||||||
|
=============== <20>¥à¥à¨á®¢ âì ¯àאַ㣮«ìãî ç áâì ä® . ===============
|
||||||
|
======================================================================
|
||||||
|
<EFBFBD> à ¬¥âàë:
|
||||||
|
* eax = 15 - ®¬¥à äãªæ¨¨
|
||||||
|
* ebx = 9 - ®¬¥à ¯®¤äãªæ¨¨
|
||||||
|
* ecx = [left]*65536 + [right]
|
||||||
|
* edx = [top]*65536 + [bottom]
|
||||||
|
‚®§¢à é ¥¬®¥ § 票¥:
|
||||||
|
* äãªæ¨ï ¥ ¢®§¢à é ¥â § 票ï
|
||||||
|
‡ ¬¥ç ¨ï:
|
||||||
|
* (left,top) - ª®®à¤¨ âë «¥¢®£® ¢¥à奣® 㣫 ,
|
||||||
|
(right,bottom) - ª®®à¤¨ âë ¯à ¢®£® ¨¦¥£®.
|
||||||
|
* …᫨ ¯ à ¬¥âàë ãáâ ®¢«¥ë ¥ª®à४⮠- ä® ¥ ¯¥à¥à¨á®¢ë¢ ¥âáï.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
============= ”ãªæ¨ï 16 - á®åà ¨âì à ¬¤¨áª ¤¨áª¥âã. =============
|
============= ”ãªæ¨ï 16 - á®åà ¨âì à ¬¤¨áª ¤¨áª¥âã. =============
|
||||||
======================================================================
|
======================================================================
|
||||||
@ -1065,6 +1108,34 @@ dd 1675
|
|||||||
* ‚®ááâ ®¢«¥¨¥ ®ª á ®¤®¢à¥¬¥®© ªâ¨¢¨§ 樥© ®áãé¥á⢫ï¥âáï
|
* ‚®ááâ ®¢«¥¨¥ ®ª á ®¤®¢à¥¬¥®© ªâ¨¢¨§ 樥© ®áãé¥á⢫ï¥âáï
|
||||||
¯®¤äãªæ¨¨ 3 (¯à¨¨¬ î饩 ®¬¥à á«®â ).
|
¯®¤äãªæ¨¨ 3 (¯à¨¨¬ î饩 ®¬¥à á«®â ).
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
======= ”ãªæ¨ï 18, ¯®¤äãªæ¨ï 23 - ¬¨¨¬¨§¨à®¢ âì ¢á¥ ®ª . =========
|
||||||
|
======================================================================
|
||||||
|
<EFBFBD> à ¬¥âàë:
|
||||||
|
* eax = 18 - ®¬¥à äãªæ¨¨
|
||||||
|
* ebx = 23 - ®¬¥à ¯®¤äãªæ¨¨
|
||||||
|
‚®§¢à é ¥¬®¥ § 票¥:
|
||||||
|
* eax = 0 - ¢á¥ ®ª ¡ë«¨ ¬¨¨¬¨§¨à®¢ ë ¤® ¢ë§®¢ äãªæ¨¨
|
||||||
|
* eax = N - ª®«¨ç¥á⢮ ®ª® ᢥàãâëå äãªæ¨¥©
|
||||||
|
‡ ¬¥ç ¨ï:
|
||||||
|
* Žª ᯥæ. ¯®â®ª®¢ (¨¬ï ç¨ ¥âáï á ᨬ¢®« @) ¥ ᢮à 稢 îâáï.
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
===== ”ãªæ¨ï 18, ¯®¤äãªæ¨ï 24 - ãáâ ®¢¨âì ¯à¥¤¥«ë ®âà¨á®¢ª¨. ======
|
||||||
|
======================================================================
|
||||||
|
<EFBFBD> à ¬¥âàë:
|
||||||
|
* eax = 18 - ®¬¥à äãªæ¨¨
|
||||||
|
* ebx = 24 - ®¬¥à ¯®¤äãªæ¨¨
|
||||||
|
* ecx = ®¢ë© à §¬¥à ¯® X
|
||||||
|
* edx = ®¢ë© à §¬¥à ¯® Y
|
||||||
|
‚®§¢à é ¥¬®¥ § 票¥:
|
||||||
|
* äãªæ¨ï ¥ ¢®§¢à é ¥â § 票ï
|
||||||
|
‡ ¬¥ç ¨ï:
|
||||||
|
* ”ãªæ¨ï ¥ ¬¥ï¥â 䨧¨ç¥áª¨© à §¬¥à ¢¨¤¥®à¥¦¨¬ . Ž ¯à¥¤ § ç¥
|
||||||
|
¤«ï ¥áâ ¤ àâëå ¤¨á¯«¥¥¢, ®â®¡à ¦ îé¨å ¨§®¡à ¦¥¨¥ ç áâ¨ç®.
|
||||||
|
* <20> §¬¥àë 㪠§ë¢ ¥¬ë¥ ¢ äãªæ¨¨ ¥ ¤®«¦ë ¯à¥¢ëè âì à §¬¥àë ⥪ã饣®
|
||||||
|
¢¨¤¥®à¥¦¨¬ , ¨ ç¥ äãªæ¨ï ¨ç¥£® ¥ ¨§¬¥¨â.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
==================== ”ãªæ¨ï 20 - ¨â¥à䥩á MIDI. ====================
|
==================== ”ãªæ¨ï 20 - ¨â¥à䥩á MIDI. ====================
|
||||||
======================================================================
|
======================================================================
|
||||||
@ -1506,6 +1577,26 @@ dd 1675
|
|||||||
* ”ãªæ¨ï ¯®¤¤¥à¦¨¢ ¥âáï ⮫쪮 ¤«ï ATAPI-ãáâனá⢠(CD ¨ DVD).
|
* ”ãªæ¨ï ¯®¤¤¥à¦¨¢ ¥âáï ⮫쪮 ¤«ï ATAPI-ãáâனá⢠(CD ¨ DVD).
|
||||||
* <20>ਬ¥à®¬ ¨á¯®«ì§®¢ ¨ï äãªæ¨¨ ï¥âáï ¯à¨«®¦¥¨¥ CD_tray.
|
* <20>ਬ¥à®¬ ¨á¯®«ì§®¢ ¨ï äãªæ¨¨ ï¥âáï ¯à¨«®¦¥¨¥ CD_tray.
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
========== ”ãªæ¨ï 25 - § ¯¨á âì ®¡« áâì á«®© ä® . ===============
|
||||||
|
======================================================================
|
||||||
|
<EFBFBD> à ¬¥âàë:
|
||||||
|
* eax = 25 - ®¬¥à äãªæ¨¨
|
||||||
|
* ebx = 㪠§ â¥«ì ¯à¥¤¢ à¨â¥«ì® ¢ë¤¥«¥ãî ®¡« áâì ¯ ¬ïâ¨,
|
||||||
|
£¤¥ à §¬¥é¥® ¨á室®¥ ¨§®¡à ¦¥¨¥ ¢ ä®à¬ ⥠BBGGRRTTBBGGRRTT...
|
||||||
|
* ecx = [à §¬¥à ¯® ®á¨ x]*65536 + [à §¬¥à ¯® ®á¨ y]
|
||||||
|
* edx = [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y]
|
||||||
|
‚®§¢à é ¥¬®¥ § 票¥:
|
||||||
|
* äãªæ¨ï ¥ ¢®§¢à é ¥â § 票ï
|
||||||
|
‡ ¬¥ç ¨ï:
|
||||||
|
* Š®®à¤¨ âë ®¡« á⨠- íâ® ª®®à¤¨ âë ¢¥à奣® «¥¢®£® 㣫
|
||||||
|
®¡« á⨠®â®á¨â¥«ì® íªà .
|
||||||
|
* <20> §¬¥à ¨§®¡à ¦¥¨ï ¢ ¡ ©â å ¥áâì 4*xsize*ysize.
|
||||||
|
* TT - ¡ ©â 㪠§ â¥«ì ¯à®§à ç®áâ¨, ¢ áâ®ï饥 ¢à¥¬ï:
|
||||||
|
®â 1 ¤® FF - ¥¯à®§à ç®, ®â 0 - ¯à®§à ç®.
|
||||||
|
* ”ãªæ¨ï à §¬¥é ¥â ¨§®¡à ¦¥¨¥ ¥ ä®®¢®¥ ¨§®¡à ¦¥¨¥ (ä.15),
|
||||||
|
¯àï¬ãî ¢ LFB. Ž¯æ¨¨ ä.15 ¤«ï ä. 25 ¥ ¨¬¥îâ á¬ëá« .
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
===== ”ãªæ¨ï 26, ¯®¤äãªæ¨ï 1 - ¯®«ãç¨âì ¡ §®¢ë© ¯®àâ MPU MIDI. =====
|
===== ”ãªæ¨ï 26, ¯®¤äãªæ¨ï 1 - ¯®«ãç¨âì ¡ §®¢ë© ¯®àâ MPU MIDI. =====
|
||||||
======================================================================
|
======================================================================
|
||||||
@ -1703,6 +1794,19 @@ dd 1675
|
|||||||
* <20>ਠᮧ¤ ¨¨ ¯à®æ¥áá /¯®â®ª ⥪ãé ï ¯ ¯ª á«¥¤ã¥âáï ®â
|
* <20>ਠᮧ¤ ¨¨ ¯à®æ¥áá /¯®â®ª ⥪ãé ï ¯ ¯ª á«¥¤ã¥âáï ®â
|
||||||
த¨â¥«ï.
|
த¨â¥«ï.
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
========= ”ãªæ¨ï 34 - 㧠âì ª®¬ã ¯à¨ ¤«¥¦¨â â®çª íªà . =========
|
||||||
|
======================================================================
|
||||||
|
<EFBFBD> à ¬¥âàë:
|
||||||
|
* eax = 34 - ®¬¥à äãªæ¨¨
|
||||||
|
* ebx = x-ª®®à¤¨ â (®â®á¨â¥«ì® íªà )
|
||||||
|
* ecx = y-ª®®à¤¨ â (®â®á¨â¥«ì® íªà )
|
||||||
|
|
||||||
|
‚®§¢à é ¥¬®¥ § 票¥:
|
||||||
|
* eax = 0x000000XX - â®çª ¯à¨ ¤«¥¦¨â á«®âã ®ª N
|
||||||
|
<20>ਠ¥ª®à४âëå § 票ïå ebx ¨ ecx äãªæ¨ï ¢®§¢à é ¥â 0
|
||||||
|
* ”ãªæ¨ï ¡¥à¥â § ç¥¨ï ¨§ ®¡« á⨠[_WinMapAddress]
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
============ ”ãªæ¨ï 35 - ¯à®ç¨â âì 梥â â®çª¨ íªà ¥. ============
|
============ ”ãªæ¨ï 35 - ¯à®ç¨â âì 梥â â®çª¨ íªà ¥. ============
|
||||||
======================================================================
|
======================================================================
|
||||||
@ -3241,7 +3345,7 @@ IPC
|
|||||||
* ebx = 㪠§ â¥«ì ¨§®¡à ¦¥¨¥
|
* ebx = 㪠§ â¥«ì ¨§®¡à ¦¥¨¥
|
||||||
* ecx = [à §¬¥à ¯® ®á¨ x]*65536 + [à §¬¥à ¯® ®á¨ y]
|
* ecx = [à §¬¥à ¯® ®á¨ x]*65536 + [à §¬¥à ¯® ®á¨ y]
|
||||||
* edx = [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y]
|
* edx = [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y]
|
||||||
* esi = ç¨á«® ¡¨â ¯¨ªá¥«ì, ¤®«¦® ¡ëâì 1,2,4,8,15,16,24 ¨«¨ 32
|
* esi = ç¨á«® ¡¨â ¯¨ªá¥«ì, ¤®«¦® ¡ëâì 1,2,4,8,9,15,16,24 ¨«¨ 32
|
||||||
* edi = 㪠§ â¥«ì ¯ «¨âàã (2 ¢ á⥯¥¨ esi 梥⮢ 0x00RRGGBB);
|
* edi = 㪠§ â¥«ì ¯ «¨âàã (2 ¢ á⥯¥¨ esi 梥⮢ 0x00RRGGBB);
|
||||||
¨£®à¨àã¥âáï ¯à¨ esi > 8
|
¨£®à¨àã¥âáï ¯à¨ esi > 8
|
||||||
* ebp = ᬥ饨¥ ¤ ëå ª ¦¤®© á«¥¤ãî饩 áâப¨ ¨§®¡à ¦¥¨ï
|
* ebp = ᬥ饨¥ ¤ ëå ª ¦¤®© á«¥¤ãî饩 áâப¨ ¨§®¡à ¦¥¨ï
|
||||||
@ -3265,6 +3369,9 @@ IPC
|
|||||||
ᮮ⢥âáâ¢ã¥â ¯¥à¢®¬ã ¯¨ªá¥«î.
|
ᮮ⢥âáâ¢ã¥â ¯¥à¢®¬ã ¯¨ªá¥«î.
|
||||||
* ”®à¬ â ¨§®¡à ¦¥¨ï á 8 ¡¨â ¬¨ ¯¨ªá¥«ì: ª ¦¤ë© ¡ ©â ¨§®¡à ¦¥¨ï
|
* ”®à¬ â ¨§®¡à ¦¥¨ï á 8 ¡¨â ¬¨ ¯¨ªá¥«ì: ª ¦¤ë© ¡ ©â ¨§®¡à ¦¥¨ï
|
||||||
à áᬠâਢ ¥âáï ª ª ¨¤¥ªá ¢ ¯ «¨âà¥.
|
à áᬠâਢ ¥âáï ª ª ¨¤¥ªá ¢ ¯ «¨âà¥.
|
||||||
|
* ”®à¬ â ¨§®¡à ¦¥¨ï á 9 ¡¨â ¬¨ ¯¨ªá¥«ì: ª ¦¤ë© ¡ ©â ¨§®¡à ¦¥¨ï
|
||||||
|
(8 ¡¨â) ®¡®§ ç ¥â ¨â¥á¨¢®áâì á¥à®£® ¤«ï ®¤®£® ¯¨ªá¥«ï, â.®.
|
||||||
|
íâ®â ⨯ ¨§®¡à ¦¥¨ï ¨¤¥â¨ç¥ 8 ¡¨â ¯¨ªá¥«ì ¡¥§ ¯ «¨âàë.
|
||||||
* ”®à¬ â ¨§®¡à ¦¥¨ï á 15 ¡¨â ¬¨ ¯¨ªá¥«ì: 梥⠪ ¦¤®£® ¯¨ªá¥«ï
|
* ”®à¬ â ¨§®¡à ¦¥¨ï á 15 ¡¨â ¬¨ ¯¨ªá¥«ì: 梥⠪ ¦¤®£® ¯¨ªá¥«ï
|
||||||
ª®¤¨àã¥âáï ª ª (¢ ¡¨â®¢®¬ ¯à¥¤áâ ¢«¥¨¨) 0RRRRRGGGGGBBBBB -
|
ª®¤¨àã¥âáï ª ª (¢ ¡¨â®¢®¬ ¯à¥¤áâ ¢«¥¨¨) 0RRRRRGGGGGBBBBB -
|
||||||
¯® 5 ¯¨ªá¥«¥© ª ¦¤ë© 梥â.
|
¯® 5 ¯¨ªá¥«¥© ª ¦¤ë© 梥â.
|
||||||
@ -3364,6 +3471,27 @@ IPC
|
|||||||
…᫨ ¤à㣮¥ ¯à¨«®¦¥¨¥ ®¯à¥¤¥«¨«® íâã ¦¥ ª®¬¡¨ æ¨î,
|
…᫨ ¤à㣮¥ ¯à¨«®¦¥¨¥ ®¯à¥¤¥«¨«® íâã ¦¥ ª®¬¡¨ æ¨î,
|
||||||
®® ¯®-¯à¥¦¥¬ã ¡ã¤¥â ¯®«ãç âì 㢥¤®¬«¥¨ï.
|
®® ¯®-¯à¥¦¥¬ã ¡ã¤¥â ¯®«ãç âì 㢥¤®¬«¥¨ï.
|
||||||
|
|
||||||
|
------------- <20>®¤äãªæ¨ï 6 - § ¡«®ª¨à®¢ âì ®¡ëçë© ¢¢®¤. -------------
|
||||||
|
<EFBFBD> à ¬¥âàë:
|
||||||
|
* eax = 66 - ®¬¥à äãªæ¨¨
|
||||||
|
* ebx = 6 - ®¬¥à ¯®¤äãªæ¨¨
|
||||||
|
‚®§¢à é ¥¬®¥ § 票¥:
|
||||||
|
* äãªæ¨ï ¥ ¢®§¢à é ¥â § 票ï
|
||||||
|
‡ ¬¥ç ¨ï:
|
||||||
|
* <20>«®ª¨àã¥âáï ®¡ëçë© ¢¢®¤ ¤ ëå á ª« ¢¨ âãàë ¤«ï ãáâ ®¢«¥ëå
|
||||||
|
"£®àïç¨å" ª« ¢¨è
|
||||||
|
* „«ï í¬ã«ï樨 ¬ëè¨ ç¥à¥§ ª« ¢¨ âãàã, ¯à¨«®¦¥¨¥ MOUSEMUL
|
||||||
|
|
||||||
|
--------- <20>®¤äãªæ¨ï 7 - à §¡«®ª¨à®¢ âì ®¡ëçë© ¢¢®¤. ----------------
|
||||||
|
<EFBFBD> à ¬¥âàë:
|
||||||
|
* eax = 66 - ®¬¥à äãªæ¨¨
|
||||||
|
* ebx = 7 - ®¬¥à ¯®¤äãªæ¨¨
|
||||||
|
‚®§¢à é ¥¬®¥ § 票¥:
|
||||||
|
* äãªæ¨ï ¥ ¢®§¢à é ¥â § 票ï
|
||||||
|
‡ ¬¥ç ¨ï:
|
||||||
|
* <20> §¡«®ª¨à®¢ ¨¥ १ã«ìâ ⮢ ä. 66.6
|
||||||
|
* „«ï í¬ã«ï樨 ¬ëè¨ ç¥à¥§ ª« ¢¨ âãàã, ¯à¨«®¦¥¨¥ MOUSEMUL
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
============ ”ãªæ¨ï 67 - ¨§¬¥¨âì ¯®«®¦¥¨¥/à §¬¥àë ®ª . ===========
|
============ ”ãªæ¨ï 67 - ¨§¬¥¨âì ¯®«®¦¥¨¥/à §¬¥àë ®ª . ===========
|
||||||
======================================================================
|
======================================================================
|
||||||
@ -3616,6 +3744,21 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
|
|||||||
* ‘®¤¥à¦¨¬®¥ ¯ ¬ï⨠¢¯«®âì ¤® ¨¬¥ì襣® ¨§ áâ ண® ¨ ®¢®£®
|
* ‘®¤¥à¦¨¬®¥ ¯ ¬ï⨠¢¯«®âì ¤® ¨¬¥ì襣® ¨§ áâ ண® ¨ ®¢®£®
|
||||||
à §¬¥à®¢ á®åà ï¥âáï.
|
à §¬¥à®¢ á®åà ï¥âáï.
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
========= ”ãªæ¨ï 68, ¯®¤äãªæ¨ï 21 - § £à㧨âì ¤à ©¢¥à PE. ==========
|
||||||
|
======================================================================
|
||||||
|
<EFBFBD> à ¬¥âàë:
|
||||||
|
* eax = 68 - ®¬¥à äãªæ¨¨
|
||||||
|
* ebx = 21 - ®¬¥à ¯®¤äãªæ¨¨
|
||||||
|
* ecx = 㪠§ ⥫ì ASCIIZ-áâபã á ¨¬¥¥¬ ¤à ©¢¥à
|
||||||
|
* edx = 㪠§ â¥«ì ª®¬ ¤ãî áâபã
|
||||||
|
‚®§¢à é ¥¬®¥ § 票¥:
|
||||||
|
* eax = 0 - ¥ã¤ ç
|
||||||
|
* ¨ ç¥ eax = åí¤« ¤à ©¢¥à
|
||||||
|
‡ ¬¥ç ¨ï:
|
||||||
|
* …᫨ ¤à ©¢¥à ¥éñ ¥ § £à㦥, ® § £à㦠¥âáï;
|
||||||
|
¥á«¨ ¤à ©¢¥à 㦥 § £à㦥, ¨ç¥£® ¥ ¬¥ï¥âáï.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
=== ”ãªæ¨ï 68, ¯®¤äãªæ¨ï 22 - ®âªàëâì ¨¬¥®¢ ãî ®¡« áâì ¯ ¬ïâ¨. ==
|
=== ”ãªæ¨ï 68, ¯®¤äãªæ¨ï 22 - ®âªàëâì ¨¬¥®¢ ãî ®¡« áâì ¯ ¬ïâ¨. ==
|
||||||
======================================================================
|
======================================================================
|
||||||
@ -4464,10 +4607,7 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
|
|||||||
ª®¯ª¨ ¨§ ¡ãä¥à áç¨â ë äãªæ¨¥© 17)
|
ª®¯ª¨ ¨§ ¡ãä¥à áç¨â ë äãªæ¨¥© 17)
|
||||||
* 4 = § १¥à¢¨à®¢ ® (¢ ⥪ã饩 ॠ«¨§ 樨 ¨ª®£¤ ¥ ¯à¨å®¤¨â ¤ ¦¥
|
* 4 = § १¥à¢¨à®¢ ® (¢ ⥪ã饩 ॠ«¨§ 樨 ¨ª®£¤ ¥ ¯à¨å®¤¨â ¤ ¦¥
|
||||||
¯à¨ à §¬ ᪨஢ª¥ äãªæ¨¥© 40)
|
¯à¨ à §¬ ᪨஢ª¥ äãªæ¨¥© 40)
|
||||||
* 5 = ¯¥à¥à¨á®¢ë¢ ¥âáï ä® à ¡®ç¥£® á⮫ (á¡à áë¢ ¥âáï
|
* 5 = § ¢¥à訫 áì ¯¥à¥à¨á®¢ª ä® à ¡®ç¥£® á⮫
|
||||||
¢â®¬ â¨ç¥áª¨ ¯®á«¥ ¯¥à¥à¨á®¢ª¨, â ª çâ® ¥á«¨ ¢® ¢à¥¬ï ¯¥à¥à¨á®¢ª¨
|
|
||||||
ä® ¯à®£à ¬¬ ¥ ¦¤ñâ ¨ ¥ ¯à®¢¥àï¥â ᮡëâ¨ï, â® í⮣® ᮡëâ¨ï
|
|
||||||
® ¥ § ¬¥â¨â)
|
|
||||||
* 6 = ᮡë⨥ ®â ¬ëè¨ (çâ®-â® á«ã稫®áì - ¦ ⨥ ª®¯ªã ¬ëè¨
|
* 6 = ᮡë⨥ ®â ¬ëè¨ (çâ®-â® á«ã稫®áì - ¦ ⨥ ª®¯ªã ¬ëè¨
|
||||||
¨«¨ ¯¥à¥¬¥é¥¨¥; á¡à áë¢ ¥âáï ¯à¨ ¯à®ç⥨¨)
|
¨«¨ ¯¥à¥¬¥é¥¨¥; á¡à áë¢ ¥âáï ¯à¨ ¯à®ç⥨¨)
|
||||||
* 7 = ¯à®¨§®è«® ᮡë⨥ IPC (ᬮâਠäãªæ¨î 60 - Inter Process
|
* 7 = ¯à®¨§®è«® ᮡë⨥ IPC (ᬮâਠäãªæ¨î 60 - Inter Process
|
||||||
|
@ -194,16 +194,22 @@ Remarks:
|
|||||||
Parameters:
|
Parameters:
|
||||||
* eax = 4 - function number
|
* eax = 4 - function number
|
||||||
* ebx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
* ebx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
||||||
* ecx = 0xX0RRGGBB, where
|
* ecx = 0xXYRRGGBB, where
|
||||||
* RR, GG, BB specify text color
|
* RR, GG, BB specify text color
|
||||||
* X=ABnn (bits):
|
* X=ABnn (bits):
|
||||||
* nn specifies the used font: 0=system monospaced,
|
* nn specifies the used font: 0=system monospaced,
|
||||||
1=system font of variable width
|
1=system font of variable width
|
||||||
* A=0 - output esi characters, A=1 - output ASCIIZ-string
|
* A=0 - output esi characters, A=1 - output ASCIIZ-string
|
||||||
* B=1 - fill background with the color edi
|
* B=1 - fill background with the color edi
|
||||||
|
* Y = Cnnn
|
||||||
|
* C=1 redirect the output to the user area, specified in edi
|
||||||
|
* nnn - not used in the current, must be 0 (zero)
|
||||||
* edx = pointer to the beginning of the string
|
* edx = pointer to the beginning of the string
|
||||||
* esi = for A=0 length of the string, must not exceed 255;
|
* esi = for A=0 length of the string, must not exceed 255;
|
||||||
for A=1 is ignored
|
for A=1 is ignored
|
||||||
|
* edi = color to fill background, if B=1
|
||||||
|
* edi = pointer to user area, for redirect, if C=1
|
||||||
|
|
||||||
Returned value:
|
Returned value:
|
||||||
* function does not return value
|
* function does not return value
|
||||||
Remarks:
|
Remarks:
|
||||||
@ -211,6 +217,12 @@ Remarks:
|
|||||||
second - from char2.mt.
|
second - from char2.mt.
|
||||||
* Both fonts have height 9 pixels, width of the monospaced font
|
* Both fonts have height 9 pixels, width of the monospaced font
|
||||||
is equal to 6 pixels.
|
is equal to 6 pixels.
|
||||||
|
* C=1, pixel depth = 32 bits, user area is as follows:
|
||||||
|
dword Xsize
|
||||||
|
dword Ysize
|
||||||
|
rest of the area = Xsize * Y size * 4
|
||||||
|
* You can not use B = 1 and C = 1, at the same time. Since in both
|
||||||
|
cases, the register edi is used for different purposes.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
========================= Function 5 - delay. ========================
|
========================= Function 5 - delay. ========================
|
||||||
@ -325,7 +337,7 @@ Returned value:
|
|||||||
position ecx
|
position ecx
|
||||||
* +8: word: reserved
|
* +8: word: reserved
|
||||||
* +10 = +0xA: 11 bytes: name of the process
|
* +10 = +0xA: 11 bytes: name of the process
|
||||||
(name of corresponding executable file in the format 8+3)
|
(name of the started file - executable file without extension)
|
||||||
* +21 = +0x15: byte: reserved, this byte is not changed
|
* +21 = +0x15: byte: reserved, this byte is not changed
|
||||||
* +22 = +0x16: dword: address of the process in memory
|
* +22 = +0x16: dword: address of the process in memory
|
||||||
* +26 = +0x1A: dword: size of used memory - 1
|
* +26 = +0x1A: dword: size of used memory - 1
|
||||||
@ -600,6 +612,39 @@ Parameters:
|
|||||||
Returned value:
|
Returned value:
|
||||||
* eax = 1 - success, 0 - error
|
* eax = 1 - success, 0 - error
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
===================== Function 15, subfunction 8 =====================
|
||||||
|
============= Get coordinates of last draw the background ============
|
||||||
|
======================================================================
|
||||||
|
Parameters:
|
||||||
|
* eax = 15 - function number
|
||||||
|
* ebx = 8 - subfunction number
|
||||||
|
Returned value:
|
||||||
|
* eax = [left]*65536 + [right]
|
||||||
|
* ebx = [top]*65536 + [bottom]
|
||||||
|
Remarks:
|
||||||
|
* (left,top) are coordinates of the left upper corner,
|
||||||
|
(right,bottom) are coordinates of the right lower one.
|
||||||
|
* For receiving more reliable information, call the function
|
||||||
|
immediately after the event:
|
||||||
|
5 = kernel finished redrawing of the desktop background
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
===================== Function 15, subfunction 9 =====================
|
||||||
|
============= Redraws a rectangular part of the background ===========
|
||||||
|
======================================================================
|
||||||
|
Parameters:
|
||||||
|
* eax = 15 - function number
|
||||||
|
* ebx = 9 - subfunction number
|
||||||
|
* ecx = [left]*65536 + [right]
|
||||||
|
* edx = [top]*65536 + [bottom]
|
||||||
|
Returned value:
|
||||||
|
* function does not return value
|
||||||
|
Remarks:
|
||||||
|
* (left,top) are coordinates of the left upper corner,
|
||||||
|
(right,bottom) are coordinates of the right lower one.
|
||||||
|
* If parameters are set incorrectly then background is not redrawn.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
=============== Function 16 - save ramdisk on a floppy. ==============
|
=============== Function 16 - save ramdisk on a floppy. ==============
|
||||||
======================================================================
|
======================================================================
|
||||||
@ -1063,6 +1108,36 @@ Remarks:
|
|||||||
* One can restore and activate window simultaneously with
|
* One can restore and activate window simultaneously with
|
||||||
subfunction 3 (which requires slot number).
|
subfunction 3 (which requires slot number).
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
======== Function 18, subfunction 23 - minimize all windows. ==========
|
||||||
|
======================================================================
|
||||||
|
Parameters:
|
||||||
|
* eax = 18 - function number
|
||||||
|
* ebx = 23 - subfunction number
|
||||||
|
Returned value:
|
||||||
|
* eax = 0 - all windows have been minimized before a function call
|
||||||
|
* eax = N - number of windows minimized from function
|
||||||
|
Remarks:
|
||||||
|
* Window of special thread (name begin to symbol @) is not minimize.
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
======= Function 18, subfunction 24 - set limits of screen. ==========
|
||||||
|
======================================================================
|
||||||
|
Parameters:
|
||||||
|
* eax = 18 - function number
|
||||||
|
* ebx = 24 - subfunction number
|
||||||
|
* ecx = new X size
|
||||||
|
* edx = new Y size
|
||||||
|
Returned value:
|
||||||
|
* function does not return value
|
||||||
|
Remarks:
|
||||||
|
* The function does not change the physical size of the video mode.
|
||||||
|
It is designed for non-standard displays which display the image
|
||||||
|
partially.
|
||||||
|
* The sizes specified in the function should not exceed the sizes
|
||||||
|
of the current video mode, otherwise the function will not change
|
||||||
|
anything.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
==================== Function 20 - MIDI interface. ===================
|
==================== Function 20 - MIDI interface. ===================
|
||||||
======================================================================
|
======================================================================
|
||||||
@ -1492,6 +1567,26 @@ Remarks:
|
|||||||
* The function is supported only for ATAPI devices (CD and DVD).
|
* The function is supported only for ATAPI devices (CD and DVD).
|
||||||
* An example of usage of the function is the application CD_tray.
|
* An example of usage of the function is the application CD_tray.
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
======= Function 25 - put image area on the background layer. ========
|
||||||
|
======================================================================
|
||||||
|
Paramters:
|
||||||
|
* eax = 25 - function number
|
||||||
|
* ebx = pointer to the previously allocated memory area,
|
||||||
|
where placed the source images in a format BBGGRRTTBBGGRRTT...
|
||||||
|
* ecx = [size on axis x]*65536 + [size on axis y]
|
||||||
|
* edx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
||||||
|
Returned value:
|
||||||
|
* function does not return value
|
||||||
|
Remarks:
|
||||||
|
* Coordinates of the image are coordinates of the upper left corner
|
||||||
|
of the image relative to the screen.
|
||||||
|
* Size of the image in bytes is 4*xsize*ysize
|
||||||
|
* TT - byte pointer of transparency, at current version:
|
||||||
|
1 to FF - opaque, 0 - transparent.
|
||||||
|
* The function places the image directly to LFB. It is not for
|
||||||
|
background image f.15. Options f.15 to f.25 does not make sense.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
======== Function 26, subfunction 1 - get MPU MIDI base port. ========
|
======== Function 26, subfunction 1 - get MPU MIDI base port. ========
|
||||||
======================================================================
|
======================================================================
|
||||||
@ -1681,6 +1776,19 @@ Remarks:
|
|||||||
* At process/thread creation the current folder will be inherited
|
* At process/thread creation the current folder will be inherited
|
||||||
from the parent.
|
from the parent.
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
========= Function 34 - who owner the pixel on the screen. ===========
|
||||||
|
======================================================================
|
||||||
|
Parameters:
|
||||||
|
* eax = 34 - function number
|
||||||
|
* ebx = x-coordinate (relative to the display)
|
||||||
|
* ecx = y-coordinate (relative to the display)
|
||||||
|
|
||||||
|
Returned value:
|
||||||
|
* eax = 0x000000XX - owner of pixel the slot window N
|
||||||
|
If incorrect values ebx and ecx then function returns 0
|
||||||
|
* The function takes the value from the area [_WinMapAddress]
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
======= Function 35 - read the color of a pixel on the screen. =======
|
======= Function 35 - read the color of a pixel on the screen. =======
|
||||||
======================================================================
|
======================================================================
|
||||||
@ -3221,7 +3329,7 @@ Parameters:
|
|||||||
* ebx = pointer to the image
|
* ebx = pointer to the image
|
||||||
* ecx = [size on axis x]*65536 + [size on axis y]
|
* ecx = [size on axis x]*65536 + [size on axis y]
|
||||||
* edx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
* edx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
||||||
* esi = number of bits per pixel, must be 1,2,4,8,15,16,24 or 32
|
* esi = number of bits per pixel, must be 1,2,4,8,9,15,16,24 or 32;
|
||||||
* edi = pointer to palette (2 to the power esi colors 0x00RRGGBB);
|
* edi = pointer to palette (2 to the power esi colors 0x00RRGGBB);
|
||||||
ignored when esi > 8
|
ignored when esi > 8
|
||||||
* ebp = offset of next row data relative to previous row data
|
* ebp = offset of next row data relative to previous row data
|
||||||
@ -3242,6 +3350,9 @@ Remarks:
|
|||||||
corresponds to first pixel.
|
corresponds to first pixel.
|
||||||
* Format of image with 8 bits per pixel: each byte of image is
|
* Format of image with 8 bits per pixel: each byte of image is
|
||||||
index in the palette.
|
index in the palette.
|
||||||
|
* Format of image with 9 bits per pixel: array of one byte values;
|
||||||
|
each byte (8 bit) represents the intensity of gray for one pixel;
|
||||||
|
this format is equal to 8bpp without palette.
|
||||||
* Format of image with 15 bits per pixel: the color of each pixel
|
* Format of image with 15 bits per pixel: the color of each pixel
|
||||||
is coded as (bit representation) 0RRRRRGGGGGBBBBB - 5 bits per
|
is coded as (bit representation) 0RRRRRGGGGGBBBBB - 5 bits per
|
||||||
each color.
|
each color.
|
||||||
@ -3340,6 +3451,26 @@ Remarks:
|
|||||||
If other application has defined the same combination, it will
|
If other application has defined the same combination, it will
|
||||||
still receive notices.
|
still receive notices.
|
||||||
|
|
||||||
|
--------------- Subfunction 6 - block the normal input. --------------
|
||||||
|
Parameters:
|
||||||
|
* eax = 66 - function number
|
||||||
|
* ebx = 6 - subfunction number
|
||||||
|
Returned value:
|
||||||
|
* function does not return value
|
||||||
|
Remarks:
|
||||||
|
* Blocking the normal keyboard input for installed hotkeys
|
||||||
|
* To emulate a mouse via the keyboard, the application MOUSEMUL
|
||||||
|
|
||||||
|
------------ Subfunction 7 - unlock the normal input. ----------------
|
||||||
|
Parameters:
|
||||||
|
* eax = 66 - function number
|
||||||
|
* ebx = 7 - subfunction number
|
||||||
|
Returned value:
|
||||||
|
* function does not return value
|
||||||
|
Remarks:
|
||||||
|
* Unlocking the results of the f. 66.6
|
||||||
|
* To emulate a mouse via the keyboard, the application MOUSEMUL
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
========= Function 67 - change position/sizes of the window. =========
|
========= Function 67 - change position/sizes of the window. =========
|
||||||
======================================================================
|
======================================================================
|
||||||
@ -3595,6 +3726,21 @@ Remarks:
|
|||||||
* The contents of the block are unchanged up to the shorter of
|
* The contents of the block are unchanged up to the shorter of
|
||||||
the new and old sizes.
|
the new and old sizes.
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
=========== Function 68, subfunction 21 - load driver PE. ============
|
||||||
|
======================================================================
|
||||||
|
Parameters:
|
||||||
|
* eax = 68 - function number
|
||||||
|
* ebx = 21 - subfunction number
|
||||||
|
* ecx = pointer to ASCIIZ-string with driver name
|
||||||
|
* edx = pointer to command line
|
||||||
|
Returned value:
|
||||||
|
* eax = 0 - failed
|
||||||
|
* otherwise eax = driver handle
|
||||||
|
Remarks:
|
||||||
|
* If the driver was not loaded yet, it is loaded;
|
||||||
|
if the driver was loaded yet, nothing happens.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
======== Function 68, subfunction 22 - open named memory area. =======
|
======== Function 68, subfunction 22 - open named memory area. =======
|
||||||
======================================================================
|
======================================================================
|
||||||
@ -4430,9 +4576,7 @@ Codes of events:
|
|||||||
are read out by function 17)
|
are read out by function 17)
|
||||||
* 4 = reserved (in current implementation never comes even after
|
* 4 = reserved (in current implementation never comes even after
|
||||||
unmasking by function 40)
|
unmasking by function 40)
|
||||||
* 5 = the desktop background is redrawed (is reset automatically
|
* 5 = kernel finished redrawing of the desktop background
|
||||||
after redraw, so if in redraw time program does not wait and
|
|
||||||
does not check events, it will not remark this event)
|
|
||||||
* 6 = mouse event (something happened - button pressing or moving;
|
* 6 = mouse event (something happened - button pressing or moving;
|
||||||
is reset at reading)
|
is reset at reading)
|
||||||
* 7 = IPC event (see function 60 -
|
* 7 = IPC event (see function 60 -
|
||||||
|
@ -80,6 +80,9 @@ kernel_export \
|
|||||||
LoadFile,\
|
LoadFile,\
|
||||||
SendEvent,\
|
SendEvent,\
|
||||||
SetMouseData,\
|
SetMouseData,\
|
||||||
|
SetKeyboardData,\
|
||||||
|
RegKeyboard,\
|
||||||
|
DelKeyboard,\
|
||||||
Sleep,\
|
Sleep,\
|
||||||
GetTimerTicks,\
|
GetTimerTicks,\
|
||||||
\
|
\
|
||||||
@ -92,4 +95,8 @@ kernel_export \
|
|||||||
\
|
\
|
||||||
LFBAddress,\
|
LFBAddress,\
|
||||||
GetDisplay,\
|
GetDisplay,\
|
||||||
SetScreen
|
SetScreen,\
|
||||||
|
\
|
||||||
|
DiskAdd,\
|
||||||
|
DiskMediaChanged,\
|
||||||
|
DiskDel
|
||||||
|
@ -348,11 +348,18 @@ align 4
|
|||||||
cmp [edi+inp_size], 12
|
cmp [edi+inp_size], 12
|
||||||
jne .fail
|
jne .fail
|
||||||
|
|
||||||
mov eax, [ebx]
|
mov eax, [ebx+4]
|
||||||
mov ebx, [ebx+4]
|
mov ebx, [ebx+8]
|
||||||
|
|
||||||
|
pushfd
|
||||||
|
cli
|
||||||
mov dword [edx+STREAM.time_base], eax
|
mov dword [edx+STREAM.time_base], eax
|
||||||
mov dword [edx+STREAM.time_base+4], ebx
|
mov dword [edx+STREAM.time_base+4], ebx
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
|
mov dword [edx+STREAM.time_stamp], eax
|
||||||
|
mov dword [edx+STREAM.time_stamp+4], eax
|
||||||
|
popfd
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;;
|
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
|
||||||
;; Distributed under terms of the GNU General Public License ;;
|
;; Distributed under terms of the GNU General Public License ;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
@ -93,8 +93,8 @@ if DEBUG
|
|||||||
mov esi, msgErrAtchIRQ
|
mov esi, msgErrAtchIRQ
|
||||||
call SysMsgBoardStr
|
call SysMsgBoardStr
|
||||||
|
|
||||||
stdcall GetIntHandler, sb_irq_num
|
; stdcall GetIntHandler, sb_irq_num
|
||||||
call SysMsgBoardNum
|
; call SysMsgBoardNum
|
||||||
|
|
||||||
jmp .stop
|
jmp .stop
|
||||||
@@:
|
@@:
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -634,31 +634,34 @@ fat_find_lfn:
|
|||||||
; [esp+4] = next
|
; [esp+4] = next
|
||||||
; [esp+8] = first
|
; [esp+8] = first
|
||||||
; [esp+C]... - possibly parameters for first and next
|
; [esp+C]... - possibly parameters for first and next
|
||||||
; out: CF=1 - file not found
|
; out: CF=1 - file not found, eax=error code
|
||||||
; else CF=0, esi->next name component, edi->direntry
|
; else CF=0, esi->next name component, edi->direntry
|
||||||
pusha
|
pusha
|
||||||
lea eax, [esp+0Ch+20h]
|
lea eax, [esp+0Ch+20h]
|
||||||
call dword [eax-4]
|
call dword [eax-4]
|
||||||
jc .reterr
|
jc .reterr
|
||||||
sub esp, 262*2 ; reserve place for LFN
|
sub esp, 262*2 ; reserve place for LFN
|
||||||
mov ebp, esp
|
|
||||||
push 0 ; for fat_get_name: read ASCII name
|
push 0 ; for fat_get_name: read ASCII name
|
||||||
.l1:
|
.l1:
|
||||||
|
lea ebp, [esp+4]
|
||||||
call fat_get_name
|
call fat_get_name
|
||||||
jc .l2
|
jc .l2
|
||||||
call fat_compare_name
|
call fat_compare_name
|
||||||
jz .found
|
jz .found
|
||||||
.l2:
|
.l2:
|
||||||
|
mov ebp, [esp+8+262*2+4]
|
||||||
lea eax, [esp+0Ch+20h+262*2+4]
|
lea eax, [esp+0Ch+20h+262*2+4]
|
||||||
call dword [eax-8]
|
call dword [eax-8]
|
||||||
jnc .l1
|
jnc .l1
|
||||||
add esp, 262*2+4
|
add esp, 262*2+4
|
||||||
.reterr:
|
.reterr:
|
||||||
|
mov [esp+28], eax
|
||||||
stc
|
stc
|
||||||
popa
|
popa
|
||||||
ret
|
ret
|
||||||
.found:
|
.found:
|
||||||
add esp, 262*2+4
|
add esp, 262*2+4
|
||||||
|
mov ebp, [esp+8]
|
||||||
; if this is LFN entry, advance to true entry
|
; if this is LFN entry, advance to true entry
|
||||||
cmp byte [edi+11], 0xF
|
cmp byte [edi+11], 0xF
|
||||||
jnz @f
|
jnz @f
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -169,10 +169,6 @@ endg
|
|||||||
|
|
||||||
fs_info: ;start of code - Mihasik
|
fs_info: ;start of code - Mihasik
|
||||||
push eax
|
push eax
|
||||||
cmp [eax+21], byte 'h'
|
|
||||||
je fs_info_h
|
|
||||||
cmp [eax+21], byte 'H'
|
|
||||||
je fs_info_h
|
|
||||||
cmp [eax+21], byte 'r'
|
cmp [eax+21], byte 'r'
|
||||||
je fs_info_r
|
je fs_info_r
|
||||||
cmp [eax+21], byte 'R'
|
cmp [eax+21], byte 'R'
|
||||||
@ -189,9 +185,6 @@ endg
|
|||||||
mov ebx, 2847 ;total clusters
|
mov ebx, 2847 ;total clusters
|
||||||
mov edx, 512 ;cluster size
|
mov edx, 512 ;cluster size
|
||||||
xor eax, eax ;always 0
|
xor eax, eax ;always 0
|
||||||
jmp fs_info1
|
|
||||||
fs_info_h: ;if harddisk
|
|
||||||
call get_hd_info
|
|
||||||
fs_info1:
|
fs_info1:
|
||||||
pop edi
|
pop edi
|
||||||
mov [esp+36], eax
|
mov [esp+36], eax
|
||||||
@ -437,32 +430,6 @@ hd_err_return:
|
|||||||
jmp file_system_return
|
jmp file_system_return
|
||||||
@@:
|
@@:
|
||||||
|
|
||||||
cmp dword [esp+20], 0; READ
|
|
||||||
jne fs_noharddisk_read
|
|
||||||
|
|
||||||
mov eax, [esp+0] ; /fname
|
|
||||||
lea edi, [eax+12]
|
|
||||||
mov byte [eax], 0 ; path to asciiz
|
|
||||||
inc eax ; filename start
|
|
||||||
|
|
||||||
mov ebx, [esp+12] ; count to read
|
|
||||||
mov ecx, [esp+8] ; buffer
|
|
||||||
mov edx, [esp+4]
|
|
||||||
add edx, 12*2 ; dir start
|
|
||||||
sub edi, edx ; path length
|
|
||||||
mov esi, [esp+16] ; blocks to read
|
|
||||||
|
|
||||||
call file_read
|
|
||||||
|
|
||||||
mov edi, [esp+0]
|
|
||||||
mov byte [edi], '/'
|
|
||||||
|
|
||||||
call free_hd_channel
|
|
||||||
and [hd1_status], 0
|
|
||||||
jmp file_system_return
|
|
||||||
|
|
||||||
fs_noharddisk_read:
|
|
||||||
|
|
||||||
call free_hd_channel
|
call free_hd_channel
|
||||||
and [hd1_status], 0
|
and [hd1_status], 0
|
||||||
|
|
||||||
|
@ -7,6 +7,19 @@
|
|||||||
|
|
||||||
$Revision$
|
$Revision$
|
||||||
|
|
||||||
|
ERROR_SUCCESS = 0
|
||||||
|
ERROR_DISK_BASE = 1
|
||||||
|
ERROR_UNSUPPORTED_FS = 2
|
||||||
|
ERROR_UNKNOWN_FS = 3
|
||||||
|
ERROR_PARTITION = 4
|
||||||
|
ERROR_FILE_NOT_FOUND = 5
|
||||||
|
ERROR_END_OF_FILE = 6
|
||||||
|
ERROR_MEMORY_POINTER = 7
|
||||||
|
ERROR_DISK_FULL = 8
|
||||||
|
ERROR_FAT_TABLE = 9 ;deprecated
|
||||||
|
ERROR_FS_FAIL = 9
|
||||||
|
ERROR_ACCESS_DENIED = 10
|
||||||
|
ERROR_DEVICE = 11
|
||||||
|
|
||||||
image_of_eax EQU esp+32
|
image_of_eax EQU esp+32
|
||||||
image_of_ebx EQU esp+20
|
image_of_ebx EQU esp+20
|
||||||
|
@ -33,24 +33,8 @@ align 4
|
|||||||
fs_dependent_data_start:
|
fs_dependent_data_start:
|
||||||
; FATxx data
|
; FATxx data
|
||||||
|
|
||||||
SECTORS_PER_FAT dd 0x1f3a
|
.partition dd ?
|
||||||
NUMBER_OF_FATS dd 0x2
|
rb 80
|
||||||
SECTORS_PER_CLUSTER dd 0x8
|
|
||||||
BYTES_PER_SECTOR dd 0x200 ; Note: if BPS <> 512 need lots of changes
|
|
||||||
ROOT_CLUSTER dd 2 ; first rootdir cluster
|
|
||||||
FAT_START dd 0 ; start of fat table
|
|
||||||
ROOT_START dd 0 ; start of rootdir (only fat16)
|
|
||||||
ROOT_SECTORS dd 0 ; count of rootdir sectors (only fat16)
|
|
||||||
DATA_START dd 0 ; start of data area (=first cluster 2)
|
|
||||||
LAST_CLUSTER dd 0 ; last availabe cluster
|
|
||||||
ADR_FSINFO dd 0 ; used only by fat32
|
|
||||||
|
|
||||||
fatRESERVED dd 0x0FFFFFF6
|
|
||||||
fatBAD dd 0x0FFFFFF7
|
|
||||||
fatEND dd 0x0FFFFFF8
|
|
||||||
fatMASK dd 0x0FFFFFFF
|
|
||||||
|
|
||||||
fatStartScan dd 2
|
|
||||||
|
|
||||||
fs_dependent_data_end:
|
fs_dependent_data_end:
|
||||||
file_system_data_size = $ - PARTITION_START
|
file_system_data_size = $ - PARTITION_START
|
||||||
@ -88,7 +72,6 @@ ext2_data:
|
|||||||
.block_size dd ?
|
.block_size dd ?
|
||||||
.count_block_in_block dd ?
|
.count_block_in_block dd ?
|
||||||
.blocks_per_group dd ?
|
.blocks_per_group dd ?
|
||||||
.inodes_per_group dd ?
|
|
||||||
.global_desc_table dd ?
|
.global_desc_table dd ?
|
||||||
.root_inode dd ? ; pointer to root inode in memory
|
.root_inode dd ? ; pointer to root inode in memory
|
||||||
.inode_size dd ?
|
.inode_size dd ?
|
||||||
@ -427,108 +410,27 @@ boot_read_ok:
|
|||||||
cmp [hd_error], 0
|
cmp [hd_error], 0
|
||||||
jnz problem_fat_dec_count
|
jnz problem_fat_dec_count
|
||||||
|
|
||||||
cmp word [ebx+0x1fe], 0xaa55; is it valid boot sector?
|
push 0
|
||||||
jnz problem_fat_dec_count
|
mov eax, [PARTITION_END]
|
||||||
|
sub eax, [PARTITION_START]
|
||||||
movzx eax, word [ebx+0xe]; sectors reserved
|
inc eax
|
||||||
add eax, [PARTITION_START]
|
push eax
|
||||||
mov [FAT_START], eax; fat_start = partition_start + reserved
|
push 0
|
||||||
|
push [PARTITION_START]
|
||||||
movzx eax, byte [ebx+0xd]; sectors per cluster
|
push ebp
|
||||||
|
push ebp
|
||||||
|
mov ebp, esp
|
||||||
|
mov esi, 'old' ; special value: there is no DISK structure
|
||||||
|
push 1 ; bootsector read successfully
|
||||||
|
call fat_create_partition
|
||||||
|
add esp, 4*7
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz problem_fat_dec_count
|
jz problem_fat_dec_count
|
||||||
mov [SECTORS_PER_CLUSTER], eax
|
mov [fs_dependent_data_start.partition], eax
|
||||||
|
mov al, [eax+FAT.fs_type]
|
||||||
movzx ecx, word [ebx+0xb]; bytes per sector
|
mov [fs_type], al
|
||||||
cmp ecx, 0x200
|
|
||||||
jnz problem_fat_dec_count
|
|
||||||
mov [BYTES_PER_SECTOR], ecx
|
|
||||||
|
|
||||||
movzx eax, word [ebx+0x11]; count of rootdir entries (=0 fat32)
|
|
||||||
mov edx, 32
|
|
||||||
mul edx
|
|
||||||
dec ecx
|
|
||||||
add eax, ecx ; round up if not equal count
|
|
||||||
inc ecx ; bytes per sector
|
|
||||||
div ecx
|
|
||||||
mov [ROOT_SECTORS], eax; count of rootdir sectors
|
|
||||||
|
|
||||||
movzx eax, word [ebx+0x16]; sectors per fat <65536
|
|
||||||
test eax, eax
|
|
||||||
jnz fat16_fatsize
|
|
||||||
mov eax, [ebx+0x24] ; sectors per fat
|
|
||||||
fat16_fatsize:
|
|
||||||
mov [SECTORS_PER_FAT], eax
|
|
||||||
|
|
||||||
movzx eax, byte [ebx+0x10]; number of fats
|
|
||||||
test eax, eax ; if 0 it's not fat partition
|
|
||||||
jz problem_fat_dec_count
|
|
||||||
mov [NUMBER_OF_FATS], eax
|
|
||||||
imul eax, [SECTORS_PER_FAT]
|
|
||||||
add eax, [FAT_START]
|
|
||||||
mov [ROOT_START], eax; rootdir = fat_start + fat_size * fat_count
|
|
||||||
add eax, [ROOT_SECTORS]; rootdir sectors should be 0 on fat32
|
|
||||||
mov [DATA_START], eax; data area = rootdir + rootdir_size
|
|
||||||
|
|
||||||
movzx eax, word [ebx+0x13]; total sector count <65536
|
|
||||||
test eax, eax
|
|
||||||
jnz fat16_total
|
|
||||||
mov eax, [ebx+0x20] ; total sector count
|
|
||||||
fat16_total:
|
|
||||||
add eax, [PARTITION_START]
|
|
||||||
dec eax
|
|
||||||
mov [PARTITION_END], eax
|
|
||||||
inc eax
|
|
||||||
sub eax, [DATA_START]; eax = count of data sectors
|
|
||||||
xor edx, edx
|
|
||||||
div dword [SECTORS_PER_CLUSTER]
|
|
||||||
inc eax
|
|
||||||
mov [LAST_CLUSTER], eax
|
|
||||||
dec eax ; cluster count
|
|
||||||
mov [fatStartScan], 2
|
|
||||||
|
|
||||||
; limits by Microsoft Hardware White Paper v1.03
|
|
||||||
cmp eax, 4085 ; 0xff5
|
|
||||||
jb problem_fat_dec_count; fat12 not supported
|
|
||||||
cmp eax, 65525 ; 0xfff5
|
|
||||||
jb fat16_partition
|
|
||||||
|
|
||||||
fat32_partition:
|
|
||||||
mov eax, [ebx+0x2c] ; rootdir cluster
|
|
||||||
mov [ROOT_CLUSTER], eax
|
|
||||||
movzx eax, word [ebx+0x30]; fs info sector
|
|
||||||
add eax, [PARTITION_START]
|
|
||||||
mov [ADR_FSINFO], eax
|
|
||||||
call hd_read
|
|
||||||
mov eax, [ebx+0x1ec]
|
|
||||||
cmp eax, -1
|
|
||||||
jz @f
|
|
||||||
mov [fatStartScan], eax
|
|
||||||
@@:
|
|
||||||
|
|
||||||
popad
|
popad
|
||||||
|
|
||||||
mov [fatRESERVED], 0x0FFFFFF6
|
|
||||||
mov [fatBAD], 0x0FFFFFF7
|
|
||||||
mov [fatEND], 0x0FFFFFF8
|
|
||||||
mov [fatMASK], 0x0FFFFFFF
|
|
||||||
mov [fs_type], 32 ; Fat32
|
|
||||||
call free_hd_channel
|
call free_hd_channel
|
||||||
mov [hd1_status], 0 ; free
|
mov [hd1_status], 0 ; free
|
||||||
ret
|
ret
|
||||||
|
|
||||||
fat16_partition:
|
|
||||||
xor eax, eax
|
|
||||||
mov [ROOT_CLUSTER], eax
|
|
||||||
|
|
||||||
popad
|
|
||||||
|
|
||||||
mov [fatRESERVED], 0x0000FFF6
|
|
||||||
mov [fatBAD], 0x0000FFF7
|
|
||||||
mov [fatEND], 0x0000FFF8
|
|
||||||
mov [fatMASK], 0x0000FFFF
|
|
||||||
mov [fs_type], 16 ; Fat16
|
|
||||||
call free_hd_channel
|
|
||||||
mov [hd1_status], 0 ; free
|
|
||||||
ret
|
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ endg
|
|||||||
EV_SPACE = 512
|
EV_SPACE = 512
|
||||||
FreeEvents = event_start-EVENT.fd ; "âèðòóàëüíûé" event, èñïîëüçóþòñÿ òîëüêî ïîëÿ:
|
FreeEvents = event_start-EVENT.fd ; "âèðòóàëüíûé" event, èñïîëüçóþòñÿ òîëüêî ïîëÿ:
|
||||||
; FreeEvents.fd=event_start è FreeEvents.bk=event_end
|
; FreeEvents.fd=event_start è FreeEvents.bk=event_end
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
init_events: ;; used from kernel.asm
|
init_events: ;; used from kernel.asm
|
||||||
stdcall kernel_alloc, EV_SPACE*sizeof.EVENT
|
stdcall kernel_alloc, EV_SPACE*sizeof.EVENT
|
||||||
@ -32,7 +33,9 @@ init_events: ;; used from kernel.asm
|
|||||||
mov ecx, EV_SPACE ; current - in allocated space
|
mov ecx, EV_SPACE ; current - in allocated space
|
||||||
mov ebx, FreeEvents ; previos - íà÷àëî ñïèñêà
|
mov ebx, FreeEvents ; previos - íà÷àëî ñïèñêà
|
||||||
push ebx ; îíî æå è êîíåö ïîòîì áóäåò
|
push ebx ; îíî æå è êîíåö ïîòîì áóäåò
|
||||||
@@:
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
mov [ebx+EVENT.fd], eax
|
mov [ebx+EVENT.fd], eax
|
||||||
mov [eax+EVENT.bk], ebx
|
mov [eax+EVENT.bk], ebx
|
||||||
mov ebx, eax ; previos <- current
|
mov ebx, eax ; previos <- current
|
||||||
@ -41,14 +44,16 @@ init_events: ;; used from kernel.asm
|
|||||||
pop eax ; âîò îíî êîíöîì è ñòàëî
|
pop eax ; âîò îíî êîíöîì è ñòàëî
|
||||||
mov [ebx+EVENT.fd], eax
|
mov [ebx+EVENT.fd], eax
|
||||||
mov [eax+EVENT.bk], ebx
|
mov [eax+EVENT.bk], ebx
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
.fail:
|
.fail:
|
||||||
ret
|
ret
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
EVENT_WATCHED equ 0x10000000 ;áèò 28
|
EVENT_WATCHED equ 0x10000000 ;áèò 28
|
||||||
EVENT_SIGNALED equ 0x20000000 ;áèò 29
|
EVENT_SIGNALED equ 0x20000000 ;áèò 29
|
||||||
MANUAL_RESET equ 0x40000000 ;áèò 30
|
MANUAL_RESET equ 0x40000000 ;áèò 30
|
||||||
MANUAL_DESTROY equ 0x80000000 ;áèò 31
|
MANUAL_DESTROY equ 0x80000000 ;áèò 31
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
create_event: ;; EXPORT use
|
create_event: ;; EXPORT use
|
||||||
;info:
|
;info:
|
||||||
@ -67,7 +72,8 @@ create_event: ;; EXPORT use
|
|||||||
mov edx, [edx+TASKDATA.pid]
|
mov edx, [edx+TASKDATA.pid]
|
||||||
pushfd
|
pushfd
|
||||||
cli
|
cli
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
set_event: ;; INTERNAL use !!! don't use for Call
|
set_event: ;; INTERNAL use !!! don't use for Call
|
||||||
;info:
|
;info:
|
||||||
; Áåðåì íîâûé event èç FreeEvents, çàïîëíÿåì åãî ïîëÿ, êàê óêàçàíî â ecx,edx,esi
|
; Áåðåì íîâûé event èç FreeEvents, çàïîëíÿåì åãî ïîëÿ, êàê óêàçàíî â ecx,edx,esi
|
||||||
@ -89,7 +95,9 @@ set_event: ;; INTERNAL use !!! don't use
|
|||||||
call init_events
|
call init_events
|
||||||
popad
|
popad
|
||||||
jz RemoveEventTo.break ; POPF+RET
|
jz RemoveEventTo.break ; POPF+RET
|
||||||
@@:
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
mov eax, [eax+EVENT.fd]
|
mov eax, [eax+EVENT.fd]
|
||||||
mov [eax+EVENT.magic], 'EVNT'
|
mov [eax+EVENT.magic], 'EVNT'
|
||||||
mov [eax+EVENT.destroy], destroy_event.internal
|
mov [eax+EVENT.destroy], destroy_event.internal
|
||||||
@ -103,7 +111,8 @@ set_event: ;; INTERNAL use !!! don't use
|
|||||||
mov ecx, (sizeof.EVENT -EVENT.code)/4
|
mov ecx, (sizeof.EVENT -EVENT.code)/4
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
RemoveEventTo: ;; INTERNAL use !!! don't use for Call
|
RemoveEventTo: ;; INTERNAL use !!! don't use for Call
|
||||||
;param:
|
;param:
|
||||||
; eax - óêàçàòåëü íà event, ÊÎÒÎÐÛÉ âñòàâëÿåì
|
; eax - óêàçàòåëü íà event, ÊÎÒÎÐÛÉ âñòàâëÿåì
|
||||||
@ -118,10 +127,12 @@ RemoveEventTo: ;; INTERNAL use !!! don't use
|
|||||||
xchg ecx, [eax+EVENT.fd] ; Self.fd=NewRight, ecx=OldRight
|
xchg ecx, [eax+EVENT.fd] ; Self.fd=NewRight, ecx=OldRight
|
||||||
mov [ebx+EVENT.fd], ecx ; OldLeft.fd=OldRight
|
mov [ebx+EVENT.fd], ecx ; OldLeft.fd=OldRight
|
||||||
mov [ecx+EVENT.bk], ebx ; OldRight.bk=OldLeft
|
mov [ecx+EVENT.bk], ebx ; OldRight.bk=OldLeft
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
.break:
|
.break:
|
||||||
popfd
|
popfd
|
||||||
ret
|
ret
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
NotDummyTest: ;; INTERNAL use (not returned for fail !!!)
|
NotDummyTest: ;; INTERNAL use (not returned for fail !!!)
|
||||||
pop edi
|
pop edi
|
||||||
@ -129,6 +140,8 @@ NotDummyTest: ;; INTERNAL use (not returned
|
|||||||
mov ebx, eax
|
mov ebx, eax
|
||||||
mov eax, [ebx+EVENT.pid]
|
mov eax, [ebx+EVENT.pid]
|
||||||
push edi
|
push edi
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
.small: ; êðèâî êàê-òî...
|
.small: ; êðèâî êàê-òî...
|
||||||
pop edi
|
pop edi
|
||||||
pushfd
|
pushfd
|
||||||
@ -137,7 +150,7 @@ NotDummyTest: ;; INTERNAL use (not returned
|
|||||||
shl eax, 8
|
shl eax, 8
|
||||||
jz RemoveEventTo.break ; POPF+RET
|
jz RemoveEventTo.break ; POPF+RET
|
||||||
jmp edi ; øòàòíûé âîçâðàò
|
jmp edi ; øòàòíûé âîçâðàò
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
raise_event: ;; EXPORT use
|
raise_event: ;; EXPORT use
|
||||||
;info:
|
;info:
|
||||||
@ -158,19 +171,23 @@ raise_event: ;; EXPORT use
|
|||||||
mov ecx, (sizeof.EVENT -EVENT.code)/4
|
mov ecx, (sizeof.EVENT -EVENT.code)/4
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
@@:
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
test byte[ebx+EVENT.state+3], EVENT_SIGNALED shr 24
|
test byte[ebx+EVENT.state+3], EVENT_SIGNALED shr 24
|
||||||
jnz RemoveEventTo.break ; POPF+RET
|
jnz RemoveEventTo.break ; POPF+RET
|
||||||
bt edx, 28 ;EVENT_WATCHED
|
bt edx, 28 ;EVENT_WATCHED
|
||||||
jnc @f
|
jnc @f
|
||||||
test byte[ebx+EVENT.state+3], EVENT_WATCHED shr 24
|
test byte[ebx+EVENT.state+3], EVENT_WATCHED shr 24
|
||||||
jz RemoveEventTo.break ; POPF+RET
|
jz RemoveEventTo.break ; POPF+RET
|
||||||
@@:
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
or byte[ebx+EVENT.state+3], EVENT_SIGNALED shr 24
|
or byte[ebx+EVENT.state+3], EVENT_SIGNALED shr 24
|
||||||
add eax, SLOT_BASE+APP_EV_OFFSET
|
add eax, SLOT_BASE+APP_EV_OFFSET
|
||||||
xchg eax, ebx
|
xchg eax, ebx
|
||||||
jmp RemoveEventTo
|
jmp RemoveEventTo
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
clear_event: ;; EXPORT use
|
clear_event: ;; EXPORT use
|
||||||
;info:
|
;info:
|
||||||
@ -184,7 +201,7 @@ clear_event: ;; EXPORT use
|
|||||||
and byte[ebx+EVENT.state+3], not((EVENT_SIGNALED+EVENT_WATCHED)shr 24)
|
and byte[ebx+EVENT.state+3], not((EVENT_SIGNALED+EVENT_WATCHED)shr 24)
|
||||||
xchg eax, ebx
|
xchg eax, ebx
|
||||||
jmp RemoveEventTo
|
jmp RemoveEventTo
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
send_event: ;; EXPORT use
|
send_event: ;; EXPORT use
|
||||||
;info:
|
;info:
|
||||||
@ -207,7 +224,7 @@ send_event: ;; EXPORT use
|
|||||||
lea ebx, [eax+SLOT_BASE+APP_EV_OFFSET]
|
lea ebx, [eax+SLOT_BASE+APP_EV_OFFSET]
|
||||||
mov ecx, EVENT_SIGNALED
|
mov ecx, EVENT_SIGNALED
|
||||||
jmp set_event
|
jmp set_event
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
DummyTest: ;; INTERNAL use (not returned for fail !!!)
|
DummyTest: ;; INTERNAL use (not returned for fail !!!)
|
||||||
;param:
|
;param:
|
||||||
@ -217,16 +234,21 @@ DummyTest: ;; INTERNAL use (not returned
|
|||||||
jne @f
|
jne @f
|
||||||
cmp [eax+EVENT.id], ebx
|
cmp [eax+EVENT.id], ebx
|
||||||
je .ret
|
je .ret
|
||||||
@@:
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
pop eax
|
pop eax
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
.ret:
|
.ret:
|
||||||
ret
|
ret
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
Wait_events:
|
Wait_events:
|
||||||
or ebx, -1; infinite timeout
|
or ebx, -1; infinite timeout
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
Wait_events_ex:
|
Wait_events_ex:
|
||||||
;info:
|
;info:
|
||||||
; Îæèäàíèå "àáñòðàêòíîãî" ñîáûòèÿ ÷åðåç ïåðåâîä ñëîòà â 5-þ ïîçèöèþ.
|
; Îæèäàíèå "àáñòðàêòíîãî" ñîáûòèÿ ÷åðåç ïåðåâîä ñëîòà â 5-þ ïîçèöèþ.
|
||||||
@ -260,9 +282,11 @@ Wait_events_ex:
|
|||||||
mov [eax+TASKDATA.state], 5
|
mov [eax+TASKDATA.state], 5
|
||||||
call change_task
|
call change_task
|
||||||
mov eax, [esi+APPDATA.wait_param]
|
mov eax, [esi+APPDATA.wait_param]
|
||||||
@@:
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
ret
|
ret
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
wait_event: ;; EXPORT use
|
wait_event: ;; EXPORT use
|
||||||
;info:
|
;info:
|
||||||
@ -281,7 +305,7 @@ wait_event: ;; EXPORT use
|
|||||||
mov edx, get_event_alone ; wait_test
|
mov edx, get_event_alone ; wait_test
|
||||||
call Wait_events ; timeout ignored
|
call Wait_events ; timeout ignored
|
||||||
jmp wait_finish
|
jmp wait_finish
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
get_event_ex: ;; f68:14
|
get_event_ex: ;; f68:14
|
||||||
;info:
|
;info:
|
||||||
@ -303,6 +327,8 @@ get_event_ex: ;; f68:14
|
|||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
mov byte[edi-(sizeof.EVENT-EVENT.code)+2], cl;clear priority field
|
mov byte[edi-(sizeof.EVENT-EVENT.code)+2], cl;clear priority field
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
wait_finish:
|
wait_finish:
|
||||||
test byte[eax+EVENT.state+3], MANUAL_RESET shr 24
|
test byte[eax+EVENT.state+3], MANUAL_RESET shr 24
|
||||||
jnz get_event_queue.ret ; RET
|
jnz get_event_queue.ret ; RET
|
||||||
@ -314,7 +340,7 @@ wait_finish:
|
|||||||
pushfd
|
pushfd
|
||||||
cli
|
cli
|
||||||
jmp RemoveEventTo
|
jmp RemoveEventTo
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
destroy_event: ;; EXPORT use
|
destroy_event: ;; EXPORT use
|
||||||
;info:
|
;info:
|
||||||
@ -326,6 +352,8 @@ destroy_event: ;; EXPORT use
|
|||||||
; eax - àäðåñ îáúåêòà EVENT (=0 => fail)
|
; eax - àäðåñ îáúåêòà EVENT (=0 => fail)
|
||||||
;scratched: ebx,ecx
|
;scratched: ebx,ecx
|
||||||
call DummyTest ; not returned for fail !!!
|
call DummyTest ; not returned for fail !!!
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
.internal:
|
.internal:
|
||||||
xor ecx, ecx ; clear common header
|
xor ecx, ecx ; clear common header
|
||||||
pushfd
|
pushfd
|
||||||
@ -336,7 +364,7 @@ destroy_event: ;; EXPORT use
|
|||||||
mov [eax+EVENT.id], ecx
|
mov [eax+EVENT.id], ecx
|
||||||
mov ebx, FreeEvents
|
mov ebx, FreeEvents
|
||||||
jmp RemoveEventTo
|
jmp RemoveEventTo
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
get_event_queue:
|
get_event_queue:
|
||||||
;info:
|
;info:
|
||||||
@ -353,9 +381,11 @@ get_event_queue:
|
|||||||
mov eax, [ebx+APPOBJ.bk] ; âûáèðàåì ñ êîíöà, ïî ïðèíöèïó FIFO
|
mov eax, [ebx+APPOBJ.bk] ; âûáèðàåì ñ êîíöà, ïî ïðèíöèïó FIFO
|
||||||
cmp eax, ebx ; empty ???
|
cmp eax, ebx ; empty ???
|
||||||
je get_event_alone.ret0
|
je get_event_alone.ret0
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
.ret:
|
.ret:
|
||||||
ret
|
ret
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
get_event_alone:
|
get_event_alone:
|
||||||
;info:
|
;info:
|
||||||
@ -372,21 +402,27 @@ get_event_alone:
|
|||||||
test byte[eax+EVENT.state+3], EVENT_SIGNALED shr 24
|
test byte[eax+EVENT.state+3], EVENT_SIGNALED shr 24
|
||||||
jnz .ret
|
jnz .ret
|
||||||
or byte[eax+EVENT.state+3], EVENT_WATCHED shr 24
|
or byte[eax+EVENT.state+3], EVENT_WATCHED shr 24
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
.ret0:
|
.ret0:
|
||||||
xor eax, eax; NO event!!!
|
xor eax, eax; NO event!!!
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
.ret:
|
.ret:
|
||||||
ret
|
ret
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
sys_sendwindowmsg: ;; f72
|
sys_sendwindowmsg: ;; f72
|
||||||
dec ebx
|
dec ebx
|
||||||
jnz .ret ;subfunction==1 ?
|
jnz .ret ;subfunction==1 ?
|
||||||
;pushfd ;à íàôèãà?
|
pushfd
|
||||||
cli
|
cli
|
||||||
sub ecx, 2
|
sub ecx, 2
|
||||||
je .sendkey
|
je .sendkey
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz .retf
|
jnz .retf
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
.sendbtn:
|
.sendbtn:
|
||||||
cmp byte[BTN_COUNT], 1
|
cmp byte[BTN_COUNT], 1
|
||||||
jae .result ;overflow
|
jae .result ;overflow
|
||||||
@ -394,18 +430,27 @@ sys_sendwindowmsg: ;; f72
|
|||||||
shl edx, 8
|
shl edx, 8
|
||||||
mov [BTN_BUFF], edx
|
mov [BTN_BUFF], edx
|
||||||
jmp .result
|
jmp .result
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
.sendkey:
|
.sendkey:
|
||||||
movzx eax, byte[KEY_COUNT]
|
movzx eax, byte[KEY_COUNT]
|
||||||
cmp al, 120
|
cmp al, 120
|
||||||
jae .result ;overflow
|
jae .result ;overflow
|
||||||
inc byte[KEY_COUNT]
|
inc byte[KEY_COUNT]
|
||||||
mov [KEY_COUNT+1+eax], dl
|
mov [KEY_COUNT+1+eax], dl
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
.result:
|
.result:
|
||||||
setae byte[esp+32] ;ñ÷èòàåì, ÷òî èñõîäíî: dword[esp+32]==72
|
setae byte[esp+32] ;ñ÷èòàåì, ÷òî èñõîäíî: dword[esp+32]==72
|
||||||
.retf: ;popfd
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
.retf:
|
||||||
|
popfd
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
.ret:
|
.ret:
|
||||||
ret
|
ret
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
sys_getevent: ;; f11
|
sys_getevent: ;; f11
|
||||||
mov ebx, [current_slot];ïîêà ýòî âîïðîñ, ÷åãî êóäû ñóâàòü..........
|
mov ebx, [current_slot];ïîêà ýòî âîïðîñ, ÷åãî êóäû ñóâàòü..........
|
||||||
@ -415,16 +460,18 @@ sys_getevent: ;; f11
|
|||||||
popfd
|
popfd
|
||||||
mov [esp+32], eax
|
mov [esp+32], eax
|
||||||
ret
|
ret
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
sys_waitforevent: ;; f10
|
sys_waitforevent: ;; f10
|
||||||
or ebx, -1; infinite timeout
|
or ebx, -1; infinite timeout
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
sys_wait_event_timeout: ;; f23
|
sys_wait_event_timeout: ;; f23
|
||||||
mov edx, get_event_for_app; wait_test
|
mov edx, get_event_for_app; wait_test
|
||||||
call Wait_events_ex ; ebx - timeout
|
call Wait_events_ex ; ebx - timeout
|
||||||
mov [esp+32], eax
|
mov [esp+32], eax
|
||||||
ret
|
ret
|
||||||
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
get_event_for_app: ;; used from f10,f11,f23
|
get_event_for_app: ;; used from f10,f11,f23
|
||||||
;info:
|
;info:
|
||||||
@ -442,36 +489,52 @@ get_event_for_app: ;; used from f10,f11,f23
|
|||||||
add edi, CURRENT_TASK ; edi is assumed as [TASK_BASE]
|
add edi, CURRENT_TASK ; edi is assumed as [TASK_BASE]
|
||||||
mov ecx, [edi+TASKDATA.event_mask]
|
mov ecx, [edi+TASKDATA.event_mask]
|
||||||
and ecx, 0x7FFFFFFF
|
and ecx, 0x7FFFFFFF
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
.loop: ; ïîêà íå èñ÷åðïàåì âñå áèòû ìàñêè
|
.loop: ; ïîêà íå èñ÷åðïàåì âñå áèòû ìàñêè
|
||||||
bsr eax, ecx ; íàõîäèì íåíóëåâîé áèò ìàñêè (31 -> 0)
|
bsr eax, ecx ; íàõîäèì íåíóëåâîé áèò ìàñêè (31 -> 0)
|
||||||
jz .no_events ; èñ÷åðïàëè âñå áèòû ìàñêè, íî íè÷åãî íå íàøëè ???
|
jz .no_events ; èñ÷åðïàëè âñå áèòû ìàñêè, íî íè÷åãî íå íàøëè ???
|
||||||
btr ecx, eax ; ñáðàñûâàåì ïðîâåðÿåìûé áèò ìàñêè
|
btr ecx, eax ; ñáðàñûâàåì ïðîâåðÿåìûé áèò ìàñêè
|
||||||
; ïåðåõîäèì íà îáðàáîò÷èê ýòîãî (eax) áèòà
|
; ïåðåõîäèì íà îáðàáîò÷èê ýòîãî (eax) áèòà
|
||||||
cmp eax, 9
|
cmp eax, 9
|
||||||
jae .loop ; eax=[9..31], ignored
|
jae .loop ; eax=[9..31], ignored (event 10...32)
|
||||||
|
|
||||||
cmp eax, 3
|
cmp eax, 3
|
||||||
je .loop ; eax=3, ignored
|
je .loop ; eax=3, ignored (event 4)
|
||||||
ja .FlagAutoReset ; eax=[4..8], retvals=eax+1
|
|
||||||
|
cmp eax, 4
|
||||||
|
je .FlagAutoReset ; eax=4, retvals=eax+1 (event 5)
|
||||||
|
|
||||||
|
cmp eax, 5
|
||||||
|
je .mouse_check ; eax=5, retvals=eax+1 (event 6)
|
||||||
|
|
||||||
|
ja .FlagAutoReset ; eax=[6..8], retvals=eax+1 (event 7...9)
|
||||||
|
|
||||||
cmp eax, 1
|
cmp eax, 1
|
||||||
jae .BtKy ; eax=[1,2], retvals=eax+1
|
jae .BtKy ; eax=[1,2], retvals=eax+1 (event 2,3)
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
.WndRedraw: ; eax=0, retval WndRedraw=1
|
.WndRedraw: ; eax=0, retval WndRedraw=1
|
||||||
cmp [edi-twdw+WDATA.fl_redraw], al;al==0
|
cmp [edi-twdw+WDATA.fl_redraw], al;al==0
|
||||||
jne .result
|
jne .result
|
||||||
jmp .loop
|
jmp .loop
|
||||||
.no_events:
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
.no_events:
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
ret
|
ret
|
||||||
|
;--------------------------------------
|
||||||
.FlagAutoReset: ; retvals: BgrRedraw=5, Mouse=6, IPC=7, Stack=8, Debug=9
|
align 4
|
||||||
cmp eax, 5; Mouse 5+1=6
|
.mouse_check: ; Mouse 5+1=6
|
||||||
jne .no_mouse_check
|
|
||||||
push eax
|
push eax
|
||||||
mov eax, [TASK_BASE]
|
mov eax, [TASK_BASE]
|
||||||
mov eax, [eax + TASKDATA.event_mask]
|
mov eax, [eax + TASKDATA.event_mask]
|
||||||
test eax, 0x80000000 ; bit 31: active/inactive filter f.40
|
test eax, 0x80000000 ; bit 31: active/inactive filter f.40
|
||||||
jz @f
|
jz @f
|
||||||
pop eax
|
pop eax
|
||||||
jmp .no_mouse_check
|
jmp .FlagAutoReset
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
@@:
|
@@:
|
||||||
; If the window is captured and moved by the user, then no mouse events!!!
|
; If the window is captured and moved by the user, then no mouse events!!!
|
||||||
mov al, [mouse.active_sys_window.action]
|
mov al, [mouse.active_sys_window.action]
|
||||||
@ -479,16 +542,24 @@ get_event_for_app: ;; used from f10,f11,f23
|
|||||||
test al, al
|
test al, al
|
||||||
pop eax
|
pop eax
|
||||||
jnz .loop
|
jnz .loop
|
||||||
.no_mouse_check:
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
.FlagAutoReset: ; retvals: BgrRedraw=5, IPC=7, Stack=8, Debug=9
|
||||||
btr [ebx+APPDATA.event_mask], eax
|
btr [ebx+APPDATA.event_mask], eax
|
||||||
jnc .loop
|
jnc .loop
|
||||||
.result: ; retval = eax+1
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
.result: ; retval = eax+1
|
||||||
inc eax
|
inc eax
|
||||||
ret
|
ret
|
||||||
.BtKy:
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
.BtKy:
|
||||||
movzx edx, bh
|
movzx edx, bh
|
||||||
movzx edx, word[WIN_STACK+edx*2]
|
movzx edx, word[WIN_STACK+edx*2]
|
||||||
je .Keys ; eax=1, retval Keys=2
|
je .Keys ; eax=1, retval Keys=2
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
.Buttons: ; eax=2, retval Buttons=3
|
.Buttons: ; eax=2, retval Buttons=3
|
||||||
cmp byte[BTN_COUNT], 0
|
cmp byte[BTN_COUNT], 0
|
||||||
je .loop ; empty ???
|
je .loop ; empty ???
|
||||||
@ -501,14 +572,20 @@ get_event_for_app: ;; used from f10,f11,f23
|
|||||||
mov [window_minimize], 1
|
mov [window_minimize], 1
|
||||||
dec byte[BTN_COUNT]
|
dec byte[BTN_COUNT]
|
||||||
jmp .loop
|
jmp .loop
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
.Keys: ; eax==1
|
.Keys: ; eax==1
|
||||||
cmp edx, [TASK_COUNT]
|
cmp edx, [TASK_COUNT]
|
||||||
jne @f ; not Top ???
|
jne @f ; not Top ???
|
||||||
cmp [KEY_COUNT], al; al==1
|
cmp [KEY_COUNT], al; al==1
|
||||||
jae .result ; not empty ???
|
jae .result ; not empty ???
|
||||||
@@:
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
mov edx, hotkey_buffer
|
mov edx, hotkey_buffer
|
||||||
@@:
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
cmp [edx], bh ; bh - slot for testing
|
cmp [edx], bh ; bh - slot for testing
|
||||||
je .result
|
je .result
|
||||||
add edx, 8
|
add edx, 8
|
||||||
@ -516,3 +593,4 @@ get_event_for_app: ;; used from f10,f11,f23
|
|||||||
jb @b
|
jb @b
|
||||||
jmp .loop
|
jmp .loop
|
||||||
;end.
|
;end.
|
||||||
|
;-----------------------------------------------------------------------------
|
@ -16,15 +16,15 @@ dtext_asciiz_esi: ; for skins title out
|
|||||||
jmp dtext.1
|
jmp dtext.1
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org])
|
dtext:
|
||||||
; ebx x & y
|
; ebx x & y
|
||||||
; ecx style ( 0xX0000000 ) & color ( 0x00RRGGBB )
|
; ecx style ( 0xX0000000 ) & color ( 0x00RRGGBB )
|
||||||
; X = ABnnb:
|
; X = ABnnb:
|
||||||
; nn = font
|
; nn = font
|
||||||
; A = 0 <=> output esi characters; otherwise output ASCIIZ string
|
; A = 0 <=> output esi characters; otherwise output ASCIIZ string
|
||||||
; B = 1 <=> fill background with color eax
|
; B = 1 <=> fill background with color eax
|
||||||
; edx start of text
|
; edx start of text
|
||||||
; edi 1 force
|
; edi 1 force or user area for redirect
|
||||||
push eax
|
push eax
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -36,14 +36,17 @@ align 4
|
|||||||
xchg eax, ebx ; eax=x, ebx=y
|
xchg eax, ebx ; eax=x, ebx=y
|
||||||
cmp esi, 255
|
cmp esi, 255
|
||||||
jb .loop
|
jb .loop
|
||||||
|
|
||||||
mov esi, 255
|
mov esi, 255
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.loop:
|
.loop:
|
||||||
test ecx, ecx
|
test ecx, ecx
|
||||||
js .test_asciiz
|
js .test_asciiz
|
||||||
|
|
||||||
dec esi
|
dec esi
|
||||||
js .end
|
js .end
|
||||||
|
|
||||||
jmp @f
|
jmp @f
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@ -53,6 +56,7 @@ align 4
|
|||||||
|
|
||||||
cmp byte [esp+28], 1
|
cmp byte [esp+28], 1
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
dec esi
|
dec esi
|
||||||
js .end
|
js .end
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -63,6 +67,7 @@ align 4
|
|||||||
movzx edx, byte [edx-1]
|
movzx edx, byte [edx-1]
|
||||||
test ecx, 0x10000000
|
test ecx, 0x10000000
|
||||||
jnz .font2
|
jnz .font2
|
||||||
|
|
||||||
mov esi, 9
|
mov esi, 9
|
||||||
lea ebp, [FONT_I+8*edx+edx]
|
lea ebp, [FONT_I+8*edx+edx]
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -75,7 +80,17 @@ align 4
|
|||||||
.pixloop1:
|
.pixloop1:
|
||||||
shr dl, 1
|
shr dl, 1
|
||||||
jz .pixloop1end
|
jz .pixloop1end
|
||||||
|
|
||||||
jnc .nopix
|
jnc .nopix
|
||||||
|
|
||||||
|
test ecx, 0x08000000 ; redirect the output to the user area
|
||||||
|
jz @f
|
||||||
|
|
||||||
|
call draw_text_to_user_area
|
||||||
|
jmp .pixloop1cont
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
|
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
|
||||||
; call [putpixel]
|
; call [putpixel]
|
||||||
call __sys_putpixel
|
call __sys_putpixel
|
||||||
@ -85,8 +100,19 @@ align 4
|
|||||||
.nopix:
|
.nopix:
|
||||||
test ecx, 0x40000000
|
test ecx, 0x40000000
|
||||||
jz .pixloop1cont
|
jz .pixloop1cont
|
||||||
|
|
||||||
push ecx
|
push ecx
|
||||||
mov ecx, [esp+4+20h+20h]
|
mov ecx, [esp+4+20h+20h]
|
||||||
|
|
||||||
|
test ecx, 0x08000000 ; redirect the output to the user area
|
||||||
|
jz @f
|
||||||
|
|
||||||
|
call draw_text_to_user_area
|
||||||
|
pop ecx
|
||||||
|
jmp .pixloop1cont
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
|
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
|
||||||
; call [putpixel]
|
; call [putpixel]
|
||||||
call __sys_putpixel
|
call __sys_putpixel
|
||||||
@ -104,6 +130,7 @@ align 4
|
|||||||
inc ebp
|
inc ebp
|
||||||
dec esi
|
dec esi
|
||||||
jnz .symloop1
|
jnz .symloop1
|
||||||
|
|
||||||
popad
|
popad
|
||||||
add eax, 6
|
add eax, 6
|
||||||
jmp .loop
|
jmp .loop
|
||||||
@ -124,6 +151,15 @@ align 4
|
|||||||
.pixloop2:
|
.pixloop2:
|
||||||
shr dl, 1
|
shr dl, 1
|
||||||
jnc .nopix2
|
jnc .nopix2
|
||||||
|
|
||||||
|
test ecx, 0x08000000 ; redirect the output to the user area
|
||||||
|
jz @f
|
||||||
|
|
||||||
|
call draw_text_to_user_area
|
||||||
|
jmp .pixloop2cont
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
|
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
|
||||||
; call [putpixel]
|
; call [putpixel]
|
||||||
call __sys_putpixel
|
call __sys_putpixel
|
||||||
@ -133,8 +169,19 @@ align 4
|
|||||||
.nopix2:
|
.nopix2:
|
||||||
test ecx, 0x40000000
|
test ecx, 0x40000000
|
||||||
jz .pixloop2cont
|
jz .pixloop2cont
|
||||||
|
|
||||||
push ecx
|
push ecx
|
||||||
mov ecx, [esp+12+20h+20h]
|
mov ecx, [esp+12+20h+20h]
|
||||||
|
|
||||||
|
test ecx, 0x08000000 ; redirect the output to the user area
|
||||||
|
jz @f
|
||||||
|
|
||||||
|
call draw_text_to_user_area
|
||||||
|
pop ecx
|
||||||
|
jmp .pixloop2cont
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
|
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
|
||||||
; call [putpixel]
|
; call [putpixel]
|
||||||
call __sys_putpixel
|
call __sys_putpixel
|
||||||
@ -145,12 +192,14 @@ align 4
|
|||||||
inc eax
|
inc eax
|
||||||
dec esi
|
dec esi
|
||||||
jnz .pixloop2
|
jnz .pixloop2
|
||||||
|
|
||||||
pop esi
|
pop esi
|
||||||
sub eax, esi
|
sub eax, esi
|
||||||
inc ebx
|
inc ebx
|
||||||
inc ebp
|
inc ebp
|
||||||
dec dword [esp]
|
dec dword [esp]
|
||||||
jnz .symloop2
|
jnz .symloop2
|
||||||
|
|
||||||
pop eax
|
pop eax
|
||||||
add dword [esp+28], esi
|
add dword [esp+28], esi
|
||||||
popad
|
popad
|
||||||
@ -162,3 +211,29 @@ align 4
|
|||||||
pop eax
|
pop eax
|
||||||
ret
|
ret
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
; eax = x coordinate
|
||||||
|
; ebx = y coordinate
|
||||||
|
; ecx = ?? RR GG BB
|
||||||
|
; edi = user area
|
||||||
|
align 4
|
||||||
|
draw_text_to_user_area:
|
||||||
|
pushad
|
||||||
|
imul ebx, [edi+0]
|
||||||
|
add eax, ebx
|
||||||
|
shl eax, 2
|
||||||
|
add eax, edi
|
||||||
|
add eax, 8
|
||||||
|
and ecx, 0xffffff
|
||||||
|
or ecx, 0xff000000 ; not transparent
|
||||||
|
mov [eax], ecx ; store pixel
|
||||||
|
popad
|
||||||
|
ret
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
align 4
|
||||||
|
FONT_I:
|
||||||
|
file 'char.mt'
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
align 4
|
||||||
|
FONT_II:
|
||||||
|
file 'char2.mt'
|
||||||
|
;------------------------------------------------------------------------------
|
@ -258,8 +258,8 @@ mouse._.left_button_press_handler: ;///////////////////////////////////////////
|
|||||||
call .calculate_e_delta
|
call .calculate_e_delta
|
||||||
|
|
||||||
.call_window_handler:
|
.call_window_handler:
|
||||||
mov eax, mouse.active_sys_window.old_box
|
; mov eax, mouse.active_sys_window.old_box
|
||||||
call sys_window_start_moving_handler
|
; call sys_window_start_moving_handler
|
||||||
|
|
||||||
.exit:
|
.exit:
|
||||||
ret
|
ret
|
||||||
|
@ -1026,6 +1026,55 @@ align 4
|
|||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
minimize_all_window:
|
||||||
|
push ebx ecx edx esi edi
|
||||||
|
pushfd
|
||||||
|
cli
|
||||||
|
xor edx, edx
|
||||||
|
mov eax, 2 ; we do not minimize the kernel thread N1
|
||||||
|
mov ebx, [TASK_COUNT]
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
.loop:
|
||||||
|
movzx edi, word[WIN_POS + eax * 2]
|
||||||
|
shl edi, 5
|
||||||
|
; it is a unused slot?
|
||||||
|
cmp dword [edi+CURRENT_TASK+TASKDATA.state], 9
|
||||||
|
je @f
|
||||||
|
; it is a hidden thread?
|
||||||
|
lea esi, [edi*8+SLOT_BASE+APPDATA.app_name]
|
||||||
|
cmp [esi], byte '@'
|
||||||
|
je @f
|
||||||
|
; is it already minimized?
|
||||||
|
test [edi + window_data+WDATA.fl_wstate], WSTATE_MINIMIZED
|
||||||
|
jnz @f
|
||||||
|
; no it's not, let's do that
|
||||||
|
or [edi + window_data+WDATA.fl_wstate], WSTATE_MINIMIZED
|
||||||
|
inc edx
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
|
inc eax
|
||||||
|
cmp eax, ebx
|
||||||
|
jbe .loop
|
||||||
|
; If nothing has changed
|
||||||
|
test edx, edx
|
||||||
|
jz @f
|
||||||
|
|
||||||
|
push edx
|
||||||
|
call syscall_display_settings._.calculate_whole_screen
|
||||||
|
call syscall_display_settings._.redraw_whole_screen
|
||||||
|
pop edx
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
|
mov eax, edx
|
||||||
|
popfd
|
||||||
|
pop edi esi edx ecx ebx
|
||||||
|
ret
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
align 4
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
minimize_window: ;/////////////////////////////////////////////////////////////
|
minimize_window: ;/////////////////////////////////////////////////////////////
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
;> eax = window number on screen
|
;> eax = window number on screen
|
||||||
@ -1047,6 +1096,13 @@ minimize_window: ;/////////////////////////////////////////////////////////////
|
|||||||
|
|
||||||
; no it's not, let's do that
|
; no it's not, let's do that
|
||||||
or [edi + WDATA.fl_wstate], WSTATE_MINIMIZED
|
or [edi + WDATA.fl_wstate], WSTATE_MINIMIZED
|
||||||
|
; If the window width is 0, then the action is not needed.
|
||||||
|
cmp [edi + WDATA.box.width], dword 0
|
||||||
|
je @f
|
||||||
|
; If the window height is 0, then the action is not needed.
|
||||||
|
cmp [edi + WDATA.box.height], dword 0
|
||||||
|
je @f
|
||||||
|
|
||||||
mov eax, [edi + WDATA.box.left]
|
mov eax, [edi + WDATA.box.left]
|
||||||
mov [draw_limits.left], eax
|
mov [draw_limits.left], eax
|
||||||
mov ecx, eax
|
mov ecx, eax
|
||||||
@ -1057,11 +1113,20 @@ minimize_window: ;/////////////////////////////////////////////////////////////
|
|||||||
mov edx, ebx
|
mov edx, ebx
|
||||||
add edx, [edi + WDATA.box.height]
|
add edx, [edi + WDATA.box.height]
|
||||||
mov [draw_limits.bottom], edx
|
mov [draw_limits.bottom], edx
|
||||||
call calculatescreen
|
|
||||||
xor esi, esi
|
|
||||||
xor eax, eax
|
|
||||||
call redrawscreen
|
|
||||||
|
|
||||||
|
; DEBUGF 1, "K : minimize_window\n"
|
||||||
|
; DEBUGF 1, "K : dl_left %x\n",[draw_limits.left]
|
||||||
|
; DEBUGF 1, "K : dl_right %x\n",[draw_limits.right]
|
||||||
|
; DEBUGF 1, "K : dl_top %x\n",[draw_limits.top]
|
||||||
|
; DEBUGF 1, "K : dl_bottom %x\n",[draw_limits.bottom]
|
||||||
|
call calculatescreen
|
||||||
|
; xor esi, esi
|
||||||
|
; xor eax, eax
|
||||||
|
mov eax, edi
|
||||||
|
call redrawscreen
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
pop esi edx ecx ebx eax
|
pop esi edx ecx ebx eax
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@ -1266,16 +1331,16 @@ align 4
|
|||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
sys_window_start_moving_handler: ;/////////////////////////////////////////////
|
;sys_window_start_moving_handler: ;/////////////////////////////////////////////
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
;? <description>
|
;? <description>
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
;> eax = old (original) window box
|
;> eax = old (original) window box
|
||||||
;> esi = process slot
|
;> esi = process slot
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
mov edi, eax
|
; mov edi, eax
|
||||||
call window._.draw_negative_box
|
; call window._.draw_negative_box
|
||||||
ret
|
; ret
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
@ -1287,8 +1352,8 @@ sys_window_end_moving_handler: ;///////////////////////////////////////////////
|
|||||||
;> ebx = new (final) window box
|
;> ebx = new (final) window box
|
||||||
;> esi = process slot
|
;> esi = process slot
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
mov edi, ebx
|
; mov edi, ebx
|
||||||
call window._.end_moving__box
|
; call window._.end_moving__box
|
||||||
|
|
||||||
mov edi, esi
|
mov edi, esi
|
||||||
shl edi, 5
|
shl edi, 5
|
||||||
@ -1351,45 +1416,17 @@ window._.invalidate_screen: ;//////////////////////////////////////////////////
|
|||||||
|
|
||||||
; TODO: do we really need `draw_limits`?
|
; TODO: do we really need `draw_limits`?
|
||||||
; Yes, they are used by background drawing code.
|
; Yes, they are used by background drawing code.
|
||||||
mov ecx, [eax + BOX.left]
|
|
||||||
mov edx, [ebx + BOX.left]
|
; we need only to restore the background windows at the old place!
|
||||||
cmp ecx, edx
|
mov ecx, [ebx + BOX.left]
|
||||||
jle @f
|
|
||||||
mov ecx, edx
|
|
||||||
;--------------------------------------
|
|
||||||
align 4
|
|
||||||
@@:
|
|
||||||
mov [draw_limits.left], ecx
|
mov [draw_limits.left], ecx
|
||||||
mov ecx, [eax + BOX.left]
|
add ecx, [ebx + BOX.width]
|
||||||
add ecx, [eax + BOX.width]
|
|
||||||
add edx, [ebx + BOX.width]
|
|
||||||
cmp ecx, edx
|
|
||||||
jae @f
|
|
||||||
mov ecx, edx
|
|
||||||
;--------------------------------------
|
|
||||||
align 4
|
|
||||||
@@:
|
|
||||||
mov [draw_limits.right], ecx
|
mov [draw_limits.right], ecx
|
||||||
mov ecx, [eax + BOX.top]
|
mov ecx, [ebx + BOX.top]
|
||||||
mov edx, [ebx + BOX.top]
|
|
||||||
cmp ecx, edx
|
|
||||||
jle @f
|
|
||||||
mov ecx, edx
|
|
||||||
;--------------------------------------
|
|
||||||
align 4
|
|
||||||
@@:
|
|
||||||
mov [draw_limits.top], ecx
|
mov [draw_limits.top], ecx
|
||||||
mov ecx, [eax + BOX.top]
|
add ecx, [ebx + BOX.height]
|
||||||
add ecx, [eax + BOX.height]
|
|
||||||
add edx, [ebx + BOX.height]
|
|
||||||
cmp ecx, edx
|
|
||||||
jae @f
|
|
||||||
mov ecx, edx
|
|
||||||
;--------------------------------------
|
|
||||||
align 4
|
|
||||||
@@:
|
|
||||||
mov [draw_limits.bottom], ecx
|
mov [draw_limits.bottom], ecx
|
||||||
; recalculate screen buffer at old position
|
; recalculate screen buffer at old position
|
||||||
push ebx
|
push ebx
|
||||||
mov edx, [eax + BOX.height]
|
mov edx, [eax + BOX.height]
|
||||||
mov ecx, [eax + BOX.width]
|
mov ecx, [eax + BOX.width]
|
||||||
@ -1399,7 +1436,7 @@ align 4
|
|||||||
add edx, ebx
|
add edx, ebx
|
||||||
call calculatescreen
|
call calculatescreen
|
||||||
pop eax
|
pop eax
|
||||||
; recalculate screen buffer at new position
|
; recalculate screen buffer at new position
|
||||||
mov edx, [eax + BOX.height]
|
mov edx, [eax + BOX.height]
|
||||||
mov ecx, [eax + BOX.width]
|
mov ecx, [eax + BOX.width]
|
||||||
mov ebx, [eax + BOX.top]
|
mov ebx, [eax + BOX.top]
|
||||||
@ -1578,7 +1615,10 @@ window._.sys_set_window: ;/////////////////////////////////////////////////////
|
|||||||
test [edi + WDATA.fl_wdrawn], 1
|
test [edi + WDATA.fl_wdrawn], 1
|
||||||
jnz .set_client_box
|
jnz .set_client_box
|
||||||
or [edi + WDATA.fl_wdrawn], 1
|
or [edi + WDATA.fl_wdrawn], 1
|
||||||
|
; After first draw_window we need redraw mouse necessarily!
|
||||||
|
; Otherwise the user can see cursor specified by f.37.5 from another window.
|
||||||
|
; He will be really unhappy! He is terrible in rage - usually he throws stones!
|
||||||
|
mov [redrawmouse_unconditional], 1
|
||||||
; NOTE: commented out since doesn't provide necessary functionality
|
; NOTE: commented out since doesn't provide necessary functionality
|
||||||
; anyway, to be reworked
|
; anyway, to be reworked
|
||||||
; mov eax, [timer_ticks] ; [0xfdf0]
|
; mov eax, [timer_ticks] ; [0xfdf0]
|
||||||
@ -2344,17 +2384,17 @@ align 4
|
|||||||
pop esi ebx eax
|
pop esi ebx eax
|
||||||
ret
|
ret
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
align 4
|
;align 4
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
window._.end_moving__box: ;//////////////////////////////////////////////////
|
;window._.end_moving__box: ;//////////////////////////////////////////////////
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
;? Draw positive box
|
;? Draw positive box
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
;> edi = pointer to BOX struct
|
;> edi = pointer to BOX struct
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
push eax ebx esi
|
; push eax ebx esi
|
||||||
xor esi, esi
|
; xor esi, esi
|
||||||
jmp window._.draw_negative_box.1
|
; jmp window._.draw_negative_box.1
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
@ -34,6 +34,7 @@ uglobal
|
|||||||
ctrl_alt_del db 0
|
ctrl_alt_del db 0
|
||||||
|
|
||||||
kb_lights db 0
|
kb_lights db 0
|
||||||
|
old_kb_lights db 0
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
hotkey_scancodes rd 256 ; we have 256 scancodes
|
hotkey_scancodes rd 256 ; we have 256 scancodes
|
||||||
@ -113,6 +114,83 @@ set_keyboard_data:
|
|||||||
pop ebp edi esi ebx
|
pop ebp edi esi ebx
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
struct KEYBOARD
|
||||||
|
next dd ?
|
||||||
|
prev dd ?
|
||||||
|
functions dd ?
|
||||||
|
userdata dd ?
|
||||||
|
ends
|
||||||
|
struct KBDFUNC
|
||||||
|
strucsize dd ?
|
||||||
|
close dd ?
|
||||||
|
setlights dd ?
|
||||||
|
ends
|
||||||
|
|
||||||
|
iglobal
|
||||||
|
keyboards:
|
||||||
|
dd keyboards
|
||||||
|
dd keyboards
|
||||||
|
endg
|
||||||
|
uglobal
|
||||||
|
keyboard_list_mutex MUTEX
|
||||||
|
endg
|
||||||
|
|
||||||
|
register_keyboard:
|
||||||
|
push ebx
|
||||||
|
push sizeof.KEYBOARD
|
||||||
|
pop eax
|
||||||
|
call malloc
|
||||||
|
test eax, eax
|
||||||
|
jz .nothing
|
||||||
|
mov ecx, [esp+4+4]
|
||||||
|
mov [eax+KEYBOARD.functions], ecx
|
||||||
|
mov ecx, [esp+8+4]
|
||||||
|
mov [eax+KEYBOARD.userdata], ecx
|
||||||
|
xchg eax, ebx
|
||||||
|
mov ecx, keyboard_list_mutex
|
||||||
|
call mutex_lock
|
||||||
|
mov ecx, keyboards
|
||||||
|
mov edx, [ecx+KEYBOARD.prev]
|
||||||
|
mov [ebx+KEYBOARD.next], ecx
|
||||||
|
mov [ebx+KEYBOARD.prev], edx
|
||||||
|
mov [edx+KEYBOARD.next], ebx
|
||||||
|
mov [ecx+KEYBOARD.prev], ebx
|
||||||
|
mov ecx, [ebx+KEYBOARD.functions]
|
||||||
|
cmp [ecx+KBDFUNC.strucsize], KBDFUNC.setlights
|
||||||
|
jbe .unlock
|
||||||
|
mov ecx, [ecx+KBDFUNC.setlights]
|
||||||
|
test ecx, ecx
|
||||||
|
jz .unlock
|
||||||
|
stdcall ecx, [ebx+KEYBOARD.userdata], dword [kb_lights]
|
||||||
|
.unlock:
|
||||||
|
mov ecx, keyboard_list_mutex
|
||||||
|
call mutex_unlock
|
||||||
|
xchg eax, ebx
|
||||||
|
.nothing:
|
||||||
|
pop ebx
|
||||||
|
ret 8
|
||||||
|
|
||||||
|
delete_keyboard:
|
||||||
|
push ebx
|
||||||
|
mov ebx, [esp+4+4]
|
||||||
|
mov ecx, keyboard_list_mutex
|
||||||
|
call mutex_lock
|
||||||
|
mov eax, [ebx+KEYBOARD.next]
|
||||||
|
mov edx, [ebx+KEYBOARD.prev]
|
||||||
|
mov [eax+KEYBOARD.prev], edx
|
||||||
|
mov [edx+KEYBOARD.next], eax
|
||||||
|
call mutex_unlock
|
||||||
|
mov ecx, [ebx+KEYBOARD.functions]
|
||||||
|
cmp [ecx+KBDFUNC.strucsize], KBDFUNC.close
|
||||||
|
jbe .nothing
|
||||||
|
mov ecx, [ecx+KBDFUNC.close]
|
||||||
|
test ecx, ecx
|
||||||
|
jz .nothing
|
||||||
|
stdcall ecx, [ebx+KEYBOARD.userdata]
|
||||||
|
.nothing:
|
||||||
|
pop ebx
|
||||||
|
ret 4
|
||||||
|
;---------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
irq1:
|
irq1:
|
||||||
movzx eax, word[TASK_COUNT]; top window process
|
movzx eax, word[TASK_COUNT]; top window process
|
||||||
@ -281,8 +359,11 @@ send_scancode:
|
|||||||
|
|
||||||
xor [kb_state], eax
|
xor [kb_state], eax
|
||||||
xor [kb_lights], bl
|
xor [kb_lights], bl
|
||||||
|
push ecx
|
||||||
call set_lights
|
call set_lights
|
||||||
|
pop ecx
|
||||||
.writekey:
|
.writekey:
|
||||||
|
pushad
|
||||||
; test for system hotkeys
|
; test for system hotkeys
|
||||||
movzx eax, ch
|
movzx eax, ch
|
||||||
cmp bh, 1
|
cmp bh, 1
|
||||||
@ -335,9 +416,16 @@ send_scancode:
|
|||||||
mov [edi+4], ax
|
mov [edi+4], ax
|
||||||
mov eax, [kb_state]
|
mov eax, [kb_state]
|
||||||
mov [edi+6], ax
|
mov [edi+6], ax
|
||||||
|
|
||||||
|
cmp [PID_lock_input], dword 0
|
||||||
|
je .nohotkey
|
||||||
|
|
||||||
|
popad
|
||||||
jmp .exit.irq1
|
jmp .exit.irq1
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
.nohotkey:
|
.nohotkey:
|
||||||
|
popad
|
||||||
|
|
||||||
cmp [keyboard_mode], 0; return from keymap
|
cmp [keyboard_mode], 0; return from keymap
|
||||||
jne .scancode
|
jne .scancode
|
||||||
|
|
||||||
@ -384,10 +472,43 @@ send_scancode:
|
|||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
set_lights:
|
set_lights:
|
||||||
|
push ebx esi
|
||||||
|
mov ecx, keyboard_list_mutex
|
||||||
|
call mutex_lock
|
||||||
|
mov esi, keyboards
|
||||||
|
.loop:
|
||||||
|
mov esi, [esi+KEYBOARD.next]
|
||||||
|
cmp esi, keyboards
|
||||||
|
jz .done
|
||||||
|
mov eax, [esi+KEYBOARD.functions]
|
||||||
|
cmp dword [eax], KBDFUNC.setlights
|
||||||
|
jbe .loop
|
||||||
|
mov eax, [eax+KBDFUNC.setlights]
|
||||||
|
test eax, eax
|
||||||
|
jz .loop
|
||||||
|
stdcall eax, [esi+KEYBOARD.userdata], dword [kb_lights]
|
||||||
|
jmp .loop
|
||||||
|
.done:
|
||||||
|
mov ecx, keyboard_list_mutex
|
||||||
|
call mutex_unlock
|
||||||
|
pop esi ebx
|
||||||
|
ret
|
||||||
|
|
||||||
|
ps2_set_lights:
|
||||||
mov al, 0xED
|
mov al, 0xED
|
||||||
call kb_write
|
call kb_write
|
||||||
mov al, [kb_lights]
|
mov al, [esp+8]
|
||||||
call kb_write
|
call kb_write
|
||||||
|
ret 8
|
||||||
|
|
||||||
|
;// mike.dld ]
|
||||||
|
check_lights_state:
|
||||||
|
mov al, [kb_lights]
|
||||||
|
cmp al, [old_kb_lights]
|
||||||
|
jz .nothing
|
||||||
|
mov [old_kb_lights], al
|
||||||
|
call set_lights
|
||||||
|
.nothing:
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
numlock_map:
|
numlock_map:
|
||||||
|
@ -26,14 +26,14 @@ uglobal
|
|||||||
align 4
|
align 4
|
||||||
mousecount dd 0x0
|
mousecount dd 0x0
|
||||||
mousedata dd 0x0
|
mousedata dd 0x0
|
||||||
Y_UNDER_subtraction_CUR_hot_y:
|
|
||||||
dd 0
|
|
||||||
X_UNDER_subtraction_CUR_hot_x:
|
|
||||||
dd 0
|
|
||||||
Y_UNDER_sub_CUR_hot_y_add_curh:
|
Y_UNDER_sub_CUR_hot_y_add_curh:
|
||||||
dd 0
|
dw 0
|
||||||
|
Y_UNDER_subtraction_CUR_hot_y:
|
||||||
|
dw 0
|
||||||
X_UNDER_sub_CUR_hot_x_add_curh:
|
X_UNDER_sub_CUR_hot_x_add_curh:
|
||||||
dd 0
|
dw 0
|
||||||
|
X_UNDER_subtraction_CUR_hot_x:
|
||||||
|
dw 0
|
||||||
endg
|
endg
|
||||||
|
|
||||||
iglobal
|
iglobal
|
||||||
@ -447,15 +447,15 @@ redrawmouse:
|
|||||||
|
|
||||||
mov ax, [Y_UNDER]
|
mov ax, [Y_UNDER]
|
||||||
sub eax, [esi+CURSOR.hot_y]
|
sub eax, [esi+CURSOR.hot_y]
|
||||||
mov [Y_UNDER_subtraction_CUR_hot_y], eax
|
mov [Y_UNDER_subtraction_CUR_hot_y], ax
|
||||||
add eax, [cur.h]
|
add eax, [cur.h]
|
||||||
mov [Y_UNDER_sub_CUR_hot_y_add_curh], eax
|
mov [Y_UNDER_sub_CUR_hot_y_add_curh], ax
|
||||||
|
|
||||||
mov ax, [X_UNDER]
|
mov ax, [X_UNDER]
|
||||||
sub eax, [esi+CURSOR.hot_x]
|
sub eax, [esi+CURSOR.hot_x]
|
||||||
mov [X_UNDER_subtraction_CUR_hot_x], eax
|
mov [X_UNDER_subtraction_CUR_hot_x], ax
|
||||||
add eax, [cur.w]
|
add eax, [cur.w]
|
||||||
mov [X_UNDER_sub_CUR_hot_x_add_curh], eax
|
mov [X_UNDER_sub_CUR_hot_x_add_curh], ax
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -68,7 +68,7 @@
|
|||||||
; 3c dword cpu usage in cpu timer tics
|
; 3c dword cpu usage in cpu timer tics
|
||||||
;
|
;
|
||||||
;
|
;
|
||||||
; 5000 -> 68FF display width fast calc area (6k6)
|
; 5000 -> 68FF free (6k6)
|
||||||
; 6900 -> 6EFF saved picture under mouse pointer (1k5)
|
; 6900 -> 6EFF saved picture under mouse pointer (1k5)
|
||||||
;
|
;
|
||||||
; 6F00 -> 6FFF free (256)
|
; 6F00 -> 6FFF free (256)
|
||||||
@ -137,7 +137,7 @@
|
|||||||
; FF00 byte 1 = system shutdown request
|
; FF00 byte 1 = system shutdown request
|
||||||
; FF01 byte task activation request?
|
; FF01 byte task activation request?
|
||||||
; FFF0 byte >0 if redraw background request from app
|
; FFF0 byte >0 if redraw background request from app
|
||||||
; FFF1 byte >0 if background changed
|
; FFF1 byte free
|
||||||
; FFF2 write and read bank in screen
|
; FFF2 write and read bank in screen
|
||||||
; FFF4 byte 0 if first mouse draw & do not return picture under
|
; FFF4 byte 0 if first mouse draw & do not return picture under
|
||||||
; FFF5 byte 1 do not draw pointer
|
; FFF5 byte 1 do not draw pointer
|
||||||
@ -147,8 +147,8 @@
|
|||||||
|
|
||||||
; 0x8006CC00 -> 6DBFF stack at boot time (4Kb)
|
; 0x8006CC00 -> 6DBFF stack at boot time (4Kb)
|
||||||
;
|
;
|
||||||
; 0x8006DC00 -> 6E5FF basic text font II
|
; 0x8006DC00 -> 6E5FF free (2560)
|
||||||
; 0x8006E600 -> 6Efff basic text font I
|
; 0x8006E600 -> 6Efff free (2560)
|
||||||
; 0x8006F000 -> 6FFFF main page directory
|
; 0x8006F000 -> 6FFFF main page directory
|
||||||
|
|
||||||
; 0x80070000 -> 7FFFF data of retrieved disks and partitions (Mario79)
|
; 0x80070000 -> 7FFFF data of retrieved disks and partitions (Mario79)
|
||||||
@ -204,15 +204,18 @@
|
|||||||
; 0x80284000 -> 28BFFF HDD DMA AREA (32k)
|
; 0x80284000 -> 28BFFF HDD DMA AREA (32k)
|
||||||
; 0x8028C000 -> 297FFF free (48k)
|
; 0x8028C000 -> 297FFF free (48k)
|
||||||
;
|
;
|
||||||
; 0x80298000 -> 29ffff auxiliary table for background smoothing code (32k)
|
; 0x80298000 -> 29FFFF auxiliary table for background smoothing code (32k)
|
||||||
;
|
;
|
||||||
; 0x802A0000 -> 2B00ff wav device buffer (64k)
|
; 0x802A0000 -> 2B00FF wav device buffer (64k)
|
||||||
; 0x802A0000 -> 2B00ff wav device status (256)
|
; 0x802A0000 -> 2B00FF wav device status (256)
|
||||||
; 0x802B0100 -> 2Bffff free (63k8)
|
|
||||||
; 0x802C0000 -> 2C3fff button info (8k)
|
|
||||||
;
|
;
|
||||||
; 0000 word number of buttons
|
; 0x802B0100 -> 2B3FFD free (15k7)
|
||||||
; first button entry at 0x10
|
;
|
||||||
|
; 0x802B3FEE -> 2B3FEF button info (64K+ 16 + 2 byte)
|
||||||
|
; 2B3FEE 0000 word number of buttons
|
||||||
|
; 2B3FF0 first button entry
|
||||||
|
;
|
||||||
|
; button entry at 0x10
|
||||||
; +0000 word process number
|
; +0000 word process number
|
||||||
; +0002 word button id number : bits 00-15
|
; +0002 word button id number : bits 00-15
|
||||||
; +0004 word x start
|
; +0004 word x start
|
||||||
@ -221,7 +224,10 @@
|
|||||||
; +000A word y size
|
; +000A word y size
|
||||||
; +000C word button id number : bits 16-31
|
; +000C word button id number : bits 16-31
|
||||||
;
|
;
|
||||||
; 0x802C4000 -> 2CFFFF free (48k)
|
; 0x802C4000 -> 2C9FFF area for fast getting offset to LFB (24k)
|
||||||
|
; BPSLine_calc_area
|
||||||
|
; 0x802CA000 -> 2CFFFF area for fast getting offset to _WinMapAddress (24k)
|
||||||
|
; d_width_calc_area
|
||||||
;
|
;
|
||||||
; 0x802D0000 -> 2DFFFF reserved port area (64k)
|
; 0x802D0000 -> 2DFFFF reserved port area (64k)
|
||||||
;
|
;
|
||||||
@ -231,25 +237,29 @@
|
|||||||
; dword end port
|
; dword end port
|
||||||
; dword 0
|
; dword 0
|
||||||
;
|
;
|
||||||
; 0x802E0000 -> 2EFFFF irq data area (64k)
|
; 0x802E0000 -> 2EFFFF irq data area (64k) ;BOOT_VAR
|
||||||
; 0x802F0000 -> 2FFFFF low memory save (64k)
|
|
||||||
;
|
;
|
||||||
; 0x80300000 -> 31FFFF tcp memory (128k)
|
; 0x802F0000 -> 2F3FFF tcp memory stack_data_start eth_data_start (16k)
|
||||||
; 0x80320000 -> 327FFF tcp memory (32k)
|
|
||||||
;
|
;
|
||||||
; 0x80328000 -> 32FFFF !vrr driver (32k)
|
; 0x802F4000 -> 30ffff stack_data | stack_data_end (112k)
|
||||||
|
;
|
||||||
; 0x80330000 -> 377FFF skin data (32k)
|
; 0x80310000 -> 317fff resendQ (32k)
|
||||||
|
;
|
||||||
; 0x80338000 -> 338FFF draw data - 256 entries (4k)
|
; 0x80318000 -> 31ffff skin_data (32k)
|
||||||
|
;
|
||||||
|
; 0x80320000 -> 323FF3 draw data - 256 entries (4k)
|
||||||
; 00 dword draw limit - x start
|
; 00 dword draw limit - x start
|
||||||
; 04 dword draw limit - y start
|
; 04 dword draw limit - y start
|
||||||
; 08 dword draw limit - x end
|
; 08 dword draw limit - x end
|
||||||
; 0C dword draw limit - y end
|
; 0C dword draw limit - y end
|
||||||
; 0x80339000 -> 3BFFF3 free (12k)
|
;
|
||||||
; 0x8033BFF4 -> 33BFFF background info
|
; 0x8032BFF4 -> 32BFFF background info
|
||||||
; 0x8033C000 page map (length b = memsize shr 15)
|
; 0x80323FF4 BgrDrawMode
|
||||||
; 0x8033C000 + b start of static pagetables
|
; 0x80323FF8 BgrDataWidth
|
||||||
|
; 0x80323FFC BgrDataHeight
|
||||||
|
;
|
||||||
|
; 0x80324000 page map (length b = memsize shr 15)
|
||||||
|
; 0x80324000 + b start of static pagetables
|
||||||
|
|
||||||
; 0x803FFFFF <- no direct address translation beyond this point
|
; 0x803FFFFF <- no direct address translation beyond this point
|
||||||
; =============================================================
|
; =============================================================
|
||||||
|
@ -242,7 +242,7 @@ endg
|
|||||||
pcnet32_dwio_read_csr:
|
pcnet32_dwio_read_csr:
|
||||||
push edx
|
push edx
|
||||||
lea edx, [ebp+PCNET32_DWIO_RAP]
|
lea edx, [ebp+PCNET32_DWIO_RAP]
|
||||||
mov ebx, eax
|
mov eax, ebx
|
||||||
out dx, eax
|
out dx, eax
|
||||||
lea edx, [ebp+PCNET32_DWIO_RDP]
|
lea edx, [ebp+PCNET32_DWIO_RDP]
|
||||||
in eax, dx
|
in eax, dx
|
||||||
@ -267,7 +267,7 @@ pcnet32_dwio_write_csr:
|
|||||||
pcnet32_dwio_read_bcr:
|
pcnet32_dwio_read_bcr:
|
||||||
push edx
|
push edx
|
||||||
lea edx, [ebp+PCNET32_DWIO_RAP]
|
lea edx, [ebp+PCNET32_DWIO_RAP]
|
||||||
mov ebx, eax
|
mov eax, ebx
|
||||||
out dx, eax
|
out dx, eax
|
||||||
lea edx, [ebp+PCNET32_DWIO_BDP]
|
lea edx, [ebp+PCNET32_DWIO_BDP]
|
||||||
in eax, dx
|
in eax, dx
|
||||||
@ -709,10 +709,10 @@ pcnet32_probe:
|
|||||||
mov eax, 2
|
mov eax, 2
|
||||||
call dword [pcnet32_access.write_bcr]
|
call dword [pcnet32_access.write_bcr]
|
||||||
mov ebx, 1
|
mov ebx, 1
|
||||||
mov eax, (pcnet32_private and 0xffff)
|
mov eax, ((pcnet32_private - OS_BASE) and 0xffff)
|
||||||
call dword [pcnet32_access.write_csr]
|
call dword [pcnet32_access.write_csr]
|
||||||
mov ebx, 2
|
mov ebx, 2
|
||||||
mov eax, (pcnet32_private shr 16) and 0xffff
|
mov eax, ((pcnet32_private - OS_BASE) shr 16) and 0xffff
|
||||||
call dword [pcnet32_access.write_csr]
|
call dword [pcnet32_access.write_csr]
|
||||||
mov ebx, 0
|
mov ebx, 0
|
||||||
mov eax, 1
|
mov eax, 1
|
||||||
|
@ -202,6 +202,7 @@ purge .dy1
|
|||||||
|
|
||||||
align 4
|
align 4
|
||||||
blit_32:
|
blit_32:
|
||||||
|
xchg bx, bx
|
||||||
push ebp
|
push ebp
|
||||||
push edi
|
push edi
|
||||||
push esi
|
push esi
|
||||||
@ -270,9 +271,10 @@ blit_32:
|
|||||||
|
|
||||||
mov edi, ebp
|
mov edi, ebp
|
||||||
|
|
||||||
imul edi, [_display.pitch]
|
; imul edi, [_display.pitch]
|
||||||
|
mov edi, [BPSLine_calc_area+edi*4]
|
||||||
; imul ebp, [_display.width]
|
; imul ebp, [_display.width]
|
||||||
mov ebp, [d_width_calc_area + ebp*4]
|
mov ebp, [d_width_calc_area+ebp*4]
|
||||||
|
|
||||||
add ebp, ebx
|
add ebp, ebx
|
||||||
add ebp, [_WinMapAddress]
|
add ebp, [_WinMapAddress]
|
||||||
@ -298,7 +300,13 @@ blit_32:
|
|||||||
|
|
||||||
lea edi, [edi+ebx*4]
|
lea edi, [edi+ebx*4]
|
||||||
|
|
||||||
|
mov ebx, 1
|
||||||
|
test [esp+72], dword 0x10
|
||||||
|
jnz @F
|
||||||
|
|
||||||
mov ebx, [CURRENT_TASK]
|
mov ebx, [CURRENT_TASK]
|
||||||
|
@@:
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
.outer32:
|
.outer32:
|
||||||
xor ecx, ecx
|
xor ecx, ecx
|
||||||
@ -365,7 +373,12 @@ align 4
|
|||||||
.core_24:
|
.core_24:
|
||||||
lea ebx, [ebx+ebx*2]
|
lea ebx, [ebx+ebx*2]
|
||||||
lea edi, [LFB_BASE+edi+ebx]
|
lea edi, [LFB_BASE+edi+ebx]
|
||||||
|
mov ebx, 1
|
||||||
|
test [esp+72], dword 0x10
|
||||||
|
jnz @F
|
||||||
|
|
||||||
mov ebx, [CURRENT_TASK]
|
mov ebx, [CURRENT_TASK]
|
||||||
|
@@:
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
.outer24:
|
.outer24:
|
||||||
|
@ -353,6 +353,8 @@ create_cursor:
|
|||||||
|
|
||||||
stdcall init_cursor, eax, esi
|
stdcall init_cursor, eax, esi
|
||||||
|
|
||||||
|
align 4
|
||||||
|
.add_cursor:
|
||||||
mov ecx, [.hcursor]
|
mov ecx, [.hcursor]
|
||||||
lea ecx, [ecx+CURSOR.list_next]
|
lea ecx, [ecx+CURSOR.list_next]
|
||||||
lea edx, [_display.cr_list.next]
|
lea edx, [_display.cr_list.next]
|
||||||
@ -363,9 +365,6 @@ create_cursor:
|
|||||||
popfd
|
popfd
|
||||||
|
|
||||||
mov eax, [.hcursor]
|
mov eax, [.hcursor]
|
||||||
;--------------------------------------
|
|
||||||
align 4
|
|
||||||
.check_hw:
|
|
||||||
cmp [_display.init_cursor], 0
|
cmp [_display.init_cursor], 0
|
||||||
je .fail
|
je .fail
|
||||||
|
|
||||||
@ -385,14 +384,14 @@ align 4
|
|||||||
shr ebx, 16
|
shr ebx, 16
|
||||||
movzx ecx, bh
|
movzx ecx, bh
|
||||||
movzx edx, bl
|
movzx edx, bl
|
||||||
mov [eax+CURSOR.hot_x], ecx
|
mov [edi+CURSOR.hot_x], ecx
|
||||||
mov [eax+CURSOR.hot_y], edx
|
mov [edi+CURSOR.hot_y], edx
|
||||||
|
|
||||||
xchg edi, eax
|
xchg edi, eax
|
||||||
mov ecx, 1024
|
mov ecx, 1024
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
jmp .check_hw
|
jmp .add_cursor
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
proc load_cursor stdcall, src:dword, flags:dword
|
proc load_cursor stdcall, src:dword, flags:dword
|
||||||
@ -619,9 +618,7 @@ proc move_cursor_24 stdcall, hcursor:dword, x:dword, y:dword
|
|||||||
mov [_dy], edx
|
mov [_dy], edx
|
||||||
|
|
||||||
; mul dword [BytesPerScanLine]
|
; mul dword [BytesPerScanLine]
|
||||||
mov eax, [d_width_calc_area + eax*4]
|
mov eax, [BPSLine_calc_area+eax*4]
|
||||||
lea eax, [eax + eax*2]
|
|
||||||
|
|
||||||
lea edx, [LFB_BASE+ecx*3]
|
lea edx, [LFB_BASE+ecx*3]
|
||||||
add edx, eax
|
add edx, eax
|
||||||
mov [cur_saved_base], edx
|
mov [cur_saved_base], edx
|
||||||
@ -645,6 +642,8 @@ align 4
|
|||||||
sub edi, [y]
|
sub edi, [y]
|
||||||
inc ebx
|
inc ebx
|
||||||
inc edi
|
inc edi
|
||||||
|
sub ebx, [_dx]
|
||||||
|
sub edi, [_dy]
|
||||||
|
|
||||||
mov [cur.w], ebx
|
mov [cur.w], ebx
|
||||||
mov [cur.h], edi
|
mov [cur.h], edi
|
||||||
@ -738,9 +737,7 @@ proc move_cursor_32 stdcall, hcursor:dword, x:dword, y:dword
|
|||||||
mov [_dy], edx
|
mov [_dy], edx
|
||||||
|
|
||||||
; mul dword [BytesPerScanLine]
|
; mul dword [BytesPerScanLine]
|
||||||
mov eax, [d_width_calc_area + eax*4]
|
mov eax, [BPSLine_calc_area+eax*4]
|
||||||
shl eax, 2
|
|
||||||
|
|
||||||
lea edx, [LFB_BASE+eax+ecx*4]
|
lea edx, [LFB_BASE+eax+ecx*4]
|
||||||
mov [cur_saved_base], edx
|
mov [cur_saved_base], edx
|
||||||
|
|
||||||
@ -763,6 +760,8 @@ align 4
|
|||||||
sub edi, [y]
|
sub edi, [y]
|
||||||
inc ebx
|
inc ebx
|
||||||
inc edi
|
inc edi
|
||||||
|
sub ebx, [_dx]
|
||||||
|
sub edi, [_dy]
|
||||||
|
|
||||||
mov [cur.w], ebx
|
mov [cur.w], ebx
|
||||||
mov [cur.h], edi
|
mov [cur.h], edi
|
||||||
@ -840,10 +839,10 @@ check_mouse_area_for_getpixel_new:
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
push eax ebx
|
push eax ebx
|
||||||
; offset X
|
; offset X
|
||||||
mov ecx, [X_UNDER_subtraction_CUR_hot_x]
|
movzx ecx, word [X_UNDER_subtraction_CUR_hot_x]
|
||||||
sub eax, ecx ; x1
|
sub eax, ecx ; x1
|
||||||
; offset Y
|
; offset Y
|
||||||
mov ecx, [Y_UNDER_subtraction_CUR_hot_y]
|
movzx ecx, word [Y_UNDER_subtraction_CUR_hot_y]
|
||||||
sub ebx, ecx ; y1
|
sub ebx, ecx ; y1
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; ebx = offset y
|
; ebx = offset y
|
||||||
@ -879,41 +878,49 @@ check_mouse_area_for_putpixel_new:
|
|||||||
; eax = new color
|
; eax = new color
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; check for Y
|
; check for Y
|
||||||
cmp cx, [Y_UNDER_subtraction_CUR_hot_y]
|
|
||||||
jb .no_mouse_area
|
|
||||||
|
|
||||||
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
|
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
|
||||||
jae .no_mouse_area
|
jae .no_mouse_area
|
||||||
|
|
||||||
|
sub cx, [Y_UNDER_subtraction_CUR_hot_y]
|
||||||
|
jb .no_mouse_area
|
||||||
|
|
||||||
rol ecx, 16
|
rol ecx, 16
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; check for X
|
; check for X
|
||||||
cmp cx, [X_UNDER_subtraction_CUR_hot_x]
|
|
||||||
jb .no_mouse_area
|
|
||||||
|
|
||||||
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
|
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
|
||||||
jae .no_mouse_area
|
jae .no_mouse_area
|
||||||
|
|
||||||
|
sub cx, [X_UNDER_subtraction_CUR_hot_x]
|
||||||
|
jb .no_mouse_area
|
||||||
|
|
||||||
|
ror ecx, 16
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.1:
|
.1:
|
||||||
push eax
|
push eax
|
||||||
; offset X
|
|
||||||
mov ax, [X_UNDER_subtraction_CUR_hot_x]
|
|
||||||
sub cx, ax ; x1
|
|
||||||
ror ecx, 16
|
|
||||||
; offset Y
|
|
||||||
mov ax, [Y_UNDER_subtraction_CUR_hot_y]
|
|
||||||
sub cx, ax ; y1
|
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; ecx = (offset x) shl 16 + (offset y)
|
; ecx = (offset x) shl 16 + (offset y)
|
||||||
push ebx
|
push ebx
|
||||||
mov ebx, ecx
|
mov ebx, ecx
|
||||||
shr ebx, 16 ; x
|
shr ebx, 16 ; x
|
||||||
and ecx, 0xffff ; y
|
and ecx, 0xffff ; y
|
||||||
|
|
||||||
|
cmp ecx, [cur.h]
|
||||||
|
jae @f
|
||||||
|
|
||||||
|
cmp ebx, [cur.w]
|
||||||
|
jb .ok
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
@@:
|
||||||
|
; DEBUGF 1, "K : SHIT HAPPENS: %x %x \n", ecx,ebx
|
||||||
|
pop ebx
|
||||||
|
jmp .sh ; SORRY! SHIT HAPPENS!
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
.ok:
|
||||||
; ecx = offset y
|
; ecx = offset y
|
||||||
; ebx = offset x
|
; ebx = offset x
|
||||||
mov eax, [esp + 4]
|
|
||||||
|
|
||||||
push ebx ecx
|
push ebx ecx
|
||||||
imul ecx, [cur.w] ;y
|
imul ecx, [cur.w] ;y
|
||||||
add ecx, ebx
|
add ecx, ebx
|
||||||
@ -949,10 +956,14 @@ align 4
|
|||||||
test eax, 0xFF000000
|
test eax, 0xFF000000
|
||||||
jz @f
|
jz @f
|
||||||
|
|
||||||
pop ecx
|
add esp, 4
|
||||||
ret
|
ret
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
|
.sh:
|
||||||
|
mov ecx, -1
|
||||||
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
@@:
|
@@:
|
||||||
pop eax
|
pop eax
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -1019,6 +1030,8 @@ align 4
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
|
stdcall load_cursor, clock_arrow, dword LOAD_FROM_MEM
|
||||||
|
mov [def_cursor_clock], eax
|
||||||
stdcall load_cursor, def_arrow, dword LOAD_FROM_MEM
|
stdcall load_cursor, def_arrow, dword LOAD_FROM_MEM
|
||||||
mov [def_cursor], eax
|
mov [def_cursor], eax
|
||||||
ret
|
ret
|
||||||
@ -1034,4 +1047,8 @@ align 4
|
|||||||
def_arrow:
|
def_arrow:
|
||||||
file 'arrow.cur'
|
file 'arrow.cur'
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
align 4
|
||||||
|
clock_arrow:
|
||||||
|
file 'arrow_clock.cur'
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -72,8 +72,7 @@ align 4
|
|||||||
.no_mouseunder:
|
.no_mouseunder:
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
|
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
|
||||||
mov ebx, [d_width_calc_area + ebx*4]
|
mov ebx, [BPSLine_calc_area+ebx*4]
|
||||||
lea ebx, [ebx + ebx*2]
|
|
||||||
lea edi, [eax+eax*2]; edi = x*3
|
lea edi, [eax+eax*2]; edi = x*3
|
||||||
add edi, ebx ; edi = x*3+(y*y multiplier)
|
add edi, ebx ; edi = x*3+(y*y multiplier)
|
||||||
mov ecx, [LFB_BASE+edi]
|
mov ecx, [LFB_BASE+edi]
|
||||||
@ -105,8 +104,7 @@ align 4
|
|||||||
.no_mouseunder:
|
.no_mouseunder:
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
|
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
|
||||||
mov ebx, [d_width_calc_area + ebx*4]
|
mov ebx, [BPSLine_calc_area+ebx*4]
|
||||||
shl ebx, 2
|
|
||||||
lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
|
lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
|
||||||
mov ecx, [LFB_BASE+edi]
|
mov ecx, [LFB_BASE+edi]
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -243,19 +241,7 @@ align 4
|
|||||||
; pointer to screen
|
; pointer to screen
|
||||||
mov edx, [putimg.abs_cy]
|
mov edx, [putimg.abs_cy]
|
||||||
; imul edx, [BytesPerScanLine]
|
; imul edx, [BytesPerScanLine]
|
||||||
|
mov edx, [BPSLine_calc_area+edx*4]
|
||||||
mov edx, [d_width_calc_area + edx*4]
|
|
||||||
cmp bl, 4
|
|
||||||
je .32
|
|
||||||
lea edx, [edx+edx*2]
|
|
||||||
jmp @f
|
|
||||||
;-------------------------------------
|
|
||||||
align 4
|
|
||||||
.32:
|
|
||||||
shl edx, 2
|
|
||||||
;-------------------------------------
|
|
||||||
align 4
|
|
||||||
@@:
|
|
||||||
mov eax, [putimg.abs_cx]
|
mov eax, [putimg.abs_cx]
|
||||||
; movzx ebx, byte [ScreenBPP]
|
; movzx ebx, byte [ScreenBPP]
|
||||||
; shr ebx, 3
|
; shr ebx, 3
|
||||||
@ -420,29 +406,38 @@ align 4
|
|||||||
jne .skip
|
jne .skip
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
push ecx
|
push ecx
|
||||||
mov ecx, [putimg.real_sy_and_abs_cy + 4]
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
.sh:
|
||||||
|
neg ecx
|
||||||
|
add ecx, [putimg.real_sx_and_abs_cx + 4]
|
||||||
|
;--------------------------------------
|
||||||
|
; check for X
|
||||||
|
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
|
||||||
|
jae .no_mouse_area
|
||||||
|
|
||||||
|
sub cx, [X_UNDER_subtraction_CUR_hot_x]
|
||||||
|
jb .no_mouse_area
|
||||||
|
|
||||||
|
shl ecx, 16
|
||||||
|
|
||||||
|
add ecx, [putimg.real_sy_and_abs_cy + 4]
|
||||||
sub ecx, edi
|
sub ecx, edi
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; check for Y
|
; check for Y
|
||||||
cmp cx, [Y_UNDER_subtraction_CUR_hot_y]
|
|
||||||
jb .no_mouse_area
|
|
||||||
|
|
||||||
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
|
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
|
||||||
jae .no_mouse_area
|
jae .no_mouse_area
|
||||||
|
|
||||||
rol ecx, 16
|
sub cx, [Y_UNDER_subtraction_CUR_hot_y]
|
||||||
add ecx, [putimg.real_sx_and_abs_cx + 4]
|
|
||||||
sub ecx, [esp]
|
|
||||||
;--------------------------------------
|
|
||||||
; check for X
|
|
||||||
cmp cx, [X_UNDER_subtraction_CUR_hot_x]
|
|
||||||
jb .no_mouse_area
|
jb .no_mouse_area
|
||||||
|
|
||||||
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
|
|
||||||
jae .no_mouse_area
|
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; check mouse area for putpixel
|
; check mouse area for putpixel
|
||||||
call check_mouse_area_for_putpixel_new.1
|
call check_mouse_area_for_putpixel_new.1
|
||||||
|
cmp ecx, -1 ;SHIT HAPPENS?
|
||||||
|
jne .no_mouse_area
|
||||||
|
|
||||||
|
mov ecx, [esp]
|
||||||
|
jmp .sh
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.no_mouse_area:
|
.no_mouse_area:
|
||||||
@ -622,29 +617,38 @@ align 4
|
|||||||
jne .skip
|
jne .skip
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
push ecx
|
push ecx
|
||||||
mov ecx, [putimg.real_sy_and_abs_cy + 4]
|
;--------------------------------------
|
||||||
|
align 4
|
||||||
|
.sh:
|
||||||
|
neg ecx
|
||||||
|
add ecx, [putimg.real_sx_and_abs_cx + 4]
|
||||||
|
;--------------------------------------
|
||||||
|
; check for X
|
||||||
|
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
|
||||||
|
jae .no_mouse_area
|
||||||
|
|
||||||
|
sub cx, [X_UNDER_subtraction_CUR_hot_x]
|
||||||
|
jb .no_mouse_area
|
||||||
|
|
||||||
|
shl ecx, 16
|
||||||
|
|
||||||
|
add ecx, [putimg.real_sy_and_abs_cy + 4]
|
||||||
sub ecx, edi
|
sub ecx, edi
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; check for Y
|
; check for Y
|
||||||
cmp cx, [Y_UNDER_subtraction_CUR_hot_y]
|
|
||||||
jb .no_mouse_area
|
|
||||||
|
|
||||||
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
|
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
|
||||||
jae .no_mouse_area
|
jae .no_mouse_area
|
||||||
|
|
||||||
rol ecx, 16
|
sub cx, [Y_UNDER_subtraction_CUR_hot_y]
|
||||||
add ecx, [putimg.real_sx_and_abs_cx + 4]
|
|
||||||
sub ecx, [esp]
|
|
||||||
;--------------------------------------
|
|
||||||
; check for X
|
|
||||||
cmp cx, [X_UNDER_subtraction_CUR_hot_x]
|
|
||||||
jb .no_mouse_area
|
jb .no_mouse_area
|
||||||
|
|
||||||
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
|
|
||||||
jae .no_mouse_area
|
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; check mouse area for putpixel
|
; check mouse area for putpixel
|
||||||
call check_mouse_area_for_putpixel_new.1
|
call check_mouse_area_for_putpixel_new.1
|
||||||
|
cmp ecx, -1 ;SHIT HAPPENS?
|
||||||
|
jne .no_mouse_area
|
||||||
|
|
||||||
|
mov ecx, [esp]
|
||||||
|
jmp .sh
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.no_mouse_area:
|
.no_mouse_area:
|
||||||
@ -740,9 +744,7 @@ Vesa20_putpixel24:
|
|||||||
mov cx, bx
|
mov cx, bx
|
||||||
|
|
||||||
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
|
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
|
||||||
mov ebx, [d_width_calc_area + ebx*4]
|
mov ebx, [BPSLine_calc_area+ebx*4]
|
||||||
lea ebx, [ebx + ebx*2]
|
|
||||||
|
|
||||||
lea edi, [eax+eax*2]; edi = x*3
|
lea edi, [eax+eax*2]; edi = x*3
|
||||||
mov eax, [esp+32-8+4]
|
mov eax, [esp+32-8+4]
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -771,9 +773,7 @@ Vesa20_putpixel24_new:
|
|||||||
mov cx, bx
|
mov cx, bx
|
||||||
|
|
||||||
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
|
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
|
||||||
mov ebx, [d_width_calc_area + ebx*4]
|
mov ebx, [BPSLine_calc_area+ebx*4]
|
||||||
lea ebx, [ebx + ebx*2]
|
|
||||||
|
|
||||||
lea edi, [eax+eax*2]; edi = x*3
|
lea edi, [eax+eax*2]; edi = x*3
|
||||||
mov eax, [esp+32-8+4]
|
mov eax, [esp+32-8+4]
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -785,21 +785,23 @@ Vesa20_putpixel24_new:
|
|||||||
jnz @f
|
jnz @f
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; check for Y
|
; check for Y
|
||||||
cmp cx, [Y_UNDER_subtraction_CUR_hot_y]
|
|
||||||
jb @f
|
|
||||||
|
|
||||||
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
|
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
|
||||||
jae @f
|
jae @f
|
||||||
|
|
||||||
|
sub cx, [Y_UNDER_subtraction_CUR_hot_y]
|
||||||
|
jb @f
|
||||||
|
|
||||||
rol ecx, 16
|
rol ecx, 16
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; check for X
|
; check for X
|
||||||
cmp cx, [X_UNDER_subtraction_CUR_hot_x]
|
|
||||||
jb @f
|
|
||||||
|
|
||||||
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
|
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
|
||||||
jae @f
|
jae @f
|
||||||
|
|
||||||
|
sub cx, [X_UNDER_subtraction_CUR_hot_x]
|
||||||
|
jb @f
|
||||||
|
|
||||||
|
ror ecx, 16
|
||||||
|
|
||||||
call check_mouse_area_for_putpixel_new.1
|
call check_mouse_area_for_putpixel_new.1
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@ -819,9 +821,7 @@ Vesa20_putpixel32:
|
|||||||
mov cx, bx
|
mov cx, bx
|
||||||
|
|
||||||
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
|
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
|
||||||
mov ebx, [d_width_calc_area + ebx*4]
|
mov ebx, [BPSLine_calc_area+ebx*4]
|
||||||
shl ebx, 2
|
|
||||||
|
|
||||||
lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
|
lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
|
||||||
mov eax, [esp+32-8+4]; eax = color
|
mov eax, [esp+32-8+4]; eax = color
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -849,9 +849,7 @@ Vesa20_putpixel32_new:
|
|||||||
mov cx, bx
|
mov cx, bx
|
||||||
|
|
||||||
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
|
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
|
||||||
mov ebx, [d_width_calc_area + ebx*4]
|
mov ebx, [BPSLine_calc_area+ebx*4]
|
||||||
shl ebx, 2
|
|
||||||
|
|
||||||
lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
|
lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
|
||||||
mov eax, [esp+32-8+4]; eax = color
|
mov eax, [esp+32-8+4]; eax = color
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -863,21 +861,23 @@ Vesa20_putpixel32_new:
|
|||||||
jnz @f
|
jnz @f
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; check for Y
|
; check for Y
|
||||||
cmp cx, [Y_UNDER_subtraction_CUR_hot_y]
|
|
||||||
jb @f
|
|
||||||
|
|
||||||
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
|
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
|
||||||
jae @f
|
jae @f
|
||||||
|
|
||||||
|
sub cx, [Y_UNDER_subtraction_CUR_hot_y]
|
||||||
|
jb @f
|
||||||
|
|
||||||
rol ecx, 16
|
rol ecx, 16
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; check for X
|
; check for X
|
||||||
cmp cx, [X_UNDER_subtraction_CUR_hot_x]
|
|
||||||
jb @f
|
|
||||||
|
|
||||||
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
|
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
|
||||||
jae @f
|
jae @f
|
||||||
|
|
||||||
|
sub cx, [X_UNDER_subtraction_CUR_hot_x]
|
||||||
|
jb @f
|
||||||
|
|
||||||
|
ror ecx, 16
|
||||||
|
|
||||||
call check_mouse_area_for_putpixel_new.1
|
call check_mouse_area_for_putpixel_new.1
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@ -1238,19 +1238,7 @@ align 4
|
|||||||
; pointer to screen
|
; pointer to screen
|
||||||
mov edx, [drbar.abs_cy]
|
mov edx, [drbar.abs_cy]
|
||||||
; imul edx, [BytesPerScanLine]
|
; imul edx, [BytesPerScanLine]
|
||||||
|
mov edx, [BPSLine_calc_area+edx*4]
|
||||||
mov edx, [d_width_calc_area + edx*4]
|
|
||||||
cmp bl, 4
|
|
||||||
je .32
|
|
||||||
lea edx, [edx+edx*2]
|
|
||||||
jmp @f
|
|
||||||
;-------------------------------------
|
|
||||||
align 4
|
|
||||||
.32:
|
|
||||||
shl edx, 2
|
|
||||||
;-------------------------------------
|
|
||||||
align 4
|
|
||||||
@@:
|
|
||||||
mov eax, [drbar.abs_cx]
|
mov eax, [drbar.abs_cx]
|
||||||
imul eax, ebx
|
imul eax, ebx
|
||||||
add edx, eax
|
add edx, eax
|
||||||
@ -1406,29 +1394,32 @@ align 4
|
|||||||
sub ecx, esi
|
sub ecx, esi
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; check for Y
|
; check for Y
|
||||||
cmp cx, [Y_UNDER_subtraction_CUR_hot_y]
|
|
||||||
jb .no_mouse_area
|
|
||||||
|
|
||||||
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
|
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
|
||||||
jae .no_mouse_area
|
jae .no_mouse_area
|
||||||
|
|
||||||
|
sub cx, [Y_UNDER_subtraction_CUR_hot_y]
|
||||||
|
jb .no_mouse_area
|
||||||
|
|
||||||
rol ecx, 16
|
rol ecx, 16
|
||||||
add ecx, [drbar.real_sx_and_abs_cx]
|
add ecx, [drbar.real_sx_and_abs_cx]
|
||||||
sub ecx, edi
|
sub ecx, edi
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; check for X
|
; check for X
|
||||||
cmp cx, [X_UNDER_subtraction_CUR_hot_x]
|
|
||||||
jb .no_mouse_area
|
|
||||||
|
|
||||||
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
|
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
|
||||||
jae .no_mouse_area
|
jae .no_mouse_area
|
||||||
|
|
||||||
|
sub cx, [X_UNDER_subtraction_CUR_hot_x]
|
||||||
|
jb .no_mouse_area
|
||||||
|
|
||||||
|
ror ecx, 16
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; check mouse area for putpixel
|
; check mouse area for putpixel
|
||||||
|
push eax
|
||||||
call check_mouse_area_for_putpixel_new.1
|
call check_mouse_area_for_putpixel_new.1
|
||||||
mov [edx], ax
|
mov [edx], ax
|
||||||
shr eax, 16
|
shr eax, 16
|
||||||
mov [edx + 2], al
|
mov [edx + 2], al
|
||||||
mov eax, [drbar.color]
|
pop eax
|
||||||
jmp .skip
|
jmp .skip
|
||||||
; store to real LFB
|
; store to real LFB
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -1590,27 +1581,30 @@ align 4
|
|||||||
sub ecx, esi
|
sub ecx, esi
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; check for Y
|
; check for Y
|
||||||
cmp cx, [Y_UNDER_subtraction_CUR_hot_y]
|
|
||||||
jb .no_mouse_area
|
|
||||||
|
|
||||||
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
|
cmp cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
|
||||||
jae .no_mouse_area
|
jae .no_mouse_area
|
||||||
|
|
||||||
|
sub cx, [Y_UNDER_subtraction_CUR_hot_y]
|
||||||
|
jb .no_mouse_area
|
||||||
|
|
||||||
rol ecx, 16
|
rol ecx, 16
|
||||||
add ecx, [drbar.real_sx_and_abs_cx]
|
add ecx, [drbar.real_sx_and_abs_cx]
|
||||||
sub ecx, edi
|
sub ecx, edi
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; check for X
|
; check for X
|
||||||
cmp cx, [X_UNDER_subtraction_CUR_hot_x]
|
|
||||||
jb .no_mouse_area
|
|
||||||
|
|
||||||
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
|
cmp cx, [X_UNDER_sub_CUR_hot_x_add_curh]
|
||||||
jae .no_mouse_area
|
jae .no_mouse_area
|
||||||
|
|
||||||
|
sub cx, [X_UNDER_subtraction_CUR_hot_x]
|
||||||
|
jb .no_mouse_area
|
||||||
|
|
||||||
|
ror ecx, 16
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
; check mouse area for putpixel
|
; check mouse area for putpixel
|
||||||
|
push eax
|
||||||
call check_mouse_area_for_putpixel_new.1
|
call check_mouse_area_for_putpixel_new.1
|
||||||
mov [edx], eax
|
mov [edx], eax
|
||||||
mov eax, [drbar.color]
|
pop eax
|
||||||
jmp .skip
|
jmp .skip
|
||||||
; store to real LFB
|
; store to real LFB
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -1654,18 +1648,7 @@ dp2:
|
|||||||
; and LFB data (output for our function) [edi]
|
; and LFB data (output for our function) [edi]
|
||||||
; mov eax, [BytesPerScanLine]
|
; mov eax, [BytesPerScanLine]
|
||||||
; mul ebx
|
; mul ebx
|
||||||
mov eax, [d_width_calc_area + ebx*4]
|
mov eax, [BPSLine_calc_area+ebx*4]
|
||||||
cmp [ScreenBPP], byte 32
|
|
||||||
je .32
|
|
||||||
lea eax, [eax+eax*2]
|
|
||||||
jmp @f
|
|
||||||
;-------------------------------------
|
|
||||||
align 4
|
|
||||||
.32:
|
|
||||||
shl eax, 2
|
|
||||||
;-------------------------------------
|
|
||||||
align 4
|
|
||||||
@@:
|
|
||||||
xchg ebp, eax
|
xchg ebp, eax
|
||||||
add ebp, eax
|
add ebp, eax
|
||||||
add ebp, eax
|
add ebp, eax
|
||||||
@ -1811,19 +1794,7 @@ vesa20_drawbackground_stretch:
|
|||||||
; and LFB data (output for our function) [edi]
|
; and LFB data (output for our function) [edi]
|
||||||
; mov eax, [BytesPerScanLine]
|
; mov eax, [BytesPerScanLine]
|
||||||
; mul ebx
|
; mul ebx
|
||||||
mov eax, [d_width_calc_area + ebx*4]
|
mov eax, [BPSLine_calc_area+ebx*4]
|
||||||
cmp [ScreenBPP], byte 32
|
|
||||||
je .32
|
|
||||||
lea eax, [eax+eax*2]
|
|
||||||
jmp @f
|
|
||||||
;-------------------------------------
|
|
||||||
align 4
|
|
||||||
.32:
|
|
||||||
shl eax, 2
|
|
||||||
;-------------------------------------
|
|
||||||
align 4
|
|
||||||
@@:
|
|
||||||
|
|
||||||
xchg ebp, eax
|
xchg ebp, eax
|
||||||
add ebp, eax
|
add ebp, eax
|
||||||
add ebp, eax
|
add ebp, eax
|
||||||
|
Loading…
Reference in New Issue
Block a user