Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!uw-beaver!milton!sumax!polari!6sceng!blm From: blm@6sceng.UUCP (Brian Matthews) Newsgroups: comp.sys.mac.misc Subject: Re: 68000 specific program? Message-ID: <629@6sceng.UUCP> Date: 19 May 91 21:40:09 GMT References: <1991May18.180250.20204@cunixf.cc.columbia.edu> Organization: Six Sigma CASE, Inc. Lines: 21 In article <1991May18.180250.20204@cunixf.cc.columbia.edu> rs54@cunixf.cc.columbia.edu (Richard Sucgang) writes: |I am unsure about this but: |Is it possible to write a program so coded that it |will specifically run only with a 68000 chip, and not t |on any of the later generation chips? data values: byte 0, 1 text moveq &1, %d0 lea values - 1, %a0 long 0x10300200 ; mov.b 0(%a0,%d0.w*2),%d0 At this point, d0 contains 1 on a 68020 or higher, and 0 on a 68010 or lower. I'll leave it up to the reader to figure out why this works (look at how the scale factor is encoded on 020s). If you're doing this on a Mac, you can use SysEnvirons to find out what kind of processor you're running on. -- Brian L. Matthews blm@6sceng.UUCP