Rename fields in SYSCALL_STACK struct: _eax -> eax, etc

git-svn-id: svn://kolibrios.org@9831 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Ivan Baravy 2022-06-05 14:41:51 +00:00
parent b66e372685
commit a9d195b964
8 changed files with 134 additions and 134 deletions

View File

@ -363,15 +363,15 @@ SYSTEM_RESTART = 4
BLIT_CLIENT_RELATIVE = 0x20000000 BLIT_CLIENT_RELATIVE = 0x20000000
struct SYSCALL_STACK struct SYSCALL_STACK
_eip dd ? eip dd ? ; +0
_edi dd ? ; +4 edi dd ? ; +4
_esi dd ? ; +8 esi dd ? ; +8
_ebp dd ? ; +12 ebp dd ? ; +12
_esp dd ? ; +16 esp dd ? ; +16
_ebx dd ? ; +20 ebx dd ? ; +20
_edx dd ? ; +24 edx dd ? ; +24
_ecx dd ? ; +28 ecx dd ? ; +28
_eax dd ? ; +32 eax dd ? ; +32
ends ends
struct LHEAD struct LHEAD

View File

@ -1109,22 +1109,22 @@ f68:
jmp dword [f68call + ebx*4-11*4] jmp dword [f68call + ebx*4-11*4]
.11: .11:
call init_heap call init_heap
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.12: .12:
stdcall user_alloc, ecx stdcall user_alloc, ecx
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.13: .13:
stdcall user_free, ecx stdcall user_free, ecx
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.14: .14:
cmp ecx, OS_BASE cmp ecx, OS_BASE
jae .fail jae .fail
mov edi, ecx mov edi, ecx
call get_event_ex call get_event_ex
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.16: .16:
test ecx, ecx test ecx, ecx
@ -1132,11 +1132,11 @@ f68:
cmp ecx, OS_BASE cmp ecx, OS_BASE
jae .fail jae .fail
stdcall get_service, ecx stdcall get_service, ecx
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.17: .17:
call srv_handlerEx ;ecx call srv_handlerEx ;ecx
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.18: .18:
mov eax, edx mov eax, edx
@ -1144,13 +1144,13 @@ f68:
stdcall is_string_userspace, ecx stdcall is_string_userspace, ecx
jnz .fail jnz .fail
stdcall load_library, ecx, eax stdcall load_library, ecx, eax
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.20: .20:
mov eax, edx mov eax, edx
mov ebx, ecx mov ebx, ecx
call user_realloc ;in: eax = pointer, ebx = new size call user_realloc ;in: eax = pointer, ebx = new size
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.21: .21:
cmp ecx, OS_BASE cmp ecx, OS_BASE
@ -1158,48 +1158,48 @@ f68:
cmp edx, OS_BASE cmp edx, OS_BASE
jae .fail jae .fail
stdcall load_pe_driver, ecx, edx stdcall load_pe_driver, ecx, edx
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.22: .22:
cmp ecx, OS_BASE cmp ecx, OS_BASE
jae .fail jae .fail
stdcall shmem_open, ecx, edx, esi stdcall shmem_open, ecx, edx, esi
mov [esp + SYSCALL_STACK._edx], edx mov [esp + SYSCALL_STACK.edx], edx
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.23: .23:
cmp ecx, OS_BASE cmp ecx, OS_BASE
jae .fail jae .fail
stdcall shmem_close, ecx stdcall shmem_close, ecx
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.24: .24:
mov eax, [current_slot] mov eax, [current_slot]
xchg ecx, [eax + APPDATA.exc_handler] xchg ecx, [eax + APPDATA.exc_handler]
xchg edx, [eax + APPDATA.except_mask] xchg edx, [eax + APPDATA.except_mask]
mov [esp + SYSCALL_STACK._ebx], edx mov [esp + SYSCALL_STACK.ebx], edx
mov [esp + SYSCALL_STACK._eax], ecx mov [esp + SYSCALL_STACK.eax], ecx
ret ret
.25: .25:
cmp ecx, 32 cmp ecx, 32
jae .fail jae .fail
mov eax, [current_slot] mov eax, [current_slot]
btr [eax + APPDATA.except_mask], ecx btr [eax + APPDATA.except_mask], ecx
setc byte[esp + SYSCALL_STACK._eax] setc byte[esp + SYSCALL_STACK.eax]
jecxz @f jecxz @f
bts [eax + APPDATA.except_mask], ecx bts [eax + APPDATA.except_mask], ecx
@@: @@:
ret ret
.26: .26:
stdcall user_unmap, ecx, edx, esi stdcall user_unmap, ecx, edx, esi
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.27: .27:
cmp ecx, OS_BASE cmp ecx, OS_BASE
jae .fail jae .fail
stdcall load_file_umode, ecx stdcall load_file_umode, ecx
mov [esp + SYSCALL_STACK._edx], edx mov [esp + SYSCALL_STACK.edx], edx
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.28: .28:
cmp ecx, OS_BASE cmp ecx, OS_BASE
@ -1214,15 +1214,15 @@ f68:
test eax, eax test eax, eax
jz @f jz @f
stdcall load_file_umode, ebp stdcall load_file_umode, ebp
mov [esp + SYSCALL_STACK._edx], edx mov [esp + SYSCALL_STACK.edx], edx
@@: @@:
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
stdcall kernel_free, ebp stdcall kernel_free, ebp
ret ret
.29: .29:
stdcall user_ring, ecx stdcall user_ring, ecx
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
; unload driver ; unload driver
@ -1261,7 +1261,7 @@ f68:
stdcall free, ecx stdcall free, ecx
;dec [count_services] ;dec [count_services]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.31: ; get list service .31: ; get list service
test ecx, ecx test ecx, ecx
@ -1271,9 +1271,9 @@ f68:
mov ebx, [srv.fd] mov ebx, [srv.fd]
mov ecx, [srv.bk] mov ecx, [srv.bk]
mov [esp + SYSCALL_STACK._ebx], ebx ;fd mov [esp + SYSCALL_STACK.ebx], ebx ;fd
mov [esp + SYSCALL_STACK._ecx], ecx ;bk mov [esp + SYSCALL_STACK.ecx], ecx ;bk
mov [esp + SYSCALL_STACK._eax], 0 mov [esp + SYSCALL_STACK.eax], 0
ret ret
@@: @@:
dec ecx dec ecx
@ -1304,7 +1304,7 @@ f68:
xor eax, eax xor eax, eax
.fail: .fail:
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
align 4 align 4

View File

@ -388,7 +388,7 @@ sys_resize_app_memory:
@@: @@:
stdcall new_mem_resize, ecx stdcall new_mem_resize, ecx
.store_result: .store_result:
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
.no_application_mem_resize: .no_application_mem_resize:
ret ret

View File

@ -718,7 +718,7 @@ dd .loadCursorUni
mov eax, [MOUSE_X] mov eax, [MOUSE_X]
shl eax, 16 shl eax, 16
mov ax, [MOUSE_Y] mov ax, [MOUSE_Y]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
@@: @@:
ret ret
@ -737,24 +737,24 @@ dd .loadCursorUni
rol eax, 16 rol eax, 16
sub ax, word[edi + APPDATA.wnd_clientbox.left] sub ax, word[edi + APPDATA.wnd_clientbox.left]
rol eax, 16 rol eax, 16
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.msbutton: .msbutton:
movzx eax, byte [BTN_DOWN] movzx eax, byte [BTN_DOWN]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.msbuttonExt: .msbuttonExt:
mov eax, [BTN_DOWN] mov eax, [BTN_DOWN]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.app_load_cursor: .app_load_cursor:
cmp ecx, OS_BASE cmp ecx, OS_BASE
jae @f jae @f
stdcall load_cursor, ecx, edx stdcall load_cursor, ecx, edx
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
@@: @@:
ret ret
@ -771,19 +771,19 @@ dd .loadCursorUni
test eax, eax test eax, eax
jz @f jz @f
stdcall load_cursor, ebp, LOAD_FROM_FILE stdcall load_cursor, ebp, LOAD_FROM_FILE
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
@@: @@:
stdcall kernel_free, ebp stdcall kernel_free, ebp
ret ret
.app_set_cursor: .app_set_cursor:
stdcall set_cursor, ecx stdcall set_cursor, ecx
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.app_delete_cursor: .app_delete_cursor:
stdcall delete_cursor, ecx stdcall delete_cursor, ecx
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.msz: .msz:
@ -794,10 +794,10 @@ dd .loadCursorUni
mov ax, [MOUSE_SCROLL_H] mov ax, [MOUSE_SCROLL_H]
shl eax, 16 shl eax, 16
mov ax, [MOUSE_SCROLL_V] mov ax, [MOUSE_SCROLL_V]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
and [MOUSE_SCROLL_H], word 0 and [MOUSE_SCROLL_H], word 0
and [MOUSE_SCROLL_V], word 0 and [MOUSE_SCROLL_V], word 0
ret ret
@@: @@:
and [esp + SYSCALL_STACK._eax], dword 0 and [esp + SYSCALL_STACK.eax], dword 0
ret ret

View File

@ -1584,7 +1584,7 @@ sys_setup:
; 11 = enable lba read ; 11 = enable lba read
; 12 = enable pci access ; 12 = enable pci access
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
and [esp + SYSCALL_STACK._eax], dword 0 and [esp + SYSCALL_STACK.eax], dword 0
; F.21.1 - set MPU MIDI base port ; F.21.1 - set MPU MIDI base port
dec ebx dec ebx
jnz @f jnz @f
@ -1671,7 +1671,7 @@ sys_setup:
ret ret
;-------------------------------------- ;--------------------------------------
.error: .error:
or [esp + SYSCALL_STACK._eax], dword -1 or [esp + SYSCALL_STACK.eax], dword -1
ret ret
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
align 4 align 4
@ -1694,7 +1694,7 @@ sys_getsetup:
jnz @f jnz @f
movzx eax, [midi_base] movzx eax, [midi_base]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;-------------------------------------- ;--------------------------------------
@@: @@:
@ -1741,11 +1741,11 @@ sys_getsetup:
jnz .error jnz .error
movzx eax, word [keyboard] movzx eax, word [keyboard]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.addr_error: ; if given memory address is illegal .addr_error: ; if given memory address is illegal
or dword [esp + SYSCALL_STACK._eax], -1 or dword [esp + SYSCALL_STACK.eax], -1
ret ret
;-------------------------------------- ;--------------------------------------
@@: @@:
@ -1754,7 +1754,7 @@ sys_getsetup:
jnz @f jnz @f
mov eax, [syslang] mov eax, [syslang]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;-------------------------------------- ;--------------------------------------
@@: @@:
@ -1763,7 +1763,7 @@ sys_getsetup:
jnz @f jnz @f
mov eax, [timer_ticks] mov eax, [timer_ticks]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;-------------------------------------- ;--------------------------------------
@@: @@:
@ -1772,8 +1772,8 @@ sys_getsetup:
jnz @f jnz @f
call get_clock_ns call get_clock_ns
mov [esp + SYSCALL_STACK._edx], edx mov [esp + SYSCALL_STACK.edx], edx
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;-------------------------------------- ;--------------------------------------
@@: @@:
@ -1782,7 +1782,7 @@ sys_getsetup:
jnz @f jnz @f
mov eax, [lba_read_enabled] mov eax, [lba_read_enabled]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;-------------------------------------- ;--------------------------------------
@@: @@:
@ -1791,11 +1791,11 @@ sys_getsetup:
jnz .error jnz .error
mov eax, [pci_access_enabled] mov eax, [pci_access_enabled]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;-------------------------------------- ;--------------------------------------
.error: .error:
or [esp + SYSCALL_STACK._eax], dword -1 or [esp + SYSCALL_STACK.eax], dword -1
ret ret
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
get_timer_ticks: get_timer_ticks:
@ -2006,7 +2006,7 @@ sysfn_shutdown: ; 18.9 = system shutdown
mov [SYS_SHUTDOWN], al mov [SYS_SHUTDOWN], al
mov [shutdown_processes], eax mov [shutdown_processes], eax
call wakeup_osloop call wakeup_osloop
and dword [esp + SYSCALL_STACK._eax], 0 and dword [esp + SYSCALL_STACK.eax], 0
exit_for_anyone: exit_for_anyone:
ret ret
uglobal uglobal
@ -2093,11 +2093,11 @@ sysfn_terminate2:
call sysfn_terminate call sysfn_terminate
call unlock_application_table call unlock_application_table
sti sti
and dword [esp + SYSCALL_STACK._eax], 0 and dword [esp + SYSCALL_STACK.eax], 0
ret ret
.not_found: .not_found:
call unlock_application_table call unlock_application_table
or dword [esp + SYSCALL_STACK._eax], -1 or dword [esp + SYSCALL_STACK.eax], -1
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
sysfn_deactivate: ; 18.1 = DEACTIVATE WINDOW sysfn_deactivate: ; 18.1 = DEACTIVATE WINDOW
@ -2216,19 +2216,19 @@ sysfn_zmodif:
.fail: .fail:
xor eax, eax xor eax, eax
.exit: .exit:
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
sysfn_getidletime: ; 18.4 = GET IDLETIME sysfn_getidletime: ; 18.4 = GET IDLETIME
;mov eax, [TASK_TABLE+32+TASKDATA.cpu_usage] ;mov eax, [TASK_TABLE+32+TASKDATA.cpu_usage]
mov eax, [SLOT_BASE + APPDATA.cpu_usage] mov eax, [SLOT_BASE + APPDATA.cpu_usage]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
sysfn_getcpuclock: ; 18.5 = GET TSC/SEC sysfn_getcpuclock: ; 18.5 = GET TSC/SEC
mov eax, dword [cpu_freq] mov eax, dword [cpu_freq]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
get_cpu_freq: get_cpu_freq:
@ -2244,7 +2244,7 @@ align 4
sysfn_getactive: ; 18.7 = get active window sysfn_getactive: ; 18.7 = get active window
mov eax, [thread_count] mov eax, [thread_count]
movzx eax, word [WIN_POS + eax*2] movzx eax, word [WIN_POS + eax*2]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
sysfn_sound_flag: ; 18.8 = get/set sound_flag sysfn_sound_flag: ; 18.8 = get/set sound_flag
@ -2252,7 +2252,7 @@ sysfn_sound_flag: ; 18.8 = get/set sound_flag
dec ecx dec ecx
jnz nogetsoundflag jnz nogetsoundflag
movzx eax, byte [sound_flag]; get sound_flag movzx eax, byte [sound_flag]; get sound_flag
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
nogetsoundflag: nogetsoundflag:
; cmp ecx,2 ; cmp ecx,2
@ -2293,7 +2293,7 @@ sysfn_getversion: ; 18.13 = get kernel ID and version
rep movsb rep movsb
ret ret
.addr_error: ; if given memory address is illegal .addr_error: ; if given memory address is illegal
mov dword [esp + SYSCALL_STACK._eax], -1 mov dword [esp + SYSCALL_STACK.eax], -1
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
sysfn_waitretrace: ; 18.14 = sys wait retrace sysfn_waitretrace: ; 18.14 = sys wait retrace
@ -2304,7 +2304,7 @@ sysfn_waitretrace: ; 18.14 = sys wait retrace
in al, dx in al, dx
test al, 1000b test al, 1000b
jz WaitRetrace_loop jz WaitRetrace_loop
and [esp + SYSCALL_STACK._eax], dword 0 and [esp + SYSCALL_STACK.eax], dword 0
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
@ -2317,7 +2317,7 @@ sysfn_centermouse: ; 18.15 = mouse centered
mov [MOUSE_Y], ax mov [MOUSE_Y], ax
call wakeup_osloop call wakeup_osloop
xor eax, eax xor eax, eax
and [esp + SYSCALL_STACK._eax], eax and [esp + SYSCALL_STACK.eax], eax
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
sysfn_mouse_acceleration: ; 18.19 = set/get mouse features sysfn_mouse_acceleration: ; 18.19 = set/get mouse features
@ -2327,7 +2327,7 @@ sysfn_mouse_acceleration: ; 18.19 = set/get mouse features
.get_mouse_acceleration: .get_mouse_acceleration:
xor eax, eax xor eax, eax
mov ax, [mouse_speed_factor] mov ax, [mouse_speed_factor]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.set_mouse_acceleration: .set_mouse_acceleration:
mov [mouse_speed_factor], dx mov [mouse_speed_factor], dx
@ -2335,7 +2335,7 @@ sysfn_mouse_acceleration: ; 18.19 = set/get mouse features
.get_mouse_delay: .get_mouse_delay:
xor eax, eax xor eax, eax
mov al, [mouse_delay] mov al, [mouse_delay]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.set_mouse_delay: .set_mouse_delay:
mov [mouse_delay], dl mov [mouse_delay], dl
@ -2357,7 +2357,7 @@ sysfn_mouse_acceleration: ; 18.19 = set/get mouse features
.get_doubleclick_delay: .get_doubleclick_delay:
xor eax, eax xor eax, eax
mov al, [mouse_doubleclick_delay] mov al, [mouse_doubleclick_delay]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.set_doubleclick_delay: .set_doubleclick_delay:
mov [mouse_doubleclick_delay], dl mov [mouse_doubleclick_delay], dl
@ -2376,19 +2376,19 @@ dd .set_doubleclick_delay
sysfn_getfreemem: sysfn_getfreemem:
mov eax, [pg_data.pages_free] mov eax, [pg_data.pages_free]
shl eax, 2 shl eax, 2
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
sysfn_getallmem: sysfn_getallmem:
mov eax, [MEM_AMOUNT] mov eax, [MEM_AMOUNT]
shr eax, 10 shr eax, 10
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
sysfn_pid_to_slot: sysfn_pid_to_slot:
mov eax, ecx mov eax, ecx
call pid_to_slot call pid_to_slot
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
sysfn_min_rest_window: sysfn_min_rest_window:
@ -2413,18 +2413,18 @@ sysfn_min_rest_window:
.exit: .exit:
popad popad
xor eax, eax xor eax, eax
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.error: .error:
popad popad
xor eax, eax xor eax, eax
dec eax dec eax
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
sysfn_min_windows: sysfn_min_windows:
call minimize_all_window call minimize_all_window
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
call change_task call change_task
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
@ -2487,10 +2487,10 @@ sys_cachetodiskette:
cmp ebx, 2 cmp ebx, 2
ja .no_floppy_save ja .no_floppy_save
call save_image call save_image
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.no_floppy_save: .no_floppy_save:
mov [esp + SYSCALL_STACK._eax], dword 1 mov [esp + SYSCALL_STACK.eax], dword 1
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
@ -2524,7 +2524,7 @@ sys_getkey:
;-------------------------------------- ;--------------------------------------
align 4 align 4
.ret_eax: .ret_eax:
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;-------------------------------------- ;--------------------------------------
align 4 align 4
@ -2554,7 +2554,7 @@ align 4
align 4 align 4
sys_getbutton: sys_getbutton:
mov ebx, [current_slot_idx] ; TOP OF WINDOW STACK mov ebx, [current_slot_idx] ; TOP OF WINDOW STACK
mov [esp + SYSCALL_STACK._eax], dword 1 mov [esp + SYSCALL_STACK.eax], dword 1
movzx ecx, word [WIN_STACK + ebx * 2] movzx ecx, word [WIN_STACK + ebx * 2]
mov edx, [thread_count] ; less than 256 processes mov edx, [thread_count] ; less than 256 processes
cmp ecx, edx cmp ecx, edx
@ -2565,7 +2565,7 @@ sys_getbutton:
mov eax, [BTN_BUFF] mov eax, [BTN_BUFF]
and al, 0xFE ; delete left button bit and al, 0xFE ; delete left button bit
mov [BTN_COUNT], byte 0 mov [BTN_COUNT], byte 0
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
;-------------------------------------- ;--------------------------------------
align 4 align 4
.exit: .exit:
@ -2676,11 +2676,11 @@ sys_cpuusage:
; return number of processes ; return number of processes
mov eax, [thread_count] mov eax, [thread_count]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.addr_error: ; if given memory address is illegal .addr_error: ; if given memory address is illegal
mov dword [esp + SYSCALL_STACK._eax], -1 mov dword [esp + SYSCALL_STACK.eax], -1
ret ret
@ -2774,7 +2774,7 @@ sys_sheduler:
;.shed_counter: ;.shed_counter:
.00: .00:
mov eax, [context_counter] mov eax, [context_counter]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.02: .02:
@ -2804,8 +2804,8 @@ sys_sheduler:
mov eax, esi mov eax, esi
mov ecx, edx mov ecx, edx
rdmsr rdmsr
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
mov [esp + SYSCALL_STACK._ebx], edx ;ret in ebx? mov [esp + SYSCALL_STACK.ebx], edx ;ret in ebx?
ret ret
.04: .04:
@ -2834,25 +2834,25 @@ sys_sheduler:
cache_disable: cache_disable:
mov eax, cr0 mov eax, cr0
or eax, 01100000000000000000000000000000b or eax, 01100000_00000000_00000000_00000000b
mov cr0, eax mov cr0, eax
wbinvd ;set MESI wbinvd ;set MESI
ret ret
cache_enable: cache_enable:
mov eax, cr0 mov eax, cr0
and eax, 10011111111111111111111111111111b and eax, 10011111_11111111_11111111_11111111b
mov cr0, eax mov cr0, eax
ret ret
is_cache_enabled: is_cache_enabled:
mov eax, cr0 mov eax, cr0
mov ebx, eax mov ebx, eax
and eax, 01100000000000000000000000000000b and eax, 01100000_00000000_00000000_00000000b
jz cache_disabled jz cache_disabled
mov [esp + SYSCALL_STACK._eax], ebx mov [esp + SYSCALL_STACK.eax], ebx
cache_disabled: cache_disabled:
mov dword [esp + SYSCALL_STACK._eax], eax;0 mov dword [esp + SYSCALL_STACK.eax], eax;0
ret ret
modify_pce: modify_pce:
@ -2862,7 +2862,7 @@ modify_pce:
; xor eax,ebx ;invert pce ; xor eax,ebx ;invert pce
bts eax, 8;pce=cr4[8] bts eax, 8;pce=cr4[8]
mov cr4, eax mov cr4, eax
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;--------------------------------------------------------------------------------------------- ;---------------------------------------------------------------------------------------------
@ -3377,7 +3377,7 @@ align 4
set_app_param: set_app_param:
mov edi, [current_slot] mov edi, [current_slot]
xchg ebx, [edi + APPDATA.event_mask] ; set new event mask xchg ebx, [edi + APPDATA.event_mask] ; set new event mask
mov [esp + SYSCALL_STACK._eax], ebx ; return old mask value mov [esp + SYSCALL_STACK.eax], ebx ; return old mask value
ret ret
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
@ -3511,7 +3511,7 @@ align 4
syscall_reserveportarea: ; ReservePortArea and FreePortArea syscall_reserveportarea: ; ReservePortArea and FreePortArea
call r_f_port_area call r_f_port_area
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;reserve/free group of ports ;reserve/free group of ports
@ -4227,7 +4227,7 @@ end if
ret ret
@@: @@:
mov [esp + SYSCALL_STACK._eax], ecx mov [esp + SYSCALL_STACK.eax], ecx
mov [esp+20], ecx mov [esp+20], ecx
jmp .ret jmp .ret
@ -4242,7 +4242,7 @@ end if
movzx edx, byte [ebx] movzx edx, byte [ebx]
call memmove call memmove
dec [msg_board_count] dec [msg_board_count]
mov [esp + SYSCALL_STACK._eax], edx ;eax mov [esp + SYSCALL_STACK.eax], edx ;eax
mov [esp + 20], dword 1 mov [esp + 20], dword 1
ret ret
@ -4273,7 +4273,7 @@ sys_process_def:
jmp dword [f66call + ebx*4] jmp dword [f66call + ebx*4]
.not_support: .not_support:
or [esp + SYSCALL_STACK._eax], -1 or [esp + SYSCALL_STACK.eax], -1
ret ret
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
align 4 align 4
@ -4284,13 +4284,13 @@ align 4
align 4 align 4
.2: ; 2 = get keyboard mode .2: ; 2 = get keyboard mode
movzx eax, byte [edi + APPDATA.keyboard_mode] movzx eax, byte [edi + APPDATA.keyboard_mode]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
align 4 align 4
.3: ;3 = get keyboard ctrl, alt, shift .3: ;3 = get keyboard ctrl, alt, shift
mov eax, [kb_state] mov eax, [kb_state]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
align 4 align 4
@ -4303,7 +4303,7 @@ align 4
add eax, 16 add eax, 16
cmp eax, hotkey_list+16*256 cmp eax, hotkey_list+16*256
jb @b jb @b
mov dword [esp + SYSCALL_STACK._eax], 1 mov dword [esp + SYSCALL_STACK.eax], 1
ret ret
.found_free: .found_free:
mov [eax + 8], edi mov [eax + 8], edi
@ -4318,7 +4318,7 @@ align 4
jz @f jz @f
mov [edx + 12], eax mov [edx + 12], eax
@@: @@:
and dword [esp + SYSCALL_STACK._eax], 0 and dword [esp + SYSCALL_STACK.eax], 0
ret ret
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
align 4 align 4
@ -4338,7 +4338,7 @@ align 4
mov eax, [eax] mov eax, [eax]
jmp .scan jmp .scan
.notfound: .notfound:
mov dword [esp + SYSCALL_STACK._eax], 1 mov dword [esp + SYSCALL_STACK.eax], 1
ret ret
.found: .found:
mov ecx, [eax] mov ecx, [eax]
@ -4354,7 +4354,7 @@ align 4
mov [eax + 8], edx mov [eax + 8], edx
mov [eax + 12], edx mov [eax + 12], edx
mov [eax], edx mov [eax], edx
mov [esp + SYSCALL_STACK._eax], edx mov [esp + SYSCALL_STACK.eax], edx
ret ret
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
align 4 align 4
@ -4415,7 +4415,7 @@ sys_gs: ; direct screen access
ja .not_support ja .not_support
jmp dword [f61call + ebx*4] jmp dword [f61call + ebx*4]
.not_support: .not_support:
or [esp + SYSCALL_STACK._eax], dword -1 or [esp + SYSCALL_STACK.eax], dword -1
ret ret
@ -4423,15 +4423,15 @@ sys_gs: ; direct screen access
mov eax, [_display.width] mov eax, [_display.width]
shl eax, 16 shl eax, 16
mov ax, word [_display.height] mov ax, word [_display.height]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.2: ; bits per pixel .2: ; bits per pixel
mov eax, [_display.bits_per_pixel] mov eax, [_display.bits_per_pixel]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.3: ; bytes per scanline .3: ; bytes per scanline
mov eax, [_display.lfb_pitch] mov eax, [_display.lfb_pitch]
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
align 4 align 4
@ -4441,7 +4441,7 @@ syscall_getscreensize: ; GetScreenSize
shl eax, 16 shl eax, 16
mov ax, word [_display.height] mov ax, word [_display.height]
dec ax dec ax
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
align 4 align 4
@ -4531,7 +4531,7 @@ align 4
;-------------------------------------- ;--------------------------------------
align 4 align 4
.store: .store:
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
align 4 align 4
@ -4544,7 +4544,7 @@ syscall_getpixel: ; GetPixel
xchg eax, ebx xchg eax, ebx
and ecx, 0xFBFFFFFF ;negate 0x04000000 use mouseunder area and ecx, 0xFBFFFFFF ;negate 0x04000000 use mouseunder area
call dword [GETPIXEL]; eax - x, ebx - y call dword [GETPIXEL]; eax - x, ebx - y
mov [esp + SYSCALL_STACK._eax], ecx mov [esp + SYSCALL_STACK.eax], ecx
ret ret
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
align 4 align 4
@ -4630,7 +4630,7 @@ syscall_threads: ; CreateThreads
xor ebx, ebx xor ebx, ebx
call new_sys_threads call new_sys_threads
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
@ -4788,7 +4788,7 @@ sys_apm:
align 4 align 4
undefined_syscall: ; Undefined system call undefined_syscall: ; Undefined system call
mov [esp + SYSCALL_STACK._eax], dword -1 mov [esp + SYSCALL_STACK.eax], dword -1
ret ret
align 4 align 4

View File

@ -81,7 +81,7 @@ sys_futex:
.cmp_requeue: .cmp_requeue:
.wait_bitset: .wait_bitset:
.wake_bitset: .wake_bitset:
mov [esp + SYSCALL_STACK._eax], -1 mov [esp + SYSCALL_STACK.eax], -1
ret ret
align 4 align 4
@ -91,7 +91,7 @@ align 4
jz @F jz @F
mov eax, [eax + FUTEX.handle] mov eax, [eax + FUTEX.handle]
@@: @@:
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
align 4 align 4
@ -101,7 +101,7 @@ align 4
.destroy: .destroy:
mov ecx, ebp mov ecx, ebp
call destroy_futex call destroy_futex
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
align 4 align 4
@ -118,7 +118,7 @@ align 4
lock cmpxchg [ecx], edx lock cmpxchg [ecx], edx
je .wait_slow je .wait_slow
mov [esp + SYSCALL_STACK._eax], -2 mov [esp + SYSCALL_STACK.eax], -2
ret ret
.wait_slow: .wait_slow:
@ -143,7 +143,7 @@ align 4
add esp, sizeof.MUTEX_WAITER add esp, sizeof.MUTEX_WAITER
popfd popfd
mov [esp + SYSCALL_STACK._eax], 0 mov [esp + SYSCALL_STACK.eax], 0
ret ret
align 4 align 4
@ -159,7 +159,7 @@ align 4
lock cmpxchg [ecx], edx ;wait until old_value == new_value lock cmpxchg [ecx], edx ;wait until old_value == new_value
je .wait_slow_timeout je .wait_slow_timeout
mov [esp + SYSCALL_STACK._eax], -2 mov [esp + SYSCALL_STACK.eax], -2
ret ret
align 4 align 4
@ -200,7 +200,7 @@ align 4
add esp, sizeof.MUTEX_WAITER add esp, sizeof.MUTEX_WAITER
popfd popfd
mov [esp + SYSCALL_STACK._eax], 0 mov [esp + SYSCALL_STACK.eax], 0
ret ret
.timeout: .timeout:
@ -208,7 +208,7 @@ align 4
add esp, sizeof.MUTEX_WAITER add esp, sizeof.MUTEX_WAITER
popfd popfd
mov [esp + SYSCALL_STACK._eax], -1 mov [esp + SYSCALL_STACK.eax], -1
ret ret
@ -239,6 +239,6 @@ align 4
jb .again_wake jb .again_wake
.done: .done:
popfd popfd
mov [esp + SYSCALL_STACK._eax], ecx mov [esp + SYSCALL_STACK.eax], ecx
ret ret

View File

@ -115,7 +115,7 @@ sys_pipe2:
add esp, 5*4 add esp, 5*4
pop ebp pop ebp
xor eax, eax xor eax, eax
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.err_3: .err_3:
mov eax, ebp mov eax, ebp
@ -132,7 +132,7 @@ sys_pipe2:
.fail: .fail:
mov eax, ebp mov eax, ebp
pop ebp pop ebp
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
purge .pipeflags purge .pipeflags
@ -169,7 +169,7 @@ pipe_read:
.read: .read:
mov esi, [ebp + PIPE.buffer] mov esi, [ebp + PIPE.buffer]
add esi, [ebp + PIPE.read_end] add esi, [ebp + PIPE.read_end]
mov [esp + SYSCALL_STACK._eax], ecx mov [esp + SYSCALL_STACK.eax], ecx
sub [ebp + PIPE.count], ecx sub [ebp + PIPE.count], ecx
cld cld
rep movsb rep movsb
@ -223,7 +223,7 @@ pipe_read:
jmp .again jmp .again
.eof: .eof:
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
lea ecx, [ebp + PIPE.pipe_lock] lea ecx, [ebp + PIPE.pipe_lock]
call mutex_unlock call mutex_unlock
ret ret
@ -297,7 +297,7 @@ pipe_write:
jnz .again jnz .again
pop eax ; written pop eax ; written
mov [esp + SYSCALL_STACK._eax], eax mov [esp + SYSCALL_STACK.eax], eax
ret ret
.wait: .wait:
@ -330,10 +330,10 @@ pipe_write:
call mutex_unlock call mutex_unlock
add esp, 4 add esp, 4
mov [esp + SYSCALL_STACK._eax], -EPIPE mov [esp + SYSCALL_STACK.eax], -EPIPE
ret ret
align 4 align 4
pipe_close: pipe_close:
mov [esp + SYSCALL_STACK._eax], -EBADF mov [esp + SYSCALL_STACK.eax], -EBADF
ret ret

View File

@ -64,7 +64,7 @@ sys_posix:
jmp dword [sys_posix_call + ebx*4] jmp dword [sys_posix_call + ebx*4]
.fail: .fail:
mov [esp + SYSCALL_STACK._eax], -EBADF mov [esp + SYSCALL_STACK.eax], -EBADF
ret ret
@ -95,7 +95,7 @@ sys_read:
mov eax, [ebp] mov eax, [ebp]
jmp dword [eax + FILEOP_READ*4] jmp dword [eax + FILEOP_READ*4]
.fail: .fail:
mov [esp + SYSCALL_STACK._eax], -EBADF mov [esp + SYSCALL_STACK.eax], -EBADF
ret ret
;ssize_t write(int fd, const void *buf, size_t count); ;ssize_t write(int fd, const void *buf, size_t count);
@ -124,6 +124,6 @@ sys_write:
mov eax, [ebp] mov eax, [ebp]
jmp dword [eax + FILEOP_WRITE*4] jmp dword [eax + FILEOP_WRITE*4]
.fail: .fail:
mov [esp + SYSCALL_STACK._eax], -EBADF mov [esp + SYSCALL_STACK.eax], -EBADF
ret ret