news@srs.UUCP (02/06/87)
Here is a little code that returns a 1 on a 68020 and a 0 on the 680{00,10}. We needed this for some machine dependant code on the Sun-2 and Sun-3. After I wrote this, someone told me Sun has a function called "is68020" which I assume does about the same as this. This works because the "scale factor" is ignored on the 680{00,10} processors. .text _values: .long 0 .long 1 .globl _tell _tell: moveq #2,d1 | index into 3rd byte of values movl #_values,a0 | movl a0@(0:b,d1:w:2),d0 | assembled below .long 0x20301200 | by-pass Sun-2 assembler | ^ that's the :2 bit rts -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ - UUCP: {allegra,seismo}!rochester!srs!matt Matt Goheen _ - "All hands on deck, S.R. Systems _ - this bird is sink-king." Rochester, NY _ -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_