Author: ToasT (ACD47DA4.ipt.aol.com)
Date: 03-04-2008 21:30
Okay try this assembly program.
You will find the result is different on the two processors.
;---- program start ---
lea #$10,a0 ;a0=illegal vector
lea trphandle,a1 ;a1=illegal save routine
move.l (a0),-(sp) ;Store the vector for later
move.l a1,(a0) ;install the save routine
move.l sp,a1 ;store the stack for later
move ccr,d0 ;This instruction fails on the 68000
move.l #10,d0 ;if the program makes it here then it is a 68010
; Start of save routine
trphandle: move.l a1,sp ;restore the stack
move.l (sp)+,(a0) ;restore the illegal vector
add.l #68000,d0 ;add 68000 to d0 to see the processor type
;---- program end ---
d0 = processor type
|