forked from KolibriOS/kolibrios
1) merged trunk
2) fn 68.20 from diamond git-svn-id: svn://kolibrios.org@453 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
$Revision: 431 $
|
$Revision: 448 $
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
|
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
|
||||||
@@ -745,6 +745,9 @@ proc user_free stdcall, base:dword
|
|||||||
test eax, 1
|
test eax, 1
|
||||||
jz @F
|
jz @F
|
||||||
call free_page
|
call free_page
|
||||||
|
mov eax, esi
|
||||||
|
shl eax, 12
|
||||||
|
invlpg [eax]
|
||||||
@@:
|
@@:
|
||||||
inc esi
|
inc esi
|
||||||
dec ecx
|
dec ecx
|
||||||
@@ -756,6 +759,18 @@ proc user_free stdcall, base:dword
|
|||||||
sub ebx, [edx+APPDATA.mem_size]
|
sub ebx, [edx+APPDATA.mem_size]
|
||||||
neg ebx
|
neg ebx
|
||||||
call update_mem_size
|
call update_mem_size
|
||||||
|
call user_normalize
|
||||||
|
ret
|
||||||
|
.exit:
|
||||||
|
xor eax, eax
|
||||||
|
inc eax
|
||||||
|
ret
|
||||||
|
endp
|
||||||
|
|
||||||
|
user_normalize:
|
||||||
|
; in: esi=heap_base, edi=heap_top
|
||||||
|
; out: eax=0 <=> OK
|
||||||
|
; destroys: ebx,edx,esi,edi
|
||||||
shr esi, 12
|
shr esi, 12
|
||||||
shr edi, 12
|
shr edi, 12
|
||||||
@@:
|
@@:
|
||||||
@@ -798,7 +813,236 @@ proc user_free stdcall, base:dword
|
|||||||
.err:
|
.err:
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
ret
|
ret
|
||||||
endp
|
|
||||||
|
user_realloc:
|
||||||
|
; in: eax = pointer, ebx = new size
|
||||||
|
; out: eax = new pointer or NULL
|
||||||
|
test eax, eax
|
||||||
|
jnz @f
|
||||||
|
; realloc(NULL,sz) - same as malloc(sz)
|
||||||
|
push ebx
|
||||||
|
call user_alloc
|
||||||
|
ret
|
||||||
|
@@:
|
||||||
|
push ecx edx
|
||||||
|
lea ecx, [eax - 0x1000]
|
||||||
|
shr ecx, 12
|
||||||
|
mov edx, [page_tabs+ecx*4]
|
||||||
|
test edx, USED_BLOCK
|
||||||
|
jnz @f
|
||||||
|
; attempt to realloc invalid pointer
|
||||||
|
.ret0:
|
||||||
|
pop edx ecx
|
||||||
|
xor eax, eax
|
||||||
|
ret
|
||||||
|
@@:
|
||||||
|
add ebx, 0x1FFF
|
||||||
|
shr edx, 12
|
||||||
|
shr ebx, 12
|
||||||
|
; edx = allocated size, ebx = new size
|
||||||
|
add edx, ecx
|
||||||
|
add ebx, ecx
|
||||||
|
cmp edx, ebx
|
||||||
|
jb .realloc_add
|
||||||
|
; release part of allocated memory
|
||||||
|
.loop:
|
||||||
|
cmp edx, ebx
|
||||||
|
jz .release_done
|
||||||
|
dec edx
|
||||||
|
xor eax, eax
|
||||||
|
xchg eax, [page_tabs+edx*4]
|
||||||
|
test al, 1
|
||||||
|
jz .loop
|
||||||
|
call free_page
|
||||||
|
mov eax, edx
|
||||||
|
shl eax, 12
|
||||||
|
invlpg [eax]
|
||||||
|
jmp .loop
|
||||||
|
.release_done:
|
||||||
|
sub ebx, ecx
|
||||||
|
cmp ebx, 1
|
||||||
|
jnz .nofreeall
|
||||||
|
mov eax, [page_tabs+ecx*4]
|
||||||
|
and eax, not 0xFFF
|
||||||
|
mov edx, [CURRENT_TASK]
|
||||||
|
shl edx, 8
|
||||||
|
mov ebx, [SLOT_BASE+APPDATA.mem_size+edx]
|
||||||
|
sub ebx, eax
|
||||||
|
add ebx, 0x1000
|
||||||
|
or al, FREE_BLOCK
|
||||||
|
mov [page_tabs+ecx*4], eax
|
||||||
|
push esi edi
|
||||||
|
mov esi, [SLOT_BASE+APPDATA.heap_base+edx]
|
||||||
|
mov edi, [SLOT_BASE+APPDATA.heap_top+edx]
|
||||||
|
call update_mem_size
|
||||||
|
call user_normalize
|
||||||
|
pop edi esi
|
||||||
|
jmp .ret0 ; all freed
|
||||||
|
.nofreeall:
|
||||||
|
sub edx, ecx
|
||||||
|
shl ebx, 12
|
||||||
|
or ebx, USED_BLOCK
|
||||||
|
xchg [page_tabs+ecx*4], ebx
|
||||||
|
shr ebx, 12
|
||||||
|
sub ebx, edx
|
||||||
|
push ebx ecx edx
|
||||||
|
mov edx, [CURRENT_TASK]
|
||||||
|
shl edx, 8
|
||||||
|
shl ebx, 12
|
||||||
|
sub ebx, [SLOT_BASE+APPDATA.mem_size+edx]
|
||||||
|
neg ebx
|
||||||
|
call update_mem_size
|
||||||
|
pop edx ecx ebx
|
||||||
|
lea eax, [ecx+1]
|
||||||
|
shl eax, 12
|
||||||
|
push eax
|
||||||
|
add ecx, ebx
|
||||||
|
add edx, ecx
|
||||||
|
shl ebx, 12
|
||||||
|
jz .ret
|
||||||
|
push esi
|
||||||
|
mov esi, [CURRENT_TASK]
|
||||||
|
shl esi, 8
|
||||||
|
mov esi, [SLOT_BASE+APPDATA.heap_top+esi]
|
||||||
|
shr esi, 12
|
||||||
|
@@:
|
||||||
|
cmp edx, esi
|
||||||
|
jae .merge_done
|
||||||
|
mov eax, [page_tabs+edx*4]
|
||||||
|
test al, USED_BLOCK
|
||||||
|
jz .merge_done
|
||||||
|
and dword [page_tabs+edx*4], 0
|
||||||
|
and eax, not 0xFFF
|
||||||
|
add ebx, eax
|
||||||
|
add edx, eax
|
||||||
|
jmp @b
|
||||||
|
.merge_done:
|
||||||
|
pop esi
|
||||||
|
or ebx, FREE_BLOCK
|
||||||
|
mov [page_tabs+ecx*4], ebx
|
||||||
|
.ret:
|
||||||
|
pop eax edx ecx
|
||||||
|
ret
|
||||||
|
.realloc_add:
|
||||||
|
; get some additional memory
|
||||||
|
mov eax, [CURRENT_TASK]
|
||||||
|
shl eax, 8
|
||||||
|
mov eax, [SLOT_BASE+APPDATA.heap_top+eax]
|
||||||
|
shr eax, 12
|
||||||
|
cmp edx, eax
|
||||||
|
jae .cant_inplace
|
||||||
|
mov eax, [page_tabs+edx*4]
|
||||||
|
shr eax, 12
|
||||||
|
add eax, edx
|
||||||
|
cmp eax, ebx
|
||||||
|
jb .cant_inplace
|
||||||
|
sub eax, ebx
|
||||||
|
jz @f
|
||||||
|
shl eax, 12
|
||||||
|
or al, FREE_BLOCK
|
||||||
|
mov [page_tabs+ebx*4], eax
|
||||||
|
@@:
|
||||||
|
mov eax, ebx
|
||||||
|
sub eax, ecx
|
||||||
|
shl eax, 12
|
||||||
|
or al, USED_BLOCK
|
||||||
|
mov [page_tabs+ecx*4], eax
|
||||||
|
lea eax, [ecx+1]
|
||||||
|
shl eax, 12
|
||||||
|
push eax
|
||||||
|
push edi
|
||||||
|
lea edi, [page_tabs+edx*4]
|
||||||
|
mov eax, 2
|
||||||
|
sub ebx, edx
|
||||||
|
mov ecx, ebx
|
||||||
|
cld
|
||||||
|
rep stosd
|
||||||
|
pop edi
|
||||||
|
mov edx, [CURRENT_TASK]
|
||||||
|
shl edx, 8
|
||||||
|
shl ebx, 12
|
||||||
|
add ebx, [SLOT_BASE+APPDATA.mem_size+edx]
|
||||||
|
call update_mem_size
|
||||||
|
pop eax edx ecx
|
||||||
|
ret
|
||||||
|
.cant_inplace:
|
||||||
|
push esi edi
|
||||||
|
mov eax, [CURRENT_TASK]
|
||||||
|
shl eax, 8
|
||||||
|
mov esi, [SLOT_BASE+APPDATA.heap_base+eax]
|
||||||
|
mov edi, [SLOT_BASE+APPDATA.heap_top+eax]
|
||||||
|
shr esi, 12
|
||||||
|
shr edi, 12
|
||||||
|
sub ebx, ecx
|
||||||
|
.find_place:
|
||||||
|
cmp esi, edi
|
||||||
|
jae .place_not_found
|
||||||
|
mov eax, [page_tabs+esi*4]
|
||||||
|
test al, FREE_BLOCK
|
||||||
|
jz .next_place
|
||||||
|
shr eax, 12
|
||||||
|
cmp eax, ebx
|
||||||
|
jae .place_found
|
||||||
|
add esi, eax
|
||||||
|
jmp .find_place
|
||||||
|
.next_place:
|
||||||
|
shr eax, 12
|
||||||
|
add esi, eax
|
||||||
|
jmp .find_place
|
||||||
|
.place_not_found:
|
||||||
|
pop edi esi
|
||||||
|
jmp .ret0
|
||||||
|
.place_found:
|
||||||
|
sub eax, ebx
|
||||||
|
jz @f
|
||||||
|
push esi
|
||||||
|
add esi, eax
|
||||||
|
shl eax, 12
|
||||||
|
or al, FREE_BLOCK
|
||||||
|
mov [page_tabs+esi*4], eax
|
||||||
|
pop esi
|
||||||
|
@@:
|
||||||
|
mov eax, ebx
|
||||||
|
shl eax, 12
|
||||||
|
or al, USED_BLOCK
|
||||||
|
mov [page_tabs+esi*4], eax
|
||||||
|
inc esi
|
||||||
|
mov eax, esi
|
||||||
|
shl eax, 12
|
||||||
|
sub eax, new_app_base
|
||||||
|
push eax
|
||||||
|
mov eax, [page_tabs+ecx*4]
|
||||||
|
and eax, not 0xFFF
|
||||||
|
or al, FREE_BLOCK
|
||||||
|
sub edx, ecx
|
||||||
|
mov [page_tabs+ecx*4], eax
|
||||||
|
inc ecx
|
||||||
|
@@:
|
||||||
|
xor eax, eax
|
||||||
|
xchg eax, [page_tabs+ecx*4]
|
||||||
|
mov [page_tabs+esi*4], eax
|
||||||
|
mov eax, ecx
|
||||||
|
shl eax, 12
|
||||||
|
invlpg [eax]
|
||||||
|
inc ecx
|
||||||
|
inc esi
|
||||||
|
dec ebx
|
||||||
|
dec edx
|
||||||
|
jnz @b
|
||||||
|
push ebx
|
||||||
|
mov edx, [CURRENT_TASK]
|
||||||
|
shl edx, 8
|
||||||
|
shl ebx, 12
|
||||||
|
add ebx, [SLOT_BASE+APPDATA.mem_size+edx]
|
||||||
|
call update_mem_size
|
||||||
|
pop ebx
|
||||||
|
@@:
|
||||||
|
mov dword [page_tabs+esi*4], 2
|
||||||
|
inc esi
|
||||||
|
dec ebx
|
||||||
|
jnz @b
|
||||||
|
pop eax edi esi edx ecx
|
||||||
|
ret
|
||||||
|
|
||||||
if 0
|
if 0
|
||||||
align 4
|
align 4
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
$Revision: 431 $
|
$Revision: 448 $
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
|
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
|
||||||
@@ -111,13 +111,12 @@ proc free_page
|
|||||||
pushfd
|
pushfd
|
||||||
cli
|
cli
|
||||||
shr eax, 12 ;page index
|
shr eax, 12 ;page index
|
||||||
mov ebx, sys_pgmap
|
bts dword [sys_pgmap], eax ;that's all!
|
||||||
bts [ebx], eax ;that's all!
|
|
||||||
cmc
|
cmc
|
||||||
adc [pg_data.pages_free], 0
|
adc [pg_data.pages_free], 0
|
||||||
shr eax, 3
|
shr eax, 3
|
||||||
and eax, not 3 ;dword offset from page_map
|
and eax, not 3 ;dword offset from page_map
|
||||||
add eax, ebx
|
add eax, sys_pgmap
|
||||||
cmp [page_start], eax
|
cmp [page_start], eax
|
||||||
ja @f
|
ja @f
|
||||||
popfd
|
popfd
|
||||||
@@ -962,14 +961,21 @@ new_services:
|
|||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
cmp eax, 19
|
cmp eax, 19
|
||||||
ja .fail
|
ja @f
|
||||||
; add ebx, new_app_base
|
|
||||||
cmp ebx, OS_BASE
|
cmp ebx, OS_BASE
|
||||||
jae .fail
|
jae .fail
|
||||||
stdcall load_library, ebx
|
stdcall load_library, ebx
|
||||||
mov [esp+36], eax
|
mov [esp+36], eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@@:
|
||||||
|
cmp eax, 20
|
||||||
|
ja .fail
|
||||||
|
mov eax, ecx
|
||||||
|
call user_realloc
|
||||||
|
mov [esp+36], eax
|
||||||
|
ret
|
||||||
|
|
||||||
.fail:
|
.fail:
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov [esp+36], eax
|
mov [esp+36], eax
|
||||||
|
@@ -3316,7 +3316,7 @@ IPC
|
|||||||
======================================================================
|
======================================================================
|
||||||
================ <20>㭪<EFBFBD><E3ADAA><EFBFBD> 63 - ࠡ<><E0A0A1><EFBFBD> <20> <20><><EFBFBD> <20>⫠<EFBFBD><E2ABA0><EFBFBD>. ===============
|
================ <20>㭪<EFBFBD><E3ADAA><EFBFBD> 63 - ࠡ<><E0A0A1><EFBFBD> <20> <20><><EFBFBD> <20>⫠<EFBFBD><E2ABA0><EFBFBD>. ===============
|
||||||
======================================================================
|
======================================================================
|
||||||
<EFBFBD><EFBFBD>᪠ <20>⫠<EFBFBD><E2ABA0><EFBFBD> <20>।<EFBFBD>⠢<EFBFBD><E2A0A2><EFBFBD><EFBFBD> ᮡ<><E1AEA1> <20><><EFBFBD>⥬<EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> (<28><> 512 <20><><EFBFBD><EFBFBD>),
|
<EFBFBD><EFBFBD>᪠ <20>⫠<EFBFBD><E2ABA0><EFBFBD> <20>।<EFBFBD>⠢<EFBFBD><E2A0A2><EFBFBD><EFBFBD> ᮡ<><E1AEA1> <20><><EFBFBD>⥬<EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> (<28><> 4096 <20><><EFBFBD><EFBFBD>),
|
||||||
<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20>ந<EFBFBD><E0AEA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20>ந<EFBFBD><E0AEA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><> <20><><EFBFBD><EFBFBD>ண<EFBFBD> <20><>㣠<EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><> <20><><EFBFBD><EFBFBD>ண<EFBFBD> <20><>㣠<EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᮣ<><E1AEA3>襭<EFBFBD><E8A5AD>, <20> ᮮ⢥<E1AEAE><E2A2A5>⢨<EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᮣ<><E1AEA3>襭<EFBFBD><E8A5AD>, <20> ᮮ⢥<E1AEAE><E2A2A5>⢨<EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -
|
||||||
@@ -3644,7 +3644,8 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
|
|||||||
* eax = 1 - <20>ᯥ譮
|
* eax = 1 - <20>ᯥ譮
|
||||||
* eax = 0 - <20><>㤠<EFBFBD><E3A4A0>
|
* eax = 0 - <20><>㤠<EFBFBD><E3A4A0>
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>砭<EFBFBD><EFBFBD>:
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>砭<EFBFBD><EFBFBD>:
|
||||||
* <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ࠭<><E0A0AD> <20>뤥<EFBFBD><EBA4A5><EFBFBD> <20><><EFBFBD><EFBFBD>㭪樥<E3ADAA> 12.
|
* <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ࠭<><E0A0AD> <20>뤥<EFBFBD><EBA4A5><EFBFBD> <20><><EFBFBD><EFBFBD>㭪樥<E3ADAA> 12
|
||||||
|
<20><><EFBFBD> <20><><EFBFBD><EFBFBD>㭪樥<E3ADAA> 20.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
===== <20>㭪<EFBFBD><E3ADAA><EFBFBD> 68, <20><><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA><EFBFBD> 14 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>饭<EFBFBD><E9A5AD> <20><> <20>ࠩ<EFBFBD><E0A0A9><EFBFBD><EFBFBD>. =====
|
===== <20>㭪<EFBFBD><E3ADAA><EFBFBD> 68, <20><><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA><EFBFBD> 14 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>饭<EFBFBD><E9A5AD> <20><> <20>ࠩ<EFBFBD><E0A0A9><EFBFBD><EFBFBD>. =====
|
||||||
@@ -3736,6 +3737,30 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
|
|||||||
<20><><EFBFBD><EFBFBD><EFBFBD>稢<EFBFBD><E7A8A2>騩<EFBFBD><E9A8A9> <20><><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> dword <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <><EFA2AB><EFBFBD><EFBFBD><EFBFBD>
|
<20><><EFBFBD><EFBFBD><EFBFBD>稢<EFBFBD><E7A8A2>騩<EFBFBD><E9A8A9> <20><><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> dword <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <><EFA2AB><EFBFBD><EFBFBD><EFBFBD>
|
||||||
㪠<><E3AAA0>⥫<EFBFBD><E2A5AB> <20><> <20><><EFBFBD> <20>㭪樨, <20><><EFBFBD>ன ᮤ<>ন<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20>㭪樨.
|
㪠<><E3AAA0>⥫<EFBFBD><E2A5AB> <20><> <20><><EFBFBD> <20>㭪樨, <20><><EFBFBD>ன ᮤ<>ন<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20>㭪樨.
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
====== <20>㭪<EFBFBD><E3ADAA><EFBFBD> 68, <20><><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA><EFBFBD> 20 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. =====
|
||||||
|
======================================================================
|
||||||
|
<EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||||
|
* eax = 68 - <20><><EFBFBD><EFBFBD><EFBFBD> <20>㭪樨
|
||||||
|
* ebx = 20 - <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>㭪樨
|
||||||
|
* ecx = <20><><EFBFBD><EFBFBD><EFBFBD> ࠧ<><E0A0A7><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
* edx = 㪠<><E3AAA0>⥫<EFBFBD> <20><> 㦥 <20>뤥<EFBFBD><EBA4A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>祭<EFBFBD><E7A5AD>:
|
||||||
|
* eax = 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, 0 <20><><EFBFBD> <20>訡<EFBFBD><E8A8A1>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>砭<EFBFBD><EFBFBD>:
|
||||||
|
* <20>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD>⥫쭮 <><E1ABA5><EFBFBD><EFBFBD> <20><><EFBFBD>樠<EFBFBD><E6A8A0><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>맮<EFBFBD><EBA7AE><EFBFBD>
|
||||||
|
<20><><EFBFBD><EFBFBD>㭪樨 11.
|
||||||
|
* <20>㭪<EFBFBD><E3ADAA><EFBFBD> <20>뤥<EFBFBD><EBA4A5><EFBFBD><EFBFBD> 楫<><E6A5AB> <20><> <20><>࠭<EFBFBD><E0A0AD> (4 <20><>) ⠪, <20><><EFBFBD> 䠪<><E4A0AA><EFBFBD><EFBFBD>᪨<EFBFBD>
|
||||||
|
ࠧ<><E0A0A7><EFBFBD> <20>뤥<EFBFBD><EBA4A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> ࠢ<><E0A0A2> <20><><EFBFBD><EFBFBD><EFBFBD>襭<EFBFBD><E8A5AD><EFBFBD><EFBFBD>.
|
||||||
|
* <20> edx=0, <20><> <20>맮<EFBFBD> <20>㭪樨 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥭ <20>뤥<EFBFBD><EBA4A5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<20><><EFBFBD><EFBFBD>㭪樥<E3ADAA> 12. <20> <20><><EFBFBD>⨢<EFBFBD><E2A8A2><EFBFBD> <20><><EFBFBD>砥 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> edx
|
||||||
|
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ࠭<><E0A0AD> <20>뤥<EFBFBD><EBA4A5><EFBFBD> <20><><EFBFBD><EFBFBD>㭪樥<E3ADAA> 12 <20><><EFBFBD>
|
||||||
|
<20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>㭪樥<E3ADAA>.
|
||||||
|
* <20> ecx=0, <20><> <20>㭪<EFBFBD><E3ADAA><EFBFBD> <20><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> edx <20>
|
||||||
|
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> 0.
|
||||||
|
* <20><><EFBFBD><EFBFBD>ন<EFBFBD><E0A6A8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>襣<EFBFBD> <20><> <20><><EFBFBD>ண<EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
ࠧ<><E0A0A7> <20><><EFBFBD>࠭<EFBFBD><E0A0AD><EFBFBD><EFBFBD><EFBFBD>.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
======================== <20>㭪<EFBFBD><E3ADAA><EFBFBD> 69 - <20>⫠<EFBFBD><E2ABA0><EFBFBD>. =======================
|
======================== <20>㭪<EFBFBD><E3ADAA><EFBFBD> 69 - <20>⫠<EFBFBD><E2ABA0><EFBFBD>. =======================
|
||||||
======================================================================
|
======================================================================
|
||||||
@@ -4480,9 +4505,7 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
|
|||||||
7, 8 <20>㭪樨 21)
|
7, 8 <20>㭪樨 21)
|
||||||
* 2 = <20>㭪<EFBFBD><E3ADAA><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ন<EFBFBD><E0A6A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<><E4A0A9><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⥬<EFBFBD>
|
* 2 = <20>㭪<EFBFBD><E3ADAA><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ন<EFBFBD><E0A6A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<><E4A0A9><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⥬<EFBFBD>
|
||||||
* 3 = <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⭠<EFBFBD> 䠩<><E4A0A9><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⥬<EFBFBD>
|
* 3 = <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⭠<EFBFBD> 䠩<><E4A0A9><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⥬<EFBFBD>
|
||||||
* 4 = <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD><EFBFBD><EFBFBD> ⮫쪮 <20>㭪樥<E3ADAA> rename <20><><EFBFBD> <20><>।<EFBFBD><E0A5A4><EFBFBD> ᨫ쭮
|
* 4 = <20><>१<EFBFBD>ࢨ<EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD><E9A0A5><EFBFBD> <20> ⥪<>饩 ॠ<><E0A5A0><EFBFBD><EFBFBD>樨
|
||||||
<20><><EFBFBD><EFBFBD>୮<EFBFBD><E0ADAE> <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> ᮮ⢥<E1AEAE><E2A2A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ᠭ<EFBFBD><E1A0AD>
|
|
||||||
<20> <20><>室<EFBFBD><E5AEA4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> "partition not defined at hd"
|
|
||||||
* 5 = 䠩<> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
* 5 = 䠩<> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
* 6 = 䠩<> <20><><EFBFBD><EFBFBD><EFBFBD>稫<EFBFBD><E7A8AB>
|
* 6 = 䠩<> <20><><EFBFBD><EFBFBD><EFBFBD>稫<EFBFBD><E7A8AB>
|
||||||
* 7 = 㪠<><E3AAA0>⥫<EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
* 7 = 㪠<><E3AAA0>⥫<EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
@@ -3285,7 +3285,7 @@ Remarks:
|
|||||||
============== Function 63 - work with the debug board. ==============
|
============== Function 63 - work with the debug board. ==============
|
||||||
======================================================================
|
======================================================================
|
||||||
The debug board is the global system buffer (with the size
|
The debug board is the global system buffer (with the size
|
||||||
512 bytes), to which any program can write (generally speaking,
|
4096 bytes), to which any program can write (generally speaking,
|
||||||
arbitrary) data and from which other program can read these data.
|
arbitrary) data and from which other program can read these data.
|
||||||
By the agreement written data are text strings interpreted as
|
By the agreement written data are text strings interpreted as
|
||||||
debug messages on a course of program execution. The kernel in
|
debug messages on a course of program execution. The kernel in
|
||||||
@@ -3615,7 +3615,8 @@ Returned value:
|
|||||||
* eax = 1 - success
|
* eax = 1 - success
|
||||||
* eax = 0 - failed
|
* eax = 0 - failed
|
||||||
Remarks:
|
Remarks:
|
||||||
* The memory block must have been allocated by subfunction 12.
|
* The memory block must have been allocated by subfunction 12
|
||||||
|
or subfunction 20.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
======== Function 68, subfunction 14 - wait for driver notify. =======
|
======== Function 68, subfunction 14 - wait for driver notify. =======
|
||||||
@@ -3705,6 +3706,29 @@ Remarks:
|
|||||||
by zero. The first dword in structure points to function name,
|
by zero. The first dword in structure points to function name,
|
||||||
the second dword contains address of function.
|
the second dword contains address of function.
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
======= Function 68, subfunction 20 - reallocate memory block. =======
|
||||||
|
======================================================================
|
||||||
|
Parameters:
|
||||||
|
* eax = 68 - function number
|
||||||
|
* ebx = 20 - subfunction number
|
||||||
|
* ecx = new size in bytes
|
||||||
|
* edx = pointer to already allocated block
|
||||||
|
Returned value:
|
||||||
|
* eax = pointer to the reallocated block, 0 = error
|
||||||
|
Remarks:
|
||||||
|
* Before this call one must initialize process heap by call to
|
||||||
|
subfunction 11.
|
||||||
|
* The function allocates an integer number of pages (4 Kb) in such
|
||||||
|
way that the real size of allocated block is more than or equal to
|
||||||
|
requested size.
|
||||||
|
* If edx=0, the function call is equivalent to memory allocation
|
||||||
|
with subfunction 12. Otherwise the block at edx
|
||||||
|
must be allocated earlier with subfunction 12 or this subfunction.
|
||||||
|
* If ecx=0, the function frees memory block at edx and returns 0.
|
||||||
|
* The contents of the block are unchanged up to the shorter of
|
||||||
|
the new and old sizes.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
====================== Fucntion 69 - debugging. ======================
|
====================== Fucntion 69 - debugging. ======================
|
||||||
======================================================================
|
======================================================================
|
||||||
@@ -4435,10 +4459,7 @@ Codes of events:
|
|||||||
(by subfunctions 7, 8 of function 21)
|
(by subfunctions 7, 8 of function 21)
|
||||||
* 2 = function is not supported for the given file system
|
* 2 = function is not supported for the given file system
|
||||||
* 3 = unknown file system
|
* 3 = unknown file system
|
||||||
* 4 = is returned only from function 'rename' by transmission of
|
* 4 = reserved, is never returned in the current implementation
|
||||||
the strongly incorrect parameter and in any way does not
|
|
||||||
correspond to the description in the kernel sources
|
|
||||||
"partition not defined at hd"
|
|
||||||
* 5 = file not found
|
* 5 = file not found
|
||||||
* 6 = end of file, EOF
|
* 6 = end of file, EOF
|
||||||
* 7 = pointer lies outside of application memory
|
* 7 = pointer lies outside of application memory
|
||||||
|
@@ -205,7 +205,7 @@ include "video/cursors.inc" ; cursors functions
|
|||||||
|
|
||||||
include "network/stack.inc"
|
include "network/stack.inc"
|
||||||
|
|
||||||
include "drivers/uart.inc"
|
;include "drivers/uart.inc"
|
||||||
|
|
||||||
|
|
||||||
; Mouse pointer
|
; Mouse pointer
|
||||||
|
Reference in New Issue
Block a user