Identify Intel processor under 2.6.1

Ken Ray kray at sonsothunder.com
Tue Oct 30 12:29:04 EDT 2007


On Tue, 30 Oct 2007 10:47:02 +0000, Mark Smith wrote:

> Scott, you can test for 'endianness";
> 
> function isIntel
>   return (char 1 of (binaryencode("I",1)) is not null)
> end isIntel

Wow, Mark... that's a lot easier than what I was doing:

function isIntel
  put shell("system_profiler SPHardwareDataType") into tData
  put matchText(tData,"(?s)CPU Type:\W*(.*?)\n",tType) into tIsMatch
  if tIsMatch then
    return (tType contains "Intel")
  else
    return "Error: Can't determine CPU type."
  end if
end isIntel

Cool!

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/



More information about the use-livecode mailing list