Mon Nov 1 14:40:21 1993 julliard@di.epfl.ch (Alexandre Julliard) * [if1632/user.spec] Removed some duplicate entries. * [include/dialog.h] [windows/dialog.c] Implemented dialog units and fonts. Added preliminary loading of dialog resources. Preliminary implementation of DialogBox(). Implemented Get/SetDlgItem* functions. * [windows/win.c] Implemented WM_PARENTNOTIFY message. Implemented CreateWindowEx() and GetWindow(). Completed DestroyWindow(). Mon Nov 1 18:19:34 1993 Erik Bos * [loader/signal.c] Added support for int 0x11 & 0x12. * [loader/int21.c] Improved function handling. Sun Oct 31 12:38:09 1993 David Metcalfe <david@prism.demon.co.uk> * [objects/font.c] Implemented GetCharWidth(). Wed Oct 27 09:56:06 1993 John Brezak <brezak@ch.hp.com> * [Makefile] Use GNU malloc. * [include/int21.h include/wine.h] Change sc_eflags to sc_efl . * [include/wine.h] Fix misplaced #endif Include <signal.h> for NetBSD * [loader/int21.c] Don't include <sys/vfs.h> in NetBSD Do include <sys/mount.h> in NetBSD Cleanup some lint. Mon Oct 26 17:59:01 1993 Erik Bos * [include/int21.h] Added. * [loader/int21.c] Added support for many dos ints. * [misc/file.c] [include/files.h] Moved OPEN_MAX and DosDriveStruct to files.h. Sun Oct 24 13:36:50 1993 David Metcalfe <david@prism.demon.co.uk> * [controls/button.c] Implemented CHECKBOX, AUTOCHECKBOX, 3STATE, AUTO3STATE, RADIOBUTTON, AUTORADIOBUTTON, GROUPBOX controls, together with a preliminary USERBUTTON control. * [objects/text.c] Corrected bugs in TEXT_NextLine() and added handling of prefix character. * [controls/button.c] Disabled focus handling by commenting out SetFocus() calls until serious bug can be found. Oct 20, 93 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [controls/listbox.c] Listbox control window Painting cleanup, new messages processed. * [controls/scroll.c] Scroll bar control window Painting cleanup. * [controls/combo.c] Combo box control window Painting cleanup. Tue Oct 12 17:50:11 1993 julliard@di.epfl.ch (Alexandre Julliard) * [objects/color.c] [objects/palette.c] [windows/syscolor.c] Better support for the private color map. Using a private map is now the default. * [windows/win.c] Bug fix. * [include/dialog.h] [windows/dialog.c] Implemented CreateDialog*() and IsDialogMessage(). * [misc/xt.c] [windows/defwnd.c] Moved DefWindowProc() to defwnd.c. Added WM_NCCREATE, WM_NCDESTROY and WM_CTLCOLOR handling. * [windows/defdlg.c] Started the implementation of DefDlgProc(). * [windows/win.c] Added WM_NCCREATE and WM_NCDESTROY messages. Implemented IsChild(). Tue Oct 12 17:50:20 1993 David Metcalfe <david@prism.demon.co.uk> * [windows/focus.c] Implemented GetFocus() and SetFocus(). * [windows/event.c] Added processing of FocusIn and FocusOut events. * [windows/graphics.c] Added DrawFocusRect(). Sat Oct 9 14:36:57 1993 Erik Bos * [loader/int1a.c] Added more function handling. Wed Oct 6 12:21:22 1993 Erik Bos * [loader/signal.c] Split signal.c into int1a.c, int21.c and signal.c. Tue Oct 5 22:12:40 1993 David Metcalfe * [controls/static.c] [control/widgets.c] Static control class. * [objects/text.c] Added processing of additional DT_ flags to DrawText(). * [windows/win.c] [misc/xt.c] Added SetWindowText() and WM_SETTEXT processing. Tue Oct 5 22:12:40 1993 Martin Ayotte * [controls/listbox.c] Listbox control window * [controls/scroll.c] Scroll bar control window * [controls/combo.c] Combo box control window * [include/combo.h] Combo box definitions * [include/listbox.h] Listbox definitions * [include/scroll.h] Scroll bar definitions Sat Oct 2 09:35:54 1993 Bob Amstadt (bob at pooh) * [if1632/callback.c] Fixed bug in MakeProcInstance(). * [debugger/info.c] Changed x/w and x/b to display in hex. * [debugger/i386-pinsn.c] Added code to properly unassemble 16-bit indexing. Fri Oct 1 08:29:05 1993 Bob Amstadt (bob at pooh) * [loader/files.c] [misc/profile.c] System initialization file is now called "wine.ini" and can be located in the current directory, the user's home directory, or any directories specified in the WINEPATH environment variable. * [tools/build.c] [if1632/call.S] [include/regfunc.h] Changed register function stack to match sigcontext structure. Thu Sep 30 22:30:21 1993 Bob Amstadt (bob at pooh) * [loader/files.c] Created function to search a path for files to load. * [loader/wine.c] Modified exe and dll file loading to search through path specified by the environment variable WINEPATH. Thu Sep 30 22:30:21 1993 Eric Youngdale * [loader/signal.c] Bug fix. Thu Sep 30 22:30:21 1993 John Brezak * [debugger/dbg.y] [debugger/debug.l] [debugger/dtest.c] [debugger/obstack.h] Updates to allow debugger to function under NetBSD.
381 lines
6.9 KiB
ArmAsm
381 lines
6.9 KiB
ArmAsm
/*
|
||
* Copyright Robert J. Amstadt, 1993
|
||
*/
|
||
#ifdef linux
|
||
#define UDATASEL 0x2b
|
||
#endif
|
||
#ifdef __NetBSD__
|
||
#define UDATASEL 0x27
|
||
#endif
|
||
.data
|
||
jump_target:
|
||
return_value:
|
||
.long 0
|
||
|
||
/**********************************************************************
|
||
* Places to keep info about the current 32-bit stack frame.
|
||
*/
|
||
saved_esp:
|
||
.long 0
|
||
saved_ebp:
|
||
.long 0
|
||
saved_ss:
|
||
.word 0
|
||
|
||
/**********************************************************************
|
||
* Places to keep info about the current 16-bit stack frame.
|
||
*/
|
||
.globl _IF1632_Saved16_esp,_IF1632_Saved16_ebp,_IF1632_Saved16_ss
|
||
_IF1632_Saved16_esp:
|
||
.long 0
|
||
_IF1632_Saved16_ebp:
|
||
.long 0
|
||
_IF1632_Saved16_ss:
|
||
.word 0
|
||
|
||
nbytes:
|
||
.word 0
|
||
selector:
|
||
.word 0
|
||
offset:
|
||
.word 0
|
||
|
||
.text
|
||
|
||
/**********************************************************************
|
||
* int CallToInit16(unsigned long csip, unsigned long sssp,
|
||
* unsigned short ds)
|
||
*
|
||
* Stack: 0 ebp
|
||
* 4 eip
|
||
* 8 target ip
|
||
* 10 target cs
|
||
* 12 target sp
|
||
* 14 target ss
|
||
* 16 target ds
|
||
*/
|
||
.align 4
|
||
.globl _CallToInit16
|
||
_CallToInit16:
|
||
pushl %ebp
|
||
movl %esp,%ebp
|
||
|
||
/*
|
||
* Save our registers
|
||
*/
|
||
pushal
|
||
pushl saved_esp
|
||
pushl saved_ebp
|
||
pushw saved_ss
|
||
|
||
/*
|
||
* Get target address.
|
||
*/
|
||
movl 8(%ebp),%eax
|
||
movl %eax,jump_target
|
||
lea jump_target,%edx
|
||
|
||
/*
|
||
* Put stack registers where we can get them after stack switch.
|
||
*/
|
||
movw %ss,saved_ss
|
||
movl %esp,saved_esp
|
||
movl %ebp,saved_ebp
|
||
|
||
/*
|
||
* Load initial registers
|
||
*/
|
||
movw _WIN_StackSize,%bx
|
||
movw _WIN_HeapSize,%cx
|
||
movl $0,%esi
|
||
xorl %eax,%eax
|
||
movw _PSPSelector,%ax
|
||
movw %ax,%es
|
||
movw 16(%ebp),%ax
|
||
movw %ax,%ds
|
||
movl %eax,%edi
|
||
xorl %eax,%eax
|
||
movw 12(%ebp),%ax
|
||
movl %eax,%esp
|
||
movw 14(%ebp),%ax
|
||
movw %ax,%ss
|
||
movl %esp,%eax
|
||
movl %eax,%ebp
|
||
#if 1
|
||
movw $UDATASEL,%ax
|
||
movw %ax,%fs
|
||
movw %ax,%gs
|
||
#endif
|
||
/*
|
||
* Call entry point
|
||
*/
|
||
.byte 0x66
|
||
lcall %fs:(%edx)
|
||
|
||
/*
|
||
* Restore old stack and segment registers.
|
||
*
|
||
* Two choices here:
|
||
* 1. Trust that fs or gs hasn't changed.
|
||
* 2. Rely on knowledge of Linux use of segments.
|
||
*
|
||
* I'll opt for choice 2 because who knows what programs we
|
||
* going to run. Linux should be fairly stable in terms of
|
||
* GDT usage.
|
||
*/
|
||
pushl %eax
|
||
movw $UDATASEL,%ax
|
||
movw %ax,%ds
|
||
movw %ax,%es
|
||
movw %ax,%fs
|
||
movw %ax,%gs
|
||
popl %eax
|
||
movw saved_ss,%ss
|
||
movl saved_esp,%esp
|
||
movl saved_ebp,%ebp
|
||
|
||
/*
|
||
* Restore registers, but do not destroy return value.
|
||
*/
|
||
popw saved_ss
|
||
popl saved_ebp
|
||
popl saved_esp
|
||
movl %eax,return_value
|
||
popal
|
||
movl return_value,%eax
|
||
.align 2,0x90
|
||
leave
|
||
ret
|
||
|
||
/**********************************************************************
|
||
* int CallTo16(unsigned long csip, unsigned short ds)
|
||
*
|
||
* Stack: 0 ebp
|
||
* 4 eip
|
||
* 8 target ip
|
||
* 10 target cs
|
||
* 12 target ds
|
||
*/
|
||
.align 4
|
||
.globl _CallTo16
|
||
_CallTo16:
|
||
pushl %ebp
|
||
movl %esp,%ebp
|
||
|
||
/*
|
||
* Get target address and new ds
|
||
*/
|
||
movl 8(%ebp),%eax
|
||
movl %eax,jump_target
|
||
lea jump_target,%edx
|
||
movw 12(%ebp),%ax
|
||
|
||
/*
|
||
* Switch to 16-bit stack
|
||
*/
|
||
pushl saved_esp
|
||
pushl saved_ebp
|
||
pushw saved_ss
|
||
|
||
movw %ss,saved_ss
|
||
movl %esp,saved_esp
|
||
movl %ebp,saved_ebp
|
||
|
||
movw _IF1632_Saved16_ss,%ss
|
||
movl _IF1632_Saved16_esp,%esp
|
||
movl _IF1632_Saved16_ebp,%ebp
|
||
|
||
/*
|
||
* Call entry point
|
||
*/
|
||
movw %ax,%ds
|
||
.byte 0x66
|
||
lcall %fs:(%edx)
|
||
|
||
/*
|
||
* Restore old stack and segment registers.
|
||
*
|
||
* Two choices here:
|
||
* 1. Trust that fs or gs hasn't changed.
|
||
* 2. Rely on knowledge of Linux use of segments.
|
||
*
|
||
* I'll opt for choice 2 because who knows what programs we
|
||
* going to run. Linux should be fairly stable in terms of
|
||
* GDT usage.
|
||
*/
|
||
pushl %eax
|
||
movw $UDATASEL,%ax
|
||
movw %ax,%ds
|
||
movw %ax,%es
|
||
movw %ax,%fs
|
||
movw %ax,%gs
|
||
popl %eax
|
||
|
||
movw %ss,_IF1632_Saved16_ss
|
||
movl %esp,_IF1632_Saved16_esp
|
||
movl %ebp,_IF1632_Saved16_ebp
|
||
|
||
movw saved_ss,%ss
|
||
movl saved_esp,%esp
|
||
movl saved_ebp,%ebp
|
||
|
||
popw saved_ss
|
||
popl saved_ebp
|
||
popl saved_esp
|
||
|
||
movl %eax,return_value
|
||
movw return_value+2,%dx
|
||
.align 2,0x90
|
||
leave
|
||
ret
|
||
|
||
/**********************************************************************
|
||
* CallTo32()
|
||
*
|
||
* This function is called as a relay point to the built function
|
||
* handler. KERNEL, USER and GDI calls are dealt with by this
|
||
* handler. Calls to these DLLs will be mapped to a call handler
|
||
* which will set EAX to a number indicating which DLL and which
|
||
* function within that DLL.
|
||
*
|
||
* This function will pass to the function handler two arguments.
|
||
* The first argument will be the contents of EAX, the second
|
||
* argument will be a segment:offset pair that points to the
|
||
* 16-bit stack.
|
||
*/
|
||
.align 4
|
||
.globl _CallTo32
|
||
_CallTo32:
|
||
pushl %ebp
|
||
movl %esp,%ebp
|
||
|
||
/*
|
||
* Save registers. 286 mode does not have fs or gs.
|
||
*/
|
||
pushw %ds
|
||
pushw %es
|
||
|
||
/*
|
||
* Restore segment registers.
|
||
*/
|
||
pushl %eax
|
||
movw $UDATASEL,%ax
|
||
movw %ax,%ds
|
||
movw %ax,%es
|
||
popl %eax
|
||
|
||
/*
|
||
* Save old stack save variables, save stack registers, reload
|
||
* stack registers.
|
||
*/
|
||
pushl _IF1632_Saved16_esp
|
||
pushl _IF1632_Saved16_ebp
|
||
pushw _IF1632_Saved16_ss
|
||
|
||
movw %ss,_IF1632_Saved16_ss
|
||
movl %esp,_IF1632_Saved16_esp
|
||
movl %ebp,_IF1632_Saved16_ebp
|
||
|
||
movw saved_ss,%ss
|
||
movl saved_esp,%esp
|
||
movl saved_ebp,%ebp
|
||
|
||
/*
|
||
* Call entry point
|
||
*/
|
||
pushw _IF1632_Saved16_ss
|
||
pushw _IF1632_Saved16_esp
|
||
pushl %eax
|
||
call _DLLRelay
|
||
|
||
/*
|
||
* Restore registers, but do not destroy return value.
|
||
*/
|
||
movw _IF1632_Saved16_ss,%ss
|
||
movl _IF1632_Saved16_esp,%esp
|
||
movl _IF1632_Saved16_ebp,%ebp
|
||
|
||
popw _IF1632_Saved16_ss
|
||
popl _IF1632_Saved16_ebp
|
||
popl _IF1632_Saved16_esp
|
||
|
||
popw %es
|
||
popw %ds
|
||
|
||
.align 2,0x90
|
||
leave
|
||
/*
|
||
* Now we need to ditch the parameter bytes that were left on the
|
||
* stack. We do this by effectively popping the number of bytes,
|
||
* and the return address, removing the parameters and then putting
|
||
* the return address back on the stack.
|
||
* Normally this field is filled in by the relevant function in
|
||
* the emulation library, since it should know how many bytes to
|
||
* expect.
|
||
*/
|
||
popw %gs:nbytes
|
||
cmpw $0,%gs:nbytes
|
||
je noargs
|
||
popw %gs:offset
|
||
popw %gs:selector
|
||
addw %gs:nbytes,%esp
|
||
pushw %gs:selector
|
||
pushw %gs:offset
|
||
noargs:
|
||
|
||
/*
|
||
* Last, but not least we need to move the high word from eax to dx
|
||
*/
|
||
pushl %eax
|
||
popw %dx
|
||
popw %dx
|
||
|
||
.byte 0x66
|
||
lret
|
||
|
||
/**********************************************************************
|
||
* ReturnFromRegisterFunc()
|
||
*/
|
||
.globl _ReturnFromRegisterFunc
|
||
_ReturnFromRegisterFunc:
|
||
/*
|
||
* Restore 16-bit stack
|
||
*/
|
||
movw _IF1632_Saved16_ss,%ss
|
||
movl _IF1632_Saved16_esp,%esp
|
||
movl _IF1632_Saved16_ebp,%ebp
|
||
|
||
popw _IF1632_Saved16_ss
|
||
popl _IF1632_Saved16_ebp
|
||
popl _IF1632_Saved16_esp
|
||
|
||
popw %es
|
||
popw %ds
|
||
|
||
.align 2,0x90
|
||
leave
|
||
/*
|
||
* This leaves us with a stack that has number of arguments,
|
||
* the return address, the saved registers, and the return
|
||
* address again.
|
||
*/
|
||
add $6,%esp /* argument count, return address */
|
||
popw %gs
|
||
add $2,%esp
|
||
popw %fs
|
||
add $2,%esp
|
||
popw %es
|
||
add $2,%esp
|
||
popw %ds
|
||
add $2,%esp
|
||
popal
|
||
add $16,%esp /* trapno, err, eip, cs */
|
||
popfl
|
||
add $20,%esp /* esp, ss, i387, oldmask, cr2 */
|
||
|
||
/*
|
||
* Return to original caller.
|
||
*/
|
||
.byte 0x66
|
||
lret
|
||
|