Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BP 7.0 DPMI crashes on WIn2000

5 views
Skip to first unread message

Herbert Raab

unread,
Oct 12, 2001, 4:56:54 PM10/12/01
to

Hello List!

I have a Borland Pascal 7.0 / Turbo Vision 2.0 DPMI application that has been running stable for
many years on my "old" 350 MHz Pentium II on Windows NT 4.0. However, another
user reported that the same application crashes with a runtime error 216 on severals
PCs he has (from 350 MHz to 2 GHz) under Windows 2000 as soon as the mouse is
moved. If you don't touch the mouse, it seems to work as usual...

Apparently this is a known problem - go to http://www.merlyn.demon.co.uk/pas-bptp.htm
ans search for "RTE 216". Unfortunaley, I was not able to find the coe for the fixes of
GetMouseState and InitEvents in Drivers.pas that is supposed to cure that problem.

Any help would be greatly appreciated!

Thanks,
Herbert

Dr John Stockton

unread,
Oct 14, 2001, 12:20:30 PM10/14/01
to
JRS: In article <3bc75916_1@dnews>, seen in news:borland.public.turbopas
cal, Herbert Raab <herber...@ris.at> wrote at Fri, 12 Oct 2001
13:56:54 :-

Lines too long causing wrap.

MSIE 4, at least, will not find "RTE 216" on that page; it is not really
there (but "RTE&#160;216" is"). Look immediately *above* pas-bptp.htm#TV,
in the NT4 section.

I do not know whether the problem, or the fix, is the same in windows
2000. Nor do I know the location of fixes, merely that they have been
cited as above.


In article <3bc75a2c$1_2@dnews>, seen in news:borland.public.turbopascal,
Herbert Raab <herber...@ris.at> wrote at Fri, 12 Oct 2001 14:01:32 :-
>
>Sorry to bother you, I found the answer to my question in message #13527...

Under such circumstances, it is considered good practice to reveal the
essence of the answer, for at least two reasons; it may help others, and
it may result in comment on the value of the solution found.

Such message numbers, if you are giving what I think you are giving, are
of limited use; they are server-dependent, and the Borland server
seemingly does not always give them. Please give message-ID, which is
constant, and/or date+time + subject + newsgroup.

--
© John Stockton, Surrey, UK. j...@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
<URL: http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
<URL: http://www.merlyn.demon.co.uk/clpb-faq.txt> Pedt Scragg: c.l.p.b. mFAQ;
<URL: ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip> Timo Salmi's Turbo Pascal FAQ.

AlexB

unread,
Oct 15, 2001, 7:39:22 AM10/15/01
to
Herbert Raab wrote:
>
> I have a Borland Pascal 7.0 / Turbo Vision 2.0 DPMI application that has been running stable for
> many years on my "old" 350 MHz Pentium II on Windows NT 4.0. However, another
> user reported that the same application crashes with a runtime error 216 on severals
> PCs he has (from 350 MHz to 2 GHz) under Windows 2000 as soon as the mouse is
> moved. If you don't touch the mouse, it seems to work as usual...

Old post:

> There is a more serious problem with Windows 2000 and mice if
> you use the protected mode compiler in BP7. Your program will
> crash at the first mouse movement. No helping there!
>

The problem lies in RTM.EXE where far callbacks from mouse driver has
interferention with any int21h (DOS services) interrupt.

Temporary solution ( may be persistent - is Borland still support
DPMI16? )
is to modify 2 procedures in drivers.pas.

here is final text:

---
Procedure GetMouseState; near; assembler;
asm
{
Quick-n-dirty patch for WNT2000 & RTM.EXE with mouse. (RunErr 216)
for any questions pls mail to sy...@ol405.paco.net
}
MOV AX,3
INT 33H
MOV SI,CX
MOV CL,3
SHR SI,CL
SHR DX,CL
MOV MouseButtons,BL
MOV MouseWhere.X,SI
MOV MouseWhere.Y,DX
{ /Endpatch #1 (#2 in InitEvents)}
CLI
CMP EventCount,0
JNE @@1
MOV BL,MouseButtons
MOV CX,MouseWhere.Word[0]
MOV DX,MouseWhere.Word[2]
MOV ES,Seg0040
MOV DI,ES:Ticks
JMP @@3
@@1: MOV SI,EventQHead
CLD
LODSW
XCHG AX,DI
LODSW
XCHG AX,BX
LODSW
XCHG AX,CX
LODSW
XCHG AX,DX
CMP SI,OFFSET EventQLast
JNE @@2
MOV SI,OFFSET EventQueue
@@2: MOV EventQHead,SI
DEC EventCount
@@3: STI
CMP MouseReverse,0
JE @@4
MOV BH,BL
AND BH,3
JE @@4
CMP BH,3
JE @@4
XOR BL,3
@@4:
end;
.......

procedure InitEvents; assembler;
asm
XOR AX,AX
CMP AL,ButtonCount
JE @@1
MOV DownButtons,AL
MOV LastDouble,AL
MOV EventCount,AX
MOV AX,OFFSET DS:EventQueue
MOV EventQHead,AX
MOV EventQTail,AX
MOV AX,3
INT 33H
XCHG AX,CX
MOV CL,3
SHR AX,CL
SHR DX,CL
MOV MouseButtons,BL
MOV MouseWhere.X,AX
MOV MouseWhere.Y,DX
MOV LastButtons,BL
MOV LastWhere.X,AX
MOV LastWhere.Y,DX
{ #2 point of quick-n-dirty patch.
MOV AX,12
MOV CX,07FH
MOV DX,OFFSET CS:MouseInt
PUSH CS
POP ES
INT 33H
}
MOV AX,1
INT 33H
MOV MouseEvents,1
@@1:
end;
---

Realmode applications may use same code. This only changes type of mouse
handling from interrupt-driven to Poll method.

Syon.

--------------------------------------------------

Since i'm using win2k i can't use the mouse anymore
in a TP6 program in a dos window.
Does someone knows what should be change

"Matt Claessen" <Matt.C...@svm.rivm.nl> wrote in message
news:
>
> W2K has cut and paste for DOS boxes, and this feature is enabled
> by default.
> Right click the top of your DOS Box, look for the 'Edit Options'
> and uncheck 'QuickEdit Mode' and 'Insert Mode'

I have been after a fix for the "No mouse in the IDE" problem in Win2k
forever. THANK YOU! You solved a problem the TeamB mob had no clue on.

Note this solves the problem for BC 3.1 as well.
---------------------------------------------------------------
Alex.

0 new messages