Discussion:
PB DOS under XP
(too old to reply)
John Larkin
2007-01-24 03:24:16 UTC
Permalink
PB/DOS programe work pretty well under XP, graphics and all. But they
use 100% of CPU power when running. Anybody got ideas on how to
suspend a program periodically while, say, waiting for keyboard input?
SLEEP doesn't work... still 100%. I guess you'd have to shell to
something that truly does a Windows sleep, then returns after a modest
delay, or some equivalent of an INKEY$ call that suspends until a
character comes in.

Any ideas? Are here any bios-type calls, accessable in 16-bit mode,
that sleep?

Hmmm, maybe I could shell to a little compiled PB/CC thingie that does
a proper Windows sleep?

John
F. George McDuffee
2007-01-24 04:20:42 UTC
Permalink
On Tue, 23 Jan 2007 19:24:16 -0800, John Larkin
Post by John Larkin
PB/DOS programe work pretty well under XP, graphics and all. But they
use 100% of CPU power when running. Anybody got ideas on how to
suspend a program periodically while, say, waiting for keyboard input?
SLEEP doesn't work... still 100%. I guess you'd have to shell to
something that truly does a Windows sleep, then returns after a modest
delay, or some equivalent of an INKEY$ call that suspends until a
character comes in.
Any ideas? Are here any bios-type calls, accessable in 16-bit mode,
that sleep?
Hmmm, maybe I could shell to a little compiled PB/CC thingie that does
a proper Windows sleep?
John
=============
Take a look at PowerBASICs CC [console compiler] It appears to
do what you are asking for but with the look/feel of the old dos
text based programs.



Unk'a George (George McDuffee
===================================

A man may be a tough, concentrated, successful money-maker and
never contribute to his country anything more than a horrible example.

A manager may be tough and practical, squeezing out,
while the going is good, the last ounce of profit and dividend,
and may leave behind him an exhausted industry and
a legacy of industrial hatred.

A tough manager may never look outside his own factory walls or
be conscious of his partnership in a wider world.

I often wonder what strange cud such men sit chewing
when their working days are over, and
the accumulating riches of the mind have eluded them.

Robert Menzies (1894-1978), Australian Liberal politician, prime minister.
Jonathan Berry
2007-01-24 15:11:31 UTC
Permalink
Good question! I also have a DOS application (the very text
editor with which I'm writing this email) which grabs all
available CPU cycles. It makes the fan on my laptop come on
full.

There was a program called Rain which would quiet your CPU
instead of having it overheat, but it only worked in Win9x.
Win2K and up are supposed to have cured whatever problem that
Rain cured.

I wonder if there might be another command processor (a
substitute or replacement for cmd.exe ) which would throttle
down the I'm always waiting for a keystroke greed of this old
DOS appy.
Post by John Larkin
PB/DOS programe work pretty well under XP, graphics and all. But they
use 100% of CPU power when running. Anybody got ideas on how to
suspend a program periodically while, say, waiting for keyboard input?
SLEEP doesn't work... still 100%. I guess you'd have to shell to
something that truly does a Windows sleep, then returns after a modest
delay, or some equivalent of an INKEY$ call that suspends until a
character comes in.
Any ideas? Are here any bios-type calls, accessable in 16-bit mode,
that sleep?
Hmmm, maybe I could shell to a little compiled PB/CC thingie that does
a proper Windows sleep?
John
--
happy
Jonathan Berry and Erika http://members.shaw.ca/berry5868/fun.htm
Michael Mattias
2007-01-24 16:32:31 UTC
Permalink
Post by Jonathan Berry
I wonder if there might be another command processor (a
substitute or replacement for cmd.exe ) which would throttle
down the I'm always waiting for a keystroke greed of this old
DOS appy.
Just for the record..... it's the way the DOS program is written that sucks
CPU. Then again, that was OK for MS-DOS programs, since under MS-DOS only
the one program is using the CPU anyway.

Also, I KNOW there is a DOS or BIOS interrupt service which you can call
with CALL INTERRUPT which yields clock slices. I just don't know which one
or what parameters. You might try searching the PowerBASIC online forum for
this, as that is where I think I saw it. (http://www.powerbasic.com, follow
links to "Peer Support Forums")

MCM
James Beck
2007-01-24 16:01:05 UTC
Permalink
Post by John Larkin
PB/DOS programe work pretty well under XP, graphics and all. But they
use 100% of CPU power when running. Anybody got ideas on how to
suspend a program periodically while, say, waiting for keyboard input?
SLEEP doesn't work... still 100%. I guess you'd have to shell to
something that truly does a Windows sleep, then returns after a modest
delay, or some equivalent of an INKEY$ call that suspends until a
character comes in.
Any ideas? Are here any bios-type calls, accessable in 16-bit mode,
that sleep?
Hmmm, maybe I could shell to a little compiled PB/CC thingie that does
a proper Windows sleep?
John
Have you tried running the program under DOS BOX?
It lets you pick the number of clock cycles to give the DOS session and
it pretty much emulates an old DOS box in software. You can even run a
graphics program in a scaled window.

Jim
Albert Richheimer
2007-01-24 19:49:00 UTC
Permalink
John larkin wrote on 24.01.2007, 04:24

JL> PB/DOS programe work pretty well under XP, graphics and all. But they
JL> use 100% of CPU power when running. Anybody got ideas on how to
JL> suspend a program periodically while, say, waiting for keyboard input?
JL> SLEEP doesn't work... still 100%. I guess you'd have to shell to
JL> something that truly does a Windows sleep, then returns after a modest
JL> delay, or some equivalent of an INKEY$ call that suspends until a
JL> character comes in.

Try TameDos: http://www.tamedos.com

Beste Grüße / best regards
Albert

Mail an die From-Adresse wird nicht gelesen.
Mail sent to the from-address is not monitored.
mailto: richheimer{at-symbol}bluewin.ch

---
* MM 1.1 #0362 *

Loading...