1)fixed applications iopl level 2)fixed #PF exceptions handler

3)changed sysfuncr.txt fn. 18.20, 64.1, 68.11, 68.16


git-svn-id: svn://kolibrios.org@172 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2006-10-10 05:11:30 +00:00
parent 8609e45095
commit 174a707452
7 changed files with 4804 additions and 383 deletions

View File

@ -632,10 +632,19 @@ proc init_heap stdcall, heap_size:dword
tab_count dd ?
endl
mov ebx,[CURRENT_TASK]
shl ebx,8
mov eax, [PROC_BASE+APPDATA.heap_top+ebx]
test eax, eax
jz @F
sub eax,[PROC_BASE+APPDATA.heap_base+ebx]
sub eax, 4096
ret
@@:
mov edx, [heap_size]
and edx, edx
jz .exit
add edx, 4095
add edx, (4095+4096)
and edx, not 4095
mov [heap_size], edx
add edx, 0x003FFFFF
@ -643,15 +652,13 @@ proc init_heap stdcall, heap_size:dword
shr edx, 22
mov [tab_count], edx
mov ebx,[CURRENT_TASK]
shl ebx,8
mov esi, [PROC_BASE+0x8c+ebx]
mov esi, [PROC_BASE+APPDATA.mem_size+ebx]
add esi, 0x003FFFFF
and esi, not 0x003FFFFF
mov edi, esi
mov [PROC_BASE+0x18+ebx], esi
mov [PROC_BASE+APPDATA.heap_base+ebx], esi
add esi, [heap_size]
mov [PROC_BASE+0x1C+ebx], esi
mov [PROC_BASE+APPDATA.heap_top+ebx], esi
mov eax, cr3
and eax, not 0xFFF
@ -672,7 +679,7 @@ proc init_heap stdcall, heap_size:dword
shl ecx, 12-2
mov ebx,[CURRENT_TASK]
shl ebx,8
mov edi, [PROC_BASE+0x18+ebx]
mov edi, [PROC_BASE+APPDATA.heap_base+ebx]
add edi, new_app_base
shr edi, 10
mov esi, edi
@ -688,7 +695,6 @@ proc init_heap stdcall, heap_size:dword
sub eax, 4096
or ebx, FREE_BLOCK
mov [pages_tab+esi], ebx
ret
.exit:
xor eax, eax
@ -704,8 +710,8 @@ proc user_alloc stdcall, alloc_size:dword
mov ebx, [CURRENT_TASK]
shl ebx, 8
mov esi, dword [ebx+PROC_BASE+0x18]; heap_base
mov edi, dword [ebx+PROC_BASE+0x1C]; heap_top
mov esi, dword [ebx+PROC_BASE+APPDATA.heap_base]; heap_base
mov edi, dword [ebx+PROC_BASE+APPDATA.heap_top]; heap_top
add esi, new_app_base
add edi, new_app_base
@ -788,8 +794,8 @@ proc user_free stdcall, base:dword
@@:
mov ebx, [CURRENT_TASK]
shl ebx, 8
mov esi, dword [ebx+PROC_BASE+0x18]; heap_base
mov edi, dword [ebx+PROC_BASE+0x1C]; heap_top
mov esi, dword [ebx+PROC_BASE+APPDATA.heap_base]; heap_base
mov edi, dword [ebx+PROC_BASE+APPDATA.heap_top]; heap_top
shr esi, 12
shr edi, 12
@@:
@ -834,103 +840,6 @@ proc user_free stdcall, base:dword
ret
endp
;proc new_mem_resize stdcall, new_size:dword
;
; stdcall wait_mutex, pg_data.pg_mutex
;
; mov edi, [new_size]
; add edi,4095
; and edi,not 4095
; mov [new_size], edi
; mov edx,[CURRENT_TASK]
; shl edx,8
; mov esi, [PROC_BASE+0x8c+edx]
; add esi, 4095
; and esi, not 4095
; cmp edi, esi
; jae .expand
; shr edi, 12
; shr esi, 12
;
;@@: mov eax, [pages_tab+0x4000+edi*4]
; test eax, 1
; jz .next
; mov dword [pages_tab+0x4000+edi*4], 2
; mov ebx, edi
; shl ebx, 12
; invlpg [ebx+std_application_base_address]
; call free_page
;
;.next: add edi, 1
; cmp edi, esi
; jb @B
;
;.update_size:
; mov ebx, [new_size]
; mov [PROC_BASE+0x8c+edx],ebx
;
;;search threads and update
;;application memory size infomation
; mov ecx,[PROC_BASE+0xb8+edx]
; mov eax,2
;.search_threads:
;;eax = current slot
;;ebx = new memory size
;;ecx = page directory
; cmp eax,[TASK_COUNT]
; jg .search_threads_end
; mov edx,eax
; shl edx,5
; cmp word [CURRENT_TASK+edx+0xa],9 ;if slot empty?
; jz .search_threads_next
; shl edx,3
; cmp [PROC_BASE+edx+0xb8],ecx ;if it is our thread?
; jnz .search_threads_next
; mov [PROC_BASE+edx+0x8c],ebx ;update memory size
;.search_threads_next:
; inc eax
; jmp .search_threads
;.search_threads_end:
; xor eax, eax
; dec [pg_data.pg_mutex]
; ret
;
;
;.expand:
; add edi, new_app_base
; add esi, new_app_base
;
;.grow: call alloc_page
; test eax, eax
; jz .exit
; stdcall map_page,esi,eax,dword PG_UW
; push edi
; mov edi, esi
; xor eax, eax
; mov ecx, 1024
; cld
; rep stosd
; pop edi
; add esi, 0x1000
; cmp esi, edi
; jna .grow
; jmp .update_size
;.exit:
; xor eax, eax
; inc eax
; dec [pg_data.pg_mutex]
; ret
;endp
align 4
proc alloc_dll
pushf
@ -964,168 +873,3 @@ proc alloc_service
add eax, srv_tab
ret
endp
if NEW
align 16
new_services:
cmp eax, 10
jb .fail
ja @f
push dword [ebp+8+new_app_base]
call get_mem_info
mov [esp+36], eax
ret
@@:
cmp eax, 11
ja @f
push dword [ebp+8+new_app_base]
call init_heap
mov [esp+36], eax
ret
@@:
cmp eax, 12
ja @f
push dword [ebp+8+new_app_base]
call user_alloc
mov [esp+36], eax
ret
@@:
cmp eax, 13
ja @f
push dword [ebp+8+new_app_base]
call user_free
mov [esp+36], eax
ret
@@:
cmp eax, 14
ja @f
mov eax, [ebp+8+new_app_base]
add eax,new_app_base
stdcall get_notify, eax
ret
;@@:
; cmp eax, 15
; ja @f
; call set_notify
; ret
@@:
cmp eax, 16
ja @f
mov eax, [ebp+8+new_app_base]
add eax, new_app_base
stdcall get_service, eax
mov [esp+36], eax
ret
@@:
cmp eax, 17
ja @f
stdcall srv_handler,[ebp+8+new_app_base],\
[ebp+12+new_app_base],\
[ebp+16+new_app_base]
mov [esp+36], eax
ret
;@@:
; cmp eax, 20
; ja @f
; call CreateSound
; mov [esp+36], eax
; ret
@@:
.fail:
xor eax, eax
mov [esp+36], eax
ret
proc strncmp stdcall, str1:dword, str2:dword, count:dword
mov ecx,[count]
jecxz .end
mov ebx,ecx
mov edi,[str1]
mov esi,edi
xor eax,eax
repne scasb
neg ecx ; cx = count - strlen
add ecx,ebx ; strlen + count - strlen
.okay:
mov edi,esi
mov esi,[str2]
repe cmpsb
mov al,[esi-1]
xor ecx,ecx
cmp al,[edi-1]
ja .str2_big
je .end
.str1_big:
sub ecx,2
.str2_big:
not ecx
.end:
mov eax,ecx
ret
endp
proc get_proc stdcall, exp:dword, sz_name:dword
mov edx, [exp]
.next:
mov eax, [edx]
test eax, eax
jz .end
push edx
stdcall strncmp, eax, [sz_name], 16
pop edx
test eax, eax
jz .ok
add edx,8
jmp .next
.ok:
mov eax, [edx+4]
.end:
ret
endp
proc link_dll stdcall, exp:dword, imp:dword
mov esi, [imp]
.next:
mov eax, [esi]
test eax, eax
jz .end
push esi
stdcall get_proc, [exp], eax
pop esi
test eax, eax
jz @F
mov [esi], eax
@@:
add esi, 4
jmp .next
.end:
ret
endp
end if

View File

@ -382,7 +382,10 @@ proc new_mem_resize stdcall, new_size:dword
mov edx,[CURRENT_TASK]
shl edx,8
mov esi, [PROC_BASE+0x8c+edx]
cmp [PROC_BASE+APPDATA.heap_base+edx],0
jne .exit
mov esi, [PROC_BASE+APPDATA.mem_size+edx]
add esi, 4095
and esi, not 4095
@ -522,19 +525,12 @@ proc page_fault_handler
mov ebp, esp
mov eax, cr2
sub esp, 4
mov [esp], eax
push eax
push ds
mov ax, 0x10
mov ds, ax
; mov edx, 0x400 ;bocsh
; mov al,0xff ;bocsh
; out dx, al ;bocsh
; nop ;bocsh fix
mov ebx, [ebp-4]
cmp ebx, 0xe0000000
@ -552,13 +548,15 @@ proc page_fault_handler
inc [pg_data.pages_faults]
shr ebx, 12
mov ecx, ebx
shr ecx, 10
mov edx, [master_tab+ecx*4]
test edx, 1
jz .fail
mov eax, [pages_tab+ebx*4]
shr ebx, 10
mov edx, [master_tab+ebx*4]
test eax, 2
jz .exit
jz .fail
call alloc_page
and eax, eax
@ -581,6 +579,17 @@ proc page_fault_handler
popad
add esp, 4
iretd
.fail:
pop ds
mov esp, ebp
popad
add esp, 4
save_ring3_context ;debugger support
mov bl, 14
jmp exc_c
iretd
.kernel_space:
shr ebx, 12
@ -902,8 +911,13 @@ align 4
sysfn_meminfo:
add ebx, new_app_base
cmp ebx, new_app_base
jb .fail
mov eax, [pg_data.pages_count]
mov [ebx], eax
shl eax, 12
mov [esp+36], eax
mov ecx, [pg_data.pages_free]
mov [ebx+4], ecx
mov edx, [pg_data.pages_faults]
@ -916,7 +930,9 @@ sysfn_meminfo:
mov [ebx+20], eax
mov ecx, [free_blocks]
mov [ebx+24], ecx
ret
.fail:
mov dword [esp+36], -1
ret
align 4
@ -929,14 +945,6 @@ new_services:
jb .fail
ja @f
; add ebx, new_app_base
; stdcall get_mem_info, ebx
; mov [esp+36], eax
; ret
;@@:
; cmp eax, 11
; ja @f
stdcall init_heap, ebx
mov [esp+36], eax
ret
@ -958,6 +966,8 @@ new_services:
cmp eax, 14
ja @f
add ebx,new_app_base
cmp ebx, new_app_base
jb .fail
stdcall get_notify, ebx
ret
@@:
@ -974,6 +984,8 @@ new_services:
ja @f
add ebx, new_app_base
cmp ebx, new_app_base
jb .fail
stdcall get_service, ebx
mov [esp+36], eax
ret
@ -1235,6 +1247,33 @@ proc set_mtrr stdcall, reg:dword,base:dword,size:dword,mem_type:dword
ret
endp
align 4
proc stall stdcall, delay:dword
push ecx
push edx
push ebx
push eax
mov eax, [delay]
mul [stall_mcs]
mov ebx, eax ;low
mov ecx, edx ;high
rdtsc
add ebx, eax
adc ecx,edx
@@:
rdtsc
sub eax, ebx
sbb edx, ecx
jb @B
pop eax
pop ebx
pop edx
pop ecx
ret
endp
iglobal
align 4
intel_str db "GenuineIntel",0
@ -1265,6 +1304,7 @@ align 16
fpu_data rd 1
fdd_buff rd 1
stall_mcs rd 1
;;CPUID information
cpu_vendor rd 3

View File

@ -130,7 +130,7 @@ proc create_app_space stdcall, app_size:dword,img_size:dword
mov [master_addr], eax
mov eax, [app_size]
add eax, 4095+4096
add eax, 4095
and eax, NOT(4095)
mov [app_size], eax
mov ebx, eax
@ -757,7 +757,7 @@ proc add_app_parameters stdcall,slot:dword,img_base:dword,\
mov ax,graph_data ;ax - selector of graphic segment
mov [l.gs],ax
mov [l.io],word 128
mov [l.eflags],dword 0x3202
mov [l.eflags],dword 0x1202
mov [l.ss0],os_data
mov ebx,[slot]

View File

@ -385,7 +385,7 @@
ᮡá⢥­­® à ¡®âã, ¨ ¢à¥¬¥­¨ ¯à®áâ®ï ¢ ®¦¨¤ ­¨¨ ¯à¥à뢠­¨ï
(ª®â®à®¥ ¬®¦­® ¯®«ãç¨âì ¢ë§®¢®¬ ¯®¤ä㭪樨 4 ä㭪樨 18).
* <20> ç¨­ ï á® á«®â  2, à §¬¥é îâáï ®¡ëç­ë¥ ¯à¨«®¦¥­¨ï.
* Ž¡ëç­ë¥ ¯à¨«®¦¥­¨ï à §¬¥é îâáï ¢ ¯ ¬ï⨠¯®  ¤à¥áã 0x10000000
* Ž¡ëç­ë¥ ¯à¨«®¦¥­¨ï à §¬¥é îâáï ¢ ¯ ¬ï⨠¯®  ¤à¥áã 0x60400000
(ª®­áâ ­â  ï¤à  std_application_base_address).
<20> «®¦¥­¨ï ­¥ ¯à®¨á室¨â, ¯®áª®«ìªã ã ª ¦¤®£® ¯à®æ¥áá  á¢®ï
â ¡«¨æ  áâà ­¨æ.
@ -878,8 +878,8 @@
db a,b,c,d ¤«ï ¢¥àᨨ a.b.c.d
db UID_xxx: ®¤­® ¨§ UID_NONE=0, UID_MENUET=1, UID_KOLIBRI=2
db 'name',0 - ASCIIZ-áâப  á ¨¬¥­¥¬
„«ï ï¤à  Kolibri 0.6.0.0:
db 0,6,0,0
„«ï ï¤à  Kolibri 0.5.8.1:
db 0,5,8,1
db 2
db 'Kolibri',0
@ -1005,6 +1005,32 @@ db 'Kolibri',0
¨ ¯à®¢¥à¨âì, çâ® ãáâ ­ ¢«¨¢ ¥¬®¥ ¯®«®¦¥­¨¥ ­¥ ¢ë室¨â §  ¯à¥¤¥«ë
íªà ­ .
======================================================================
====================== ”ã­ªæ¨ï 18, ¯®¤äã­ªæ¨ï 20 =====================
============= <20>®«ãç¨âì ¨­ä®à¬ æ¨î ®¡ ®¯¥à â¨¢­®© ¯ ¬ïâ¨. =============
======================================================================
<EFBFBD> à ¬¥âàë:
* eax = 18 - ­®¬¥à ä㭪樨
* ebx = 20 - ­®¬¥à ¯®¤ä㭪樨
* ecx = 㪠§ â¥«ì ­  ¡ãä¥à ¤«ï ¨­ä®à¬ æ¨¨ (36 ¡ ©â)
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* eax = ®¡é¨© à §¬¥à ¨¬¥î饩áï ®¯¥à â¨¢­®© ¯ ¬ï⨠¢ ¡ ©â å
¨«¨ -1 ¢ á«ãç ¥ ®è¨¡ª¨
* ¡ãä¥à, ­  ª®â®àë© ãª §ë¢ ¥â ecx, ᮤ¥à¦¨â á«¥¤ãîéãî ¨­ä®à¬ æ¨î:
* +0: dword: ®¡é¨© à §¬¥à ¨¬¥î饩áï ®¯¥à â¨¢­®© ¯ ¬ï⨠¢ áâà ­¨æ å
* +4: dword: à §¬¥à ᢮¡®¤­®© ®¯¥à â¨¢­®© ¯ ¬ï⨠¢ áâà ­¨æ å
* +8: dword: ç¨á«® áâà ­¨ç­ëå ®è¨¡®ª (¨áª«î祭¨© #PF)
¢ ¯à¨«®¦¥­¨ïå
* +12: dword: à §¬¥à ªãç¨ ï¤à  ¢ ¡ ©â å
* +16: dword: à §¬¥à ᢮¡®¤­®© ¯ ¬ï⨠¢ ªãç¥ ï¤à  ¢ ¡ ©â å
* +20: dword: ®¡é¥¥ ª®«¨ç¥á⢮ ¡«®ª®¢ ¯ ¬ï⨠¢ ªãç¥ ï¤à 
* +24: dword: ª®«¨ç¥á⢮ ᢮¡®¤­ëå ¡«®ª®¢ ¯ ¬ï⨠¢ ªãç¥ ï¤à 
* +28: dword: à §¬¥à ­ ¨¡®«ì襣® ᢮¡®¤­®£® ¡«®ª  ¢ ªãç¥ ï¤à 
(§ à¥§¥à¢¨à®¢ ­®)
* +32: dword: à §¬¥à ­ ¨¡®«ì襣® ¢ë¤¥«¥­­®£® ¡«®ª  ¢ ªãç¥ ï¤à 
(§ à¥§¥à¢¨à®¢ ­®)
======================================================================
==================== ”ã­ªæ¨ï 20 - ¨­â¥à䥩á MIDI. ====================
======================================================================
@ -2905,7 +2931,6 @@ dword-
„®áâã¯­ë¥ ¯®¤ä㭪樨:
* ¯®¤äã­ªæ¨ï 0 - ç⥭¨¥ ä ©« /¯ ¯ª¨
* ¯®¤äã­ªæ¨ï 1 - ¯¥à¥§ ¯¨áì ä ©« 
* ¯®¤äã­ªæ¨ï 2 - 㤠«¥­¨¥ ä ©« /¯ ¯ª¨
* ¯®¤äã­ªæ¨ï 4 - ᮧ¤ ­¨¥ ¯ ¯ª¨
* ¯®¤äã­ªæ¨ï 5 - ¯¥à¥¨¬¥­®¢ ­¨¥/¯¥à¥¬¥é¥­¨¥ ä ©« /¯ ¯ª¨
* ¯®¤äã­ªæ¨ï 8 - LBA-ç⥭¨¥ á ãáâனá⢠
@ -2995,30 +3020,6 @@ dword-
‡ ¬¥ç ­¨ï:
* <20>â  äã­ªæ¨ï ãáâ à¥« , ¨á¯®«ì§ã©â¥ ¯®¤äã­ªæ¨î 2 ä㭪樨 70.
======================================================================
=========== ”ã­ªæ¨ï 58, ¯®¤äã­ªæ¨ï 2 - 㤠«¨âì ä ©«/¯ ¯ªã. ===========
======================================================================
<EFBFBD> à ¬¥âàë:
* eax = 58 - ­®¬¥à ä㭪樨
* ebx = 㪠§ â¥«ì ­  ¨­ä®à¬ æ¨®­­ãî áâàãªâãàã
”®à¬ â ¨­ä®à¬ æ¨®­­®© áâàãªâãàë:
* +0: dword: 2 = ­®¬¥à ¯®¤ä㭪樨
* +4: dword: ¨£­®à¨àã¥âáï
* +8: dword: ¨£­®à¨àã¥âáï
* +12 = +0xC: dword: ¨£­®à¨àã¥âáï
* +16 = +0x10: dword: 㪠§ â¥«ì ­  ¡ãä¥à ¤«ï à ¡®âë á¨á⥬ë
(4096 ¡ ©â)
* +20 = +0x14: ASCIIZ-¨¬ï ä ©« , ¯à ¢¨«  ä®à¬¨à®¢ ­¨ï ¨¬ñ­ 㪠§ ­ë ¢
®¡é¥¬ ®¯¨á ­¨¨
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* eax = 0 - ãᯥ譮, ¨­ ç¥ ª®¤ ®è¨¡ª¨ ä ©«®¢®© á¨á⥬ë
* ebx à §àãè ¥âáï
‡ ¬¥ç ­¨ï:
* <20>ਠࠡ®â¥ á ¤¨áª¥â®© ­¥ á«¥¤ã¥â 㤠«ïâì ­¥¯ãáâãî ¯ ¯ªã.
Š®¤ à ¡®âë á ¦ñá⪨¬ ¤¨áª®¬ ­¥¯ãáâë¥ ¯ ¯ª¨ 㤠«ï¥â ª®à४⭮
(â.¥. ४ãàᨢ­® á® ¢á¥¬¨ ä ©« ¬¨ ¨ ¢«®¦¥­­ë¬¨ ¯ ¯ª ¬¨).
<20> ¬¤¨áª ¯ ¯®ª ­¥ ¯®¤¤¥à¦¨¢ ¥â.
======================================================================
============== ”ã­ªæ¨ï 58, ¯®¤äã­ªæ¨ï 4 - ᮧ¤ âì ¯ ¯ªã. =============
======================================================================
@ -3495,8 +3496,11 @@ IPC
* eax = 0 - ãᯥ譮
* eax = 1 - ­¥¤®áâ â®ç­® ¯ ¬ïâ¨
‡ ¬¥ç ­¨ï:
* <20>  ¤ ­­ë© ¬®¬¥­â íâ  äã­ªæ¨ï ï¥âáï ¥¤¨­á⢥­­ë¬ á।á⢮¬ ¤«ï
¤¨­ ¬¨ç¥áª®£® ¢ë¤¥«¥­¨ï/®á¢®¡®¦¤¥­¨ï ¯ ¬ï⨠¯à¨«®¦¥­¨ï.
* …áâì ¤à㣮© ᯮᮡ ¢ë¤¥«¥­¨ï/®á¢®¡®¦¤¥­¨ï ¤¨­ ¬¨ç¥áª®© ¯ ¬ï⨠-
¯®¤ä㭪樨 11, 12, 13 ä㭪樨 68.
”ã­ªæ¨ï ­¥ ¬®¦¥â ¨á¯®«ì§®¢ âìáï ᮢ¬¥áâ­® á 68.11, 68.12, 68.13
‚맮¢ ä㭪樨 ¡ã¤¥â ¨£­®à¨à®¢ âìáï ¥á«¨ ¯à¨«®¦¥­¨¥ ᮧ¤ áâ «®ª «ì­ãî
ªãç㠢맮¢®¬ 68.11
======================================================================
================= ”ã­ªæ¨ï 66 - à ¡®â  á ª« ¢¨ âãன. =================
@ -3699,88 +3703,134 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
ª®â®à®¥ ¢áñ à ¢­® ¯à¨¡ìñâ ¯®â®ª.
======================================================================
======= ”ã­ªæ¨ï 68, ¯®¤äã­ªæ¨ï 5 - ¢ë¤¥«¨âì 䨧¨ç¥áªãî ¯ ¬ïâì. =======
===== ”ã­ªæ¨ï 68, ¯®¤äã­ªæ¨ï 11 - ¨­¨æ¨ «¨§¨à®¢ âì ªãçã ¯à®æ¥áá . ====
======================================================================
<EFBFBD> à ¬¥âàë:
* eax = 68 - ­®¬¥à ä㭪樨
* ebx = 5 - ­®¬¥à ¯®¤ä㭪樨
* ecx = à §¬¥à (¢ ¡ ©â å)
* ebx = 11 - ­®¬¥à ¯®¤ä㭪樨
* ecx = à §¬¥à ªãç¨ (¢ ¡ ©â å)
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* eax = 䨧¨ç¥áª¨©  ¤à¥á ¢ë¤¥«¥­­®© ¯ ¬ïâ¨
* eax = 0 - ­¥ãᯥå
* ¨­ ç¥ à §¬¥à ᮧ¤ ­­®© ªãç¨
‡ ¬¥ç ­¨ï:
* Ž¡ëç­ë¥ ¯à¨«®¦¥­¨ï ­¥ ¤®«¦­ë ¨á¯®«ì§®¢ âì íâã äã­ªæ¨î, ®­ 
¯à¥¤­ §­ ç¥­  ¤«ï á«ãç ï, ª®£¤  ¯à¨ à ¡®â¥ á ª ª¨¬-«¨¡®
ãáâனá⢮¬ âॡã¥âáï à §¬¥áâ¨âì ¤ ­­ë¥ ¯® ¨§¢¥áâ­®¬ã 䨧¨ç¥áª®¬ã
 ¤à¥áã. ( áãé­®áâ¨, íâ  äã­ªæ¨ï ࠧࠡ â뢠« áì ¤«ï AC97WAV.)
* —¨á«® ¡«®ª®¢ 䨧¨ç¥áª®© ¯ ¬ï⨠®£à ­¨ç¥­® (ª®­á⠭⮩ 24,
¯à¨çñ¬ íâ  ª®­áâ ­â  ¢ª«î砥⠨ ­¥áª®«ìª® ¡«®ª®¢ ¯ ¬ïâ¨
¤«ï ­ ¤®¡­®á⥩ ï¤à ).
* Žá¢®¡®¤¨âì ¢ë¤¥«¥­­ãî â ª¨¬ ®¡à §®¬ ¯ ¬ïâì ¬®¦­®
¯®¤ä㭪樥© 6, ª®¯¨à®¢ ­¨¥¬ ¤ ­­ëå â㤠/®¡à â­®
§ ­¨¬ îâáï ¯®¤ä㭪樨 7 ¨ 8.
* <20> §¬¥à ªãç¨ ¢ëà ¢­¨¢ ¥âáï ¢ ¡®«ìèãî áâ®à®­ã ­  £à ­¨æã áâà ­¨æë.
* ‚맮¢ ä㭪樨 ¨­¨æ¨ «¨§¨àã¥â ªãçã, ¨§ ª®â®à®© ¢¯®á«¥¤á⢨¨ ¬®¦­®
¢ë¤¥«ïâì ¨ ®á¢®¡®¦¤ âì ¡«®ª¨ ¯ ¬ï⨠¯®¤äã­ªæ¨ï¬¨ 12 ¨ 13.
* <20>ਠ¯®¢â®à­®¬ ¢ë§®¢¥ ä㭪樨 ⥬ ¦¥ ¯à®æ¥áᮬ äã­ªæ¨ï ¢¥à­ñâ à §¬¥à
áãé¥áâ¢ãî饩 ªãç¨.
* <20>®á«¥ ᮧ¤ ­¨ï ªãç¨ ¢ë§®¢ë ä㭪樨 64.1 ¨£­®à¨àãîâáï.
======================================================================
====== ”ã­ªæ¨ï 68, ¯®¤äã­ªæ¨ï 6 - ®á¢®¡®¤¨âì 䨧¨ç¥áªãî ¯ ¬ïâì. ======
========== ”ã­ªæ¨ï 68, ¯®¤äã­ªæ¨ï 12 - ¢ë¤¥«¨âì ¡«®ª ¯ ¬ïâ¨. =========
======================================================================
<EFBFBD> à ¬¥âàë:
* eax = 68 - ­®¬¥à ä㭪樨
* ebx = 6 - ­®¬¥à ¯®¤ä㭪樨
* ecx = 䨧¨ç¥áª¨©  ¤à¥á ¯ ¬ïâ¨
* ebx = 12 - ­®¬¥à ¯®¤ä㭪樨
* ecx = âà¥¡ã¥¬ë© à §¬¥à ¢ ¡ ©â å
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* äã­ªæ¨ï ­¥ ¢®§¢à é ¥â §­ ç¥­¨ï
* eax = 㪠§ â¥«ì ­  ¢ë¤¥«¥­­ë© ¡«®ª
‡ ¬¥ç ­¨ï:
* Ž¡ëç­ë¥ ¯à¨«®¦¥­¨ï ­¥ ¤®«¦­ë ¨á¯®«ì§®¢ âì íâã äã­ªæ¨î, ®­ 
¯à¥¤­ §­ ç¥­  ¤«ï á«ãç ï, ª®£¤  ¯à¨ à ¡®â¥ á ª ª¨¬-«¨¡®
ãáâனá⢮¬ âॡã¥âáï à §¬¥áâ¨âì ¤ ­­ë¥ ¯® ¨§¢¥áâ­®¬ã 䨧¨ç¥áª®¬ã
 ¤à¥áã. ( áãé­®áâ¨, íâ  äã­ªæ¨ï ࠧࠡ â뢠« áì ¤«ï AC97WAV.)
* <20> ¬ïâì ¤®«¦­  ¡ëâì à ­¥¥ ¢ë¤¥«¥­  ¯®¤ä㭪樥© 5.
* <20>।¢ à¨â¥«ì­® á«¥¤ã¥â ¨­¨æ¨ «¨§¨à®¢ âì ªãçã ¯à®æ¥áá  ¢ë§®¢®¬
¯®¤ä㭪樨 11.
* ”ã­ªæ¨ï ¢ë¤¥«ï¥â 楫®¥ ç¨á«® áâà ­¨æ (4 Š¡) â ª, çâ® ä ªâ¨ç¥áª¨©
à §¬¥à ¢ë¤¥«¥­­®£® ¡«®ª  ¡®«ìè¥ ¨«¨ à ¢¥­ § ¯à®è¥­­®¬ã.
======================================================================
=== ”ã­ªæ¨ï 68, ¯®¤äã­ªæ¨ï 7 - § ¯¨á âì ¤ ­­ë¥ ¢ 䨧¨ç¥áªãî ¯ ¬ïâì. ==
========= ”ã­ªæ¨ï 68, ¯®¤äã­ªæ¨ï 13 - ®á¢®¡®¤¨âì ¡«®ª ¯ ¬ïâ¨. ========
======================================================================
<EFBFBD> à ¬¥âàë:
* eax = 68 - ­®¬¥à ä㭪樨
* ebx = 7 - ­®¬¥à ¯®¤ä㭪樨
* ecx = 䨧¨ç¥áª¨©  ¤à¥á
* edx = 㪠§ â¥«ì ­  ¤ ­­ë¥ (¢ ¯à¨«®¦¥­¨¨)
* esi = à §¬¥à ¤ ­­ëå (¢ ¡ ©â å)
* ebx = 13 - ­®¬¥à ¯®¤ä㭪樨
* ecx = 㪠§ â¥«ì ­  ¡«®ª ¯ ¬ïâ¨
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* äã­ªæ¨ï ­¥ ¢®§¢à é ¥â §­ ç¥­¨ï
* eax = 1 - ãᯥ譮
* eax = 0 - ­¥ã¤ ç 
‡ ¬¥ç ­¨ï:
* Ž¡ëç­ë¥ ¯à¨«®¦¥­¨ï ­¥ ¤®«¦­ë ¨á¯®«ì§®¢ âì íâã äã­ªæ¨î, ®­ 
¯à¥¤­ §­ ç¥­  ¤«ï á«ãç ï, ª®£¤  ¯à¨ à ¡®â¥ á ª ª¨¬-«¨¡®
ãáâனá⢮¬ âॡã¥âáï à §¬¥áâ¨âì ¤ ­­ë¥ ¯® ¨§¢¥áâ­®¬ã 䨧¨ç¥áª®¬ã
 ¤à¥áã. ( áãé­®áâ¨, íâ  äã­ªæ¨ï ࠧࠡ â뢠« áì ¤«ï AC97WAV.)
* „¨ ¯ §®­ 䨧¨ç¥áª¨å  ¤à¥á®¢ ¤®«¦¥­ «¥¦ âì ¢­ãâਠ࠭¥¥ ¢ë¤¥«¥­­®£®
¯®¤ä㭪樥© 5 ¡«®ª  䨧¨ç¥áª®© ¯ ¬ïâ¨.
* <20>஢¥à®ª ª®à४⭮á⨠­¥ ¯à®¨§¢®¤¨âáï.
* <20>«®ª ¯ ¬ï⨠¤®«¦¥­ ¡ëâì à ­¥¥ ¢ë¤¥«¥­ ¯®¤ä㭪樥© 12.
======================================================================
== ”ã­ªæ¨ï 68, ¯®¤äã­ªæ¨ï 8 - ¯à®ç¨â âì ¤ ­­ë¥ ¨§ 䨧¨ç¥áª®© ¯ ¬ïâ¨. =
===== ”ã­ªæ¨ï 68, ¯®¤äã­ªæ¨ï 14 - ®¦¨¤ âì ¨§¢¥é¥­¨ï ®â ¤à ©¢¥à . =====
======================================================================
<EFBFBD> à ¬¥âàë:
* eax = 68 - ­®¬¥à ä㭪樨
* ebx = 8 - ­®¬¥à ¯®¤ä㭪樨
* ecx = 䨧¨ç¥áª¨©  ¤à¥á
* edx = 㪠§ â¥«ì ­  ¡ãä¥à ¤«ï ¤ ­­ëå (¢ ¯à¨«®¦¥­¨¨)
* esi = à §¬¥à ¤ ­­ëå (¢ ¡ ©â å)
* ebx = 14 - ­®¬¥à ¯®¤ä㭪樨
* ecx = 㪠§ â¥«ì ­  ¡ãä¥à ¤«ï ¨­ä®à¬ æ¨¨ (8 ¡ ©â)
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* äã­ªæ¨ï ­¥ ¢®§¢à é ¥â §­ ç¥­¨ï
* ¡ãä¥à, ­  ª®â®àë© ãª §ë¢ ¥â ecx, ᮤ¥à¦¨â á«¥¤ãîéãî ¨­ä®à¬ æ¨î:
* +0: dword: ª®­áâ ­â  EV_INTR = 1
* +4: dword: ¤ ­­ë¥ ¤à ©¢¥à 
‡ ¬¥ç ­¨ï:
* Ž¡ëç­ë¥ ¯à¨«®¦¥­¨ï ­¥ ¤®«¦­ë ¨á¯®«ì§®¢ âì íâã äã­ªæ¨î, ®­ 
¯à¥¤­ §­ ç¥­  ¤«ï á«ãç ï, ª®£¤  ¯à¨ à ¡®â¥ á ª ª¨¬-«¨¡®
ãáâனá⢮¬ âॡã¥âáï à §¬¥áâ¨âì ¤ ­­ë¥ ¯® ¨§¢¥áâ­®¬ã 䨧¨ç¥áª®¬ã
 ¤à¥áã. ( áãé­®áâ¨, íâ  äã­ªæ¨ï ࠧࠡ â뢠« áì ¤«ï AC97WAV.)
* „¨ ¯ §®­ 䨧¨ç¥áª¨å  ¤à¥á®¢ ¤®«¦¥­ «¥¦ âì ¢­ãâਠ࠭¥¥ ¢ë¤¥«¥­­®£®
¯®¤ä㭪樥© 5 ¡«®ª  䨧¨ç¥áª®© ¯ ¬ïâ¨.
* <20>஢¥à®ª ª®à४⭮á⨠­¥ ¯à®¨§¢®¤¨âáï.
* ’¥ªãé ï ॠ«¨§ æ¨ï ¢® ¢à¥¬ï ®¦¨¤ ­¨ï âॡã¥â ¤®¢®«ì­® "âï¦ñ«ëå"
®¯¥à æ¨© ¯¥à¥ª«î祭¨ï ª®­â¥ªáâ .
======================================================================
== ”ã­ªæ¨ï 68, ¯®¤äã­ªæ¨ï 15 - ãáâ ­®¢¨âì ®¡à ¡®â稪 ¨áª«î祭¨© FPU. =
======================================================================
<EFBFBD> à ¬¥âàë:
* eax = 68 - ­®¬¥à ä㭪樨
* ebx = 15 - ­®¬¥à ¯®¤ä㭪樨
* ecx =  ¤à¥á ­®¢®£® ®¡à ¡®â稪  ¨áª«î祭¨©
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* eax =  ¤à¥á áâ à®£® ®¡à ¡®â稪  ¨áª«î祭¨©
(0, ¥á«¨ ®­ ­¥ ¡ë« ãáâ ­®¢«¥­)
======================================================================
=========== ”ã­ªæ¨ï 68, ¯®¤äã­ªæ¨ï 16 - § £à㧨âì ¤à ©¢¥à. ===========
======================================================================
<EFBFBD> à ¬¥âàë:
* eax = 68 - ­®¬¥à ä㭪樨
* ebx = 16 - ­®¬¥à ¯®¤ä㭪樨
* ecx = 㪠§ â¥«ì ­  ASCIIZ áâபã á ¨¬¥­¥¬ ¤à ©¢¥à 
¬ ªá¨¬ «ì­ ï ¤«¨­  ¨¬¥­¨ 16 ᨬ¢®«®¢ ¢ª«îç ï ­®«ì
®áâ «ì­ë¥ ᨬ¢®«ë ¨£­®à¨àãîâáï
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* eax = 0 - ­¥ã¤ ç 
* ¨­ ç¥ eax = åí­¤« ¤à ©¢¥à 
‡ ¬¥ç ­¨ï:
* …᫨ ¤à ©¢¥à ¥éñ ­¥ § £à㦥­, ®­ § £à㦠¥âáï;
¥á«¨ ¤à ©¢¥à 㦥 § £à㦥­, ­¨ç¥£® ­¥ ¬¥­ï¥âáï.
* ˆ¬ï ¤à ©¢¥à  çã¢á⢨⥫쭮 ª ॣ¨áâàã ᨬ¢®«®¢.
* Œ®¦­® § £à㦠âì ⮫쪮 ¤à ©¢¥à , § à¥£¨áâà¨à®¢ ­­ë¥ ¢ á¨á⥬¥;
¢ ⥪ã饩 ॠ«¨§ æ¨¨ ¥áâì ஢­® 2 â ª¨å ¤à ©¢¥à :
* ¨¬ï SOUND, ä ©« /rd/1/unisound.obj
* ¨¬ï INFINITY, ä ©« /rd/1/infinity.obj
======================================================================
========== ”ã­ªæ¨ï 68, ¯®¤äã­ªæ¨ï 17 - ã¯à ¢«¥­¨¥ ¤à ©¢¥à®¬. =========
======================================================================
<EFBFBD> à ¬¥âàë:
* eax = 68 - ­®¬¥à ä㭪樨
* ebx = 17 - ­®¬¥à ¯®¤ä㭪樨
* ecx = 㪠§ â¥«ì ­  ã¯à ¢«ïîéãî áâàãªâãàã:
* +0: dword: åí­¤« ¤à ©¢¥à 
* +4: dword: ª®¤ ä㭪樨 ¤à ©¢¥à 
* +8: dword: 㪠§ â¥«ì ­  ¢å®¤­ë¥ ¤ ­­ë¥
* +12 = +0xC: dword: à §¬¥à ¢å®¤­ëå ¤ ­­ëå
* +16 = +0x10: dword: 㪠§ â¥«ì ­  ¢ë室­ë¥ ¤ ­­ë¥
* +20 = +0x14: dword: à §¬¥à ¢ë室­ëå ¤ ­­ëå
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* eax = ®¯à¥¤¥«ï¥âáï ¤à ©¢¥à®¬
‡ ¬¥ç ­¨ï:
* Š®¤ë ä㭪権 ¨ áâàãªâãà  ¢å®¤­ëå/¢ë室­ëå ¤ ­­ëå
®¯à¥¤¥«ïîâáï ¤à ©¢¥à®¬.
* <20>।¢ à¨â¥«ì­® ¤®«¦¥­ ¡ëâì ¯®«ã祭 åí­¤« ¤à ©¢¥à  ¯®¤ä㭪樥© 16.
======================================================================
== ”ã­ªæ¨ï 68, ¯®¤äã­ªæ¨ï 18 - ãáâ ­®¢¨âì ®¡à ¡®â稪 ¨áª«î祭¨© SSE. =
======================================================================
<EFBFBD> à ¬¥âàë:
* eax = 68 - ­®¬¥à ä㭪樨
* ebx = 18 - ­®¬¥à ¯®¤ä㭪樨
* ecx =  ¤à¥á ­®¢®£® ®¡à ¡®â稪  ¨áª«î祭¨©
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* eax =  ¤à¥á áâ à®£® ®¡à ¡®â稪  ¨áª«î祭¨©
(0, ¥á«¨ ®­ ­¥ ¡ë« ãáâ ­®¢«¥­)
======================================================================
======================== ”ã­ªæ¨ï 69 - ®â« ¤ª . =======================
======================================================================
<EFBFBD>à®æ¥áá ¬®¦¥â § £à㧨âì ¤à㣮© ¯à®æ¥áá ª ª ®â« ¦¨¢ ¥¬ë© ãáâ ­®¢ª®©
ᮮ⢥âáâ¢ãî饣® ¡¨â  ¯à¨ ¢ë§®¢¥ ¯®¤ä㭪樨 16 ä㭪樨 58
¨«¨ ¯®¤ä㭪樨 7 ä㭪樨 70.
ᮮ⢥âáâ¢ãî饣® ¡¨â  ¯à¨ ¢ë§®¢¥ ¯®¤ä㭪樨 7 ä㭪樨 70.
“ ¯à®æ¥áá  ¬®¦¥â ¡ëâì ⮫쪮 ®¤¨­ ®â« ¤ç¨ª; ®¤¨­ ¯à®æ¥áá ¬®¦¥â
®â« ¦¨¢ âì ­¥áª®«ìª® à §­ëå. ‘¨á⥬  㢥¤®¬«ï¥â ®â« ¤ç¨ª ® ᮡëâ¨ïå,
¯à®¨á室ïé¨å á ®â« ¦¨¢ ¥¬ë¬ ¯à®æ¥áᮬ. ‘®®¡é¥­¨ï § ¯¨á뢠îâáï ¢ ¡ãä¥à,
@ -4082,6 +4132,7 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
* ¯®¤äã­ªæ¨ï 5 - ¯®«ã祭¨¥  âਡã⮢ ä ©« /¯ ¯ª¨
* ¯®¤äã­ªæ¨ï 6 - ãáâ ­®¢ª   âਡã⮢ ä ©« /¯ ¯ª¨
* ¯®¤äã­ªæ¨ï 7 - § ¯ã᪠¯à®£à ¬¬ë
* ¯®¤äã­ªæ¨ï 8 - 㤠«¥­¨¥ ä ©« /¯ ¯ª¨
„«ï CD-¯à¨¢®¤®¢ ¢ á¢ï§¨ á  ¯¯ à â­ë¬¨ ®£à ­¨ç¥­¨ï¬¨ ¤®áâ㯭ë
⮫쪮 ¯®¤ä㭪樨 0,1,5 ¨ 7, ¢ë§®¢ ¤àã£¨å ¯®¤ä㭪権 § ¢¥àè¨âáï
®è¨¡ª®© á ª®¤®¬ 2.
@ -4394,6 +4445,31 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
¢ § ¬®à®¦¥­­®¬ á®áâ®ï­¨¨; ¤«ï § ¯ã᪠ ¨á¯®«ì§ã©â¥
¯®¤äã­ªæ¨î 5 ä㭪樨 69.
======================================================================
========== ”ã­ªæ¨ï 70, ¯®¤äã­ªæ¨ï 8 - 㤠«¥­¨¥ ä ©« /¯ ¯ª¨. ==========
======================================================================
<EFBFBD> à ¬¥âàë:
* eax = 70 - ­®¬¥à ä㭪樨
* ebx = 㪠§ â¥«ì ­  ¨­ä®à¬ æ¨®­­ãî áâàãªâãàã
”®à¬ â ¨­ä®à¬ æ¨®­­®© áâàãªâãàë:
* +0: dword: 8 = ­®¬¥à ¯®¤ä㭪樨
* +4: dword: 0 (§ à¥§¥à¢¨à®¢ ­®)
* +8: dword: 0 (§ à¥§¥à¢¨à®¢ ­®)
* +12 = +0xC: dword: 0 (§ à¥§¥à¢¨à®¢ ­®)
* +16 = +0x10: dword: 0 (§ à¥§¥à¢¨à®¢ ­®)
* +20 = +0x14: ASCIIZ-¨¬ï ä ©« , ¯à ¢¨«  ä®à¬¨à®¢ ­¨ï ¨¬ñ­ 㪠§ ­ë ¢
®¡é¥¬ ®¯¨á ­¨¨
¨«¨
* +20 = +0x14: db 0
* +21 = +0x15: dd 㪠§ â¥«ì ­  ASCIIZ-áâபã á ¨¬¥­¥¬ ä ©« 
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* eax = 0 - ãᯥ譮, ¨­ ç¥ ª®¤ ®è¨¡ª¨ ä ©«®¢®© á¨á⥬ë
* ebx à §àãè ¥âáï
‡ ¬¥ç ­¨ï:
* ”ã­ªæ¨ï ­¥ ¯®¤¤¥à¦¨¢ ¥âáï ¤«ï CD (¢¥à­ñâáï ª®¤ ®è¨¡ª¨ 2).
* Œ®¦­® 㤠«ïâì ⮫쪮 ¯ãáâë¥ ¯ ¯ª¨ (¯®¯ë⪠ 㤠«¥­¨ï ­¥¯ãá⮩ ¯ ¯ª¨
¯à¨¢¥¤ñâ ª ®è¨¡ª¥ á ª®¤®¬ 10, "¤®áâ㯠§ ¯à¥éñ­").
======================================================================
=== ”ã­ªæ¨ï 71, ¯®¤äã­ªæ¨ï 1 - ãáâ ­®¢¨âì § £®«®¢®ª ®ª­  ¯à®£à ¬¬ë. ==
======================================================================
@ -4481,4 +4557,4 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
<EFBFBD>ਠ§ ¯ã᪥ ¯à®£à ¬¬ë ¢®§¬®¦­ë â ª¦¥ á«¥¤ãî騥 ª®¤ë ®è¨¡®ª:
* 30 = 0x1E = ­¥¤®áâ â®ç­® ¯ ¬ïâ¨
* 31 = 0x1F = ä ©« ­¥ ï¥âáï ¨á¯®«­¨¬ë¬
* 32 = 0x20 = ᫨誮¬ ¬­®£® ¯à®æ¥áᮢ
* 32 = 0x20 = ᫨誮¬ ¬­®£® ¯à®æ¥áᮢ

File diff suppressed because it is too large Load Diff

View File

@ -374,7 +374,6 @@ B32:
@@:
mov [pg_data.kernel_tables], edx
;!!!!!!!!!!!!!!!!!!!!!!!!!!
include 'detect/disks.inc'
;!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -684,6 +683,9 @@ include 'vmodeld.inc'
sub eax,ecx
shl eax,2
mov [0xf600],eax ; save tsc / sec
mov ebx, 1000000
div ebx
mov [stall_mcs], eax
; SET VARIABLES

View File

@ -177,8 +177,10 @@ struc APPDATA
.fpu_handler dd ? ;+24
.sse_handler dd ? ;+28
.event dd ? ;+32
.heap_base dd ? ;+36
.heap_top dd ? ;+40
db 92 dup(?)
db 84 dup(?) ;+44
.wnd_shape dd ? ;+128
.wnd_shape_scale dd ?