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:
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
This always returns 255 in the byTemp variable. Can anyone help, please?
Alain Dekker (email@example.com)