CPU temperature Pentium 4

CPU temperature Pentium 4

Hi,

My first post in this forum! I'm developing a Delphi 7 application used in a machine for inspecting food. We use a standard computer that uses an Intel Pentium 4 2.8 GHz processor.

We have had a few reports that in very hot factories (or where cooling has not been applied correctly) the computer overheats. I'd like to integrate a CPU temperature monitor into the application but can't get it to work.

Firstly, I should say that I have kernal mode access using something I found called "UserPort.sys". This works (without it the assembler below throws an exception).

Secondly, we received the following from the suppliers (from Taiwan, I think):

1.write value 29h to port 295h
2.read CPU Temperature from port 296h

As far as I can tell (I'm not experienced at assembler), the code should be:

asm
mov al,$0029// Byte to write
mov dx,$0295// Port to write to
out dx,al// Write the byte

mov dx,$0296 // Port to read from
in al,dx // Read the response
mov byTemp,al// Put the response into byTemp
end;

This always returns 255 in the byTemp variable. Can anyone help, please?

Thanks,

Alain Dekker (alain.dekker@loma.com)

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

And what exactly is at port 0x0295?

Leave a Comment

Please sign in to add a comment. Not a member? Join today