🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.computer.drivers.wanted
8 messages
8 total messages Started by CoolFish Tue, 23 May 2000 00:00
Windows 2000 Microsecond Timer Driver
#127
Author: CoolFish
Date: Tue, 23 May 2000 00:00
22 lines
2448 bytes
Hi
I was wondering if anyone new the answer to this
----------------------------------------------------------------------------
--------------------
Write and install a simple driver for accessing the 8254 Timer integrated
circuit on a computer
with an Intel Pentium (x86) processor running the WIndows 2000 or Win NT
operatinf system.
The driver has to provide for initialising, starting, stopping and reading
the timer.  The timer will be
used for timing the executions of a small segment of code within a program.
The timer is started
and stopped by invoking the MicroSecondTimer(int op) function at the desired
position in the code.
THe parameter 'op' is a code number for the desired operation (initialise,
start, etc). The function
returns an integer value, according to the operation selected. For this
purpose it is not necessary
to set up an interrupt for the timer.
----------------------------------------------------------------------------
--------------------
Cheers
Re: Windows 2000 Microsecond Timer Driver
#128
Author: Jp Calderone
Date: Tue, 23 May 2000 00:00
41 lines
3338 bytes
CoolFish wrote:
> 
> Hi
> I was wondering if anyone new the answer to this
> ----------------------------------------------------------------------------
> --------------------
> Write and install a simple driver for accessing the 8254 Timer integrated
> circuit on a computer
> with an Intel Pentium (x86) processor running the WIndows 2000 or Win NT
> operatinf system.
> The driver has to provide for initialising, starting, stopping and reading
> the timer.  The timer will be
> used for timing the executions of a small segment of code within a program.
> The timer is started
> and stopped by invoking the MicroSecondTimer(int op) function at the desired
> position in the code.
> THe parameter 'op' is a code number for the desired operation (initialise,
> start, etc). The function
> returns an integer value, according to the operation selected. For this
> purpose it is not necessary
> to set up an interrupt for the timer.
> ----------------------------------------------------------------------------
> --------------------
> Cheers

 It's a statement, not a question, so it has no answer.  It may have a
response, or a solution, but I'm sure your prof. would rather you find
it than us.

 Jp

-- 
In the days when Sussman was a novice Minsky once came to him as he sat
hacking at the PDP-6. "What are you doing?" asked Minsky. "I am training a
randomly wired neural net to play Tic-Tac-Toe." "Why is the net wired
randomly?" asked Minsky. "I do not want it to have any preconceptions of how
to play." Minsky shut his eyes. "Why do you close your eyes?" Sussman asked
his teacher. "So the room will be empty." At that moment, Sussman was
enlightened.
 --
 7:43am up 4 days, 10:17, 3 users, load average: 0.38, 0.14, 0.04
Re: Windows 2000 Microsecond Timer Driver
#129
Author: telford
Date: Wed, 24 May 2000 00:00
29 lines
3010 bytes
In alt.mud.programming CoolFish <coolfish@bigpond.com> wrote:
> Hi
> I was wondering if anyone new the answer to this
> ----------------------------------------------------------------------------
> --------------------
> Write and install a simple driver for accessing the 8254 Timer integrated
> circuit on a computer
> with an Intel Pentium (x86) processor running the WIndows 2000 or Win NT
> operatinf system.
> The driver has to provide for initialising, starting, stopping and reading
> the timer.  The timer will be
> used for timing the executions of a small segment of code within a program.

I hope I'm not too rude in saying that this is a really shithouse way to
time code execution. If you want your code to run fast and need to identify
where the time is spent then regularly interrupt the execution and look
at the program counter value (read how profiling works with linux/gcc/gprof).
After time you see which regions the program counter is most often in. 

If you have a particular chunk of code that interfaces with some realtime
device then use the parallel port -- set a pin high as you enter that
codeblock and set the pin low as you exit the codeblock. A fairly cheap
oscilloscope connected to that pin will give you much more accurate
timing than the 8254 will ever do and you have a bunch of pins to use
so you can set many `checkpoints' in your code. Also, only a single
instruction is required to toggle the parallel port so it has minimal
impact on what you are trying to measure.

	- Tel
Re: Windows 2000 Microsecond Timer Driver
#130
Author: jim.conyngham
Date: Mon, 05 Jun 2000 00:00
29 lines
1971 bytes
Ah, but HOW would you "regularly interrupt program execution"?

In article <8ggcq7$jmp$1@hyperion.triode.net.au>,
  <telford@xenon.triode.net.au> wrote:
> In alt.mud.programming CoolFish <coolfish@bigpond.com> wrote:
[snipped]
> > with an Intel Pentium (x86) processor running the WIndows 2000 or
Win NT
> > operatinf system.
> > The driver has to provide for initialising, starting, stopping and
reading
> > the timer.  The timer will be
> > used for timing the executions of a small segment of code within a
program.
>
> I hope I'm not too rude in saying that this is a really shithouse way
to
> time code execution. If you want your code to run fast and need to
identify
> where the time is spent then regularly interrupt the execution and
look
> at the program counter value (read how profiling works with
linux/gcc/gprof).
> After time you see which regions the program counter is most often in.
>


Sent via Deja.com http://www.deja.com/
Before you buy.
Re: Windows 2000 Microsecond Timer Driver
#131
Author: Marc Bowden
Date: Tue, 06 Jun 2000 00:00
16 lines
1744 bytes
In article <8hh3cq$kd2$1@nnrp1.deja.com>, jim.conyngham@amd.com wrote:

> Ah, but HOW would you "regularly interrupt program execution"?
> 

  Under Windows 2000? We refer to that as "running a program."

======================================================================
Marc Bowden - Soulsinger                  D R E A M S H A D O W
Human Resources Director                --------------------------
                                          The Legacy of the Three

dreamer.telmaron.com 3333  or  206.246.120.2 3333  ryumo@merit.edu

"We did not choose to become the guardians, but there is no one else."
======================================================================
Re: Windows 2000 Microsecond Timer Driver
#132
Author: Lars9999
Date: Tue, 06 Jun 2000 00:00
19 lines
2014 bytes
"Marc Bowden" <ryumo@merit.edu> wrote in message
news:ryumo-0606001351160001@mactheknife.merit.edu...
> In article <8hh3cq$kd2$1@nnrp1.deja.com>, jim.conyngham@amd.com wrote:
>
> > Ah, but HOW would you "regularly interrupt program execution"?
> >
>
>   Under Windows 2000? We refer to that as "running a program."
>
> ======================================================================
> Marc Bowden - Soulsinger                  D R E A M S H A D O W
> Human Resources Director                --------------------------
>                                           The Legacy of the Three
>
> dreamer.telmaron.com 3333  or  206.246.120.2 3333  ryumo@merit.edu
>
> "We did not choose to become the guardians, but there is no one else."
> ======================================================================
Re: Windows 2000 Microsecond Timer Driver
#133
Author: telford
Date: Wed, 07 Jun 2000 00:00
16 lines
1629 bytes
In alt.mud.programming jim.conyngham@amd.com wrote:
> Ah, but HOW would you "regularly interrupt program execution"?

Under Linux, it's a standard system service.

Under Win2000, never tried but though I do tend to dis Microsoft
for poor quality I cannot believe that the only way to interrupt a
process is to reprogram the hardware timer and install your own
interrupt handler.

If you have to do all that then why not just use DOS?

Isn't it possible for one process to interrupt another?
Can this second process go into some non CPU-invasive loop?

	- Tel
Re: Windows 2000 Microsecond Timer Driver
#134
Author: Marc Bowden
Date: Thu, 08 Jun 2000 00:00
23 lines
1965 bytes
In article <8hl45b$q56$2@hyperion.triode.net.au>,
<telford@xenon.triode.net.au> wrote:

> 
> Isn't it possible for one process to interrupt another?

  Nope. Under NT, *nothing* touches the hardware directly. In theory.

> Can this second process go into some non CPU-invasive loop?
> 

  I don't think you can use the words "windows" and "non CPU invasive" in
the same sentence.

======================================================================
Marc Bowden - Soulsinger                  D R E A M S H A D O W
Human Resources Director                --------------------------
                                          The Legacy of the Three

dreamer.telmaron.com 3333  or  206.246.120.2 3333  ryumo@merit.edu

"We did not choose to become the guardians, but there is no one else."
======================================================================
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads