[Omaha.pm] Perl and (horrors) calling an Assembly routine.

Dan Linder dan at linder.org
Tue Oct 13 11:07:08 PDT 2009


Considering how OS/platform agnostic Perl is, this might sound like a
really odd question...

Does anyone know if there is a way to include assembly routines or
call out to an external binary blob?

I am trying to write a CPU detection routine and on the Intel/AMD
platform there is the "cpuid" operation that will return all the gory
details about the hardware (cache size, number of physical processors,
number of cores per processor, CPU family, speed, etc).

I have some C code that I gleaned from Intel and AMDs websites, but it
would be great if I could put this in a Perl script and then run it on
all of my x86 systems (Linux, Solaris x86, etc), rather than having to
re-compile it each time I need to update a section of the logic
(outside the cpuid routines).

DanL

-- 
******************* ***************** ************* ***********
******* ***** *** **
"Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from
the Satires of Juvenal
"I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author)
** *** ***** ******* *********** ************* *****************
*******************


More information about the Omaha-pm mailing list