Mail Archives: djgpp-workers/1996/11/17/16:20:20
Thanks for your effort's Eli, but I found the REAL cause of my problem,
I forgot the bump up the friggin realode stack pointer in my callback.
asm("
_handleInt21:
pushl %eax
cmpw $0x3000,%es:0x1c(%edi)
je 1f
cmpb $0x40,%es:0x1d(%edi)
jne 2f
inb $0x61,%al
xorb $2,%al
outb %al,$0x61
2: movl %cs:_oldInt21,%eax
movl %eax,%es:0x2a(%edi)
popl %eax
iret
1:
movl $0xdeadbeef,%es:0x1c(%edi)
movl %ds:(%esi),%eax
movl %eax,%es:0x2a(%edi)
movw %ds:4(%esi),%ax
movw %ax,%es:0x20(%edi)
addw $6,%es:0x2e(%edi) # the forgotten line (blush)
popl %eax
iret
");
Eli Zaretskii wrote:
>
> On Sun, 17 Nov 1996, Bill Currie wrote:
>
> > If I allocate a real mode callback and insert it in the dos int 21 chain
> > (havn't tried for others), and do a __dpmi_int(0x21,®s), everything
> > works fine. BUT, if I us a software interrupt instead, the computer
> > locks up and requires a reset.
>
> I modified the `main' a bit to not use `_farsetsel' (paranoia) and give me
> a chance to look at the printed values before it crashes (source below)
> and ran it with CWSDPMI, QDPMI and PMODE. Results:
>
> QDPMI: works, prints and beeps as advertised.
> CWSDPMI: crashes when INT 21h is issued after the RMCB is
> installed. It seems the crash is *after* the RMCB is
> called and chains, because I hear the beep.
That's the __dpmi_int() call working, I reversed the order of the calls
to see
if it was my direct interrupt calling that caused the problem.
> PMODE: prints 0 instead of deadbeaf, crashes with SIGSEGV when
> INT 21h is issued. I attach the traceback below, in the
> hope that it says something useful.
Interesting that you got a traceback at all. When I tried it at home,
emm386
gave me a (incomplete) stack fault message and my pc locked up.
I agree with your dropping of the _farns*, bloody risky.
I find it interesting that cwsdpmi would continue to work properly with
a naff
stack pointer real mode when __dpmi_int is used. Charles, is this a bug
or a
feature?
Again, thanks for trying.
Bill
--
Leave others their otherness.
- Raw text -