forked from KolibriOS/kolibrios
replace vars 0x8000 0xC000 0xC004 0xD000 0x80000 whith symbolic constants
rename PROC_BASE -> SLOT_BASE git-svn-id: svn://kolibrios.org@380 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
04929cf017
commit
a90d0cfe1d
@ -9,7 +9,7 @@ give_back_application_data: ;
|
|||||||
mov edi,[edi+TASKDATA.mem_start]
|
mov edi,[edi+TASKDATA.mem_start]
|
||||||
add edi,ecx
|
add edi,ecx
|
||||||
give_back_application_data_1:
|
give_back_application_data_1:
|
||||||
mov esi,0xD000 ;FDD_DataBuffer ;0x40000
|
mov esi,FDD_BUFF ;FDD_DataBuffer ;0x40000
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
mov cx,128
|
mov cx,128
|
||||||
cld
|
cld
|
||||||
@ -21,7 +21,7 @@ take_data_from_application: ;
|
|||||||
mov esi,[esi+TASKDATA.mem_start]
|
mov esi,[esi+TASKDATA.mem_start]
|
||||||
add esi,ecx
|
add esi,ecx
|
||||||
take_data_from_application_1:
|
take_data_from_application_1:
|
||||||
mov edi,0xD000 ;FDD_DataBuffer ;0x40000
|
mov edi,FDD_BUFF ;FDD_DataBuffer ;0x40000
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
mov cx,128
|
mov cx,128
|
||||||
cld
|
cld
|
||||||
|
@ -134,108 +134,109 @@ SSE_FZ equ 0x8000
|
|||||||
|
|
||||||
SSE_INIT equ (SSE_IM+SSE_DM+SSE_ZM+SSE_OM+SSE_UM+SSE_PM)
|
SSE_INIT equ (SSE_IM+SSE_DM+SSE_ZM+SSE_OM+SSE_UM+SSE_PM)
|
||||||
|
|
||||||
OS_BASE equ 0; 0x80400000
|
OS_BASE equ 0
|
||||||
|
|
||||||
window_data equ OS_BASE+0x0000000
|
window_data equ (OS_BASE+0x0000000)
|
||||||
|
|
||||||
CURRENT_TASK equ OS_BASE+0x0003000
|
CURRENT_TASK equ (OS_BASE+0x0003000)
|
||||||
TASK_COUNT equ OS_BASE+0x0003004
|
TASK_COUNT equ (OS_BASE+0x0003004)
|
||||||
TASK_BASE equ OS_BASE+0x0003010
|
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)
|
||||||
|
|
||||||
;mouseunder equ OS_BASE+0x0006900
|
mouseunder equ (OS_BASE+0x0006900)
|
||||||
FLOPPY_BUFF equ OS_BASE+0x0008000
|
FLOPPY_BUFF equ (OS_BASE+0x0008000)
|
||||||
ACTIVE_PROC_STACK equ OS_BASE+0x000A400
|
ACTIVE_PROC_STACK equ (OS_BASE+0x000A400)
|
||||||
idts equ OS_BASE+0x000B100
|
idts equ (OS_BASE+0x000B100)
|
||||||
WIN_STACK equ OS_BASE+0x000C000
|
WIN_STACK equ (OS_BASE+0x000C000)
|
||||||
WIN_POS equ OS_BASE+0x000C400
|
WIN_POS equ (OS_BASE+0x000C400)
|
||||||
FDD_DATA equ OS_BASE+0x000D000
|
FDD_BUFF equ (OS_BASE+0x000D000)
|
||||||
|
FDD_DATA equ (OS_BASE+0x000D000)
|
||||||
|
|
||||||
ENABLE_TASKSWITCH equ OS_BASE+0x000E000
|
ENABLE_TASKSWITCH equ (OS_BASE+0x000E000)
|
||||||
PUTPIXEL equ OS_BASE+0x000E020
|
PUTPIXEL equ (OS_BASE+0x000E020)
|
||||||
GETPIXEL equ OS_BASE+0x000E024
|
GETPIXEL equ (OS_BASE+0x000E024)
|
||||||
BANK_SWITCH equ OS_BASE+0x000E030
|
BANK_SWITCH equ (OS_BASE+0x000E030)
|
||||||
|
|
||||||
MOUSE_PICTURE equ OS_BASE+0x000F200
|
MOUSE_PICTURE equ (OS_BASE+0x000F200)
|
||||||
MOUSE_VISIBLE equ OS_BASE+0x000F204
|
MOUSE_VISIBLE equ (OS_BASE+0x000F204)
|
||||||
XY_TEMP equ OS_BASE+0x000F300
|
XY_TEMP equ (OS_BASE+0x000F300)
|
||||||
KEY_COUNT equ OS_BASE+0x000F400
|
KEY_COUNT equ (OS_BASE+0x000F400)
|
||||||
KEY_BUFF equ OS_BASE+0x000F401
|
KEY_BUFF equ (OS_BASE+0x000F401)
|
||||||
|
|
||||||
BTN_COUNT equ OS_BASE+0x000F500
|
BTN_COUNT equ (OS_BASE+0x000F500)
|
||||||
BTN_BUFF equ OS_BASE+0x000F501
|
BTN_BUFF equ (OS_BASE+0x000F501)
|
||||||
|
|
||||||
CPU_FREQ equ OS_BASE+0x000F600
|
CPU_FREQ equ (OS_BASE+0x000F600)
|
||||||
MOUSE_PORT equ OS_BASE+0x000F604
|
MOUSE_PORT equ (OS_BASE+0x000F604)
|
||||||
|
|
||||||
PS2_CHUNK equ OS_BASE+0x000FB00
|
PS2_CHUNK equ (OS_BASE+0x000FB00)
|
||||||
MOUSE_X equ OS_BASE+0x000FB0A
|
MOUSE_X equ (OS_BASE+0x000FB0A)
|
||||||
MOUSE_Y equ OS_BASE+0x000FB0C
|
MOUSE_Y equ (OS_BASE+0x000FB0C)
|
||||||
|
|
||||||
MOUSE_COLOR_MEM equ OS_BASE+0x000FB10
|
MOUSE_COLOR_MEM equ (OS_BASE+0x000FB10)
|
||||||
COLOR_TEMP equ OS_BASE+0x000FB30
|
COLOR_TEMP equ (OS_BASE+0x000FB30)
|
||||||
BTN_DOWN equ OS_BASE+0x000FB40
|
BTN_DOWN equ (OS_BASE+0x000FB40)
|
||||||
MOUSE_DOWN equ OS_BASE+0x000FB44
|
MOUSE_DOWN equ (OS_BASE+0x000FB44)
|
||||||
X_UNDER equ OS_BASE+0x000FB4A
|
X_UNDER equ (OS_BASE+0x000FB4A)
|
||||||
Y_UNDER equ OS_BASE+0x000FB4C
|
Y_UNDER equ (OS_BASE+0x000FB4C)
|
||||||
ScreenBPP equ OS_BASE+0x000FBF1
|
ScreenBPP equ (OS_BASE+0x000FBF1)
|
||||||
MOUSE_BUFF_COUNT equ OS_BASE+0x000FCFF
|
MOUSE_BUFF_COUNT equ (OS_BASE+0x000FCFF)
|
||||||
LFBAddress equ OS_BASE+0x000FE80
|
LFBAddress equ (OS_BASE+0x000FE80)
|
||||||
MEM_AMOUNT equ OS_BASE+0x000FE8C
|
MEM_AMOUNT equ (OS_BASE+0x000FE8C)
|
||||||
;LFBSize equ OS_BASE+0x02f9050
|
;LFBSize equ (OS_BASE+0x02f9050)
|
||||||
|
|
||||||
SCR_X_SIZE equ OS_BASE+0x000FE00
|
SCR_X_SIZE equ (OS_BASE+0x000FE00)
|
||||||
SCR_Y_SIZE equ OS_BASE+0x000FE04
|
SCR_Y_SIZE equ (OS_BASE+0x000FE04)
|
||||||
SCR_BYTES_PER_LINE equ OS_BASE+0x000FE08
|
SCR_BYTES_PER_LINE equ (OS_BASE+0x000FE08)
|
||||||
SCR_MODE equ OS_BASE+0x000FE0C
|
SCR_MODE equ (OS_BASE+0x000FE0C)
|
||||||
|
|
||||||
BTN_ADDR equ OS_BASE+0x000FE88
|
BTN_ADDR equ (OS_BASE+0x000FE88)
|
||||||
SYS_SHUTDOWN equ OS_BASE+0x000FF00
|
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)
|
||||||
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)
|
||||||
DONT_SWITCH equ OS_BASE+0x000FFFF
|
DONT_SWITCH equ (OS_BASE+0x000FFFF)
|
||||||
|
|
||||||
STACK_TOP equ OS_BASE+0x003EC00
|
STACK_TOP equ (OS_BASE+0x003EC00)
|
||||||
|
|
||||||
FONT_II equ OS_BASE+0x003EC00
|
FONT_II equ (OS_BASE+0x003EC00)
|
||||||
FONT_I equ OS_BASE+0x003F600
|
FONT_I equ (OS_BASE+0x003F600)
|
||||||
DISK_DATA equ OS_BASE+0x0040000
|
DISK_DATA equ (OS_BASE+0x0040000)
|
||||||
PROC_BASE equ OS_BASE+0x0080000
|
SLOT_BASE equ (OS_BASE+0x0080000)
|
||||||
TMP_BUFF equ OS_BASE+0x0090000
|
TMP_BUFF equ (OS_BASE+0x0090000)
|
||||||
|
|
||||||
VGABasePtr equ OS_BASE+0x00A0000
|
VGABasePtr equ (OS_BASE+0x00A0000)
|
||||||
|
|
||||||
RAMDISK equ OS_BASE+0x0100000
|
RAMDISK equ (OS_BASE+0x0100000)
|
||||||
RAMDISK_FAT equ OS_BASE+0x0280000
|
RAMDISK_FAT equ (OS_BASE+0x0280000)
|
||||||
FLOPPY_FAT equ OS_BASE+0x0282000
|
FLOPPY_FAT equ (OS_BASE+0x0282000)
|
||||||
SB16_Status equ OS_BASE+0x02B0000
|
SB16_Status equ (OS_BASE+0x02B0000)
|
||||||
BUTTON_INFO equ OS_BASE+0x02C0000
|
BUTTON_INFO equ (OS_BASE+0x02C0000)
|
||||||
RESERVED_PORTS equ OS_BASE+0x02D0000
|
RESERVED_PORTS equ (OS_BASE+0x02D0000)
|
||||||
IRQ_SAVE equ OS_BASE+0x02E0000
|
IRQ_SAVE equ (OS_BASE+0x02E0000)
|
||||||
SYS_VAR equ OS_BASE+0x02f0000
|
SYS_VAR equ (OS_BASE+0x02f0000)
|
||||||
IMG_BACKGROUND equ OS_BASE+0x0300000
|
IMG_BACKGROUND equ (OS_BASE+0x0300000)
|
||||||
WinMapAddress equ OS_BASE+0x0460000
|
WinMapAddress equ (OS_BASE+0x0460000)
|
||||||
display_data equ OS_BASE+0x0460000
|
display_data equ (OS_BASE+0x0460000)
|
||||||
HD_CACHE equ OS_BASE+0x0600000
|
HD_CACHE equ (OS_BASE+0x0600000)
|
||||||
stack_data_start equ OS_BASE+0x0700000
|
stack_data_start equ (OS_BASE+0x0700000)
|
||||||
eth_data_start equ OS_BASE+0x0700000
|
eth_data_start equ (OS_BASE+0x0700000)
|
||||||
stack_data equ OS_BASE+0x0704000
|
stack_data equ (OS_BASE+0x0704000)
|
||||||
stack_data_end equ OS_BASE+0x071ffff
|
stack_data_end equ (OS_BASE+0x071ffff)
|
||||||
VMODE_BASE equ OS_BASE+0x0760000
|
VMODE_BASE equ (OS_BASE+0x0760000)
|
||||||
resendQ equ OS_BASE+0x0770000
|
resendQ equ (OS_BASE+0x0770000)
|
||||||
|
|
||||||
;skin_data equ OS_BASE+0x0778000
|
;skin_data equ (OS_BASE+0x0778000)
|
||||||
|
|
||||||
|
|
||||||
tss_data equ 0x780000
|
tss_data equ (OS_BASE+0x780000)
|
||||||
draw_data equ 0x988000
|
draw_data equ (OS_BASE+0x988000)
|
||||||
|
|
||||||
HEAP_BASE equ 0x98B000
|
HEAP_BASE equ (OS_BASE+0x98B000)
|
||||||
|
|
||||||
LFB_BASE equ 0x7DC00000
|
LFB_BASE equ 0x7DC00000
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ debug_set_event_data:
|
|||||||
; destroys eax
|
; destroys eax
|
||||||
mov eax, [CURRENT_TASK]
|
mov eax, [CURRENT_TASK]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov [eax+0x80000+APPDATA.dbg_event_mem], ebx
|
mov [eax+SLOT_BASE+APPDATA.dbg_event_mem], ebx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
get_debuggee_slot:
|
get_debuggee_slot:
|
||||||
@ -37,7 +37,7 @@ get_debuggee_slot:
|
|||||||
shl eax, 5
|
shl eax, 5
|
||||||
push ebx
|
push ebx
|
||||||
mov ebx, [CURRENT_TASK]
|
mov ebx, [CURRENT_TASK]
|
||||||
cmp [0x80000+eax*8+APPDATA.debugger_slot], ebx
|
cmp [SLOT_BASE+eax*8+APPDATA.debugger_slot], ebx
|
||||||
pop ebx
|
pop ebx
|
||||||
jnz .ret_bad
|
jnz .ret_bad
|
||||||
; clc ; automatically
|
; clc ; automatically
|
||||||
@ -51,7 +51,7 @@ debug_detach:
|
|||||||
; destroys eax,ebx
|
; destroys eax,ebx
|
||||||
call get_debuggee_slot
|
call get_debuggee_slot
|
||||||
jc .ret
|
jc .ret
|
||||||
and dword [eax*8+0x80000+APPDATA.debugger_slot], 0
|
and dword [eax*8+SLOT_BASE+APPDATA.debugger_slot], 0
|
||||||
call do_resume
|
call do_resume
|
||||||
.ret:
|
.ret:
|
||||||
sti
|
sti
|
||||||
@ -227,7 +227,7 @@ debug_set_drx:
|
|||||||
call get_debuggee_slot
|
call get_debuggee_slot
|
||||||
jc .errret
|
jc .errret
|
||||||
mov ebp, eax
|
mov ebp, eax
|
||||||
lea eax, [eax*8+0x80000+APPDATA.dbg_regs]
|
lea eax, [eax*8+SLOT_BASE+APPDATA.dbg_regs]
|
||||||
; [eax]=dr0, [eax+4]=dr1, [eax+8]=dr2, [eax+C]=dr3
|
; [eax]=dr0, [eax+4]=dr1, [eax+8]=dr2, [eax+C]=dr3
|
||||||
; [eax+10]=dr7
|
; [eax+10]=dr7
|
||||||
add edx, std_application_base_address
|
add edx, std_application_base_address
|
||||||
@ -358,7 +358,7 @@ debugger_notify:
|
|||||||
.1:
|
.1:
|
||||||
mov eax, ebp
|
mov eax, ebp
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov edx, [0x80000+eax+APPDATA.dbg_event_mem]
|
mov edx, [SLOT_BASE+eax+APPDATA.dbg_event_mem]
|
||||||
test edx, edx
|
test edx, edx
|
||||||
jz .ret
|
jz .ret
|
||||||
; read buffer header
|
; read buffer header
|
||||||
@ -414,7 +414,7 @@ debugger_notify:
|
|||||||
; new debug event
|
; new debug event
|
||||||
mov eax, ebp
|
mov eax, ebp
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
or byte [0x80000+eax+APPDATA.event_mask+1], 1 ; set flag 100h
|
or byte [SLOT_BASE+eax+APPDATA.event_mask+1], 1 ; set flag 100h
|
||||||
.ret:
|
.ret:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -432,7 +432,7 @@ debug_exc:
|
|||||||
; set DRx registers for task and continue
|
; set DRx registers for task and continue
|
||||||
mov eax, [CURRENT_TASK]
|
mov eax, [CURRENT_TASK]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
add eax, 0x80000+APPDATA.dbg_regs
|
add eax, SLOT_BASE+APPDATA.dbg_regs
|
||||||
mov ecx, [eax+0]
|
mov ecx, [eax+0]
|
||||||
mov dr0, ecx
|
mov dr0, ecx
|
||||||
mov ecx, [eax+4]
|
mov ecx, [eax+4]
|
||||||
@ -455,7 +455,7 @@ debug_exc:
|
|||||||
cli
|
cli
|
||||||
mov eax, [CURRENT_TASK]
|
mov eax, [CURRENT_TASK]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov eax, [0x80000+eax+APPDATA.debugger_slot]
|
mov eax, [SLOT_BASE+eax+APPDATA.debugger_slot]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jnz .debug
|
jnz .debug
|
||||||
sti
|
sti
|
||||||
|
@ -156,12 +156,12 @@ proc get_notify stdcall, p_ev:dword
|
|||||||
.wait:
|
.wait:
|
||||||
mov ebx,[CURRENT_TASK]
|
mov ebx,[CURRENT_TASK]
|
||||||
shl ebx,8
|
shl ebx,8
|
||||||
test dword [ebx+PROC_BASE+0xA8],EVENT_NOTIFY
|
test dword [ebx+SLOT_BASE+0xA8],EVENT_NOTIFY
|
||||||
jz @f
|
jz @f
|
||||||
and dword [ebx+PROC_BASE+0xA8], not EVENT_NOTIFY
|
and dword [ebx+SLOT_BASE+0xA8], not EVENT_NOTIFY
|
||||||
mov edi, [p_ev]
|
mov edi, [p_ev]
|
||||||
mov dword [edi], EV_INTR
|
mov dword [edi], EV_INTR
|
||||||
mov eax, [ebx+PROC_BASE+APPDATA.event]
|
mov eax, [ebx+SLOT_BASE+APPDATA.event]
|
||||||
mov dword [edi+4], eax
|
mov dword [edi+4], eax
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
@ -998,7 +998,7 @@ create_kernel_object:
|
|||||||
|
|
||||||
mov ecx,[CURRENT_TASK]
|
mov ecx,[CURRENT_TASK]
|
||||||
shl ecx,8
|
shl ecx,8
|
||||||
add ecx, PROC_BASE+APP_OBJ_OFFSET
|
add ecx, SLOT_BASE+APP_OBJ_OFFSET
|
||||||
|
|
||||||
pushfd
|
pushfd
|
||||||
cli
|
cli
|
||||||
|
@ -57,7 +57,7 @@ fpu_save:
|
|||||||
jne .save
|
jne .save
|
||||||
.copy:
|
.copy:
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov esi, [eax+PROC_BASE+APPDATA.fpu_state]
|
mov esi, [eax+SLOT_BASE+APPDATA.fpu_state]
|
||||||
mov ecx, 512/4
|
mov ecx, 512/4
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
@ -72,7 +72,7 @@ fpu_save:
|
|||||||
mov [fpu_owner], eax
|
mov [fpu_owner], eax
|
||||||
|
|
||||||
shl ecx, 8
|
shl ecx, 8
|
||||||
mov ecx, [ecx+PROC_BASE+APPDATA.fpu_state]
|
mov ecx, [ecx+SLOT_BASE+APPDATA.fpu_state]
|
||||||
|
|
||||||
bt [cpu_caps], CAPS_SSE
|
bt [cpu_caps], CAPS_SSE
|
||||||
jnc .no_SSE
|
jnc .no_SSE
|
||||||
@ -117,7 +117,7 @@ fpu_restore:
|
|||||||
ret
|
ret
|
||||||
.copy:
|
.copy:
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov edi, [eax+PROC_BASE+APPDATA.fpu_state]
|
mov edi, [eax+SLOT_BASE+APPDATA.fpu_state]
|
||||||
mov ecx, 512/4
|
mov ecx, 512/4
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
@ -139,7 +139,7 @@ e7: ;#NM exception handler
|
|||||||
je .exit
|
je .exit
|
||||||
|
|
||||||
shl ebx, 8
|
shl ebx, 8
|
||||||
mov eax, [ebx+PROC_BASE+APPDATA.fpu_state]
|
mov eax, [ebx+SLOT_BASE+APPDATA.fpu_state]
|
||||||
bt [cpu_caps], CAPS_SSE
|
bt [cpu_caps], CAPS_SSE
|
||||||
jnc .no_SSE
|
jnc .no_SSE
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ e7: ;#NM exception handler
|
|||||||
mov ebx, [CURRENT_TASK]
|
mov ebx, [CURRENT_TASK]
|
||||||
mov [fpu_owner], ebx
|
mov [fpu_owner], ebx
|
||||||
shl ebx, 8
|
shl ebx, 8
|
||||||
mov eax, [ebx+PROC_BASE+APPDATA.fpu_state]
|
mov eax, [ebx+SLOT_BASE+APPDATA.fpu_state]
|
||||||
fxrstor [eax]
|
fxrstor [eax]
|
||||||
.exit:
|
.exit:
|
||||||
restore_ring3_context
|
restore_ring3_context
|
||||||
@ -158,7 +158,7 @@ e7: ;#NM exception handler
|
|||||||
mov ebx, [CURRENT_TASK]
|
mov ebx, [CURRENT_TASK]
|
||||||
mov [fpu_owner], ebx
|
mov [fpu_owner], ebx
|
||||||
shl ebx, 8
|
shl ebx, 8
|
||||||
mov eax, [ebx+PROC_BASE+APPDATA.fpu_state]
|
mov eax, [ebx+SLOT_BASE+APPDATA.fpu_state]
|
||||||
frstor [eax]
|
frstor [eax]
|
||||||
restore_ring3_context
|
restore_ring3_context
|
||||||
iret
|
iret
|
||||||
@ -186,7 +186,7 @@ except_16: ;fpu native exceptions handler
|
|||||||
mov ebx, [ss:CURRENT_TASK]
|
mov ebx, [ss:CURRENT_TASK]
|
||||||
shl ebx, 8
|
shl ebx, 8
|
||||||
|
|
||||||
mov eax, [ss:ebx+PROC_BASE+APPDATA.fpu_handler]
|
mov eax, [ss:ebx+SLOT_BASE+APPDATA.fpu_handler]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .default
|
jz .default
|
||||||
|
|
||||||
@ -230,7 +230,7 @@ except_19: ;sse exceptions handler
|
|||||||
mov ebx, [ss:CURRENT_TASK]
|
mov ebx, [ss:CURRENT_TASK]
|
||||||
shl ebx, 8
|
shl ebx, 8
|
||||||
|
|
||||||
mov eax, [ss:ebx+PROC_BASE+APPDATA.sse_handler]
|
mov eax, [ss:ebx+SLOT_BASE+APPDATA.sse_handler]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .default
|
jz .default
|
||||||
|
|
||||||
|
@ -616,20 +616,20 @@ proc init_heap
|
|||||||
|
|
||||||
mov ebx,[CURRENT_TASK]
|
mov ebx,[CURRENT_TASK]
|
||||||
shl ebx,8
|
shl ebx,8
|
||||||
mov eax, [PROC_BASE+APPDATA.heap_top+ebx]
|
mov eax, [SLOT_BASE+APPDATA.heap_top+ebx]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz @F
|
jz @F
|
||||||
sub eax,[PROC_BASE+APPDATA.heap_base+ebx]
|
sub eax,[SLOT_BASE+APPDATA.heap_base+ebx]
|
||||||
sub eax, 4096
|
sub eax, 4096
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
mov esi, [PROC_BASE+APPDATA.mem_size+ebx]
|
mov esi, [SLOT_BASE+APPDATA.mem_size+ebx]
|
||||||
add esi, 4095
|
add esi, 4095
|
||||||
and esi, not 4095
|
and esi, not 4095
|
||||||
mov [PROC_BASE+APPDATA.mem_size+ebx], esi
|
mov [SLOT_BASE+APPDATA.mem_size+ebx], esi
|
||||||
mov eax, HEAP_TOP
|
mov eax, HEAP_TOP
|
||||||
mov [PROC_BASE+APPDATA.heap_base+ebx], esi
|
mov [SLOT_BASE+APPDATA.heap_base+ebx], esi
|
||||||
mov [PROC_BASE+APPDATA.heap_top+ebx], eax
|
mov [SLOT_BASE+APPDATA.heap_top+ebx], eax
|
||||||
|
|
||||||
sub eax, esi
|
sub eax, esi
|
||||||
add esi, new_app_base
|
add esi, new_app_base
|
||||||
@ -653,8 +653,8 @@ proc user_alloc stdcall, alloc_size:dword
|
|||||||
|
|
||||||
mov ebx, [CURRENT_TASK]
|
mov ebx, [CURRENT_TASK]
|
||||||
shl ebx, 8
|
shl ebx, 8
|
||||||
mov esi, dword [ebx+PROC_BASE+APPDATA.heap_base]; heap_base
|
mov esi, dword [ebx+SLOT_BASE+APPDATA.heap_base]; heap_base
|
||||||
mov edi, dword [ebx+PROC_BASE+APPDATA.heap_top]; heap_top
|
mov edi, dword [ebx+SLOT_BASE+APPDATA.heap_top]; heap_top
|
||||||
add esi, new_app_base
|
add esi, new_app_base
|
||||||
add edi, new_app_base
|
add edi, new_app_base
|
||||||
l_0:
|
l_0:
|
||||||
@ -695,7 +695,7 @@ l_0:
|
|||||||
mov ebx, [alloc_size]
|
mov ebx, [alloc_size]
|
||||||
add ebx, 0xFFF
|
add ebx, 0xFFF
|
||||||
and ebx, not 0xFFF
|
and ebx, not 0xFFF
|
||||||
add ebx, [PROC_BASE+APPDATA.mem_size+edx]
|
add ebx, [SLOT_BASE+APPDATA.mem_size+edx]
|
||||||
call update_mem_size
|
call update_mem_size
|
||||||
|
|
||||||
mov eax, esi
|
mov eax, esi
|
||||||
@ -752,9 +752,9 @@ proc user_free stdcall, base:dword
|
|||||||
.not_used:
|
.not_used:
|
||||||
mov edx, [CURRENT_TASK]
|
mov edx, [CURRENT_TASK]
|
||||||
shl edx, 8
|
shl edx, 8
|
||||||
mov esi, dword [edx+PROC_BASE+APPDATA.heap_base]; heap_base
|
mov esi, dword [edx+SLOT_BASE+APPDATA.heap_base]; heap_base
|
||||||
mov edi, dword [edx+PROC_BASE+APPDATA.heap_top]; heap_top
|
mov edi, dword [edx+SLOT_BASE+APPDATA.heap_top]; heap_top
|
||||||
sub ebx, [edx+PROC_BASE+APPDATA.mem_size]
|
sub ebx, [edx+SLOT_BASE+APPDATA.mem_size]
|
||||||
neg ebx
|
neg ebx
|
||||||
call update_mem_size
|
call update_mem_size
|
||||||
add esi, new_app_base
|
add esi, new_app_base
|
||||||
|
@ -458,10 +458,10 @@ proc new_mem_resize stdcall, new_size:dword
|
|||||||
|
|
||||||
mov edx,[CURRENT_TASK]
|
mov edx,[CURRENT_TASK]
|
||||||
shl edx,8
|
shl edx,8
|
||||||
cmp [PROC_BASE+APPDATA.heap_base+edx],0
|
cmp [SLOT_BASE+APPDATA.heap_base+edx],0
|
||||||
jne .exit
|
jne .exit
|
||||||
|
|
||||||
mov esi, [PROC_BASE+APPDATA.mem_size+edx]
|
mov esi, [SLOT_BASE+APPDATA.mem_size+edx]
|
||||||
add esi, 4095
|
add esi, 4095
|
||||||
and esi, not 4095
|
and esi, not 4095
|
||||||
|
|
||||||
@ -562,10 +562,10 @@ update_mem_size:
|
|||||||
; ebx = new memory size
|
; ebx = new memory size
|
||||||
; destroys eax,ecx,edx
|
; destroys eax,ecx,edx
|
||||||
|
|
||||||
mov [PROC_BASE+APPDATA.mem_size+edx],ebx
|
mov [SLOT_BASE+APPDATA.mem_size+edx],ebx
|
||||||
;search threads and update
|
;search threads and update
|
||||||
;application memory size infomation
|
;application memory size infomation
|
||||||
mov ecx,[PROC_BASE+APPDATA.dir_table+edx]
|
mov ecx,[SLOT_BASE+APPDATA.dir_table+edx]
|
||||||
mov eax,2
|
mov eax,2
|
||||||
|
|
||||||
.search_threads:
|
.search_threads:
|
||||||
@ -579,9 +579,9 @@ update_mem_size:
|
|||||||
cmp word [CURRENT_TASK+edx+TASKDATA.state],9 ;if slot empty?
|
cmp word [CURRENT_TASK+edx+TASKDATA.state],9 ;if slot empty?
|
||||||
jz .search_threads_next
|
jz .search_threads_next
|
||||||
shl edx,3
|
shl edx,3
|
||||||
cmp [PROC_BASE+edx+APPDATA.dir_table],ecx ;if it is our thread?
|
cmp [SLOT_BASE+edx+APPDATA.dir_table],ecx ;if it is our thread?
|
||||||
jnz .search_threads_next
|
jnz .search_threads_next
|
||||||
mov [PROC_BASE+edx+APPDATA.mem_size],ebx ;update memory size
|
mov [SLOT_BASE+edx+APPDATA.mem_size],ebx ;update memory size
|
||||||
.search_threads_next:
|
.search_threads_next:
|
||||||
inc eax
|
inc eax
|
||||||
jmp .search_threads
|
jmp .search_threads
|
||||||
@ -838,7 +838,7 @@ proc set_ipc_buff
|
|||||||
|
|
||||||
mov eax,[CURRENT_TASK]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
add eax, PROC_BASE
|
add eax, SLOT_BASE
|
||||||
pushf
|
pushf
|
||||||
cli
|
cli
|
||||||
mov [eax+0xA0],ebx ;set fields in extended information area
|
mov [eax+0xA0],ebx ;set fields in extended information area
|
||||||
@ -876,7 +876,7 @@ proc sys_ipc_send stdcall, PID:dword, msg_addr:dword, msg_size:dword
|
|||||||
|
|
||||||
mov [dst_slot], eax
|
mov [dst_slot], eax
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov edi,[eax+PROC_BASE+0xa0] ;is ipc area defined?
|
mov edi,[eax+SLOT_BASE+0xa0] ;is ipc area defined?
|
||||||
test edi,edi
|
test edi,edi
|
||||||
jz .no_ipc_area
|
jz .no_ipc_area
|
||||||
|
|
||||||
@ -885,10 +885,10 @@ proc sys_ipc_send stdcall, PID:dword, msg_addr:dword, msg_size:dword
|
|||||||
and ebx, 0xFFF
|
and ebx, 0xFFF
|
||||||
mov [dst_offset], ebx
|
mov [dst_offset], ebx
|
||||||
|
|
||||||
mov esi, [eax+PROC_BASE+0xa4]
|
mov esi, [eax+SLOT_BASE+0xa4]
|
||||||
mov [buf_size], esi
|
mov [buf_size], esi
|
||||||
|
|
||||||
stdcall map_mem, [ipc_tmp], [PROC_BASE+eax+0xB8],\
|
stdcall map_mem, [ipc_tmp], [SLOT_BASE+eax+0xB8],\
|
||||||
edi, esi
|
edi, esi
|
||||||
|
|
||||||
mov edi, [dst_offset]
|
mov edi, [dst_offset]
|
||||||
@ -942,7 +942,7 @@ proc sys_ipc_send stdcall, PID:dword, msg_addr:dword, msg_size:dword
|
|||||||
|
|
||||||
mov eax, [dst_slot]
|
mov eax, [dst_slot]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
or [eax+PROC_BASE+0xA8],dword 0x40
|
or [eax+SLOT_BASE+0xA8],dword 0x40
|
||||||
cmp dword [check_idle_semaphore],20
|
cmp dword [check_idle_semaphore],20
|
||||||
jge .ipc_no_cis
|
jge .ipc_no_cis
|
||||||
|
|
||||||
@ -1039,8 +1039,8 @@ new_services:
|
|||||||
ja @f
|
ja @f
|
||||||
mov ecx, [CURRENT_TASK]
|
mov ecx, [CURRENT_TASK]
|
||||||
shl ecx, 8
|
shl ecx, 8
|
||||||
mov eax, [ecx+PROC_BASE+APPDATA.fpu_handler]
|
mov eax, [ecx+SLOT_BASE+APPDATA.fpu_handler]
|
||||||
mov [ecx+PROC_BASE+APPDATA.fpu_handler], ebx
|
mov [ecx+SLOT_BASE+APPDATA.fpu_handler], ebx
|
||||||
mov [esp+36], eax
|
mov [esp+36], eax
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
@ -1066,8 +1066,8 @@ new_services:
|
|||||||
ja @f
|
ja @f
|
||||||
mov ecx, [CURRENT_TASK]
|
mov ecx, [CURRENT_TASK]
|
||||||
shl ecx, 8
|
shl ecx, 8
|
||||||
mov eax, [ecx+PROC_BASE+APPDATA.sse_handler]
|
mov eax, [ecx+SLOT_BASE+APPDATA.sse_handler]
|
||||||
mov [ecx+PROC_BASE+APPDATA.sse_handler], ebx
|
mov [ecx+SLOT_BASE+APPDATA.sse_handler], ebx
|
||||||
mov [esp+36], eax
|
mov [esp+36], eax
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
idtreg:
|
idtreg:
|
||||||
dw 8*0x41-1
|
dw 8*0x41-1
|
||||||
dd idts+8
|
dd idts+8
|
||||||
;label idts at 0xB100-8
|
|
||||||
|
|
||||||
build_process_gdt_tss_pointer:
|
build_process_gdt_tss_pointer:
|
||||||
|
|
||||||
@ -122,7 +121,7 @@ exc_c:
|
|||||||
cli
|
cli
|
||||||
mov eax, [CURRENT_TASK]
|
mov eax, [CURRENT_TASK]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov eax, [0x80000+eax+APPDATA.debugger_slot]
|
mov eax, [SLOT_BASE+eax+APPDATA.debugger_slot]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jnz .debug
|
jnz .debug
|
||||||
sti
|
sti
|
||||||
@ -582,7 +581,7 @@ terminate: ; terminate application
|
|||||||
push esi ;save .slot
|
push esi ;save .slot
|
||||||
|
|
||||||
shl esi, 8
|
shl esi, 8
|
||||||
cmp [PROC_BASE+esi+APPDATA.dir_table], 0
|
cmp [SLOT_BASE+esi+APPDATA.dir_table], 0
|
||||||
jne @F
|
jne @F
|
||||||
add esp, 4
|
add esp, 4
|
||||||
ret
|
ret
|
||||||
@ -601,7 +600,7 @@ term9:
|
|||||||
|
|
||||||
mov esi, [.slot]
|
mov esi, [.slot]
|
||||||
shl esi,8
|
shl esi,8
|
||||||
add esi, PROC_BASE+APP_OBJ_OFFSET
|
add esi, SLOT_BASE+APP_OBJ_OFFSET
|
||||||
@@:
|
@@:
|
||||||
mov eax, [esi+APPOBJ.fd]
|
mov eax, [esi+APPOBJ.fd]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
@ -619,7 +618,7 @@ term9:
|
|||||||
@@:
|
@@:
|
||||||
mov eax, [.slot]
|
mov eax, [.slot]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov eax,[PROC_BASE+eax+APPDATA.dir_table]
|
mov eax,[SLOT_BASE+eax+APPDATA.dir_table]
|
||||||
stdcall destroy_app_space, eax
|
stdcall destroy_app_space, eax
|
||||||
|
|
||||||
mov esi, [.slot]
|
mov esi, [.slot]
|
||||||
@ -627,7 +626,7 @@ term9:
|
|||||||
jne @F
|
jne @F
|
||||||
|
|
||||||
mov [fpu_owner],1
|
mov [fpu_owner],1
|
||||||
mov eax, [256+PROC_BASE+APPDATA.fpu_state]
|
mov eax, [256+SLOT_BASE+APPDATA.fpu_state]
|
||||||
clts
|
clts
|
||||||
bt [cpu_caps], CAPS_SSE
|
bt [cpu_caps], CAPS_SSE
|
||||||
jnc .no_SSE
|
jnc .no_SSE
|
||||||
@ -732,7 +731,7 @@ term9:
|
|||||||
pushad
|
pushad
|
||||||
mov edi, esi
|
mov edi, esi
|
||||||
shl edi, 5
|
shl edi, 5
|
||||||
mov eax, [0x80000+edi*8+APPDATA.debugger_slot]
|
mov eax, [SLOT_BASE+edi*8+APPDATA.debugger_slot]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .nodebug
|
jz .nodebug
|
||||||
push 8
|
push 8
|
||||||
@ -747,13 +746,13 @@ term9:
|
|||||||
|
|
||||||
mov ebx, [.slot]
|
mov ebx, [.slot]
|
||||||
shl ebx, 8
|
shl ebx, 8
|
||||||
mov ebx,[PROC_BASE+ebx+APPDATA.pl0_stack]
|
mov ebx,[SLOT_BASE+ebx+APPDATA.pl0_stack]
|
||||||
|
|
||||||
stdcall kernel_free, ebx
|
stdcall kernel_free, ebx
|
||||||
|
|
||||||
mov edi, [.slot]
|
mov edi, [.slot]
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add edi,0x80000
|
add edi,SLOT_BASE
|
||||||
mov eax, 0x20202020
|
mov eax, 0x20202020
|
||||||
stosd
|
stosd
|
||||||
stosd
|
stosd
|
||||||
@ -763,7 +762,7 @@ term9:
|
|||||||
rep stosd
|
rep stosd
|
||||||
|
|
||||||
; activate window
|
; activate window
|
||||||
movzx eax, word [0xC000 + esi*2]
|
movzx eax, word [WIN_STACK + esi*2]
|
||||||
cmp eax, [TASK_COUNT]
|
cmp eax, [TASK_COUNT]
|
||||||
jne .dont_activate
|
jne .dont_activate
|
||||||
pushad
|
pushad
|
||||||
@ -771,7 +770,7 @@ term9:
|
|||||||
dec eax
|
dec eax
|
||||||
cmp eax, 1
|
cmp eax, 1
|
||||||
jbe .nothing_to_activate
|
jbe .nothing_to_activate
|
||||||
lea esi, [0xc400+eax*2]
|
lea esi, [WIN_POS+eax*2]
|
||||||
movzx edi, word [esi] ; edi = process
|
movzx edi, word [esi] ; edi = process
|
||||||
shl edi, 5
|
shl edi, 5
|
||||||
cmp [CURRENT_TASK + edi + TASKDATA.state], byte 9 ; skip dead slots
|
cmp [CURRENT_TASK + edi + TASKDATA.state], byte 9 ; skip dead slots
|
||||||
@ -870,7 +869,7 @@ term9:
|
|||||||
mov [edi+CURRENT_TASK + TASKDATA.state],byte 9
|
mov [edi+CURRENT_TASK + TASKDATA.state],byte 9
|
||||||
; debugger test - terminate all debuggees
|
; debugger test - terminate all debuggees
|
||||||
mov eax, 2
|
mov eax, 2
|
||||||
mov ecx, 0x80000+2*0x100+APPDATA.debugger_slot
|
mov ecx, SLOT_BASE+2*0x100+APPDATA.debugger_slot
|
||||||
.xd0:
|
.xd0:
|
||||||
cmp eax, [TASK_COUNT]
|
cmp eax, [TASK_COUNT]
|
||||||
ja .xd1
|
ja .xd1
|
||||||
|
@ -54,7 +54,7 @@ sysenter_entry:
|
|||||||
push eax
|
push eax
|
||||||
mov eax, [ss:CURRENT_TASK]
|
mov eax, [ss:CURRENT_TASK]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov eax, [ss:PROC_BASE + eax + APPDATA.pl0_stack]
|
mov eax, [ss:SLOT_BASE + eax + APPDATA.pl0_stack]
|
||||||
lea esp, [ss:eax + RING0_STACK_SIZE] ; configure ESP
|
lea esp, [ss:eax + RING0_STACK_SIZE] ; configure ESP
|
||||||
mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app
|
mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app
|
||||||
sti
|
sti
|
||||||
@ -99,7 +99,7 @@ syscall_entry:
|
|||||||
mov [ss:sysenter_stack - 4], eax
|
mov [ss:sysenter_stack - 4], eax
|
||||||
mov eax, [ss:CURRENT_TASK]
|
mov eax, [ss:CURRENT_TASK]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov eax, [ss:PROC_BASE + eax + APPDATA.pl0_stack]
|
mov eax, [ss:SLOT_BASE + eax + APPDATA.pl0_stack]
|
||||||
lea esp, [ss:eax + RING0_STACK_SIZE] ; configure ESP
|
lea esp, [ss:eax + RING0_STACK_SIZE] ; configure ESP
|
||||||
mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app
|
mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app
|
||||||
sti
|
sti
|
||||||
@ -197,7 +197,7 @@ iglobal
|
|||||||
dd undefined_syscall ; 56-reserved
|
dd undefined_syscall ; 56-reserved
|
||||||
dd undefined_syscall ; 57-reserved
|
dd undefined_syscall ; 57-reserved
|
||||||
dd file_system ; 58-Common file system interface
|
dd file_system ; 58-Common file system interface
|
||||||
dd undefined_syscall ; 59-reserved
|
dd undefined_syscall ; 59-reserved
|
||||||
dd sys_IPC ; 60-Inter Process Communication
|
dd sys_IPC ; 60-Inter Process Communication
|
||||||
dd sys_gs ; 61-Direct graphics access
|
dd sys_gs ; 61-Direct graphics access
|
||||||
dd sys_pci ; 62-PCI functions
|
dd sys_pci ; 62-PCI functions
|
||||||
|
@ -159,7 +159,7 @@ proc fs_execute
|
|||||||
|
|
||||||
mov [slot], eax
|
mov [slot], eax
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
add eax, PROC_BASE
|
add eax, SLOT_BASE
|
||||||
mov [slot_base], eax
|
mov [slot_base], eax
|
||||||
mov edi, eax
|
mov edi, eax
|
||||||
_clear_ 256 ;clean extended information about process
|
_clear_ 256 ;clean extended information about process
|
||||||
@ -487,7 +487,7 @@ set_cr3:
|
|||||||
mov esi, [CURRENT_TASK]
|
mov esi, [CURRENT_TASK]
|
||||||
mov ebx, esi
|
mov ebx, esi
|
||||||
shl esi,8
|
shl esi,8
|
||||||
mov [PROC_BASE+esi+0xB8],eax
|
mov [SLOT_BASE+esi+0xB8],eax
|
||||||
imul ebx,tss_step
|
imul ebx,tss_step
|
||||||
add ebx,tss_data
|
add ebx,tss_data
|
||||||
mov [ebx+28], eax
|
mov [ebx+28], eax
|
||||||
@ -531,7 +531,7 @@ proc destroy_app_space stdcall, pg_dir:dword
|
|||||||
cmp byte [CURRENT_TASK+ecx+0xa],9 ;if process running?
|
cmp byte [CURRENT_TASK+ecx+0xa],9 ;if process running?
|
||||||
jz @f ;skip empty slots
|
jz @f ;skip empty slots
|
||||||
shl ecx,3
|
shl ecx,3
|
||||||
cmp [PROC_BASE+ecx+0xB8],ebx ;compare page directory addresses
|
cmp [SLOT_BASE+ecx+0xB8],ebx ;compare page directory addresses
|
||||||
jnz @f
|
jnz @f
|
||||||
inc edx ;thread found
|
inc edx ;thread found
|
||||||
@@:
|
@@:
|
||||||
@ -635,7 +635,7 @@ check_process_region:
|
|||||||
cmp word [CURRENT_TASK+eax+0xa],0
|
cmp word [CURRENT_TASK+eax+0xa],0
|
||||||
jnz .failed
|
jnz .failed
|
||||||
shl eax,3
|
shl eax,3
|
||||||
mov eax,[PROC_BASE+eax+0xb8]
|
mov eax,[SLOT_BASE+eax+0xb8]
|
||||||
test eax,eax
|
test eax,eax
|
||||||
jz .failed
|
jz .failed
|
||||||
|
|
||||||
@ -738,7 +738,7 @@ proc read_process_memory
|
|||||||
add ebx, new_app_base
|
add ebx, new_app_base
|
||||||
push ecx
|
push ecx
|
||||||
stdcall map_memEx, [proc_mem_map],\
|
stdcall map_memEx, [proc_mem_map],\
|
||||||
[PROC_BASE+eax+0xB8],\
|
[SLOT_BASE+eax+0xB8],\
|
||||||
ebx, ecx
|
ebx, ecx
|
||||||
pop ecx
|
pop ecx
|
||||||
|
|
||||||
@ -804,7 +804,7 @@ proc write_process_memory
|
|||||||
add ebx, new_app_base
|
add ebx, new_app_base
|
||||||
push ecx
|
push ecx
|
||||||
stdcall map_memEx, [proc_mem_map],\
|
stdcall map_memEx, [proc_mem_map],\
|
||||||
[PROC_BASE+eax+0xB8],\
|
[SLOT_BASE+eax+0xB8],\
|
||||||
ebx, ecx
|
ebx, ecx
|
||||||
pop ecx
|
pop ecx
|
||||||
|
|
||||||
@ -868,12 +868,12 @@ proc new_sys_threads
|
|||||||
|
|
||||||
mov esi,[CURRENT_TASK]
|
mov esi,[CURRENT_TASK]
|
||||||
shl esi,8
|
shl esi,8
|
||||||
add esi,PROC_BASE
|
add esi,SLOT_BASE
|
||||||
mov ebx,esi ;ebx=esi - pointer to extended information about current thread
|
mov ebx,esi ;ebx=esi - pointer to extended information about current thread
|
||||||
|
|
||||||
mov edi, eax
|
mov edi, eax
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add edi,PROC_BASE
|
add edi,SLOT_BASE
|
||||||
mov edx,edi ;edx=edi - pointer to extended infomation about new thread
|
mov edx,edi ;edx=edi - pointer to extended infomation about new thread
|
||||||
mov ecx,256/4
|
mov ecx,256/4
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
@ -950,9 +950,9 @@ proc set_app_params stdcall,slot:dword, params:dword,\
|
|||||||
mov ebx, eax
|
mov ebx, eax
|
||||||
|
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
mov [eax+PROC_BASE+APPDATA.fpu_state], edi
|
mov [eax+SLOT_BASE+APPDATA.fpu_state], edi
|
||||||
mov [eax+PROC_BASE+APPDATA.fpu_handler], 0
|
mov [eax+SLOT_BASE+APPDATA.fpu_handler], 0
|
||||||
mov [eax+PROC_BASE+APPDATA.sse_handler], 0
|
mov [eax+SLOT_BASE+APPDATA.sse_handler], 0
|
||||||
|
|
||||||
mov esi, fpu_data
|
mov esi, fpu_data
|
||||||
mov ecx, 512/4
|
mov ecx, 512/4
|
||||||
@ -963,18 +963,18 @@ proc set_app_params stdcall,slot:dword, params:dword,\
|
|||||||
inc dword [TASK_COUNT] ;update number of processes
|
inc dword [TASK_COUNT] ;update number of processes
|
||||||
.noinc:
|
.noinc:
|
||||||
shl ebx,8
|
shl ebx,8
|
||||||
lea edx, [ebx+PROC_BASE+APP_EV_OFFSET]
|
lea edx, [ebx+SLOT_BASE+APP_EV_OFFSET]
|
||||||
mov [PROC_BASE+APPDATA.fd_ev+ebx],edx
|
mov [SLOT_BASE+APPDATA.fd_ev+ebx],edx
|
||||||
mov [PROC_BASE+APPDATA.bk_ev+ebx],edx
|
mov [SLOT_BASE+APPDATA.bk_ev+ebx],edx
|
||||||
|
|
||||||
add edx, APP_OBJ_OFFSET-APP_EV_OFFSET
|
add edx, APP_OBJ_OFFSET-APP_EV_OFFSET
|
||||||
mov [PROC_BASE+APPDATA.fd_obj+ebx],edx
|
mov [SLOT_BASE+APPDATA.fd_obj+ebx],edx
|
||||||
mov [PROC_BASE+APPDATA.bk_obj+ebx],edx
|
mov [SLOT_BASE+APPDATA.bk_obj+ebx],edx
|
||||||
|
|
||||||
mov ecx, [def_cursor]
|
mov ecx, [def_cursor]
|
||||||
mov [PROC_BASE+APPDATA.cursor+ebx],ecx
|
mov [SLOT_BASE+APPDATA.cursor+ebx],ecx
|
||||||
mov eax, [pl0_stack]
|
mov eax, [pl0_stack]
|
||||||
mov [PROC_BASE+APPDATA.pl0_stack+ebx],eax
|
mov [SLOT_BASE+APPDATA.pl0_stack+ebx],eax
|
||||||
|
|
||||||
shr ebx,3
|
shr ebx,3
|
||||||
mov eax, new_app_base
|
mov eax, new_app_base
|
||||||
@ -990,7 +990,7 @@ proc set_app_params stdcall,slot:dword, params:dword,\
|
|||||||
add eax, 256
|
add eax, 256
|
||||||
jc @f
|
jc @f
|
||||||
|
|
||||||
cmp eax, [PROC_BASE+APPDATA.mem_size+ebx*8]
|
cmp eax, [SLOT_BASE+APPDATA.mem_size+ebx*8]
|
||||||
ja @f
|
ja @f
|
||||||
|
|
||||||
add edx, new_app_base
|
add edx, new_app_base
|
||||||
@ -1003,7 +1003,7 @@ proc set_app_params stdcall,slot:dword, params:dword,\
|
|||||||
mov eax, edx
|
mov eax, edx
|
||||||
add eax, 1024
|
add eax, 1024
|
||||||
jc @f
|
jc @f
|
||||||
cmp eax, [PROC_BASE+APPDATA.mem_size+ebx*8]
|
cmp eax, [SLOT_BASE+APPDATA.mem_size+ebx*8]
|
||||||
ja @f
|
ja @f
|
||||||
add edx, new_app_base
|
add edx, new_app_base
|
||||||
stdcall k_strncpy, edx, [app_path], 1024
|
stdcall k_strncpy, edx, [app_path], 1024
|
||||||
@ -1050,7 +1050,7 @@ proc set_app_params stdcall,slot:dword, params:dword,\
|
|||||||
;set cr3 register in TSS of application
|
;set cr3 register in TSS of application
|
||||||
mov ecx, [slot]
|
mov ecx, [slot]
|
||||||
shl ecx, 8
|
shl ecx, 8
|
||||||
mov eax,[PROC_BASE+ecx+APPDATA.dir_table]
|
mov eax,[SLOT_BASE+ecx+APPDATA.dir_table]
|
||||||
mov [edi+TSS._cr3],eax
|
mov [edi+TSS._cr3],eax
|
||||||
|
|
||||||
mov esi,[params]
|
mov esi,[params]
|
||||||
@ -1104,7 +1104,7 @@ proc set_app_params stdcall,slot:dword, params:dword,\
|
|||||||
jz .no_debug
|
jz .no_debug
|
||||||
mov [CURRENT_TASK+ebx+0xa],byte 1 ;set process state - suspended
|
mov [CURRENT_TASK+ebx+0xa],byte 1 ;set process state - suspended
|
||||||
mov eax,[CURRENT_TASK]
|
mov eax,[CURRENT_TASK]
|
||||||
mov [PROC_BASE+ebx*8+0xac],eax ;set debugger PID - current
|
mov [SLOT_BASE+ebx*8+0xac],eax ;set debugger PID - current
|
||||||
.no_debug:
|
.no_debug:
|
||||||
mov esi,new_process_running
|
mov esi,new_process_running
|
||||||
call sys_msg_board_str ;output information about succefull startup
|
call sys_msg_board_str ;output information about succefull startup
|
||||||
|
@ -67,7 +67,7 @@ R9800XT equ 0x4E4A ;R360
|
|||||||
|
|
||||||
OS_BASE equ 0
|
OS_BASE equ 0
|
||||||
new_app_base equ 0x80000000
|
new_app_base equ 0x80000000
|
||||||
PROC_BASE equ 0x0080000
|
SLOT_BASE equ 0x0080000
|
||||||
|
|
||||||
PG_SW equ 0x003
|
PG_SW equ 0x003
|
||||||
PG_NOCACHE equ 0x018
|
PG_NOCACHE equ 0x018
|
||||||
|
@ -29,7 +29,7 @@ DEBUG equ 1
|
|||||||
|
|
||||||
OS_BASE equ 0
|
OS_BASE equ 0
|
||||||
new_app_base equ 0x80000000
|
new_app_base equ 0x80000000
|
||||||
PROC_BASE equ OS_BASE+0x0080000
|
SLOT_BASE equ OS_BASE+0x0080000
|
||||||
|
|
||||||
CAPS_SSE2 equ 26
|
CAPS_SSE2 equ 26
|
||||||
PG_SW equ 0x003
|
PG_SW equ 0x003
|
||||||
|
@ -244,7 +244,7 @@ end virtual
|
|||||||
EVENT_NOTIFY equ 0x00000200
|
EVENT_NOTIFY equ 0x00000200
|
||||||
|
|
||||||
OS_BASE equ 0; 0x80400000
|
OS_BASE equ 0; 0x80400000
|
||||||
PROC_BASE equ OS_BASE+0x0080000
|
SLOT_BASE equ OS_BASE+0x0080000
|
||||||
new_app_base equ 0x80000000
|
new_app_base equ 0x80000000
|
||||||
|
|
||||||
public START
|
public START
|
||||||
|
@ -271,8 +271,8 @@ end virtual
|
|||||||
EVENT_NOTIFY equ 0x00000200
|
EVENT_NOTIFY equ 0x00000200
|
||||||
|
|
||||||
OS_BASE equ 0;
|
OS_BASE equ 0;
|
||||||
PROC_BASE equ OS_BASE+0x0080000
|
SLOT_BASE equ OS_BASE+0x0080000
|
||||||
new_app_base equ 0x80000000
|
new_app_base equ 0x80000000
|
||||||
|
|
||||||
public START
|
public START
|
||||||
public service_proc
|
public service_proc
|
||||||
|
@ -104,7 +104,7 @@ fr_do_1:
|
|||||||
mov edi,edx
|
mov edi,edx
|
||||||
dec ebx
|
dec ebx
|
||||||
shl ebx,9
|
shl ebx,9
|
||||||
mov esi,0x8000
|
mov esi,FLOPPY_BUFF
|
||||||
add esi,ebx
|
add esi,ebx
|
||||||
shl ecx,9
|
shl ecx,9
|
||||||
cld
|
cld
|
||||||
@ -147,7 +147,7 @@ l.20_1:
|
|||||||
cmp [FDC_Status],0
|
cmp [FDC_Status],0
|
||||||
jne fdc_status_error_3_1
|
jne fdc_status_error_3_1
|
||||||
mov dl,16
|
mov dl,16
|
||||||
mov edi,0xD000
|
mov edi,FDD_BUFF
|
||||||
inc [FDD_Sector]
|
inc [FDD_Sector]
|
||||||
l.21_1:
|
l.21_1:
|
||||||
mov esi,eax ;Name of file we want
|
mov esi,eax ;Name of file we want
|
||||||
@ -274,7 +274,7 @@ read_flp_root:
|
|||||||
mov [FDD_Track],0 ; Öèëèíäð
|
mov [FDD_Track],0 ; Öèëèíäð
|
||||||
mov [FDD_Head],1 ; Ñòîðîíà
|
mov [FDD_Head],1 ; Ñòîðîíà
|
||||||
mov [FDD_Sector],2 ; Ñåêòîð
|
mov [FDD_Sector],2 ; Ñåêòîð
|
||||||
mov edi,0x8000
|
mov edi,FLOPPY_BUFF
|
||||||
call SeekTrack
|
call SeekTrack
|
||||||
read_flp_root_1:
|
read_flp_root_1:
|
||||||
call ReadSectWithRetr
|
call ReadSectWithRetr
|
||||||
@ -303,7 +303,7 @@ read_flp_fat:
|
|||||||
mov [FDD_Track],0 ; Öèëèíäð
|
mov [FDD_Track],0 ; Öèëèíäð
|
||||||
mov [FDD_Head],0 ; Ñòîðîíà
|
mov [FDD_Head],0 ; Ñòîðîíà
|
||||||
mov [FDD_Sector],2 ; Ñåêòîð
|
mov [FDD_Sector],2 ; Ñåêòîð
|
||||||
mov edi,0x8000
|
mov edi,FLOPPY_BUFF
|
||||||
call SeekTrack
|
call SeekTrack
|
||||||
read_flp_fat_1:
|
read_flp_fat_1:
|
||||||
call ReadSectWithRetr
|
call ReadSectWithRetr
|
||||||
@ -332,7 +332,7 @@ unnecessary_flp_fat:
|
|||||||
calculatefatchain_flp:
|
calculatefatchain_flp:
|
||||||
pushad
|
pushad
|
||||||
|
|
||||||
mov esi,0x8000
|
mov esi,FLOPPY_BUFF
|
||||||
mov edi,0x282000
|
mov edi,0x282000
|
||||||
|
|
||||||
fcnew_1:
|
fcnew_1:
|
||||||
@ -384,7 +384,7 @@ check_label:
|
|||||||
cmp [FDC_Status],0
|
cmp [FDC_Status],0
|
||||||
jne fdc_status_error
|
jne fdc_status_error
|
||||||
mov esi,flp_label
|
mov esi,flp_label
|
||||||
mov edi,0xD000+39
|
mov edi,FDD_BUFF+39
|
||||||
mov ecx,15
|
mov ecx,15
|
||||||
cld
|
cld
|
||||||
rep cmpsb
|
rep cmpsb
|
||||||
@ -392,7 +392,7 @@ check_label:
|
|||||||
mov [root_read],0
|
mov [root_read],0
|
||||||
mov [flp_fat],0
|
mov [flp_fat],0
|
||||||
same_label:
|
same_label:
|
||||||
mov esi,0xD000+39
|
mov esi,FDD_BUFF+39
|
||||||
mov edi,flp_label
|
mov edi,flp_label
|
||||||
mov ecx,15
|
mov ecx,15
|
||||||
cld
|
cld
|
||||||
@ -413,7 +413,7 @@ save_flp_root:
|
|||||||
mov [FDD_Track],0 ; Öèëèíäð
|
mov [FDD_Track],0 ; Öèëèíäð
|
||||||
mov [FDD_Head],1 ; Ñòîðîíà
|
mov [FDD_Head],1 ; Ñòîðîíà
|
||||||
mov [FDD_Sector],2 ; Ñåêòîð
|
mov [FDD_Sector],2 ; Ñåêòîð
|
||||||
mov esi,0x8000
|
mov esi,FLOPPY_BUFF
|
||||||
call SeekTrack
|
call SeekTrack
|
||||||
save_flp_root_1:
|
save_flp_root_1:
|
||||||
push esi
|
push esi
|
||||||
@ -442,7 +442,7 @@ save_flp_fat:
|
|||||||
mov [FDD_Track],0 ; Öèëèíäð
|
mov [FDD_Track],0 ; Öèëèíäð
|
||||||
mov [FDD_Head],0 ; Ñòîðîíà
|
mov [FDD_Head],0 ; Ñòîðîíà
|
||||||
mov [FDD_Sector],2 ; Ñåêòîð
|
mov [FDD_Sector],2 ; Ñåêòîð
|
||||||
mov esi,0x8000
|
mov esi,FLOPPY_BUFF
|
||||||
call SeekTrack
|
call SeekTrack
|
||||||
save_flp_fat_1:
|
save_flp_fat_1:
|
||||||
push esi
|
push esi
|
||||||
@ -472,7 +472,7 @@ restorefatchain_flp: ; restore fat chain
|
|||||||
pushad
|
pushad
|
||||||
|
|
||||||
mov esi,0x282000
|
mov esi,0x282000
|
||||||
mov edi,0x8000
|
mov edi,FLOPPY_BUFF
|
||||||
|
|
||||||
fcnew2_1:
|
fcnew2_1:
|
||||||
mov eax,dword [esi]
|
mov eax,dword [esi]
|
||||||
@ -489,11 +489,11 @@ restorefatchain_flp: ; restore fat chain
|
|||||||
add edi,2
|
add edi,2
|
||||||
add esi,8
|
add esi,8
|
||||||
|
|
||||||
cmp edi,0x8000+0x1200 ;4274 bytes - all used FAT
|
cmp edi,FLOPPY_BUFF+0x1200 ;4274 bytes - all used FAT
|
||||||
jb fcnew2_1
|
jb fcnew2_1
|
||||||
|
|
||||||
mov esi,0x8000 ; duplicate fat chain
|
mov esi,FLOPPY_BUFF ; duplicate fat chain
|
||||||
mov edi,0x8000+0x1200
|
mov edi,FLOPPY_BUFF+0x1200
|
||||||
mov ecx,0x1200/4
|
mov ecx,0x1200/4
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
@ -534,7 +534,7 @@ l.20_2:
|
|||||||
cmp [FDC_Status],0
|
cmp [FDC_Status],0
|
||||||
jne fdc_status_error_4
|
jne fdc_status_error_4
|
||||||
mov dl,16
|
mov dl,16
|
||||||
mov edi,0xD000
|
mov edi,FDD_BUFF
|
||||||
inc [FDD_Sector]
|
inc [FDD_Sector]
|
||||||
l.21_2:
|
l.21_2:
|
||||||
mov esi,eax ;Name of file we want
|
mov esi,eax ;Name of file we want
|
||||||
@ -662,7 +662,7 @@ rd_do_save_1:
|
|||||||
call read_flp_root
|
call read_flp_root
|
||||||
cmp [FDC_Status],0
|
cmp [FDC_Status],0
|
||||||
jne fdc_status_error_7
|
jne fdc_status_error_7
|
||||||
mov edi,0x8000 ;Point at directory
|
mov edi,FLOPPY_BUFF ;Point at directory
|
||||||
mov edx,224 +1
|
mov edx,224 +1
|
||||||
; find an empty spot for filename in the root dir
|
; find an empty spot for filename in the root dir
|
||||||
l20ds_1:
|
l20ds_1:
|
||||||
@ -689,7 +689,7 @@ l.20_3:
|
|||||||
cmp [FDC_Status],0
|
cmp [FDC_Status],0
|
||||||
jne fdc_status_error_7
|
jne fdc_status_error_7
|
||||||
mov dl,16
|
mov dl,16
|
||||||
mov edi,0xD000
|
mov edi,FDD_BUFF
|
||||||
inc [FDD_Sector]
|
inc [FDD_Sector]
|
||||||
l.21_3:
|
l.21_3:
|
||||||
mov esi,eax ;Name of file we want
|
mov esi,eax ;Name of file we want
|
||||||
@ -920,7 +920,7 @@ adr56_flp:
|
|||||||
jne not_found_file_analyze_flp
|
jne not_found_file_analyze_flp
|
||||||
|
|
||||||
mov ecx,512/32
|
mov ecx,512/32
|
||||||
mov ebx,0xD000
|
mov ebx,FDD_BUFF
|
||||||
|
|
||||||
adr1_analyze_flp:
|
adr1_analyze_flp:
|
||||||
mov esi,edx ;[esp+16]
|
mov esi,edx ;[esp+16]
|
||||||
@ -985,7 +985,7 @@ adr561:
|
|||||||
jne error_found_file_analyze1
|
jne error_found_file_analyze1
|
||||||
|
|
||||||
mov ecx,512/32
|
mov ecx,512/32
|
||||||
mov ebx,0xD000
|
mov ebx,FDD_BUFF
|
||||||
|
|
||||||
adr1_analyze1:
|
adr1_analyze1:
|
||||||
cmp byte [ebx],0x00
|
cmp byte [ebx],0x00
|
||||||
@ -1020,7 +1020,7 @@ avanti:
|
|||||||
pusha
|
pusha
|
||||||
mov ecx,512/4
|
mov ecx,512/4
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov edi,0xD000
|
mov edi,FDD_BUFF
|
||||||
cld
|
cld
|
||||||
rep stosd
|
rep stosd
|
||||||
popa
|
popa
|
||||||
@ -1032,7 +1032,7 @@ avanti:
|
|||||||
popa
|
popa
|
||||||
cmp [FDC_Status],0
|
cmp [FDC_Status],0
|
||||||
jne error_found_file_analyze1
|
jne error_found_file_analyze1
|
||||||
mov ebx,0xD000
|
mov ebx,FDD_BUFF
|
||||||
|
|
||||||
found_file_analyze1:
|
found_file_analyze1:
|
||||||
|
|
||||||
@ -1145,19 +1145,19 @@ flp_root_first:
|
|||||||
popa
|
popa
|
||||||
cmp [FDC_Status], 0
|
cmp [FDC_Status], 0
|
||||||
jnz .readerr
|
jnz .readerr
|
||||||
mov edi, 0xD000
|
mov edi, FDD_BUFF
|
||||||
ret ; CF=0
|
ret ; CF=0
|
||||||
.readerr:
|
.readerr:
|
||||||
stc
|
stc
|
||||||
ret
|
ret
|
||||||
|
|
||||||
flp_rootmem_first:
|
flp_rootmem_first:
|
||||||
mov edi, 0x8000
|
mov edi, FLOPPY_BUFF
|
||||||
clc
|
clc
|
||||||
ret
|
ret
|
||||||
flp_rootmem_next:
|
flp_rootmem_next:
|
||||||
add edi, 0x20
|
add edi, 0x20
|
||||||
cmp edi, 0x8000+14*0x200
|
cmp edi, FLOPPY_BUFF+14*0x200
|
||||||
cmc
|
cmc
|
||||||
flp_rootmem_next_write:
|
flp_rootmem_next_write:
|
||||||
flp_rootmem_begin_write:
|
flp_rootmem_begin_write:
|
||||||
@ -1195,7 +1195,7 @@ flp_notroot_first:
|
|||||||
add eax, 31
|
add eax, 31
|
||||||
call read_chs_sector
|
call read_chs_sector
|
||||||
popa
|
popa
|
||||||
mov edi, 0xD000
|
mov edi, FDD_BUFF
|
||||||
cmp [FDC_Status], 0
|
cmp [FDC_Status], 0
|
||||||
jnz .err
|
jnz .err
|
||||||
ret ; CF=0
|
ret ; CF=0
|
||||||
@ -1242,12 +1242,12 @@ flp_notroot_extend_dir:
|
|||||||
mov [0x282000+ecx*2], di
|
mov [0x282000+ecx*2], di
|
||||||
mov [eax], edi
|
mov [eax], edi
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov edi, 0xD000
|
mov edi, FDD_BUFF
|
||||||
mov ecx, 128
|
mov ecx, 128
|
||||||
rep stosd
|
rep stosd
|
||||||
popa
|
popa
|
||||||
call flp_notroot_end_write
|
call flp_notroot_end_write
|
||||||
mov edi, 0xD000
|
mov edi, FDD_BUFF
|
||||||
clc
|
clc
|
||||||
ret
|
ret
|
||||||
.notfound:
|
.notfound:
|
||||||
@ -1358,7 +1358,7 @@ fs_FloppyRead:
|
|||||||
popa
|
popa
|
||||||
cmp [FDC_Status], 0
|
cmp [FDC_Status], 0
|
||||||
jnz .err
|
jnz .err
|
||||||
lea eax, [0xD000+ebx+512]
|
lea eax, [FDD_BUFF+ebx+512]
|
||||||
neg ebx
|
neg ebx
|
||||||
push ecx
|
push ecx
|
||||||
cmp ecx, ebx
|
cmp ecx, ebx
|
||||||
@ -1452,7 +1452,7 @@ fs_FloppyReadFolder:
|
|||||||
popa
|
popa
|
||||||
cmp [FDC_Status], 0
|
cmp [FDC_Status], 0
|
||||||
jnz .error
|
jnz .error
|
||||||
mov edi, 0xD000
|
mov edi, FDD_BUFF
|
||||||
push eax
|
push eax
|
||||||
.l1:
|
.l1:
|
||||||
call fat_get_name
|
call fat_get_name
|
||||||
@ -1480,7 +1480,7 @@ fs_FloppyReadFolder:
|
|||||||
popa
|
popa
|
||||||
cmp [FDC_Status], 0
|
cmp [FDC_Status], 0
|
||||||
jnz .error
|
jnz .error
|
||||||
mov edi, 0xD000
|
mov edi, FDD_BUFF
|
||||||
push eax
|
push eax
|
||||||
.do_bdfe:
|
.do_bdfe:
|
||||||
inc dword [edx+8] ; new file found
|
inc dword [edx+8] ; new file found
|
||||||
@ -1911,7 +1911,7 @@ fs_FloppyRewrite:
|
|||||||
jae @f
|
jae @f
|
||||||
mov ecx, [esp+20]
|
mov ecx, [esp+20]
|
||||||
@@:
|
@@:
|
||||||
mov edi, 0xD000
|
mov edi, FDD_BUFF
|
||||||
cmp byte [esp+24+28+28], 0
|
cmp byte [esp+24+28+28], 0
|
||||||
jnz .writedir
|
jnz .writedir
|
||||||
push ecx
|
push ecx
|
||||||
@ -2160,7 +2160,7 @@ fs_FloppyWrite:
|
|||||||
mov ecx, 0x200
|
mov ecx, 0x200
|
||||||
sub ecx, [esp+4+12]
|
sub ecx, [esp+4+12]
|
||||||
jbe @f
|
jbe @f
|
||||||
mov edi, 0xD000
|
mov edi, FDD_BUFF
|
||||||
add edi, [esp+4+12]
|
add edi, [esp+4+12]
|
||||||
rep stosb
|
rep stosb
|
||||||
@@:
|
@@:
|
||||||
@ -2168,7 +2168,7 @@ fs_FloppyWrite:
|
|||||||
mov ecx, 0x200
|
mov ecx, 0x200
|
||||||
sub ecx, esi
|
sub ecx, esi
|
||||||
jbe @f
|
jbe @f
|
||||||
mov edi, 0xD000
|
mov edi, FDD_BUFF
|
||||||
add edi, esi
|
add edi, esi
|
||||||
rep stosb
|
rep stosb
|
||||||
@@:
|
@@:
|
||||||
@ -2178,7 +2178,7 @@ fs_FloppyWrite:
|
|||||||
mov eax, edx
|
mov eax, edx
|
||||||
neg ebx
|
neg ebx
|
||||||
jecxz @f
|
jecxz @f
|
||||||
add ebx, 0xD000+0x200
|
add ebx, FDD_BUFF+0x200
|
||||||
call memmove
|
call memmove
|
||||||
xor ebx, ebx
|
xor ebx, ebx
|
||||||
@@:
|
@@:
|
||||||
@ -2412,7 +2412,7 @@ fs_FloppySetFileEnd:
|
|||||||
mov ecx, [esp+4]
|
mov ecx, [esp+4]
|
||||||
neg ecx
|
neg ecx
|
||||||
push edi
|
push edi
|
||||||
mov edi, 0xD000+0x200
|
mov edi, FDD_BUFF+0x200
|
||||||
add edi, [esp+8]
|
add edi, [esp+8]
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov [esp+8], eax
|
mov [esp+8], eax
|
||||||
@ -2491,8 +2491,8 @@ fs_FloppySetFileEnd:
|
|||||||
pusha
|
pusha
|
||||||
call read_chs_sector
|
call read_chs_sector
|
||||||
popa
|
popa
|
||||||
add edi, 0xD000
|
add edi, FDD_BUFF
|
||||||
mov ecx, 0xD000+0x200
|
mov ecx, FDD_BUFF+0x200
|
||||||
sub ecx, edi
|
sub ecx, edi
|
||||||
push eax
|
push eax
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
@ -2625,7 +2625,7 @@ fs_FloppyExecute:
|
|||||||
cmp [FDC_Status], 0
|
cmp [FDC_Status], 0
|
||||||
jnz .err
|
jnz .err
|
||||||
pop edi
|
pop edi
|
||||||
mov esi, 0xD000
|
mov esi, FDD_BUFF
|
||||||
push edi
|
push edi
|
||||||
mov ecx, 512/4
|
mov ecx, 512/4
|
||||||
rep movsd
|
rep movsd
|
||||||
@ -2705,21 +2705,21 @@ fs_FloppyDelete:
|
|||||||
add eax, 31
|
add eax, 31
|
||||||
call read_chs_sector
|
call read_chs_sector
|
||||||
popa
|
popa
|
||||||
mov ebx, FDD_DATA + 2*0x20
|
mov ebx, FDD_BUFF + 2*0x20
|
||||||
.checkempty:
|
.checkempty:
|
||||||
cmp byte [ebx], 0
|
cmp byte [ebx], 0
|
||||||
jz .empty
|
jz .empty
|
||||||
cmp byte [ebx], 0xE5
|
cmp byte [ebx], 0xE5
|
||||||
jnz .notempty
|
jnz .notempty
|
||||||
add ebx, 0x20
|
add ebx, 0x20
|
||||||
cmp ebx, FDD_DATA + 0x200
|
cmp ebx, FDD_BUFF + 0x200
|
||||||
jb .checkempty
|
jb .checkempty
|
||||||
movzx eax, word [FLOPPY_FAT + eax*2]
|
movzx eax, word [FLOPPY_FAT + eax*2]
|
||||||
pusha
|
pusha
|
||||||
add eax, 31
|
add eax, 31
|
||||||
call read_chs_sector
|
call read_chs_sector
|
||||||
popa
|
popa
|
||||||
mov ebx, FDD_DATA
|
mov ebx, FDD_BUFF
|
||||||
jmp .checkempty
|
jmp .checkempty
|
||||||
.notempty:
|
.notempty:
|
||||||
pop ebx
|
pop ebx
|
||||||
@ -2741,7 +2741,7 @@ fs_FloppyDelete:
|
|||||||
mov byte [edi], 0xE5
|
mov byte [edi], 0xE5
|
||||||
; delete LFN (if present)
|
; delete LFN (if present)
|
||||||
.lfndel:
|
.lfndel:
|
||||||
cmp edi, FDD_DATA
|
cmp edi, FDD_BUFF
|
||||||
ja @f
|
ja @f
|
||||||
cmp [fd_prev_sector], 0
|
cmp [fd_prev_sector], 0
|
||||||
jz .lfndone
|
jz .lfndone
|
||||||
@ -2756,7 +2756,7 @@ fs_FloppyDelete:
|
|||||||
pusha
|
pusha
|
||||||
call read_chs_sector
|
call read_chs_sector
|
||||||
popa
|
popa
|
||||||
mov edi, FDD_DATA+0x200
|
mov edi, FDD_BUFF+0x200
|
||||||
@@:
|
@@:
|
||||||
sub edi, 0x20
|
sub edi, 0x20
|
||||||
cmp byte [edi], 0xE5
|
cmp byte [edi], 0xE5
|
||||||
|
@ -167,10 +167,10 @@ sys_button:
|
|||||||
mov edi,[CURRENT_TASK]
|
mov edi,[CURRENT_TASK]
|
||||||
shl edi,8
|
shl edi,8
|
||||||
rol eax,16
|
rol eax,16
|
||||||
add ax,word[edi+0x80000+APPDATA.wnd_clientbox.left]
|
add ax,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
||||||
rol eax,16
|
rol eax,16
|
||||||
rol ebx,16
|
rol ebx,16
|
||||||
add bx,word[edi+0x80000+APPDATA.wnd_clientbox.top]
|
add bx,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.top]
|
||||||
rol ebx,16
|
rol ebx,16
|
||||||
pop edi
|
pop edi
|
||||||
.forced:
|
.forced:
|
||||||
@ -503,7 +503,7 @@ checkbuttons:
|
|||||||
; check that button is at top of windowing stack
|
; check that button is at top of windowing stack
|
||||||
|
|
||||||
movzx ebx,word [eax]
|
movzx ebx,word [eax]
|
||||||
movzx ecx,word [0xC000 + ebx * 2]
|
movzx ecx,word [WIN_STACK + ebx * 2]
|
||||||
cmp ecx,[TASK_COUNT]
|
cmp ecx,[TASK_COUNT]
|
||||||
jne buttonnewcheck
|
jne buttonnewcheck
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ create_event:
|
|||||||
@@:
|
@@:
|
||||||
mov ecx, [CURRENT_TASK]
|
mov ecx, [CURRENT_TASK]
|
||||||
shl ecx,8
|
shl ecx,8
|
||||||
add ecx, PROC_BASE+APP_OBJ_OFFSET
|
add ecx, SLOT_BASE+APP_OBJ_OFFSET
|
||||||
|
|
||||||
pushfd
|
pushfd
|
||||||
cli
|
cli
|
||||||
@ -173,7 +173,7 @@ proc send_event stdcall pid:dword, event:dword
|
|||||||
jz .fail
|
jz .fail
|
||||||
|
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
cmp [PROC_BASE+eax+APPDATA.ev_count], 32
|
cmp [SLOT_BASE+eax+APPDATA.ev_count], 32
|
||||||
ja .fail
|
ja .fail
|
||||||
|
|
||||||
mov [slot], eax
|
mov [slot], eax
|
||||||
@ -189,7 +189,7 @@ proc send_event stdcall pid:dword, event:dword
|
|||||||
rep movsd
|
rep movsd
|
||||||
|
|
||||||
mov ecx, [slot]
|
mov ecx, [slot]
|
||||||
add ecx, PROC_BASE+APP_EV_OFFSET
|
add ecx, SLOT_BASE+APP_EV_OFFSET
|
||||||
|
|
||||||
mov [eax+APPOBJ.magic], 'EVNT'
|
mov [eax+APPOBJ.magic], 'EVNT'
|
||||||
mov [eax+APPOBJ.destroy], destroy_event
|
mov [eax+APPOBJ.destroy], destroy_event
|
||||||
@ -219,10 +219,10 @@ proc get_event_ex stdcall, p_ev:dword, timeout:dword
|
|||||||
.wait:
|
.wait:
|
||||||
mov edx,[CURRENT_TASK]
|
mov edx,[CURRENT_TASK]
|
||||||
shl edx,8
|
shl edx,8
|
||||||
; cmp [PROC_BASE+edx+APPDATA.ev_count], 0
|
; cmp [SLOT_BASE+edx+APPDATA.ev_count], 0
|
||||||
; je .switch
|
; je .switch
|
||||||
|
|
||||||
add edx, PROC_BASE+APP_EV_OFFSET
|
add edx, SLOT_BASE+APP_EV_OFFSET
|
||||||
|
|
||||||
mov eax, [edx+APPOBJ.fd]
|
mov eax, [edx+APPOBJ.fd]
|
||||||
cmp eax, edx
|
cmp eax, edx
|
||||||
@ -302,7 +302,7 @@ wait_event:
|
|||||||
|
|
||||||
mov edx,[CURRENT_TASK]
|
mov edx,[CURRENT_TASK]
|
||||||
shl edx,8
|
shl edx,8
|
||||||
add edx, PROC_BASE
|
add edx, SLOT_BASE
|
||||||
|
|
||||||
pushfd
|
pushfd
|
||||||
cli ;remove event from events
|
cli ;remove event from events
|
||||||
@ -387,7 +387,7 @@ raise_event:
|
|||||||
jz .done
|
jz .done
|
||||||
@@:
|
@@:
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
add eax, PROC_BASE+APP_EV_OFFSET
|
add eax, SLOT_BASE+APP_EV_OFFSET
|
||||||
|
|
||||||
pushfd
|
pushfd
|
||||||
cli
|
cli
|
||||||
@ -431,7 +431,7 @@ clear_event:
|
|||||||
jz .fail
|
jz .fail
|
||||||
|
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
add eax, PROC_BASE+APP_EV_OFFSET
|
add eax, SLOT_BASE+APP_EV_OFFSET
|
||||||
mov edx, [.event]
|
mov edx, [.event]
|
||||||
pushfd
|
pushfd
|
||||||
cli ;remove event from events
|
cli ;remove event from events
|
||||||
@ -526,7 +526,7 @@ get_event_for_app:
|
|||||||
test [edi+TASKDATA.event_mask],dword 2
|
test [edi+TASKDATA.event_mask],dword 2
|
||||||
jz no_eventoccur2
|
jz no_eventoccur2
|
||||||
mov ecx, [CURRENT_TASK]
|
mov ecx, [CURRENT_TASK]
|
||||||
movzx edx,word [0xC000+ecx*2]
|
movzx edx,word [WIN_STACK+ecx*2]
|
||||||
mov eax, [TASK_COUNT]
|
mov eax, [TASK_COUNT]
|
||||||
cmp eax,edx
|
cmp eax,edx
|
||||||
jne no_eventoccur2x
|
jne no_eventoccur2x
|
||||||
@ -552,7 +552,7 @@ get_event_for_app:
|
|||||||
cmp [0xf500],byte 0
|
cmp [0xf500],byte 0
|
||||||
je no_eventoccur3
|
je no_eventoccur3
|
||||||
mov ecx, [CURRENT_TASK]
|
mov ecx, [CURRENT_TASK]
|
||||||
movzx edx, word [0xC000+ecx*2]
|
movzx edx, word [WIN_STACK+ecx*2]
|
||||||
mov eax, [TASK_COUNT]
|
mov eax, [TASK_COUNT]
|
||||||
cmp eax,edx
|
cmp eax,edx
|
||||||
jnz no_eventoccur3
|
jnz no_eventoccur3
|
||||||
@ -577,9 +577,9 @@ get_event_for_app:
|
|||||||
jz no_mouse_event
|
jz no_mouse_event
|
||||||
mov eax,[CURRENT_TASK]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
test [eax+0x80000+APPDATA.event_mask],dword 00100000b
|
test [eax+SLOT_BASE+APPDATA.event_mask],dword 00100000b
|
||||||
jz no_mouse_event
|
jz no_mouse_event
|
||||||
and [eax+0x80000+APPDATA.event_mask],dword 0xffffffff-00100000b
|
and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-00100000b
|
||||||
popad
|
popad
|
||||||
mov eax,6
|
mov eax,6
|
||||||
ret
|
ret
|
||||||
@ -601,9 +601,9 @@ get_event_for_app:
|
|||||||
jz no_ipc
|
jz no_ipc
|
||||||
mov eax,[CURRENT_TASK]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
test [eax+0x80000+APPDATA.event_mask],dword 01000000b
|
test [eax+SLOT_BASE+APPDATA.event_mask],dword 01000000b
|
||||||
jz no_ipc
|
jz no_ipc
|
||||||
and [eax+0x80000+APPDATA.event_mask],dword 0xffffffff-01000000b
|
and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-01000000b
|
||||||
popad
|
popad
|
||||||
mov eax,7
|
mov eax,7
|
||||||
ret
|
ret
|
||||||
@ -615,9 +615,9 @@ get_event_for_app:
|
|||||||
jz no_stack_event
|
jz no_stack_event
|
||||||
mov eax,[CURRENT_TASK]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
test [eax+0x80000+APPDATA.event_mask],dword 10000000b
|
test [eax+SLOT_BASE+APPDATA.event_mask],dword 10000000b
|
||||||
jz no_stack_event
|
jz no_stack_event
|
||||||
and [eax+0x80000+APPDATA.event_mask],dword 0xffffffff-10000000b
|
and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-10000000b
|
||||||
popad
|
popad
|
||||||
mov eax,8
|
mov eax,8
|
||||||
ret
|
ret
|
||||||
@ -627,9 +627,9 @@ get_event_for_app:
|
|||||||
jz .test_IRQ
|
jz .test_IRQ
|
||||||
mov eax, [CURRENT_TASK]
|
mov eax, [CURRENT_TASK]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
test byte [eax+0x80000+APPDATA.event_mask+1], byte 1
|
test byte [eax+SLOT_BASE+APPDATA.event_mask+1], byte 1
|
||||||
jz .test_IRQ
|
jz .test_IRQ
|
||||||
and byte [eax+0x80000+APPDATA.event_mask+1], not 1
|
and byte [eax+SLOT_BASE+APPDATA.event_mask+1], not 1
|
||||||
popad
|
popad
|
||||||
mov eax, 9
|
mov eax, 9
|
||||||
ret
|
ret
|
||||||
@ -637,7 +637,7 @@ get_event_for_app:
|
|||||||
;.test_ext:
|
;.test_ext:
|
||||||
; mov eax, [CURRENT_TASK]
|
; mov eax, [CURRENT_TASK]
|
||||||
; shl eax, 8
|
; shl eax, 8
|
||||||
; test dword [eax+0x80000+APPDATA.event_mask], EVENT_EXTENDED
|
; test dword [eax+SLOT_BASE+APPDATA.event_mask], EVENT_EXTENDED
|
||||||
; jz .test_IRQ
|
; jz .test_IRQ
|
||||||
; popad
|
; popad
|
||||||
; mov eax, 10
|
; mov eax, 10
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
;mouseunder:
|
|
||||||
; times 16*24 dd 0
|
|
||||||
label mouseunder dword at 0x6900
|
|
||||||
|
|
||||||
iglobal
|
iglobal
|
||||||
|
|
||||||
|
align 4
|
||||||
mousepointer:
|
mousepointer:
|
||||||
db 0x00,0x00,0x00,0x74,0x74,0x74,0x6e,0x6e,0x6e,0x6f
|
db 0x00,0x00,0x00,0x74,0x74,0x74,0x6e,0x6e,0x6e,0x6f
|
||||||
db 0x6f,0x6f,0x71,0x71,0x71,0x75,0x75,0x75,0x79,0x79
|
db 0x6f,0x6f,0x71,0x71,0x71,0x75,0x75,0x75,0x79,0x79
|
||||||
@ -240,4 +238,4 @@ db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
|||||||
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
||||||
db 0x00,0x00,0x00,0x00
|
db 0x00,0x00,0x00,0x00
|
||||||
|
|
||||||
endg
|
endg
|
||||||
|
@ -28,13 +28,13 @@ setwindowdefaults:
|
|||||||
pushad
|
pushad
|
||||||
|
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov ecx,0xc000
|
mov ecx,WIN_STACK
|
||||||
@@:
|
@@:
|
||||||
inc eax
|
inc eax
|
||||||
add ecx,2
|
add ecx,2
|
||||||
mov [ecx+0x000],ax ; process no
|
mov [ecx+0x000],ax ; process no
|
||||||
mov [ecx+0x400],ax ; positions in stack
|
mov [ecx+0x400],ax ; positions in stack
|
||||||
cmp ecx,0xc400-2 ; the more high, the more surface
|
cmp ecx,WIN_POS-2 ; the more high, the more surface
|
||||||
jnz @b
|
jnz @b
|
||||||
|
|
||||||
popad
|
popad
|
||||||
@ -65,7 +65,7 @@ calculatescreen:
|
|||||||
jbe .finish
|
jbe .finish
|
||||||
align 4
|
align 4
|
||||||
.new_wnd:
|
.new_wnd:
|
||||||
movzx edi, word [0xC400 + esi * 2]
|
movzx edi, word [WIN_POS + esi * 2]
|
||||||
shl edi, 5
|
shl edi, 5
|
||||||
|
|
||||||
cmp [CURRENT_TASK+edi+TASKDATA.state], byte 9
|
cmp [CURRENT_TASK+edi+TASKDATA.state], byte 9
|
||||||
@ -108,7 +108,7 @@ calculatescreen:
|
|||||||
@@:
|
@@:
|
||||||
|
|
||||||
push esi
|
push esi
|
||||||
movzx esi, word [0xC400 + esi * 2]
|
movzx esi, word [WIN_POS + esi * 2]
|
||||||
call setscreen
|
call setscreen
|
||||||
pop esi
|
pop esi
|
||||||
|
|
||||||
@ -156,9 +156,9 @@ pushad
|
|||||||
jz .ret
|
jz .ret
|
||||||
@@:
|
@@:
|
||||||
; \end{diamond}[29.08.2006]
|
; \end{diamond}[29.08.2006]
|
||||||
mov edi, esi ;;;word [esi*2+0xc400]
|
mov edi, esi ;;;word [esi*2+WIN_POS]
|
||||||
shl edi, 8
|
shl edi, 8
|
||||||
add edi, 0x80000 ; address of random shaped window area
|
add edi, SLOT_BASE ; address of random shaped window area
|
||||||
cmp [edi+APPDATA.wnd_shape], dword 0
|
cmp [edi+APPDATA.wnd_shape], dword 0
|
||||||
jne .free_form
|
jne .free_form
|
||||||
|
|
||||||
@ -912,7 +912,7 @@ windowactivate:
|
|||||||
; if type of current active window is 3,
|
; if type of current active window is 3,
|
||||||
; it must be redrawn
|
; it must be redrawn
|
||||||
mov eax, [TASK_COUNT]
|
mov eax, [TASK_COUNT]
|
||||||
movzx eax, word [0xC400 + eax*2]
|
movzx eax, word [WIN_POS + eax*2]
|
||||||
shl eax, 5
|
shl eax, 5
|
||||||
add eax, window_data
|
add eax, window_data
|
||||||
mov ebx, [eax + WDATA.cl_workarea]
|
mov ebx, [eax + WDATA.cl_workarea]
|
||||||
@ -924,14 +924,14 @@ windowactivate:
|
|||||||
|
|
||||||
push esi
|
push esi
|
||||||
movzx eax, word [esi] ; ax <- process no
|
movzx eax, word [esi] ; ax <- process no
|
||||||
movzx eax, word [0xC000+eax*2] ; ax <- position in window stack
|
movzx eax, word [WIN_STACK+eax*2] ; ax <- position in window stack
|
||||||
|
|
||||||
xor esi, esi ; drop others
|
xor esi, esi ; drop others
|
||||||
waloop:
|
waloop:
|
||||||
cmp esi, dword [TASK_COUNT]
|
cmp esi, dword [TASK_COUNT]
|
||||||
jae wacont
|
jae wacont
|
||||||
inc esi
|
inc esi
|
||||||
lea edi, [0xC000 + esi*2]
|
lea edi, [WIN_STACK + esi*2]
|
||||||
mov bx, [edi] ; position of the current process
|
mov bx, [edi] ; position of the current process
|
||||||
cmp bx, ax
|
cmp bx, ax
|
||||||
jbe @f
|
jbe @f
|
||||||
@ -945,7 +945,7 @@ windowactivate:
|
|||||||
|
|
||||||
movzx eax, word [esi]
|
movzx eax, word [esi]
|
||||||
mov bx, [TASK_COUNT] ; number of processes
|
mov bx, [TASK_COUNT] ; number of processes
|
||||||
mov [0xC000+eax*2], bx ; this is the last (and the upper)
|
mov [WIN_STACK+eax*2], bx ; this is the last (and the upper)
|
||||||
|
|
||||||
; update on screen -window stack
|
; update on screen -window stack
|
||||||
xor esi, esi
|
xor esi, esi
|
||||||
@ -954,8 +954,8 @@ windowactivate:
|
|||||||
cmp esi, edi
|
cmp esi, edi
|
||||||
jae wacont2
|
jae wacont2
|
||||||
inc esi
|
inc esi
|
||||||
movzx ebx, word [esi*2 + 0xC000]
|
movzx ebx, word [esi*2 + WIN_STACK]
|
||||||
mov [ebx*2 + 0xC400], si
|
mov [ebx*2 + WIN_POS], si
|
||||||
jmp waloop2
|
jmp waloop2
|
||||||
wacont2:
|
wacont2:
|
||||||
mov [0xf400], byte 0 ; empty keyboard buffer
|
mov [0xf400], byte 0 ; empty keyboard buffer
|
||||||
@ -981,8 +981,8 @@ checkwindowdraw:
|
|||||||
|
|
||||||
; esi = process number
|
; esi = process number
|
||||||
|
|
||||||
movzx eax, word [0xC000 + esi * 2] ; get value of the curr process
|
movzx eax, word [WIN_STACK + esi * 2] ; get value of the curr process
|
||||||
lea esi, [0xC400 + eax * 2] ; get address of this process at 0xC400
|
lea esi, [WIN_POS + eax * 2] ; get address of this process at 0xC400
|
||||||
|
|
||||||
push esi
|
push esi
|
||||||
|
|
||||||
@ -993,7 +993,7 @@ checkwindowdraw:
|
|||||||
push esi
|
push esi
|
||||||
|
|
||||||
mov eax, [TASK_COUNT]
|
mov eax, [TASK_COUNT]
|
||||||
lea eax, word [0xC400 + eax * 2] ; number of the upper window
|
lea eax, word [WIN_POS + eax * 2] ; number of the upper window
|
||||||
|
|
||||||
cmp esi, eax
|
cmp esi, eax
|
||||||
ja .all_wnds_to_top
|
ja .all_wnds_to_top
|
||||||
@ -1059,7 +1059,7 @@ waredraw: ; if redraw necessary at activate
|
|||||||
; update screen info
|
; update screen info
|
||||||
pushad
|
pushad
|
||||||
mov edi, [TASK_COUNT] ; the last process (number)
|
mov edi, [TASK_COUNT] ; the last process (number)
|
||||||
movzx esi, word [0xC400 + edi * 2]
|
movzx esi, word [WIN_POS + edi * 2]
|
||||||
shl esi, 5
|
shl esi, 5
|
||||||
add esi, window_data
|
add esi, window_data
|
||||||
|
|
||||||
@ -1073,7 +1073,7 @@ waredraw: ; if redraw necessary at activate
|
|||||||
add edx, ebx ; edx = y_end
|
add edx, ebx ; edx = y_end
|
||||||
|
|
||||||
mov edi, [TASK_COUNT]
|
mov edi, [TASK_COUNT]
|
||||||
movzx esi, word [0xC400 + edi * 2]
|
movzx esi, word [WIN_POS + edi * 2]
|
||||||
call setscreen
|
call setscreen
|
||||||
popad
|
popad
|
||||||
|
|
||||||
@ -1096,7 +1096,7 @@ waredraw: ; if redraw necessary at activate
|
|||||||
; eax = window number on screen
|
; eax = window number on screen
|
||||||
; corrupts registers and [dl*]
|
; corrupts registers and [dl*]
|
||||||
minimize_window:
|
minimize_window:
|
||||||
movzx eax, word [0xC400+eax*2]
|
movzx eax, word [WIN_POS+eax*2]
|
||||||
shl eax, 5
|
shl eax, 5
|
||||||
add eax, window_data
|
add eax, window_data
|
||||||
test [eax+WDATA.fl_wstate], WSTATE_MINIMIZED
|
test [eax+WDATA.fl_wstate], WSTATE_MINIMIZED
|
||||||
@ -1129,7 +1129,7 @@ minimize_window:
|
|||||||
restore_minimized_window:
|
restore_minimized_window:
|
||||||
pushfd
|
pushfd
|
||||||
cli
|
cli
|
||||||
movzx esi, word [0xC400+eax*2]
|
movzx esi, word [WIN_POS+eax*2]
|
||||||
mov edi, esi
|
mov edi, esi
|
||||||
shl edi, 5
|
shl edi, 5
|
||||||
add edi, window_data
|
add edi, window_data
|
||||||
@ -1200,7 +1200,7 @@ checkwindows:
|
|||||||
jb .exit
|
jb .exit
|
||||||
|
|
||||||
dec esi
|
dec esi
|
||||||
movzx edi, word [0xC400 + esi * 2] ; ebx
|
movzx edi, word [WIN_POS + esi * 2] ; ebx
|
||||||
shl edi, 5
|
shl edi, 5
|
||||||
add edi, window_data
|
add edi, window_data
|
||||||
; mov edi, ebx
|
; mov edi, ebx
|
||||||
@ -1234,7 +1234,7 @@ checkwindows:
|
|||||||
|
|
||||||
; eax = position in windowing stack
|
; eax = position in windowing stack
|
||||||
; redraw must ?
|
; redraw must ?
|
||||||
lea esi, [0xC400 + esi * 2]
|
lea esi, [WIN_POS + esi * 2]
|
||||||
call waredraw
|
call waredraw
|
||||||
add esp, 32
|
add esp, 32
|
||||||
|
|
||||||
@ -1413,7 +1413,7 @@ checkwindows:
|
|||||||
;shr edx,5
|
;shr edx,5
|
||||||
;shl edx,8
|
;shl edx,8
|
||||||
;add edx,0x80000 ; process base at 0x80000+
|
;add edx,0x80000 ; process base at 0x80000+
|
||||||
lea edx, [0x80000 + edx*8]
|
lea edx, [SLOT_BASE + edx*8]
|
||||||
|
|
||||||
movzx eax,word [0xfb0a]
|
movzx eax,word [0xfb0a]
|
||||||
cmp eax,[edi + WDATA.box.left]
|
cmp eax,[edi + WDATA.box.left]
|
||||||
@ -1485,7 +1485,7 @@ checkwindows:
|
|||||||
@@: sub edi,window_data
|
@@: sub edi,window_data
|
||||||
shr edi,5
|
shr edi,5
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add edi,0x80000+APPDATA.saved_box
|
add edi,SLOT_BASE+APPDATA.saved_box
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
pop ecx edi esi
|
pop ecx edi esi
|
||||||
@ -1499,7 +1499,7 @@ checkwindows:
|
|||||||
sub edx,window_data
|
sub edx,window_data
|
||||||
shr edx,5
|
shr edx,5
|
||||||
shl edx,8
|
shl edx,8
|
||||||
add edx,0x80000 ; process base at 0x80000+
|
add edx,SLOT_BASE ; process base at 0x80000+
|
||||||
|
|
||||||
cmp [do_resize],2 ; window shade ?
|
cmp [do_resize],2 ; window shade ?
|
||||||
jne no_window_shade
|
jne no_window_shade
|
||||||
@ -1754,14 +1754,14 @@ random_shaped_window:
|
|||||||
mov eax,[CURRENT_TASK]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
|
|
||||||
mov [eax+0x80000+APPDATA.wnd_shape],ebx
|
mov [eax+SLOT_BASE+APPDATA.wnd_shape],ebx
|
||||||
rsw_no_address:
|
rsw_no_address:
|
||||||
|
|
||||||
cmp eax,1
|
cmp eax,1
|
||||||
jne rsw_no_scale
|
jne rsw_no_scale
|
||||||
mov eax,[CURRENT_TASK]
|
mov eax,[CURRENT_TASK]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov byte [eax+0x80000+APPDATA.wnd_shape_scale], bl
|
mov byte [eax+SLOT_BASE+APPDATA.wnd_shape_scale], bl
|
||||||
rsw_no_scale:
|
rsw_no_scale:
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
@ -92,9 +92,9 @@ irq1:
|
|||||||
; mov es, ax
|
; mov es, ax
|
||||||
|
|
||||||
movzx eax,word[TASK_COUNT] ; top window process
|
movzx eax,word[TASK_COUNT] ; top window process
|
||||||
movzx eax,word[0xC400+eax*2]
|
movzx eax,word[WIN_POS+eax*2]
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov al,[0x80000+eax+APPDATA.keyboard_mode]
|
mov al,[SLOT_BASE+eax+APPDATA.keyboard_mode]
|
||||||
mov [keyboard_mode],al
|
mov [keyboard_mode],al
|
||||||
|
|
||||||
in al,0x60
|
in al,0x60
|
||||||
|
@ -102,7 +102,7 @@ save_draw_mouse:
|
|||||||
mul ecx
|
mul ecx
|
||||||
movzx edx, byte [display_data+ebx+eax]
|
movzx edx, byte [display_data+ebx+eax]
|
||||||
shl edx, 8
|
shl edx, 8
|
||||||
mov ecx, [edx+PROC_BASE+APPDATA.cursor]
|
mov ecx, [edx+SLOT_BASE+APPDATA.cursor]
|
||||||
|
|
||||||
cmp [ecx+CURSOR.magic], 'CURS'
|
cmp [ecx+CURSOR.magic], 'CURS'
|
||||||
jne .fail
|
jne .fail
|
||||||
@ -114,7 +114,7 @@ save_draw_mouse:
|
|||||||
ret
|
ret
|
||||||
.fail:
|
.fail:
|
||||||
mov ecx, [def_cursor]
|
mov ecx, [def_cursor]
|
||||||
mov [edx+PROC_BASE+APPDATA.cursor], ecx
|
mov [edx+SLOT_BASE+APPDATA.cursor], ecx
|
||||||
push ecx
|
push ecx
|
||||||
call [set_hw_cursor]
|
call [set_hw_cursor]
|
||||||
popad
|
popad
|
||||||
|
@ -258,6 +258,7 @@ B32:
|
|||||||
rep stosd
|
rep stosd
|
||||||
; CLEAR 0x80000-0x90000
|
; CLEAR 0x80000-0x90000
|
||||||
; xor eax,eax
|
; xor eax,eax
|
||||||
|
|
||||||
mov edi,0x80000
|
mov edi,0x80000
|
||||||
mov ecx,(0x90000-0x80000)/4
|
mov ecx,(0x90000-0x80000)/4
|
||||||
; cld
|
; cld
|
||||||
@ -607,33 +608,33 @@ include 'vmodeld.inc'
|
|||||||
call boot_log
|
call boot_log
|
||||||
|
|
||||||
mov eax, fpu_data
|
mov eax, fpu_data
|
||||||
mov dword [0x80000+APPDATA.fpu_state], eax
|
mov dword [SLOT_BASE+APPDATA.fpu_state], eax
|
||||||
mov dword [0x80000+APPDATA.fpu_handler], 0
|
mov dword [SLOT_BASE+APPDATA.fpu_handler], 0
|
||||||
mov dword [0x80000+APPDATA.sse_handler], 0
|
mov dword [SLOT_BASE+APPDATA.sse_handler], 0
|
||||||
|
|
||||||
; name for OS/IDLE process
|
; name for OS/IDLE process
|
||||||
|
|
||||||
mov dword [0x80000+256+APPDATA.app_name], dword 'OS/I'
|
mov dword [SLOT_BASE+256+APPDATA.app_name], dword 'OS/I'
|
||||||
mov dword [0x80000+256+APPDATA.app_name+4], dword 'DLE '
|
mov dword [SLOT_BASE+256+APPDATA.app_name+4], dword 'DLE '
|
||||||
mov edi, [os_stack]
|
mov edi, [os_stack]
|
||||||
mov dword [0x80000+256+APPDATA.pl0_stack], edi
|
mov dword [SLOT_BASE+256+APPDATA.pl0_stack], edi
|
||||||
add edi, 0x2000-512
|
add edi, 0x2000-512
|
||||||
mov dword [0x80000+256+APPDATA.fpu_state], edi
|
mov dword [SLOT_BASE+256+APPDATA.fpu_state], edi
|
||||||
|
|
||||||
mov esi, fpu_data
|
mov esi, fpu_data
|
||||||
mov ecx, 512/4
|
mov ecx, 512/4
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
|
|
||||||
mov dword [0x80000+256+APPDATA.fpu_handler], 0
|
mov dword [SLOT_BASE+256+APPDATA.fpu_handler], 0
|
||||||
mov dword [0x80000+256+APPDATA.sse_handler], 0
|
mov dword [SLOT_BASE+256+APPDATA.sse_handler], 0
|
||||||
|
|
||||||
mov ebx, [def_cursor]
|
mov ebx, [def_cursor]
|
||||||
mov dword [0x80000+256+APPDATA.cursor], ebx
|
mov dword [SLOT_BASE+256+APPDATA.cursor], ebx
|
||||||
|
|
||||||
mov ebx, PROC_BASE+256+APP_OBJ_OFFSET
|
mov ebx, SLOT_BASE+256+APP_OBJ_OFFSET
|
||||||
mov dword [0x80000+256+APPDATA.fd_obj], ebx
|
mov dword [SLOT_BASE+256+APPDATA.fd_obj], ebx
|
||||||
mov dword [0x80000+256+APPDATA.bk_obj], ebx
|
mov dword [SLOT_BASE+256+APPDATA.bk_obj], ebx
|
||||||
|
|
||||||
; task list
|
; task list
|
||||||
mov [TASK_DATA+TASKDATA.wnd_number], 1 ; on screen number
|
mov [TASK_DATA+TASKDATA.wnd_number], 1 ; on screen number
|
||||||
@ -1328,9 +1329,9 @@ draw_num_text:
|
|||||||
|
|
||||||
; mov edi,[CURRENT_TASK]
|
; mov edi,[CURRENT_TASK]
|
||||||
; shl edi,8
|
; shl edi,8
|
||||||
; add ax,word[edi+0x80000+APPDATA.wnd_clientbox.top]
|
; add ax,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.top]
|
||||||
; rol eax,16
|
; rol eax,16
|
||||||
; add ax,word[edi+0x80000+APPDATA.wnd_clientbox.left]
|
; add ax,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
||||||
; rol eax,16
|
; rol eax,16
|
||||||
|
|
||||||
mov edx,eax
|
mov edx,eax
|
||||||
@ -1341,10 +1342,10 @@ draw_num_text:
|
|||||||
push edx ; add window start x & y
|
push edx ; add window start x & y
|
||||||
mov edx,[TASK_BASE]
|
mov edx,[TASK_BASE]
|
||||||
mov ebx,[edx-twdw+WDATA.box.left]
|
mov ebx,[edx-twdw+WDATA.box.left]
|
||||||
add ebx, [(edx-CURRENT_TASK)*8+0x80000+APPDATA.wnd_clientbox.left]
|
add ebx, [(edx-CURRENT_TASK)*8+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
||||||
shl ebx,16
|
shl ebx,16
|
||||||
add ebx,[edx-twdw+WDATA.box.top]
|
add ebx,[edx-twdw+WDATA.box.top]
|
||||||
add ebx, [(edx-CURRENT_TASK)*8+0x80000+APPDATA.wnd_clientbox.top]
|
add ebx, [(edx-CURRENT_TASK)*8+SLOT_BASE+APPDATA.wnd_clientbox.top]
|
||||||
add eax,ebx
|
add eax,ebx
|
||||||
pop edx
|
pop edx
|
||||||
mov ebx,[esp+64+32-12+4]
|
mov ebx,[esp+64+32-12+4]
|
||||||
@ -1741,9 +1742,9 @@ mswin:
|
|||||||
|
|
||||||
mov edi,[CURRENT_TASK]
|
mov edi,[CURRENT_TASK]
|
||||||
shl edi,8
|
shl edi,8
|
||||||
sub ax,word[edi+PROC_BASE+APPDATA.wnd_clientbox.top]
|
sub ax,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.top]
|
||||||
rol eax,16
|
rol eax,16
|
||||||
sub ax,word[edi+PROC_BASE+APPDATA.wnd_clientbox.left]
|
sub ax,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
||||||
rol eax,16
|
rol eax,16
|
||||||
mov [esp+36],eax
|
mov [esp+36],eax
|
||||||
ret
|
ret
|
||||||
@ -2000,15 +2001,15 @@ sysfn_activate: ; 18.3 = ACTIVATE WINDOW
|
|||||||
|
|
||||||
mov [window_minimize], 2 ; restore window if minimized
|
mov [window_minimize], 2 ; restore window if minimized
|
||||||
|
|
||||||
movzx esi, word [0xC000 + ebx*2]
|
movzx esi, word [WIN_STACK + ebx*2]
|
||||||
cmp esi, [TASK_COUNT]
|
cmp esi, [TASK_COUNT]
|
||||||
je .nowindowactivate ; already active
|
je .nowindowactivate ; already active
|
||||||
|
|
||||||
mov edi, ebx
|
mov edi, ebx
|
||||||
shl edi, 5
|
shl edi, 5
|
||||||
add edi, window_data
|
add edi, window_data
|
||||||
movzx esi, word [0xC000 + ebx * 2]
|
movzx esi, word [WIN_STACK + ebx * 2]
|
||||||
lea esi, [0xC400 + esi * 2]
|
lea esi, [WIN_POS + esi * 2]
|
||||||
call waredraw
|
call waredraw
|
||||||
.nowindowactivate:
|
.nowindowactivate:
|
||||||
ret
|
ret
|
||||||
@ -2030,7 +2031,7 @@ sysfn_getcpuclock: ; 18.5 = GET TSC/SEC
|
|||||||
|
|
||||||
sysfn_getactive: ; 18.7 = get active window
|
sysfn_getactive: ; 18.7 = get active window
|
||||||
mov eax, [TASK_COUNT]
|
mov eax, [TASK_COUNT]
|
||||||
movzx eax, word [0xC400 + eax*2]
|
movzx eax, word [WIN_POS + eax*2]
|
||||||
mov [esp+36],eax
|
mov [esp+36],eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -2348,7 +2349,7 @@ sys_getkey:
|
|||||||
mov [esp+36],dword 1
|
mov [esp+36],dword 1
|
||||||
; test main buffer
|
; test main buffer
|
||||||
mov ebx, [CURRENT_TASK] ; TOP OF WINDOW STACK
|
mov ebx, [CURRENT_TASK] ; TOP OF WINDOW STACK
|
||||||
movzx ecx,word [0xC000 + ebx * 2]
|
movzx ecx,word [WIN_STACK + ebx * 2]
|
||||||
mov edx,[TASK_COUNT]
|
mov edx,[TASK_COUNT]
|
||||||
cmp ecx,edx
|
cmp ecx,edx
|
||||||
jne .finish
|
jne .finish
|
||||||
@ -2397,7 +2398,7 @@ sys_getbutton:
|
|||||||
|
|
||||||
mov ebx, [CURRENT_TASK] ; TOP OF WINDOW STACK
|
mov ebx, [CURRENT_TASK] ; TOP OF WINDOW STACK
|
||||||
mov [esp+36],dword 1
|
mov [esp+36],dword 1
|
||||||
movzx ecx, word [0xC000 + ebx * 2]
|
movzx ecx, word [WIN_STACK + ebx * 2]
|
||||||
mov edx, [TASK_COUNT] ; less than 256 processes
|
mov edx, [TASK_COUNT] ; less than 256 processes
|
||||||
cmp ecx,edx
|
cmp ecx,edx
|
||||||
jne .exit
|
jne .exit
|
||||||
@ -2453,14 +2454,14 @@ sys_cpuusage:
|
|||||||
mov ecx,[ebx]
|
mov ecx,[ebx]
|
||||||
mov [eax],ecx
|
mov [eax],ecx
|
||||||
pop ebx
|
pop ebx
|
||||||
mov cx, [0xC000 + ebx * 2]
|
mov cx, [WIN_STACK + ebx * 2]
|
||||||
mov [eax+4],cx
|
mov [eax+4],cx
|
||||||
mov cx, [0xC400 + ebx * 2]
|
mov cx, [WIN_POS + ebx * 2]
|
||||||
mov [eax+6],cx
|
mov [eax+6],cx
|
||||||
push eax
|
push eax
|
||||||
mov eax,ebx
|
mov eax,ebx
|
||||||
shl eax,8
|
shl eax,8
|
||||||
add eax,0x80000+APPDATA.app_name
|
add eax,SLOT_BASE+APPDATA.app_name
|
||||||
pop ebx
|
pop ebx
|
||||||
add ebx,10
|
add ebx,10
|
||||||
mov ecx,11
|
mov ecx,11
|
||||||
@ -2474,7 +2475,7 @@ sys_cpuusage:
|
|||||||
cmp ecx,1
|
cmp ecx,1
|
||||||
je os_mem
|
je os_mem
|
||||||
shl ecx,8
|
shl ecx,8
|
||||||
mov edx,[0x80000+ecx+APPDATA.mem_size] ;0x8c
|
mov edx,[SLOT_BASE+ecx+APPDATA.mem_size] ;0x8c
|
||||||
mov eax,std_application_base_address
|
mov eax,std_application_base_address
|
||||||
; eax run base -> edx used memory
|
; eax run base -> edx used memory
|
||||||
os_mem:
|
os_mem:
|
||||||
@ -2513,7 +2514,7 @@ sys_cpuusage:
|
|||||||
|
|
||||||
mov esi,[esp]
|
mov esi,[esp]
|
||||||
shl esi,8
|
shl esi,8
|
||||||
add esi,0x80000+APPDATA.wnd_clientbox
|
add esi,SLOT_BASE+APPDATA.wnd_clientbox
|
||||||
lea edi,[ebx+44]
|
lea edi,[ebx+44]
|
||||||
mov ecx,4
|
mov ecx,4
|
||||||
rep movsd
|
rep movsd
|
||||||
@ -2732,7 +2733,7 @@ sys_drawwindow:
|
|||||||
; parameter for drawwindow_IV
|
; parameter for drawwindow_IV
|
||||||
push 0
|
push 0
|
||||||
mov edi, [TASK_COUNT]
|
mov edi, [TASK_COUNT]
|
||||||
movzx edi, word [0xC400 + edi*2]
|
movzx edi, word [WIN_POS + edi*2]
|
||||||
cmp edi, [CURRENT_TASK]
|
cmp edi, [CURRENT_TASK]
|
||||||
jne @f
|
jne @f
|
||||||
inc dword [esp]
|
inc dword [esp]
|
||||||
@ -2758,7 +2759,7 @@ draw_window_caption:
|
|||||||
|
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov edx,[TASK_COUNT]
|
mov edx,[TASK_COUNT]
|
||||||
movzx edx,word[0xC400+edx*2]
|
movzx edx,word[WIN_POS+edx*2]
|
||||||
cmp edx,[CURRENT_TASK]
|
cmp edx,[CURRENT_TASK]
|
||||||
jne @f
|
jne @f
|
||||||
inc eax
|
inc eax
|
||||||
@ -2794,7 +2795,7 @@ draw_window_caption:
|
|||||||
shl edi,5
|
shl edi,5
|
||||||
test [edi+window_data+WDATA.fl_wstyle],WSTYLE_HASCAPTION
|
test [edi+window_data+WDATA.fl_wstyle],WSTYLE_HASCAPTION
|
||||||
jz @f
|
jz @f
|
||||||
mov ecx,[edi*8+0x80000+APPDATA.wnd_caption]
|
mov ecx,[edi*8+SLOT_BASE+APPDATA.wnd_caption]
|
||||||
or ecx,ecx
|
or ecx,ecx
|
||||||
jz @f
|
jz @f
|
||||||
add ecx,[edi+twdw+TASKDATA.mem_start]
|
add ecx,[edi+twdw+TASKDATA.mem_start]
|
||||||
@ -2880,33 +2881,33 @@ set_window_clientbox:
|
|||||||
movzx eax,[ecx+WDATA.fl_wstyle]
|
movzx eax,[ecx+WDATA.fl_wstyle]
|
||||||
and eax,0x0F
|
and eax,0x0F
|
||||||
mov eax,[eax*8+window_topleft+0]
|
mov eax,[eax*8+window_topleft+0]
|
||||||
mov [edi+0x80000+APPDATA.wnd_clientbox.left],eax
|
mov [edi+SLOT_BASE+APPDATA.wnd_clientbox.left],eax
|
||||||
shl eax,1
|
shl eax,1
|
||||||
neg eax
|
neg eax
|
||||||
add eax,[ecx+WDATA.box.width]
|
add eax,[ecx+WDATA.box.width]
|
||||||
mov [edi+0x80000+APPDATA.wnd_clientbox.width],eax
|
mov [edi+SLOT_BASE+APPDATA.wnd_clientbox.width],eax
|
||||||
|
|
||||||
movzx eax,[ecx+WDATA.fl_wstyle]
|
movzx eax,[ecx+WDATA.fl_wstyle]
|
||||||
and eax,0x0F
|
and eax,0x0F
|
||||||
push [eax*8+window_topleft+0]
|
push [eax*8+window_topleft+0]
|
||||||
mov eax,[eax*8+window_topleft+4]
|
mov eax,[eax*8+window_topleft+4]
|
||||||
mov [edi+0x80000+APPDATA.wnd_clientbox.top],eax
|
mov [edi+SLOT_BASE+APPDATA.wnd_clientbox.top],eax
|
||||||
neg eax
|
neg eax
|
||||||
sub eax,[esp]
|
sub eax,[esp]
|
||||||
add eax,[ecx+WDATA.box.height]
|
add eax,[ecx+WDATA.box.height]
|
||||||
mov [edi+0x80000+APPDATA.wnd_clientbox.height],eax
|
mov [edi+SLOT_BASE+APPDATA.wnd_clientbox.height],eax
|
||||||
add esp,4
|
add esp,4
|
||||||
|
|
||||||
pop edi ecx eax
|
pop edi ecx eax
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov [edi+0x80000+APPDATA.wnd_clientbox.left],eax
|
mov [edi+SLOT_BASE+APPDATA.wnd_clientbox.left],eax
|
||||||
mov [edi+0x80000+APPDATA.wnd_clientbox.top],eax
|
mov [edi+SLOT_BASE+APPDATA.wnd_clientbox.top],eax
|
||||||
mov eax,[ecx+WDATA.box.width]
|
mov eax,[ecx+WDATA.box.width]
|
||||||
mov [edi+0x80000+APPDATA.wnd_clientbox.width],eax
|
mov [edi+SLOT_BASE+APPDATA.wnd_clientbox.width],eax
|
||||||
mov eax,[ecx+WDATA.box.height]
|
mov eax,[ecx+WDATA.box.height]
|
||||||
mov [edi+0x80000+APPDATA.wnd_clientbox.height],eax
|
mov [edi+SLOT_BASE+APPDATA.wnd_clientbox.height],eax
|
||||||
|
|
||||||
pop edi ecx eax
|
pop edi ecx eax
|
||||||
ret
|
ret
|
||||||
@ -2950,7 +2951,7 @@ sys_set_window:
|
|||||||
|
|
||||||
sub edi,window_data
|
sub edi,window_data
|
||||||
shl edi,3
|
shl edi,3
|
||||||
add edi,0x80000
|
add edi,SLOT_BASE
|
||||||
|
|
||||||
and cl,0x0F
|
and cl,0x0F
|
||||||
mov [edi+APPDATA.wnd_caption],0
|
mov [edi+APPDATA.wnd_caption],0
|
||||||
@ -3004,12 +3005,12 @@ syscall_windowsettings:
|
|||||||
; caption still can become over bounds
|
; caption still can become over bounds
|
||||||
; diamond, 31.10.2006: check removed because with new memory manager
|
; diamond, 31.10.2006: check removed because with new memory manager
|
||||||
; there can be valid data after APPDATA.mem_size bound
|
; there can be valid data after APPDATA.mem_size bound
|
||||||
; mov ecx,[edi*8+0x80000+APPDATA.mem_size]
|
; mov ecx,[edi*8+SLOT_BASE+APPDATA.mem_size]
|
||||||
; add ecx,255 ; max caption length
|
; add ecx,255 ; max caption length
|
||||||
; cmp ebx,ecx
|
; cmp ebx,ecx
|
||||||
; ja .exit_fail
|
; ja .exit_fail
|
||||||
|
|
||||||
mov [edi*8+0x80000+APPDATA.wnd_caption],ebx
|
mov [edi*8+SLOT_BASE+APPDATA.wnd_caption],ebx
|
||||||
or [edi+window_data+WDATA.fl_wstyle],WSTYLE_HASCAPTION
|
or [edi+window_data+WDATA.fl_wstyle],WSTYLE_HASCAPTION
|
||||||
|
|
||||||
call draw_window_caption
|
call draw_window_caption
|
||||||
@ -3072,7 +3073,7 @@ sys_window_move:
|
|||||||
sub edi,window_data
|
sub edi,window_data
|
||||||
shr edi,5
|
shr edi,5
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add edi, 0x80000 + APPDATA.saved_box
|
add edi, SLOT_BASE + APPDATA.saved_box
|
||||||
mov ecx,4
|
mov ecx,4
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
@ -3302,7 +3303,7 @@ checkmisc:
|
|||||||
mov ecx, [TASK_COUNT]
|
mov ecx, [TASK_COUNT]
|
||||||
set_mouse_event:
|
set_mouse_event:
|
||||||
add edi, 256
|
add edi, 256
|
||||||
or [edi+0x80000+APPDATA.event_mask], dword 00100000b
|
or [edi+SLOT_BASE+APPDATA.event_mask], dword 00100000b
|
||||||
loop set_mouse_event
|
loop set_mouse_event
|
||||||
mouse_not_active:
|
mouse_not_active:
|
||||||
|
|
||||||
@ -4003,9 +4004,9 @@ sys_putimage:
|
|||||||
@@:
|
@@:
|
||||||
mov edi,[CURRENT_TASK]
|
mov edi,[CURRENT_TASK]
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add dx,word[edi+0x80000+APPDATA.wnd_clientbox.top]
|
add dx,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.top]
|
||||||
rol edx,16
|
rol edx,16
|
||||||
add dx,word[edi+0x80000+APPDATA.wnd_clientbox.left]
|
add dx,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
||||||
rol edx,16
|
rol edx,16
|
||||||
.forced:
|
.forced:
|
||||||
push ebp esi 0
|
push ebp esi 0
|
||||||
@ -4045,9 +4046,9 @@ sys_putimage_palette:
|
|||||||
; ebp = row delta
|
; ebp = row delta
|
||||||
mov eax, [CURRENT_TASK]
|
mov eax, [CURRENT_TASK]
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
add dx, word [eax+0x80000+APPDATA.wnd_clientbox.top]
|
add dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.top]
|
||||||
rol edx, 16
|
rol edx, 16
|
||||||
add dx, word [eax+0x80000+APPDATA.wnd_clientbox.left]
|
add dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
||||||
rol edx, 16
|
rol edx, 16
|
||||||
.forced:
|
.forced:
|
||||||
push ebp esi ebp
|
push ebp esi ebp
|
||||||
@ -4106,10 +4107,10 @@ putimage_get32bpp:
|
|||||||
__sys_drawbar:
|
__sys_drawbar:
|
||||||
mov esi,[CURRENT_TASK]
|
mov esi,[CURRENT_TASK]
|
||||||
shl esi,8
|
shl esi,8
|
||||||
add eax,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
add eax,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
||||||
add ecx,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
add ecx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
||||||
add ebx,[esi+0x80000+APPDATA.wnd_clientbox.top]
|
add ebx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
|
||||||
add edx,[esi+0x80000+APPDATA.wnd_clientbox.top]
|
add edx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
|
||||||
.forced:
|
.forced:
|
||||||
inc [mouse_pause]
|
inc [mouse_pause]
|
||||||
; call [disable_mouse]
|
; call [disable_mouse]
|
||||||
@ -4480,7 +4481,7 @@ sys_process_def:
|
|||||||
jne no_set_keyboard_setup
|
jne no_set_keyboard_setup
|
||||||
|
|
||||||
shl edi,8
|
shl edi,8
|
||||||
mov [edi+0x80000 + APPDATA.keyboard_mode],bl
|
mov [edi+SLOT_BASE + APPDATA.keyboard_mode],bl
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -4490,7 +4491,7 @@ sys_process_def:
|
|||||||
jne no_get_keyboard_setup
|
jne no_get_keyboard_setup
|
||||||
|
|
||||||
shl edi,8
|
shl edi,8
|
||||||
movzx eax, byte [0x80000+edi + APPDATA.keyboard_mode]
|
movzx eax, byte [SLOT_BASE+edi + APPDATA.keyboard_mode]
|
||||||
|
|
||||||
mov [esp+36],eax
|
mov [esp+36],eax
|
||||||
|
|
||||||
@ -4640,8 +4641,8 @@ syscall_setpixel: ; SetPixel
|
|||||||
add ebx,[edx-twdw+WDATA.box.top]
|
add ebx,[edx-twdw+WDATA.box.top]
|
||||||
mov edi,[CURRENT_TASK]
|
mov edi,[CURRENT_TASK]
|
||||||
shl edi,8
|
shl edi,8
|
||||||
add eax,[edi+0x80000+APPDATA.wnd_clientbox.left]
|
add eax,[edi+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
||||||
add ebx,[edi+0x80000+APPDATA.wnd_clientbox.top]
|
add ebx,[edi+SLOT_BASE+APPDATA.wnd_clientbox.top]
|
||||||
xor edi,edi ; no force
|
xor edi,edi ; no force
|
||||||
; mov edi,1
|
; mov edi,1
|
||||||
call [disable_mouse]
|
call [disable_mouse]
|
||||||
@ -4656,10 +4657,10 @@ syscall_writetext: ; WriteText
|
|||||||
push esi
|
push esi
|
||||||
mov esi,[CURRENT_TASK]
|
mov esi,[CURRENT_TASK]
|
||||||
shl esi,8
|
shl esi,8
|
||||||
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
add ebp,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
||||||
shl ebp,16
|
shl ebp,16
|
||||||
add ebp,[edi-twdw+WDATA.box.top]
|
add ebp,[edi-twdw+WDATA.box.top]
|
||||||
add bp,word[esi+0x80000+APPDATA.wnd_clientbox.top]
|
add bp,word[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
|
||||||
pop esi
|
pop esi
|
||||||
add ecx,[edi+TASKDATA.mem_start]
|
add ecx,[edi+TASKDATA.mem_start]
|
||||||
add eax,ebp
|
add eax,ebp
|
||||||
@ -4696,8 +4697,8 @@ syscall_drawrect: ; DrawRect
|
|||||||
shr ebx,16
|
shr ebx,16
|
||||||
mov esi,[CURRENT_TASK]
|
mov esi,[CURRENT_TASK]
|
||||||
shl esi,8
|
shl esi,8
|
||||||
add eax,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
add eax,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
||||||
add ebx,[esi+0x80000+APPDATA.wnd_clientbox.top]
|
add ebx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
|
||||||
add ecx,eax
|
add ecx,eax
|
||||||
add edx,ebx
|
add edx,ebx
|
||||||
jmp [drawbar]
|
jmp [drawbar]
|
||||||
@ -4778,15 +4779,15 @@ syscall_drawline: ; DrawLine
|
|||||||
mov ebp,edx
|
mov ebp,edx
|
||||||
mov esi,[CURRENT_TASK]
|
mov esi,[CURRENT_TASK]
|
||||||
shl esi,8
|
shl esi,8
|
||||||
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.left]
|
add ebp,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
||||||
add dx,word[esi+0x80000+APPDATA.wnd_clientbox.left]
|
add dx,word[esi+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
||||||
shl edx,16
|
shl edx,16
|
||||||
add ebp,edx
|
add ebp,edx
|
||||||
movzx edx,word[edi-twdw+WDATA.box.top]
|
movzx edx,word[edi-twdw+WDATA.box.top]
|
||||||
add eax,ebp
|
add eax,ebp
|
||||||
mov ebp,edx
|
mov ebp,edx
|
||||||
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.top]
|
add ebp,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
|
||||||
add dx,word[esi+0x80000+APPDATA.wnd_clientbox.top]
|
add dx,word[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
|
||||||
shl edx,16
|
shl edx,16
|
||||||
xor edi,edi
|
xor edi,edi
|
||||||
add edx,ebp
|
add edx,ebp
|
||||||
|
@ -1069,7 +1069,7 @@ news:
|
|||||||
|
|
||||||
foundPID1:
|
foundPID1:
|
||||||
shl ecx,8
|
shl ecx,8
|
||||||
or dword [ecx+0x80000+APPDATA.event_mask],dword 10000000b ; stack event
|
or dword [ecx+SLOT_BASE+APPDATA.event_mask],dword 10000000b ; stack event
|
||||||
|
|
||||||
pop ecx
|
pop ecx
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ newsearch:
|
|||||||
|
|
||||||
foundPID:
|
foundPID:
|
||||||
shl ecx,8
|
shl ecx,8
|
||||||
or dword [ecx+0x80000+APPDATA.event_mask],dword 10000000b ; stack event
|
or dword [ecx+SLOT_BASE+APPDATA.event_mask],dword 10000000b ; stack event
|
||||||
|
|
||||||
mov [check_idle_semaphore],200
|
mov [check_idle_semaphore],200
|
||||||
|
|
||||||
|
@ -269,13 +269,13 @@ proc set_cursor stdcall, hcursor:dword
|
|||||||
; jne .fail
|
; jne .fail
|
||||||
mov ebx, [CURRENT_TASK]
|
mov ebx, [CURRENT_TASK]
|
||||||
shl ebx, 8
|
shl ebx, 8
|
||||||
xchg eax, [ebx+PROC_BASE+APPDATA.cursor]
|
xchg eax, [ebx+SLOT_BASE+APPDATA.cursor]
|
||||||
ret
|
ret
|
||||||
.fail:
|
.fail:
|
||||||
mov eax, [def_cursor]
|
mov eax, [def_cursor]
|
||||||
mov ebx, [CURRENT_TASK]
|
mov ebx, [CURRENT_TASK]
|
||||||
shl ebx, 8
|
shl ebx, 8
|
||||||
xchg eax, [ebx+PROC_BASE+APPDATA.cursor]
|
xchg eax, [ebx+SLOT_BASE+APPDATA.cursor]
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -400,10 +400,10 @@ proc delete_cursor stdcall, hcursor:dword
|
|||||||
|
|
||||||
mov ebx, [CURRENT_TASK]
|
mov ebx, [CURRENT_TASK]
|
||||||
shl ebx, 8
|
shl ebx, 8
|
||||||
cmp esi, [ebx+PROC_BASE+APPDATA.cursor]
|
cmp esi, [ebx+SLOT_BASE+APPDATA.cursor]
|
||||||
jne @F
|
jne @F
|
||||||
mov eax, [def_cursor]
|
mov eax, [def_cursor]
|
||||||
mov [ebx+PROC_BASE+APPDATA.cursor], eax
|
mov [ebx+SLOT_BASE+APPDATA.cursor], eax
|
||||||
@@:
|
@@:
|
||||||
mov eax, [hcursor]
|
mov eax, [hcursor]
|
||||||
call [eax+APPOBJ.destroy]
|
call [eax+APPOBJ.destroy]
|
||||||
|
Loading…
Reference in New Issue
Block a user