Google Groups unterstützt keine neuen Usenet-Beiträge oder ‑Abos mehr. Bisherige Inhalte sind weiterhin sichtbar.

BP7.EXE patch for releaseing process time to Win9x?

11 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Ola Presterud

ungelesen,
05.09.2001, 06:05:4305.09.01
an
Just something I think I have heard about some time, but not sure....

Does it exist a patch (unofficial I think) that patches the BP7.EXE such
that when idle it will release process time back to Win9x? When it is run in
a DOS window, it consumes very much time just sitting there idle.

Ola

Frank Peelo

ungelesen,
05.09.2001, 07:00:0905.09.01
an

"Ola Presterud" <opres...@c2i.net> wrote in message
news:uNml7.9690$1T5.1...@news1.oke.nextra.no...

It's a program you run which hooks the keyboard interrupt before
launching BP.EXE. It was posted here about 2 1/2 years ago...

Ó:Arthur Hoornweg (arthur....@email.de.net)
Ábhar:Freeware goodie: making BP7 go multitasking
Grúpaí nuachta:comp.lang.pascal.borland
Dáta:1999-02-22


Hi everybody,

here's a small utility that will make the BP IDE
consume less CPU time under windows 95/98/NT !!!

Borland Pascal (and in fact, all Pascal versions that
use Turbo Vision in the IDE) consume 100% CPU time
under Windows 95/98/NT. The reason for this, is that
Windows can't determine when the IDE is "idle".

In my own Turbo Vision programs, I have modified
the "GetKeyEvent" source (unit drivers) to perform
a task swich under Windows if no event is waiting.
Unfortunately I don't have the sources for the BP
IDE, so I can't do the same thing for the compiler
itself.

I managed to circumvent it by writing a small
"shell" that performs the trick. Please compile
the code snippet below, and copy the executable
(bp7.exe) into the same directory where you keep
Borland Pascal(bp.exe).

Now whenever you call BP7.EXE, it will hook itself
into the keyboard interrupt and then automatically
load BP.EXE. You'll notice that Borland Pascal runs
a LOT smoother under Windows now, and consumes
almost NO CPU time if it's idle !!!

Drop me a mail if you're happy with it.


--
(To answer me, remove the ".net" from my e-mail address)

Arthur M. Hoornweg

{$A-,B-,D+,E-,F-,G+,I-,L+,N-,O-,P-,Q-,R-,S-,T-,V-,X+,Y+}
{$M 4096,0,0}
Program BP7; uses dos;


{*********************************************************************
**
Version 0.91

This little program was designed to save CPU time in Windows 95/98/NT
running Borland Pascal.

It also works brilliantly in programs (run in the IDE) that do a
"repeat until keypressed".

Copy the executable into the same directory as BP.EXE.

The program grabs interrupt 16 (keyboard interrupt) and performs a
task
switch whenever bp queries the keyboard buffer (if it's empty).

**********************************************************************
*}

VAR oldint16:pointer;

Procedure newint16;far;assembler;asm
jmp @start
@test : db 0 {flag that is set if function 01 is
called}
@start:
mov byte ptr @test,0
push ds {save DS}
push ax
mov ax,seg @data
mov ds,ax {Make DS = our DS}
pop ax
cmp ah,1 {Set flag if Keyboard buffer query}
jne @cont
mov byte ptr @test,1
@cont:
Pushf {push dummy on stack to simulate intxx
call}
call dword ptr (oldint16) {call farr old interrupt routine}
pop DS {Restore data segment}
pushf {flags are vital-save them}

cmp byte ptr @test,1 {Did we do a keyboard buffer query?}
jnz @exit {if no-exit}
popf
pushf {Was the buffer empty?}
jnz @exit

push ax {Yes, so program is idle. Save AX,}
mov ax,1680h {Do a taskswitch now,}
int 2fh
pop ax {and restore AX again}

@exit:
POPF {these are the flags from old int16}
RETF 2 {and ready!}
end;


var s:string;
d:dirstr;
n:namestr;
e:extstr;
begin
fsplit(paramstr(0),d,n,e);
Swapvectors;
getintvec($16,oldint16);
setintvec($16,@newint16);
dos.exec(D+'BP.EXE','');
setintvec($16,oldint16);
Swapvectors;
end.

Ola Presterud

ungelesen,
07.09.2001, 06:46:4607.09.01
an
"Frank Peelo" <fpe...@eircom.net> skrev i melding
news:9n50du$91b$1...@kermit.esat.net...

> > Does it exist a patch (unofficial I think) that patches the BP7.EXE
> such
> > that when idle it will release process time back to Win9x? When it
> is run in
> > a DOS window, it consumes very much time just sitting there idle.
>
> It's a program you run which hooks the keyboard interrupt before
> launching BP.EXE. It was posted here about 2 1/2 years ago...

Thanks a lot!

I will try it out. Do you have any experience with it, does it work like
advertised?

Ola

Frank Peelo

ungelesen,
07.09.2001, 08:10:5507.09.01
an

"Ola Presterud" <opres...@c2i.net> wrote in message
news:Vz1m7.11277$1T5.1...@news1.oke.nextra.no...

I noticed that in Win95, shortcut keys were really slow when BP7 was
running. I'd hit the shortcut key for Notepad or whatever, and nothing
would happen for a second or three. Things improved a bit when this
thingy was running under the IDE.

At any rate, I didn't have any crashes that I could attribute to this
patch.

FP


0 neue Nachrichten