home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.m68k
- Path: sparky!uunet!wupost!sdd.hp.com!hp-col!jpm
- From: jpm@col.hp.com (Jonathan Mahaffy)
- Subject: Re: Which processor?
- Sender: news@col.hp.com (Usenet News)
- Message-ID: <1992Sep1.005747.17504@col.hp.com>
- Date: Tue, 1 Sep 1992 00:57:47 GMT
- References: <6040@pdxgate.UUCP>
- Organization: HP Colorado Springs Division
- Lines: 24
-
- idr@rigel.cs.pdx.edu (Ian D Romanick) writes:
- How does one go about detmining what processor you are running on?
- On my machine type only 68000, '010, '020, '030, and '040 are
- available and I need to be able to know which I'm running on....
-
- let's see...
-
- supposing you are in supervisor state, and can hack
- the illegal instruction trap,
-
- code MOVEC (4e7a 0000). if you trap, you're a 68000; else
-
- code CALLM (06d0 0000)*. if you don't trap, you're a 68020; else
-
- code MOVE16 (f620 9000)**. if you don't trap, you're a 68040; else
-
- code EXTB (49c0). if you trap you're a 68010; else you're a 68030.
-
- * make sure A0 points to an RTM
- ** make sure A0 & A1 point to read/write memory on 16-byte boundaries
-
- there may be better ways...you could take off the cover, and look at
- the chip...
- jonathan
-