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:
Sergey Semyonov (Serge) 2007-02-28 10:51:05 +00:00
parent 04929cf017
commit a90d0cfe1d
25 changed files with 342 additions and 343 deletions

View File

@ -9,7 +9,7 @@ give_back_application_data: ;
mov edi,[edi+TASKDATA.mem_start]
add edi,ecx
give_back_application_data_1:
mov esi,0xD000 ;FDD_DataBuffer ;0x40000
mov esi,FDD_BUFF ;FDD_DataBuffer ;0x40000
xor ecx,ecx
mov cx,128
cld
@ -21,7 +21,7 @@ take_data_from_application: ;
mov esi,[esi+TASKDATA.mem_start]
add esi,ecx
take_data_from_application_1:
mov edi,0xD000 ;FDD_DataBuffer ;0x40000
mov edi,FDD_BUFF ;FDD_DataBuffer ;0x40000
xor ecx,ecx
mov cx,128
cld

View File

@ -134,108 +134,109 @@ SSE_FZ equ 0x8000
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
TASK_COUNT equ OS_BASE+0x0003004
TASK_BASE equ OS_BASE+0x0003010
TASK_DATA equ OS_BASE+0x0003020
TASK_EVENT equ OS_BASE+0x0003020
CURRENT_TASK equ (OS_BASE+0x0003000)
TASK_COUNT equ (OS_BASE+0x0003004)
TASK_BASE equ (OS_BASE+0x0003010)
TASK_DATA equ (OS_BASE+0x0003020)
TASK_EVENT equ (OS_BASE+0x0003020)
;mouseunder equ OS_BASE+0x0006900
FLOPPY_BUFF equ OS_BASE+0x0008000
ACTIVE_PROC_STACK equ OS_BASE+0x000A400
idts equ OS_BASE+0x000B100
WIN_STACK equ OS_BASE+0x000C000
WIN_POS equ OS_BASE+0x000C400
FDD_DATA equ OS_BASE+0x000D000
mouseunder equ (OS_BASE+0x0006900)
FLOPPY_BUFF equ (OS_BASE+0x0008000)
ACTIVE_PROC_STACK equ (OS_BASE+0x000A400)
idts equ (OS_BASE+0x000B100)
WIN_STACK equ (OS_BASE+0x000C000)
WIN_POS equ (OS_BASE+0x000C400)
FDD_BUFF equ (OS_BASE+0x000D000)
FDD_DATA equ (OS_BASE+0x000D000)
ENABLE_TASKSWITCH equ OS_BASE+0x000E000
PUTPIXEL equ OS_BASE+0x000E020
GETPIXEL equ OS_BASE+0x000E024
BANK_SWITCH equ OS_BASE+0x000E030
ENABLE_TASKSWITCH equ (OS_BASE+0x000E000)
PUTPIXEL equ (OS_BASE+0x000E020)
GETPIXEL equ (OS_BASE+0x000E024)
BANK_SWITCH equ (OS_BASE+0x000E030)
MOUSE_PICTURE equ OS_BASE+0x000F200
MOUSE_VISIBLE equ OS_BASE+0x000F204
XY_TEMP equ OS_BASE+0x000F300
KEY_COUNT equ OS_BASE+0x000F400
KEY_BUFF equ OS_BASE+0x000F401
MOUSE_PICTURE equ (OS_BASE+0x000F200)
MOUSE_VISIBLE equ (OS_BASE+0x000F204)
XY_TEMP equ (OS_BASE+0x000F300)
KEY_COUNT equ (OS_BASE+0x000F400)
KEY_BUFF equ (OS_BASE+0x000F401)
BTN_COUNT equ OS_BASE+0x000F500
BTN_BUFF equ OS_BASE+0x000F501
BTN_COUNT equ (OS_BASE+0x000F500)
BTN_BUFF equ (OS_BASE+0x000F501)
CPU_FREQ equ OS_BASE+0x000F600
MOUSE_PORT equ OS_BASE+0x000F604
CPU_FREQ equ (OS_BASE+0x000F600)
MOUSE_PORT equ (OS_BASE+0x000F604)
PS2_CHUNK equ OS_BASE+0x000FB00
MOUSE_X equ OS_BASE+0x000FB0A
MOUSE_Y equ OS_BASE+0x000FB0C
PS2_CHUNK equ (OS_BASE+0x000FB00)
MOUSE_X equ (OS_BASE+0x000FB0A)
MOUSE_Y equ (OS_BASE+0x000FB0C)
MOUSE_COLOR_MEM equ OS_BASE+0x000FB10
COLOR_TEMP equ OS_BASE+0x000FB30
BTN_DOWN equ OS_BASE+0x000FB40
MOUSE_DOWN equ OS_BASE+0x000FB44
X_UNDER equ OS_BASE+0x000FB4A
Y_UNDER equ OS_BASE+0x000FB4C
ScreenBPP equ OS_BASE+0x000FBF1
MOUSE_BUFF_COUNT equ OS_BASE+0x000FCFF
LFBAddress equ OS_BASE+0x000FE80
MEM_AMOUNT equ OS_BASE+0x000FE8C
;LFBSize equ OS_BASE+0x02f9050
MOUSE_COLOR_MEM equ (OS_BASE+0x000FB10)
COLOR_TEMP equ (OS_BASE+0x000FB30)
BTN_DOWN equ (OS_BASE+0x000FB40)
MOUSE_DOWN equ (OS_BASE+0x000FB44)
X_UNDER equ (OS_BASE+0x000FB4A)
Y_UNDER equ (OS_BASE+0x000FB4C)
ScreenBPP equ (OS_BASE+0x000FBF1)
MOUSE_BUFF_COUNT equ (OS_BASE+0x000FCFF)
LFBAddress equ (OS_BASE+0x000FE80)
MEM_AMOUNT equ (OS_BASE+0x000FE8C)
;LFBSize equ (OS_BASE+0x02f9050)
SCR_X_SIZE equ OS_BASE+0x000FE00
SCR_Y_SIZE equ OS_BASE+0x000FE04
SCR_BYTES_PER_LINE equ OS_BASE+0x000FE08
SCR_MODE equ OS_BASE+0x000FE0C
SCR_X_SIZE equ (OS_BASE+0x000FE00)
SCR_Y_SIZE equ (OS_BASE+0x000FE04)
SCR_BYTES_PER_LINE equ (OS_BASE+0x000FE08)
SCR_MODE equ (OS_BASE+0x000FE0C)
BTN_ADDR equ OS_BASE+0x000FE88
SYS_SHUTDOWN equ OS_BASE+0x000FF00
TASK_ACTIVATE equ OS_BASE+0x000FF01
BTN_ADDR equ (OS_BASE+0x000FE88)
SYS_SHUTDOWN equ (OS_BASE+0x000FF00)
TASK_ACTIVATE equ (OS_BASE+0x000FF01)
REDRAW_BACKGROUND equ OS_BASE+0x000FFF0
BANK_RW equ OS_BASE+0x000FFF2
MOUSE_BACKGROUND equ OS_BASE+0x000FFF4
DONT_DRAW_MOUSE equ OS_BASE+0x000FFF5
DONT_SWITCH equ OS_BASE+0x000FFFF
REDRAW_BACKGROUND equ (OS_BASE+0x000FFF0)
BANK_RW equ (OS_BASE+0x000FFF2)
MOUSE_BACKGROUND equ (OS_BASE+0x000FFF4)
DONT_DRAW_MOUSE equ (OS_BASE+0x000FFF5)
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_I equ OS_BASE+0x003F600
DISK_DATA equ OS_BASE+0x0040000
PROC_BASE equ OS_BASE+0x0080000
TMP_BUFF equ OS_BASE+0x0090000
FONT_II equ (OS_BASE+0x003EC00)
FONT_I equ (OS_BASE+0x003F600)
DISK_DATA equ (OS_BASE+0x0040000)
SLOT_BASE equ (OS_BASE+0x0080000)
TMP_BUFF equ (OS_BASE+0x0090000)
VGABasePtr equ OS_BASE+0x00A0000
VGABasePtr equ (OS_BASE+0x00A0000)
RAMDISK equ OS_BASE+0x0100000
RAMDISK_FAT equ OS_BASE+0x0280000
FLOPPY_FAT equ OS_BASE+0x0282000
SB16_Status equ OS_BASE+0x02B0000
BUTTON_INFO equ OS_BASE+0x02C0000
RESERVED_PORTS equ OS_BASE+0x02D0000
IRQ_SAVE equ OS_BASE+0x02E0000
SYS_VAR equ OS_BASE+0x02f0000
IMG_BACKGROUND equ OS_BASE+0x0300000
WinMapAddress equ OS_BASE+0x0460000
display_data equ OS_BASE+0x0460000
HD_CACHE equ OS_BASE+0x0600000
stack_data_start equ OS_BASE+0x0700000
eth_data_start equ OS_BASE+0x0700000
stack_data equ OS_BASE+0x0704000
stack_data_end equ OS_BASE+0x071ffff
VMODE_BASE equ OS_BASE+0x0760000
resendQ equ OS_BASE+0x0770000
RAMDISK equ (OS_BASE+0x0100000)
RAMDISK_FAT equ (OS_BASE+0x0280000)
FLOPPY_FAT equ (OS_BASE+0x0282000)
SB16_Status equ (OS_BASE+0x02B0000)
BUTTON_INFO equ (OS_BASE+0x02C0000)
RESERVED_PORTS equ (OS_BASE+0x02D0000)
IRQ_SAVE equ (OS_BASE+0x02E0000)
SYS_VAR equ (OS_BASE+0x02f0000)
IMG_BACKGROUND equ (OS_BASE+0x0300000)
WinMapAddress equ (OS_BASE+0x0460000)
display_data equ (OS_BASE+0x0460000)
HD_CACHE equ (OS_BASE+0x0600000)
stack_data_start equ (OS_BASE+0x0700000)
eth_data_start equ (OS_BASE+0x0700000)
stack_data equ (OS_BASE+0x0704000)
stack_data_end equ (OS_BASE+0x071ffff)
VMODE_BASE equ (OS_BASE+0x0760000)
resendQ equ (OS_BASE+0x0770000)
;skin_data equ OS_BASE+0x0778000
;skin_data equ (OS_BASE+0x0778000)
tss_data equ 0x780000
draw_data equ 0x988000
tss_data equ (OS_BASE+0x780000)
draw_data equ (OS_BASE+0x988000)
HEAP_BASE equ 0x98B000
HEAP_BASE equ (OS_BASE+0x98B000)
LFB_BASE equ 0x7DC00000

View File

@ -21,7 +21,7 @@ debug_set_event_data:
; destroys eax
mov eax, [CURRENT_TASK]
shl eax, 8
mov [eax+0x80000+APPDATA.dbg_event_mem], ebx
mov [eax+SLOT_BASE+APPDATA.dbg_event_mem], ebx
ret
get_debuggee_slot:
@ -37,7 +37,7 @@ get_debuggee_slot:
shl eax, 5
push ebx
mov ebx, [CURRENT_TASK]
cmp [0x80000+eax*8+APPDATA.debugger_slot], ebx
cmp [SLOT_BASE+eax*8+APPDATA.debugger_slot], ebx
pop ebx
jnz .ret_bad
; clc ; automatically
@ -51,7 +51,7 @@ debug_detach:
; destroys eax,ebx
call get_debuggee_slot
jc .ret
and dword [eax*8+0x80000+APPDATA.debugger_slot], 0
and dword [eax*8+SLOT_BASE+APPDATA.debugger_slot], 0
call do_resume
.ret:
sti
@ -227,7 +227,7 @@ debug_set_drx:
call get_debuggee_slot
jc .errret
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+10]=dr7
add edx, std_application_base_address
@ -358,7 +358,7 @@ debugger_notify:
.1:
mov eax, ebp
shl eax, 8
mov edx, [0x80000+eax+APPDATA.dbg_event_mem]
mov edx, [SLOT_BASE+eax+APPDATA.dbg_event_mem]
test edx, edx
jz .ret
; read buffer header
@ -414,7 +414,7 @@ debugger_notify:
; new debug event
mov eax, ebp
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
@ -432,7 +432,7 @@ debug_exc:
; set DRx registers for task and continue
mov eax, [CURRENT_TASK]
shl eax, 8
add eax, 0x80000+APPDATA.dbg_regs
add eax, SLOT_BASE+APPDATA.dbg_regs
mov ecx, [eax+0]
mov dr0, ecx
mov ecx, [eax+4]
@ -455,7 +455,7 @@ debug_exc:
cli
mov eax, [CURRENT_TASK]
shl eax, 8
mov eax, [0x80000+eax+APPDATA.debugger_slot]
mov eax, [SLOT_BASE+eax+APPDATA.debugger_slot]
test eax, eax
jnz .debug
sti

View File

@ -156,12 +156,12 @@ proc get_notify stdcall, p_ev:dword
.wait:
mov ebx,[CURRENT_TASK]
shl ebx,8
test dword [ebx+PROC_BASE+0xA8],EVENT_NOTIFY
test dword [ebx+SLOT_BASE+0xA8],EVENT_NOTIFY
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 dword [edi], EV_INTR
mov eax, [ebx+PROC_BASE+APPDATA.event]
mov eax, [ebx+SLOT_BASE+APPDATA.event]
mov dword [edi+4], eax
ret
@@:
@ -998,7 +998,7 @@ create_kernel_object:
mov ecx,[CURRENT_TASK]
shl ecx,8
add ecx, PROC_BASE+APP_OBJ_OFFSET
add ecx, SLOT_BASE+APP_OBJ_OFFSET
pushfd
cli

View File

@ -57,7 +57,7 @@ fpu_save:
jne .save
.copy:
shl eax, 8
mov esi, [eax+PROC_BASE+APPDATA.fpu_state]
mov esi, [eax+SLOT_BASE+APPDATA.fpu_state]
mov ecx, 512/4
cld
rep movsd
@ -72,7 +72,7 @@ fpu_save:
mov [fpu_owner], eax
shl ecx, 8
mov ecx, [ecx+PROC_BASE+APPDATA.fpu_state]
mov ecx, [ecx+SLOT_BASE+APPDATA.fpu_state]
bt [cpu_caps], CAPS_SSE
jnc .no_SSE
@ -117,7 +117,7 @@ fpu_restore:
ret
.copy:
shl eax, 8
mov edi, [eax+PROC_BASE+APPDATA.fpu_state]
mov edi, [eax+SLOT_BASE+APPDATA.fpu_state]
mov ecx, 512/4
cld
rep movsd
@ -139,7 +139,7 @@ e7: ;#NM exception handler
je .exit
shl ebx, 8
mov eax, [ebx+PROC_BASE+APPDATA.fpu_state]
mov eax, [ebx+SLOT_BASE+APPDATA.fpu_state]
bt [cpu_caps], CAPS_SSE
jnc .no_SSE
@ -147,7 +147,7 @@ e7: ;#NM exception handler
mov ebx, [CURRENT_TASK]
mov [fpu_owner], ebx
shl ebx, 8
mov eax, [ebx+PROC_BASE+APPDATA.fpu_state]
mov eax, [ebx+SLOT_BASE+APPDATA.fpu_state]
fxrstor [eax]
.exit:
restore_ring3_context
@ -158,7 +158,7 @@ e7: ;#NM exception handler
mov ebx, [CURRENT_TASK]
mov [fpu_owner], ebx
shl ebx, 8
mov eax, [ebx+PROC_BASE+APPDATA.fpu_state]
mov eax, [ebx+SLOT_BASE+APPDATA.fpu_state]
frstor [eax]
restore_ring3_context
iret
@ -186,7 +186,7 @@ except_16: ;fpu native exceptions handler
mov ebx, [ss:CURRENT_TASK]
shl ebx, 8
mov eax, [ss:ebx+PROC_BASE+APPDATA.fpu_handler]
mov eax, [ss:ebx+SLOT_BASE+APPDATA.fpu_handler]
test eax, eax
jz .default
@ -230,7 +230,7 @@ except_19: ;sse exceptions handler
mov ebx, [ss:CURRENT_TASK]
shl ebx, 8
mov eax, [ss:ebx+PROC_BASE+APPDATA.sse_handler]
mov eax, [ss:ebx+SLOT_BASE+APPDATA.sse_handler]
test eax, eax
jz .default

View File

@ -616,20 +616,20 @@ proc init_heap
mov ebx,[CURRENT_TASK]
shl ebx,8
mov eax, [PROC_BASE+APPDATA.heap_top+ebx]
mov eax, [SLOT_BASE+APPDATA.heap_top+ebx]
test eax, eax
jz @F
sub eax,[PROC_BASE+APPDATA.heap_base+ebx]
sub eax,[SLOT_BASE+APPDATA.heap_base+ebx]
sub eax, 4096
ret
@@:
mov esi, [PROC_BASE+APPDATA.mem_size+ebx]
mov esi, [SLOT_BASE+APPDATA.mem_size+ebx]
add esi, 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 [PROC_BASE+APPDATA.heap_base+ebx], esi
mov [PROC_BASE+APPDATA.heap_top+ebx], eax
mov [SLOT_BASE+APPDATA.heap_base+ebx], esi
mov [SLOT_BASE+APPDATA.heap_top+ebx], eax
sub eax, esi
add esi, new_app_base
@ -653,8 +653,8 @@ proc user_alloc stdcall, alloc_size:dword
mov ebx, [CURRENT_TASK]
shl ebx, 8
mov esi, dword [ebx+PROC_BASE+APPDATA.heap_base]; heap_base
mov edi, dword [ebx+PROC_BASE+APPDATA.heap_top]; heap_top
mov esi, dword [ebx+SLOT_BASE+APPDATA.heap_base]; heap_base
mov edi, dword [ebx+SLOT_BASE+APPDATA.heap_top]; heap_top
add esi, new_app_base
add edi, new_app_base
l_0:
@ -695,7 +695,7 @@ l_0:
mov ebx, [alloc_size]
add ebx, 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
mov eax, esi
@ -752,9 +752,9 @@ proc user_free stdcall, base:dword
.not_used:
mov edx, [CURRENT_TASK]
shl edx, 8
mov esi, dword [edx+PROC_BASE+APPDATA.heap_base]; heap_base
mov edi, dword [edx+PROC_BASE+APPDATA.heap_top]; heap_top
sub ebx, [edx+PROC_BASE+APPDATA.mem_size]
mov esi, dword [edx+SLOT_BASE+APPDATA.heap_base]; heap_base
mov edi, dword [edx+SLOT_BASE+APPDATA.heap_top]; heap_top
sub ebx, [edx+SLOT_BASE+APPDATA.mem_size]
neg ebx
call update_mem_size
add esi, new_app_base

View File

@ -458,10 +458,10 @@ proc new_mem_resize stdcall, new_size:dword
mov edx,[CURRENT_TASK]
shl edx,8
cmp [PROC_BASE+APPDATA.heap_base+edx],0
cmp [SLOT_BASE+APPDATA.heap_base+edx],0
jne .exit
mov esi, [PROC_BASE+APPDATA.mem_size+edx]
mov esi, [SLOT_BASE+APPDATA.mem_size+edx]
add esi, 4095
and esi, not 4095
@ -562,10 +562,10 @@ update_mem_size:
; ebx = new memory size
; destroys eax,ecx,edx
mov [PROC_BASE+APPDATA.mem_size+edx],ebx
mov [SLOT_BASE+APPDATA.mem_size+edx],ebx
;search threads and update
;application memory size infomation
mov ecx,[PROC_BASE+APPDATA.dir_table+edx]
mov ecx,[SLOT_BASE+APPDATA.dir_table+edx]
mov eax,2
.search_threads:
@ -579,9 +579,9 @@ update_mem_size:
cmp word [CURRENT_TASK+edx+TASKDATA.state],9 ;if slot empty?
jz .search_threads_next
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
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:
inc eax
jmp .search_threads
@ -838,7 +838,7 @@ proc set_ipc_buff
mov eax,[CURRENT_TASK]
shl eax,8
add eax, PROC_BASE
add eax, SLOT_BASE
pushf
cli
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
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
jz .no_ipc_area
@ -885,10 +885,10 @@ proc sys_ipc_send stdcall, PID:dword, msg_addr:dword, msg_size:dword
and ebx, 0xFFF
mov [dst_offset], ebx
mov esi, [eax+PROC_BASE+0xa4]
mov esi, [eax+SLOT_BASE+0xa4]
mov [buf_size], esi
stdcall map_mem, [ipc_tmp], [PROC_BASE+eax+0xB8],\
stdcall map_mem, [ipc_tmp], [SLOT_BASE+eax+0xB8],\
edi, esi
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]
shl eax, 8
or [eax+PROC_BASE+0xA8],dword 0x40
or [eax+SLOT_BASE+0xA8],dword 0x40
cmp dword [check_idle_semaphore],20
jge .ipc_no_cis
@ -1039,8 +1039,8 @@ new_services:
ja @f
mov ecx, [CURRENT_TASK]
shl ecx, 8
mov eax, [ecx+PROC_BASE+APPDATA.fpu_handler]
mov [ecx+PROC_BASE+APPDATA.fpu_handler], ebx
mov eax, [ecx+SLOT_BASE+APPDATA.fpu_handler]
mov [ecx+SLOT_BASE+APPDATA.fpu_handler], ebx
mov [esp+36], eax
ret
@@:
@ -1066,8 +1066,8 @@ new_services:
ja @f
mov ecx, [CURRENT_TASK]
shl ecx, 8
mov eax, [ecx+PROC_BASE+APPDATA.sse_handler]
mov [ecx+PROC_BASE+APPDATA.sse_handler], ebx
mov eax, [ecx+SLOT_BASE+APPDATA.sse_handler]
mov [ecx+SLOT_BASE+APPDATA.sse_handler], ebx
mov [esp+36], eax
ret
@@:

View File

@ -10,7 +10,6 @@
idtreg:
dw 8*0x41-1
dd idts+8
;label idts at 0xB100-8
build_process_gdt_tss_pointer:
@ -122,7 +121,7 @@ exc_c:
cli
mov eax, [CURRENT_TASK]
shl eax, 8
mov eax, [0x80000+eax+APPDATA.debugger_slot]
mov eax, [SLOT_BASE+eax+APPDATA.debugger_slot]
test eax, eax
jnz .debug
sti
@ -582,7 +581,7 @@ terminate: ; terminate application
push esi ;save .slot
shl esi, 8
cmp [PROC_BASE+esi+APPDATA.dir_table], 0
cmp [SLOT_BASE+esi+APPDATA.dir_table], 0
jne @F
add esp, 4
ret
@ -601,7 +600,7 @@ term9:
mov esi, [.slot]
shl esi,8
add esi, PROC_BASE+APP_OBJ_OFFSET
add esi, SLOT_BASE+APP_OBJ_OFFSET
@@:
mov eax, [esi+APPOBJ.fd]
test eax, eax
@ -619,7 +618,7 @@ term9:
@@:
mov eax, [.slot]
shl eax, 8
mov eax,[PROC_BASE+eax+APPDATA.dir_table]
mov eax,[SLOT_BASE+eax+APPDATA.dir_table]
stdcall destroy_app_space, eax
mov esi, [.slot]
@ -627,7 +626,7 @@ term9:
jne @F
mov [fpu_owner],1
mov eax, [256+PROC_BASE+APPDATA.fpu_state]
mov eax, [256+SLOT_BASE+APPDATA.fpu_state]
clts
bt [cpu_caps], CAPS_SSE
jnc .no_SSE
@ -732,7 +731,7 @@ term9:
pushad
mov edi, esi
shl edi, 5
mov eax, [0x80000+edi*8+APPDATA.debugger_slot]
mov eax, [SLOT_BASE+edi*8+APPDATA.debugger_slot]
test eax, eax
jz .nodebug
push 8
@ -747,13 +746,13 @@ term9:
mov ebx, [.slot]
shl ebx, 8
mov ebx,[PROC_BASE+ebx+APPDATA.pl0_stack]
mov ebx,[SLOT_BASE+ebx+APPDATA.pl0_stack]
stdcall kernel_free, ebx
mov edi, [.slot]
shl edi,8
add edi,0x80000
add edi,SLOT_BASE
mov eax, 0x20202020
stosd
stosd
@ -763,7 +762,7 @@ term9:
rep stosd
; activate window
movzx eax, word [0xC000 + esi*2]
movzx eax, word [WIN_STACK + esi*2]
cmp eax, [TASK_COUNT]
jne .dont_activate
pushad
@ -771,7 +770,7 @@ term9:
dec eax
cmp eax, 1
jbe .nothing_to_activate
lea esi, [0xc400+eax*2]
lea esi, [WIN_POS+eax*2]
movzx edi, word [esi] ; edi = process
shl edi, 5
cmp [CURRENT_TASK + edi + TASKDATA.state], byte 9 ; skip dead slots
@ -870,7 +869,7 @@ term9:
mov [edi+CURRENT_TASK + TASKDATA.state],byte 9
; debugger test - terminate all debuggees
mov eax, 2
mov ecx, 0x80000+2*0x100+APPDATA.debugger_slot
mov ecx, SLOT_BASE+2*0x100+APPDATA.debugger_slot
.xd0:
cmp eax, [TASK_COUNT]
ja .xd1

View File

@ -54,7 +54,7 @@ sysenter_entry:
push eax
mov eax, [ss:CURRENT_TASK]
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
mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app
sti
@ -99,7 +99,7 @@ syscall_entry:
mov [ss:sysenter_stack - 4], eax
mov eax, [ss:CURRENT_TASK]
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
mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app
sti
@ -197,7 +197,7 @@ iglobal
dd undefined_syscall ; 56-reserved
dd undefined_syscall ; 57-reserved
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_gs ; 61-Direct graphics access
dd sys_pci ; 62-PCI functions

View File

@ -159,7 +159,7 @@ proc fs_execute
mov [slot], eax
shl eax, 8
add eax, PROC_BASE
add eax, SLOT_BASE
mov [slot_base], eax
mov edi, eax
_clear_ 256 ;clean extended information about process
@ -487,7 +487,7 @@ set_cr3:
mov esi, [CURRENT_TASK]
mov ebx, esi
shl esi,8
mov [PROC_BASE+esi+0xB8],eax
mov [SLOT_BASE+esi+0xB8],eax
imul ebx,tss_step
add ebx,tss_data
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?
jz @f ;skip empty slots
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
inc edx ;thread found
@@:
@ -635,7 +635,7 @@ check_process_region:
cmp word [CURRENT_TASK+eax+0xa],0
jnz .failed
shl eax,3
mov eax,[PROC_BASE+eax+0xb8]
mov eax,[SLOT_BASE+eax+0xb8]
test eax,eax
jz .failed
@ -738,7 +738,7 @@ proc read_process_memory
add ebx, new_app_base
push ecx
stdcall map_memEx, [proc_mem_map],\
[PROC_BASE+eax+0xB8],\
[SLOT_BASE+eax+0xB8],\
ebx, ecx
pop ecx
@ -804,7 +804,7 @@ proc write_process_memory
add ebx, new_app_base
push ecx
stdcall map_memEx, [proc_mem_map],\
[PROC_BASE+eax+0xB8],\
[SLOT_BASE+eax+0xB8],\
ebx, ecx
pop ecx
@ -868,12 +868,12 @@ proc new_sys_threads
mov esi,[CURRENT_TASK]
shl esi,8
add esi,PROC_BASE
add esi,SLOT_BASE
mov ebx,esi ;ebx=esi - pointer to extended information about current thread
mov edi, eax
shl edi,8
add edi,PROC_BASE
add edi,SLOT_BASE
mov edx,edi ;edx=edi - pointer to extended infomation about new thread
mov ecx,256/4
xor eax, eax
@ -950,9 +950,9 @@ proc set_app_params stdcall,slot:dword, params:dword,\
mov ebx, eax
shl eax, 8
mov [eax+PROC_BASE+APPDATA.fpu_state], edi
mov [eax+PROC_BASE+APPDATA.fpu_handler], 0
mov [eax+PROC_BASE+APPDATA.sse_handler], 0
mov [eax+SLOT_BASE+APPDATA.fpu_state], edi
mov [eax+SLOT_BASE+APPDATA.fpu_handler], 0
mov [eax+SLOT_BASE+APPDATA.sse_handler], 0
mov esi, fpu_data
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
.noinc:
shl ebx,8
lea edx, [ebx+PROC_BASE+APP_EV_OFFSET]
mov [PROC_BASE+APPDATA.fd_ev+ebx],edx
mov [PROC_BASE+APPDATA.bk_ev+ebx],edx
lea edx, [ebx+SLOT_BASE+APP_EV_OFFSET]
mov [SLOT_BASE+APPDATA.fd_ev+ebx],edx
mov [SLOT_BASE+APPDATA.bk_ev+ebx],edx
add edx, APP_OBJ_OFFSET-APP_EV_OFFSET
mov [PROC_BASE+APPDATA.fd_obj+ebx],edx
mov [PROC_BASE+APPDATA.bk_obj+ebx],edx
mov [SLOT_BASE+APPDATA.fd_obj+ebx],edx
mov [SLOT_BASE+APPDATA.bk_obj+ebx],edx
mov ecx, [def_cursor]
mov [PROC_BASE+APPDATA.cursor+ebx],ecx
mov [SLOT_BASE+APPDATA.cursor+ebx],ecx
mov eax, [pl0_stack]
mov [PROC_BASE+APPDATA.pl0_stack+ebx],eax
mov [SLOT_BASE+APPDATA.pl0_stack+ebx],eax
shr ebx,3
mov eax, new_app_base
@ -990,7 +990,7 @@ proc set_app_params stdcall,slot:dword, params:dword,\
add eax, 256
jc @f
cmp eax, [PROC_BASE+APPDATA.mem_size+ebx*8]
cmp eax, [SLOT_BASE+APPDATA.mem_size+ebx*8]
ja @f
add edx, new_app_base
@ -1003,7 +1003,7 @@ proc set_app_params stdcall,slot:dword, params:dword,\
mov eax, edx
add eax, 1024
jc @f
cmp eax, [PROC_BASE+APPDATA.mem_size+ebx*8]
cmp eax, [SLOT_BASE+APPDATA.mem_size+ebx*8]
ja @f
add edx, new_app_base
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
mov ecx, [slot]
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 esi,[params]
@ -1104,7 +1104,7 @@ proc set_app_params stdcall,slot:dword, params:dword,\
jz .no_debug
mov [CURRENT_TASK+ebx+0xa],byte 1 ;set process state - suspended
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:
mov esi,new_process_running
call sys_msg_board_str ;output information about succefull startup

View File

@ -67,7 +67,7 @@ R9800XT equ 0x4E4A ;R360
OS_BASE equ 0
new_app_base equ 0x80000000
PROC_BASE equ 0x0080000
SLOT_BASE equ 0x0080000
PG_SW equ 0x003
PG_NOCACHE equ 0x018

View File

@ -29,7 +29,7 @@ DEBUG equ 1
OS_BASE equ 0
new_app_base equ 0x80000000
PROC_BASE equ OS_BASE+0x0080000
SLOT_BASE equ OS_BASE+0x0080000
CAPS_SSE2 equ 26
PG_SW equ 0x003

View File

@ -244,7 +244,7 @@ end virtual
EVENT_NOTIFY equ 0x00000200
OS_BASE equ 0; 0x80400000
PROC_BASE equ OS_BASE+0x0080000
SLOT_BASE equ OS_BASE+0x0080000
new_app_base equ 0x80000000
public START

View File

@ -271,8 +271,8 @@ end virtual
EVENT_NOTIFY equ 0x00000200
OS_BASE equ 0;
PROC_BASE equ OS_BASE+0x0080000
new_app_base equ 0x80000000
SLOT_BASE equ OS_BASE+0x0080000
new_app_base equ 0x80000000
public START
public service_proc

View File

@ -104,7 +104,7 @@ fr_do_1:
mov edi,edx
dec ebx
shl ebx,9
mov esi,0x8000
mov esi,FLOPPY_BUFF
add esi,ebx
shl ecx,9
cld
@ -147,7 +147,7 @@ l.20_1:
cmp [FDC_Status],0
jne fdc_status_error_3_1
mov dl,16
mov edi,0xD000
mov edi,FDD_BUFF
inc [FDD_Sector]
l.21_1:
mov esi,eax ;Name of file we want
@ -274,7 +274,7 @@ read_flp_root:
mov [FDD_Track],0 ; Öèëèíäð
mov [FDD_Head],1 ; Ñòîðîíà
mov [FDD_Sector],2 ; Ñåêòîð
mov edi,0x8000
mov edi,FLOPPY_BUFF
call SeekTrack
read_flp_root_1:
call ReadSectWithRetr
@ -303,7 +303,7 @@ read_flp_fat:
mov [FDD_Track],0 ; Öèëèíäð
mov [FDD_Head],0 ; Ñòîðîíà
mov [FDD_Sector],2 ; Ñåêòîð
mov edi,0x8000
mov edi,FLOPPY_BUFF
call SeekTrack
read_flp_fat_1:
call ReadSectWithRetr
@ -332,7 +332,7 @@ unnecessary_flp_fat:
calculatefatchain_flp:
pushad
mov esi,0x8000
mov esi,FLOPPY_BUFF
mov edi,0x282000
fcnew_1:
@ -384,7 +384,7 @@ check_label:
cmp [FDC_Status],0
jne fdc_status_error
mov esi,flp_label
mov edi,0xD000+39
mov edi,FDD_BUFF+39
mov ecx,15
cld
rep cmpsb
@ -392,7 +392,7 @@ check_label:
mov [root_read],0
mov [flp_fat],0
same_label:
mov esi,0xD000+39
mov esi,FDD_BUFF+39
mov edi,flp_label
mov ecx,15
cld
@ -413,7 +413,7 @@ save_flp_root:
mov [FDD_Track],0 ; Öèëèíäð
mov [FDD_Head],1 ; Ñòîðîíà
mov [FDD_Sector],2 ; Ñåêòîð
mov esi,0x8000
mov esi,FLOPPY_BUFF
call SeekTrack
save_flp_root_1:
push esi
@ -442,7 +442,7 @@ save_flp_fat:
mov [FDD_Track],0 ; Öèëèíäð
mov [FDD_Head],0 ; Ñòîðîíà
mov [FDD_Sector],2 ; Ñåêòîð
mov esi,0x8000
mov esi,FLOPPY_BUFF
call SeekTrack
save_flp_fat_1:
push esi
@ -472,7 +472,7 @@ restorefatchain_flp: ; restore fat chain
pushad
mov esi,0x282000
mov edi,0x8000
mov edi,FLOPPY_BUFF
fcnew2_1:
mov eax,dword [esi]
@ -489,11 +489,11 @@ restorefatchain_flp: ; restore fat chain
add edi,2
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
mov esi,0x8000 ; duplicate fat chain
mov edi,0x8000+0x1200
mov esi,FLOPPY_BUFF ; duplicate fat chain
mov edi,FLOPPY_BUFF+0x1200
mov ecx,0x1200/4
cld
rep movsd
@ -534,7 +534,7 @@ l.20_2:
cmp [FDC_Status],0
jne fdc_status_error_4
mov dl,16
mov edi,0xD000
mov edi,FDD_BUFF
inc [FDD_Sector]
l.21_2:
mov esi,eax ;Name of file we want
@ -662,7 +662,7 @@ rd_do_save_1:
call read_flp_root
cmp [FDC_Status],0
jne fdc_status_error_7
mov edi,0x8000 ;Point at directory
mov edi,FLOPPY_BUFF ;Point at directory
mov edx,224 +1
; find an empty spot for filename in the root dir
l20ds_1:
@ -689,7 +689,7 @@ l.20_3:
cmp [FDC_Status],0
jne fdc_status_error_7
mov dl,16
mov edi,0xD000
mov edi,FDD_BUFF
inc [FDD_Sector]
l.21_3:
mov esi,eax ;Name of file we want
@ -920,7 +920,7 @@ adr56_flp:
jne not_found_file_analyze_flp
mov ecx,512/32
mov ebx,0xD000
mov ebx,FDD_BUFF
adr1_analyze_flp:
mov esi,edx ;[esp+16]
@ -985,7 +985,7 @@ adr561:
jne error_found_file_analyze1
mov ecx,512/32
mov ebx,0xD000
mov ebx,FDD_BUFF
adr1_analyze1:
cmp byte [ebx],0x00
@ -1020,7 +1020,7 @@ avanti:
pusha
mov ecx,512/4
xor eax,eax
mov edi,0xD000
mov edi,FDD_BUFF
cld
rep stosd
popa
@ -1032,7 +1032,7 @@ avanti:
popa
cmp [FDC_Status],0
jne error_found_file_analyze1
mov ebx,0xD000
mov ebx,FDD_BUFF
found_file_analyze1:
@ -1145,19 +1145,19 @@ flp_root_first:
popa
cmp [FDC_Status], 0
jnz .readerr
mov edi, 0xD000
mov edi, FDD_BUFF
ret ; CF=0
.readerr:
stc
ret
flp_rootmem_first:
mov edi, 0x8000
mov edi, FLOPPY_BUFF
clc
ret
flp_rootmem_next:
add edi, 0x20
cmp edi, 0x8000+14*0x200
cmp edi, FLOPPY_BUFF+14*0x200
cmc
flp_rootmem_next_write:
flp_rootmem_begin_write:
@ -1195,7 +1195,7 @@ flp_notroot_first:
add eax, 31
call read_chs_sector
popa
mov edi, 0xD000
mov edi, FDD_BUFF
cmp [FDC_Status], 0
jnz .err
ret ; CF=0
@ -1242,12 +1242,12 @@ flp_notroot_extend_dir:
mov [0x282000+ecx*2], di
mov [eax], edi
xor eax, eax
mov edi, 0xD000
mov edi, FDD_BUFF
mov ecx, 128
rep stosd
popa
call flp_notroot_end_write
mov edi, 0xD000
mov edi, FDD_BUFF
clc
ret
.notfound:
@ -1358,7 +1358,7 @@ fs_FloppyRead:
popa
cmp [FDC_Status], 0
jnz .err
lea eax, [0xD000+ebx+512]
lea eax, [FDD_BUFF+ebx+512]
neg ebx
push ecx
cmp ecx, ebx
@ -1452,7 +1452,7 @@ fs_FloppyReadFolder:
popa
cmp [FDC_Status], 0
jnz .error
mov edi, 0xD000
mov edi, FDD_BUFF
push eax
.l1:
call fat_get_name
@ -1480,7 +1480,7 @@ fs_FloppyReadFolder:
popa
cmp [FDC_Status], 0
jnz .error
mov edi, 0xD000
mov edi, FDD_BUFF
push eax
.do_bdfe:
inc dword [edx+8] ; new file found
@ -1911,7 +1911,7 @@ fs_FloppyRewrite:
jae @f
mov ecx, [esp+20]
@@:
mov edi, 0xD000
mov edi, FDD_BUFF
cmp byte [esp+24+28+28], 0
jnz .writedir
push ecx
@ -2160,7 +2160,7 @@ fs_FloppyWrite:
mov ecx, 0x200
sub ecx, [esp+4+12]
jbe @f
mov edi, 0xD000
mov edi, FDD_BUFF
add edi, [esp+4+12]
rep stosb
@@:
@ -2168,7 +2168,7 @@ fs_FloppyWrite:
mov ecx, 0x200
sub ecx, esi
jbe @f
mov edi, 0xD000
mov edi, FDD_BUFF
add edi, esi
rep stosb
@@:
@ -2178,7 +2178,7 @@ fs_FloppyWrite:
mov eax, edx
neg ebx
jecxz @f
add ebx, 0xD000+0x200
add ebx, FDD_BUFF+0x200
call memmove
xor ebx, ebx
@@:
@ -2412,7 +2412,7 @@ fs_FloppySetFileEnd:
mov ecx, [esp+4]
neg ecx
push edi
mov edi, 0xD000+0x200
mov edi, FDD_BUFF+0x200
add edi, [esp+8]
xor eax, eax
mov [esp+8], eax
@ -2491,8 +2491,8 @@ fs_FloppySetFileEnd:
pusha
call read_chs_sector
popa
add edi, 0xD000
mov ecx, 0xD000+0x200
add edi, FDD_BUFF
mov ecx, FDD_BUFF+0x200
sub ecx, edi
push eax
xor eax, eax
@ -2625,7 +2625,7 @@ fs_FloppyExecute:
cmp [FDC_Status], 0
jnz .err
pop edi
mov esi, 0xD000
mov esi, FDD_BUFF
push edi
mov ecx, 512/4
rep movsd
@ -2705,21 +2705,21 @@ fs_FloppyDelete:
add eax, 31
call read_chs_sector
popa
mov ebx, FDD_DATA + 2*0x20
mov ebx, FDD_BUFF + 2*0x20
.checkempty:
cmp byte [ebx], 0
jz .empty
cmp byte [ebx], 0xE5
jnz .notempty
add ebx, 0x20
cmp ebx, FDD_DATA + 0x200
cmp ebx, FDD_BUFF + 0x200
jb .checkempty
movzx eax, word [FLOPPY_FAT + eax*2]
pusha
add eax, 31
call read_chs_sector
popa
mov ebx, FDD_DATA
mov ebx, FDD_BUFF
jmp .checkempty
.notempty:
pop ebx
@ -2741,7 +2741,7 @@ fs_FloppyDelete:
mov byte [edi], 0xE5
; delete LFN (if present)
.lfndel:
cmp edi, FDD_DATA
cmp edi, FDD_BUFF
ja @f
cmp [fd_prev_sector], 0
jz .lfndone
@ -2756,7 +2756,7 @@ fs_FloppyDelete:
pusha
call read_chs_sector
popa
mov edi, FDD_DATA+0x200
mov edi, FDD_BUFF+0x200
@@:
sub edi, 0x20
cmp byte [edi], 0xE5

View File

@ -167,10 +167,10 @@ sys_button:
mov edi,[CURRENT_TASK]
shl edi,8
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 ebx,16
add bx,word[edi+0x80000+APPDATA.wnd_clientbox.top]
add bx,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.top]
rol ebx,16
pop edi
.forced:
@ -503,7 +503,7 @@ checkbuttons:
; check that button is at top of windowing stack
movzx ebx,word [eax]
movzx ecx,word [0xC000 + ebx * 2]
movzx ecx,word [WIN_STACK + ebx * 2]
cmp ecx,[TASK_COUNT]
jne buttonnewcheck

View File

@ -116,7 +116,7 @@ create_event:
@@:
mov ecx, [CURRENT_TASK]
shl ecx,8
add ecx, PROC_BASE+APP_OBJ_OFFSET
add ecx, SLOT_BASE+APP_OBJ_OFFSET
pushfd
cli
@ -173,7 +173,7 @@ proc send_event stdcall pid:dword, event:dword
jz .fail
shl eax, 8
cmp [PROC_BASE+eax+APPDATA.ev_count], 32
cmp [SLOT_BASE+eax+APPDATA.ev_count], 32
ja .fail
mov [slot], eax
@ -189,7 +189,7 @@ proc send_event stdcall pid:dword, event:dword
rep movsd
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.destroy], destroy_event
@ -219,10 +219,10 @@ proc get_event_ex stdcall, p_ev:dword, timeout:dword
.wait:
mov edx,[CURRENT_TASK]
shl edx,8
; cmp [PROC_BASE+edx+APPDATA.ev_count], 0
; cmp [SLOT_BASE+edx+APPDATA.ev_count], 0
; je .switch
add edx, PROC_BASE+APP_EV_OFFSET
add edx, SLOT_BASE+APP_EV_OFFSET
mov eax, [edx+APPOBJ.fd]
cmp eax, edx
@ -302,7 +302,7 @@ wait_event:
mov edx,[CURRENT_TASK]
shl edx,8
add edx, PROC_BASE
add edx, SLOT_BASE
pushfd
cli ;remove event from events
@ -387,7 +387,7 @@ raise_event:
jz .done
@@:
shl eax, 8
add eax, PROC_BASE+APP_EV_OFFSET
add eax, SLOT_BASE+APP_EV_OFFSET
pushfd
cli
@ -431,7 +431,7 @@ clear_event:
jz .fail
shl eax, 8
add eax, PROC_BASE+APP_EV_OFFSET
add eax, SLOT_BASE+APP_EV_OFFSET
mov edx, [.event]
pushfd
cli ;remove event from events
@ -526,7 +526,7 @@ get_event_for_app:
test [edi+TASKDATA.event_mask],dword 2
jz no_eventoccur2
mov ecx, [CURRENT_TASK]
movzx edx,word [0xC000+ecx*2]
movzx edx,word [WIN_STACK+ecx*2]
mov eax, [TASK_COUNT]
cmp eax,edx
jne no_eventoccur2x
@ -552,7 +552,7 @@ get_event_for_app:
cmp [0xf500],byte 0
je no_eventoccur3
mov ecx, [CURRENT_TASK]
movzx edx, word [0xC000+ecx*2]
movzx edx, word [WIN_STACK+ecx*2]
mov eax, [TASK_COUNT]
cmp eax,edx
jnz no_eventoccur3
@ -577,9 +577,9 @@ get_event_for_app:
jz no_mouse_event
mov eax,[CURRENT_TASK]
shl eax,8
test [eax+0x80000+APPDATA.event_mask],dword 00100000b
test [eax+SLOT_BASE+APPDATA.event_mask],dword 00100000b
jz no_mouse_event
and [eax+0x80000+APPDATA.event_mask],dword 0xffffffff-00100000b
and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-00100000b
popad
mov eax,6
ret
@ -601,9 +601,9 @@ get_event_for_app:
jz no_ipc
mov eax,[CURRENT_TASK]
shl eax,8
test [eax+0x80000+APPDATA.event_mask],dword 01000000b
test [eax+SLOT_BASE+APPDATA.event_mask],dword 01000000b
jz no_ipc
and [eax+0x80000+APPDATA.event_mask],dword 0xffffffff-01000000b
and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-01000000b
popad
mov eax,7
ret
@ -615,9 +615,9 @@ get_event_for_app:
jz no_stack_event
mov eax,[CURRENT_TASK]
shl eax,8
test [eax+0x80000+APPDATA.event_mask],dword 10000000b
test [eax+SLOT_BASE+APPDATA.event_mask],dword 10000000b
jz no_stack_event
and [eax+0x80000+APPDATA.event_mask],dword 0xffffffff-10000000b
and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-10000000b
popad
mov eax,8
ret
@ -627,9 +627,9 @@ get_event_for_app:
jz .test_IRQ
mov eax, [CURRENT_TASK]
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
and byte [eax+0x80000+APPDATA.event_mask+1], not 1
and byte [eax+SLOT_BASE+APPDATA.event_mask+1], not 1
popad
mov eax, 9
ret
@ -637,7 +637,7 @@ get_event_for_app:
;.test_ext:
; mov eax, [CURRENT_TASK]
; 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
; popad
; mov eax, 10

View File

@ -1,9 +1,7 @@
;mouseunder:
; times 16*24 dd 0
label mouseunder dword at 0x6900
iglobal
align 4
mousepointer:
db 0x00,0x00,0x00,0x74,0x74,0x74,0x6e,0x6e,0x6e,0x6f
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
endg
endg

View File

@ -28,13 +28,13 @@ setwindowdefaults:
pushad
xor eax,eax
mov ecx,0xc000
mov ecx,WIN_STACK
@@:
inc eax
add ecx,2
mov [ecx+0x000],ax ; process no
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
popad
@ -65,7 +65,7 @@ calculatescreen:
jbe .finish
align 4
.new_wnd:
movzx edi, word [0xC400 + esi * 2]
movzx edi, word [WIN_POS + esi * 2]
shl edi, 5
cmp [CURRENT_TASK+edi+TASKDATA.state], byte 9
@ -108,7 +108,7 @@ calculatescreen:
@@:
push esi
movzx esi, word [0xC400 + esi * 2]
movzx esi, word [WIN_POS + esi * 2]
call setscreen
pop esi
@ -156,9 +156,9 @@ pushad
jz .ret
@@:
; \end{diamond}[29.08.2006]
mov edi, esi ;;;word [esi*2+0xc400]
mov edi, esi ;;;word [esi*2+WIN_POS]
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
jne .free_form
@ -912,7 +912,7 @@ windowactivate:
; if type of current active window is 3,
; it must be redrawn
mov eax, [TASK_COUNT]
movzx eax, word [0xC400 + eax*2]
movzx eax, word [WIN_POS + eax*2]
shl eax, 5
add eax, window_data
mov ebx, [eax + WDATA.cl_workarea]
@ -924,14 +924,14 @@ windowactivate:
push esi
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
waloop:
cmp esi, dword [TASK_COUNT]
jae wacont
inc esi
lea edi, [0xC000 + esi*2]
lea edi, [WIN_STACK + esi*2]
mov bx, [edi] ; position of the current process
cmp bx, ax
jbe @f
@ -945,7 +945,7 @@ windowactivate:
movzx eax, word [esi]
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
xor esi, esi
@ -954,8 +954,8 @@ windowactivate:
cmp esi, edi
jae wacont2
inc esi
movzx ebx, word [esi*2 + 0xC000]
mov [ebx*2 + 0xC400], si
movzx ebx, word [esi*2 + WIN_STACK]
mov [ebx*2 + WIN_POS], si
jmp waloop2
wacont2:
mov [0xf400], byte 0 ; empty keyboard buffer
@ -981,8 +981,8 @@ checkwindowdraw:
; esi = process number
movzx eax, word [0xC000 + esi * 2] ; get value of the curr process
lea esi, [0xC400 + eax * 2] ; get address of this process at 0xC400
movzx eax, word [WIN_STACK + esi * 2] ; get value of the curr process
lea esi, [WIN_POS + eax * 2] ; get address of this process at 0xC400
push esi
@ -993,7 +993,7 @@ checkwindowdraw:
push esi
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
ja .all_wnds_to_top
@ -1059,7 +1059,7 @@ waredraw: ; if redraw necessary at activate
; update screen info
pushad
mov edi, [TASK_COUNT] ; the last process (number)
movzx esi, word [0xC400 + edi * 2]
movzx esi, word [WIN_POS + edi * 2]
shl esi, 5
add esi, window_data
@ -1073,7 +1073,7 @@ waredraw: ; if redraw necessary at activate
add edx, ebx ; edx = y_end
mov edi, [TASK_COUNT]
movzx esi, word [0xC400 + edi * 2]
movzx esi, word [WIN_POS + edi * 2]
call setscreen
popad
@ -1096,7 +1096,7 @@ waredraw: ; if redraw necessary at activate
; eax = window number on screen
; corrupts registers and [dl*]
minimize_window:
movzx eax, word [0xC400+eax*2]
movzx eax, word [WIN_POS+eax*2]
shl eax, 5
add eax, window_data
test [eax+WDATA.fl_wstate], WSTATE_MINIMIZED
@ -1129,7 +1129,7 @@ minimize_window:
restore_minimized_window:
pushfd
cli
movzx esi, word [0xC400+eax*2]
movzx esi, word [WIN_POS+eax*2]
mov edi, esi
shl edi, 5
add edi, window_data
@ -1200,7 +1200,7 @@ checkwindows:
jb .exit
dec esi
movzx edi, word [0xC400 + esi * 2] ; ebx
movzx edi, word [WIN_POS + esi * 2] ; ebx
shl edi, 5
add edi, window_data
; mov edi, ebx
@ -1234,7 +1234,7 @@ checkwindows:
; eax = position in windowing stack
; redraw must ?
lea esi, [0xC400 + esi * 2]
lea esi, [WIN_POS + esi * 2]
call waredraw
add esp, 32
@ -1413,7 +1413,7 @@ checkwindows:
;shr edx,5
;shl edx,8
;add edx,0x80000 ; process base at 0x80000+
lea edx, [0x80000 + edx*8]
lea edx, [SLOT_BASE + edx*8]
movzx eax,word [0xfb0a]
cmp eax,[edi + WDATA.box.left]
@ -1485,7 +1485,7 @@ checkwindows:
@@: sub edi,window_data
shr edi,5
shl edi,8
add edi,0x80000+APPDATA.saved_box
add edi,SLOT_BASE+APPDATA.saved_box
cld
rep movsd
pop ecx edi esi
@ -1499,7 +1499,7 @@ checkwindows:
sub edx,window_data
shr edx,5
shl edx,8
add edx,0x80000 ; process base at 0x80000+
add edx,SLOT_BASE ; process base at 0x80000+
cmp [do_resize],2 ; window shade ?
jne no_window_shade
@ -1754,14 +1754,14 @@ random_shaped_window:
mov eax,[CURRENT_TASK]
shl eax,8
mov [eax+0x80000+APPDATA.wnd_shape],ebx
mov [eax+SLOT_BASE+APPDATA.wnd_shape],ebx
rsw_no_address:
cmp eax,1
jne rsw_no_scale
mov eax,[CURRENT_TASK]
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:
ret

View File

@ -92,9 +92,9 @@ irq1:
; mov es, ax
movzx eax,word[TASK_COUNT] ; top window process
movzx eax,word[0xC400+eax*2]
movzx eax,word[WIN_POS+eax*2]
shl eax,8
mov al,[0x80000+eax+APPDATA.keyboard_mode]
mov al,[SLOT_BASE+eax+APPDATA.keyboard_mode]
mov [keyboard_mode],al
in al,0x60

View File

@ -102,7 +102,7 @@ save_draw_mouse:
mul ecx
movzx edx, byte [display_data+ebx+eax]
shl edx, 8
mov ecx, [edx+PROC_BASE+APPDATA.cursor]
mov ecx, [edx+SLOT_BASE+APPDATA.cursor]
cmp [ecx+CURSOR.magic], 'CURS'
jne .fail
@ -114,7 +114,7 @@ save_draw_mouse:
ret
.fail:
mov ecx, [def_cursor]
mov [edx+PROC_BASE+APPDATA.cursor], ecx
mov [edx+SLOT_BASE+APPDATA.cursor], ecx
push ecx
call [set_hw_cursor]
popad

View File

@ -258,6 +258,7 @@ B32:
rep stosd
; CLEAR 0x80000-0x90000
; xor eax,eax
mov edi,0x80000
mov ecx,(0x90000-0x80000)/4
; cld
@ -607,33 +608,33 @@ include 'vmodeld.inc'
call boot_log
mov eax, fpu_data
mov dword [0x80000+APPDATA.fpu_state], eax
mov dword [0x80000+APPDATA.fpu_handler], 0
mov dword [0x80000+APPDATA.sse_handler], 0
mov dword [SLOT_BASE+APPDATA.fpu_state], eax
mov dword [SLOT_BASE+APPDATA.fpu_handler], 0
mov dword [SLOT_BASE+APPDATA.sse_handler], 0
; name for OS/IDLE process
mov dword [0x80000+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], dword 'OS/I'
mov dword [SLOT_BASE+256+APPDATA.app_name+4], dword 'DLE '
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
mov dword [0x80000+256+APPDATA.fpu_state], edi
mov dword [SLOT_BASE+256+APPDATA.fpu_state], edi
mov esi, fpu_data
mov ecx, 512/4
cld
rep movsd
mov dword [0x80000+256+APPDATA.fpu_handler], 0
mov dword [0x80000+256+APPDATA.sse_handler], 0
mov dword [SLOT_BASE+256+APPDATA.fpu_handler], 0
mov dword [SLOT_BASE+256+APPDATA.sse_handler], 0
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 dword [0x80000+256+APPDATA.fd_obj], ebx
mov dword [0x80000+256+APPDATA.bk_obj], ebx
mov ebx, SLOT_BASE+256+APP_OBJ_OFFSET
mov dword [SLOT_BASE+256+APPDATA.fd_obj], ebx
mov dword [SLOT_BASE+256+APPDATA.bk_obj], ebx
; task list
mov [TASK_DATA+TASKDATA.wnd_number], 1 ; on screen number
@ -1328,9 +1329,9 @@ draw_num_text:
; mov edi,[CURRENT_TASK]
; 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
; add ax,word[edi+0x80000+APPDATA.wnd_clientbox.left]
; add ax,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left]
; rol eax,16
mov edx,eax
@ -1341,10 +1342,10 @@ draw_num_text:
push edx ; add window start x & y
mov edx,[TASK_BASE]
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
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
pop edx
mov ebx,[esp+64+32-12+4]
@ -1741,9 +1742,9 @@ mswin:
mov edi,[CURRENT_TASK]
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
sub ax,word[edi+PROC_BASE+APPDATA.wnd_clientbox.left]
sub ax,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left]
rol eax,16
mov [esp+36],eax
ret
@ -2000,15 +2001,15 @@ sysfn_activate: ; 18.3 = ACTIVATE WINDOW
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]
je .nowindowactivate ; already active
mov edi, ebx
shl edi, 5
add edi, window_data
movzx esi, word [0xC000 + ebx * 2]
lea esi, [0xC400 + esi * 2]
movzx esi, word [WIN_STACK + ebx * 2]
lea esi, [WIN_POS + esi * 2]
call waredraw
.nowindowactivate:
ret
@ -2030,7 +2031,7 @@ sysfn_getcpuclock: ; 18.5 = GET TSC/SEC
sysfn_getactive: ; 18.7 = get active window
mov eax, [TASK_COUNT]
movzx eax, word [0xC400 + eax*2]
movzx eax, word [WIN_POS + eax*2]
mov [esp+36],eax
ret
@ -2348,7 +2349,7 @@ sys_getkey:
mov [esp+36],dword 1
; test main buffer
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]
cmp ecx,edx
jne .finish
@ -2397,7 +2398,7 @@ sys_getbutton:
mov ebx, [CURRENT_TASK] ; TOP OF WINDOW STACK
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
cmp ecx,edx
jne .exit
@ -2453,14 +2454,14 @@ sys_cpuusage:
mov ecx,[ebx]
mov [eax],ecx
pop ebx
mov cx, [0xC000 + ebx * 2]
mov cx, [WIN_STACK + ebx * 2]
mov [eax+4],cx
mov cx, [0xC400 + ebx * 2]
mov cx, [WIN_POS + ebx * 2]
mov [eax+6],cx
push eax
mov eax,ebx
shl eax,8
add eax,0x80000+APPDATA.app_name
add eax,SLOT_BASE+APPDATA.app_name
pop ebx
add ebx,10
mov ecx,11
@ -2474,7 +2475,7 @@ sys_cpuusage:
cmp ecx,1
je os_mem
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
; eax run base -> edx used memory
os_mem:
@ -2513,7 +2514,7 @@ sys_cpuusage:
mov esi,[esp]
shl esi,8
add esi,0x80000+APPDATA.wnd_clientbox
add esi,SLOT_BASE+APPDATA.wnd_clientbox
lea edi,[ebx+44]
mov ecx,4
rep movsd
@ -2732,7 +2733,7 @@ sys_drawwindow:
; parameter for drawwindow_IV
push 0
mov edi, [TASK_COUNT]
movzx edi, word [0xC400 + edi*2]
movzx edi, word [WIN_POS + edi*2]
cmp edi, [CURRENT_TASK]
jne @f
inc dword [esp]
@ -2758,7 +2759,7 @@ draw_window_caption:
xor eax,eax
mov edx,[TASK_COUNT]
movzx edx,word[0xC400+edx*2]
movzx edx,word[WIN_POS+edx*2]
cmp edx,[CURRENT_TASK]
jne @f
inc eax
@ -2794,7 +2795,7 @@ draw_window_caption:
shl edi,5
test [edi+window_data+WDATA.fl_wstyle],WSTYLE_HASCAPTION
jz @f
mov ecx,[edi*8+0x80000+APPDATA.wnd_caption]
mov ecx,[edi*8+SLOT_BASE+APPDATA.wnd_caption]
or ecx,ecx
jz @f
add ecx,[edi+twdw+TASKDATA.mem_start]
@ -2880,33 +2881,33 @@ set_window_clientbox:
movzx eax,[ecx+WDATA.fl_wstyle]
and eax,0x0F
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
neg eax
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]
and eax,0x0F
push [eax*8+window_topleft+0]
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
sub eax,[esp]
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
pop edi ecx eax
ret
@@:
xor eax,eax
mov [edi+0x80000+APPDATA.wnd_clientbox.left],eax
mov [edi+0x80000+APPDATA.wnd_clientbox.top],eax
mov [edi+SLOT_BASE+APPDATA.wnd_clientbox.left],eax
mov [edi+SLOT_BASE+APPDATA.wnd_clientbox.top],eax
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 [edi+0x80000+APPDATA.wnd_clientbox.height],eax
mov [edi+SLOT_BASE+APPDATA.wnd_clientbox.height],eax
pop edi ecx eax
ret
@ -2950,7 +2951,7 @@ sys_set_window:
sub edi,window_data
shl edi,3
add edi,0x80000
add edi,SLOT_BASE
and cl,0x0F
mov [edi+APPDATA.wnd_caption],0
@ -3004,12 +3005,12 @@ syscall_windowsettings:
; caption still can become over bounds
; diamond, 31.10.2006: check removed because with new memory manager
; 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
; cmp ebx,ecx
; 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
call draw_window_caption
@ -3072,7 +3073,7 @@ sys_window_move:
sub edi,window_data
shr edi,5
shl edi,8
add edi, 0x80000 + APPDATA.saved_box
add edi, SLOT_BASE + APPDATA.saved_box
mov ecx,4
cld
rep movsd
@ -3302,7 +3303,7 @@ checkmisc:
mov ecx, [TASK_COUNT]
set_mouse_event:
add edi, 256
or [edi+0x80000+APPDATA.event_mask], dword 00100000b
or [edi+SLOT_BASE+APPDATA.event_mask], dword 00100000b
loop set_mouse_event
mouse_not_active:
@ -4003,9 +4004,9 @@ sys_putimage:
@@:
mov edi,[CURRENT_TASK]
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
add dx,word[edi+0x80000+APPDATA.wnd_clientbox.left]
add dx,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left]
rol edx,16
.forced:
push ebp esi 0
@ -4045,9 +4046,9 @@ sys_putimage_palette:
; ebp = row delta
mov eax, [CURRENT_TASK]
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
add dx, word [eax+0x80000+APPDATA.wnd_clientbox.left]
add dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.left]
rol edx, 16
.forced:
push ebp esi ebp
@ -4106,10 +4107,10 @@ putimage_get32bpp:
__sys_drawbar:
mov esi,[CURRENT_TASK]
shl esi,8
add eax,[esi+0x80000+APPDATA.wnd_clientbox.left]
add ecx,[esi+0x80000+APPDATA.wnd_clientbox.left]
add ebx,[esi+0x80000+APPDATA.wnd_clientbox.top]
add edx,[esi+0x80000+APPDATA.wnd_clientbox.top]
add eax,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left]
add ecx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left]
add ebx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
add edx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
.forced:
inc [mouse_pause]
; call [disable_mouse]
@ -4480,7 +4481,7 @@ sys_process_def:
jne no_set_keyboard_setup
shl edi,8
mov [edi+0x80000 + APPDATA.keyboard_mode],bl
mov [edi+SLOT_BASE + APPDATA.keyboard_mode],bl
ret
@ -4490,7 +4491,7 @@ sys_process_def:
jne no_get_keyboard_setup
shl edi,8
movzx eax, byte [0x80000+edi + APPDATA.keyboard_mode]
movzx eax, byte [SLOT_BASE+edi + APPDATA.keyboard_mode]
mov [esp+36],eax
@ -4640,8 +4641,8 @@ syscall_setpixel: ; SetPixel
add ebx,[edx-twdw+WDATA.box.top]
mov edi,[CURRENT_TASK]
shl edi,8
add eax,[edi+0x80000+APPDATA.wnd_clientbox.left]
add ebx,[edi+0x80000+APPDATA.wnd_clientbox.top]
add eax,[edi+SLOT_BASE+APPDATA.wnd_clientbox.left]
add ebx,[edi+SLOT_BASE+APPDATA.wnd_clientbox.top]
xor edi,edi ; no force
; mov edi,1
call [disable_mouse]
@ -4656,10 +4657,10 @@ syscall_writetext: ; WriteText
push esi
mov esi,[CURRENT_TASK]
shl esi,8
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.left]
add ebp,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left]
shl ebp,16
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
add ecx,[edi+TASKDATA.mem_start]
add eax,ebp
@ -4696,8 +4697,8 @@ syscall_drawrect: ; DrawRect
shr ebx,16
mov esi,[CURRENT_TASK]
shl esi,8
add eax,[esi+0x80000+APPDATA.wnd_clientbox.left]
add ebx,[esi+0x80000+APPDATA.wnd_clientbox.top]
add eax,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left]
add ebx,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
add ecx,eax
add edx,ebx
jmp [drawbar]
@ -4778,15 +4779,15 @@ syscall_drawline: ; DrawLine
mov ebp,edx
mov esi,[CURRENT_TASK]
shl esi,8
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.left]
add dx,word[esi+0x80000+APPDATA.wnd_clientbox.left]
add ebp,[esi+SLOT_BASE+APPDATA.wnd_clientbox.left]
add dx,word[esi+SLOT_BASE+APPDATA.wnd_clientbox.left]
shl edx,16
add ebp,edx
movzx edx,word[edi-twdw+WDATA.box.top]
add eax,ebp
mov ebp,edx
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.top]
add dx,word[esi+0x80000+APPDATA.wnd_clientbox.top]
add ebp,[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
add dx,word[esi+SLOT_BASE+APPDATA.wnd_clientbox.top]
shl edx,16
xor edi,edi
add edx,ebp

View File

@ -1069,7 +1069,7 @@ news:
foundPID1:
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

View File

@ -153,7 +153,7 @@ newsearch:
foundPID:
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

View File

@ -269,13 +269,13 @@ proc set_cursor stdcall, hcursor:dword
; jne .fail
mov ebx, [CURRENT_TASK]
shl ebx, 8
xchg eax, [ebx+PROC_BASE+APPDATA.cursor]
xchg eax, [ebx+SLOT_BASE+APPDATA.cursor]
ret
.fail:
mov eax, [def_cursor]
mov ebx, [CURRENT_TASK]
shl ebx, 8
xchg eax, [ebx+PROC_BASE+APPDATA.cursor]
xchg eax, [ebx+SLOT_BASE+APPDATA.cursor]
ret
endp
@ -400,10 +400,10 @@ proc delete_cursor stdcall, hcursor:dword
mov ebx, [CURRENT_TASK]
shl ebx, 8
cmp esi, [ebx+PROC_BASE+APPDATA.cursor]
cmp esi, [ebx+SLOT_BASE+APPDATA.cursor]
jne @F
mov eax, [def_cursor]
mov [ebx+PROC_BASE+APPDATA.cursor], eax
mov [ebx+SLOT_BASE+APPDATA.cursor], eax
@@:
mov eax, [hcursor]
call [eax+APPOBJ.destroy]