[fpc-devel] First patch on GO32V2 target
Vinzent Hoefler
JeLlyFish.software at gmx.net
Mon May 30 10:44:47 CEST 2005
Hi,
attached a patch which reenables (at least according to my tests) the
SIGINT and SIGTERM key handling which is a strong indication that
exception handling might work again. Further tests regarding exception
handling should be done yet. I'm onto it.
So, if nobody complains, I hereby apply for the job of maintaining the
DOS GO32V2 target. Seems like fun. ;-) BTW, what's with the Watcom and
the WDOSX targets?
Regards,
Vinzent.
--
public key: http://www.t-domaingrabbing.ch/publickey.asc
-------------- next part --------------
Index: rtl/go32v2/dpmiexcp.pp
===================================================================
--- rtl/go32v2/dpmiexcp.pp (revision 150)
+++ rtl/go32v2/dpmiexcp.pp (working copy)
@@ -240,7 +240,7 @@
const
int31error : word = 0;
- procedure test_int31(flag : longint);
+ procedure test_int31(flag : longint); stdcall; { stack-args! }
begin
asm
pushl %ebx
Index: rtl/go32v2/go32.pp
===================================================================
--- rtl/go32v2/go32.pp (revision 150)
+++ rtl/go32v2/go32.pp (working copy)
@@ -219,7 +219,7 @@
end;
- procedure test_int31(flag : longint);
+ procedure test_int31(flag : longint); stdcall; { stack-args! }
begin
asm
pushl %ebx
@@ -277,6 +277,7 @@
begin
regs.realsp:=0;
regs.realss:=0;
+ regs.realres:=0; { play it safe }
asm
{ save all used registers to avoid crash under NTVDM }
{ when spawning a 32-bit DPMI application }
Index: rtl/go32v2/sysos.inc
===================================================================
--- rtl/go32v2/sysos.inc (revision 150)
+++ rtl/go32v2/sysos.inc (working copy)
@@ -265,14 +265,18 @@
begin
regs.realsp:=0;
regs.realss:=0;
+ regs.realres:=0; { spec says so, play it safe }
asm
pushl %ebx
pushl %edi
+ pushl %fs // Go32.RealIntr does it too (NTVDM bug),
+ // "pushl" to avoid size prefix
movw intnr,%bx
xorl %ecx,%ecx
movl regs,%edi
movw $0x300,%ax
int $0x31
+ popl %fs
popl %edi
popl %ebx
end;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20050530/eee9a0c6/attachment.sig>
More information about the fpc-devel
mailing list