On Fri, 02 Mar 2007 11:04:30 -0000, George Gwilt <[EMAIL PROTECTED]> wrote:
> > On 28 Feb 2007, at 16:56, Rich Mellor wrote: > >> >>>> Is there an easy way under QDOS to check which chip is in use - >>>> if it >>>> is a >>>> 68000 or 68008 I would use 2 (or 4) MOVE.B commands instead? >>>> SMSQ does >>>> implement the processor in the system variables, but it is not >>>> present >>>> on >>>> QDOS alas. >>> >>> Here is what smsqe does: >>> >>> move #$3700,sr !!!!!!!!! >>> move.w sr,d1 >>> cmp.w #$2700,d1 ; 68000? >>> beq.s copy ; ... yes >>> move.w #$2700,sr ; ... no, reset to normal >> >> >> OK I should implement a similar routine to this. George also >> provided a >> solution, but this seems easier. > > > The easiest way to distinguish between 68020+ and the others is: > > MOVEM.L A7,-(A7) > CMPA.L (A7),A7 > ADDQ.L #4,A7 ;Reset A7 and leave condition codes unaltered > BEQ LOW ;Not 68020+ > > This method did not work on QPC2 until Marcel altered it. Of course > now QPC2 is 68020+. > > To use either of these methods is OK with real 68xxx hardware (though > the "sr" method does require to be carried out in supervisor mode). > The trouble with emulators is that you need to be sure that "sr" or > MOVEM.L quirks are programmed into the emulator. You are right - this does not work on q-emulator - what quirk of movem.l is this actually using? Daniele probably needs to make an amendment to get this to work. The SR method does not work with smsq/e on q-emulator alas as Daniele has to trick smsq/e into thinking that the aurora is available. > I thought it safer > to try a real 68020+ instruction, such as BFTST, to check the type of > machine. This is much more likely to be a proper test for an emulator. Problem with this is the need to go through TRAPV - something I have long stayed clear of !! -- Rich Mellor RWAP Services URL:http://www.rwapsoftware.co.uk URL:http://www.rwapservices.co.uk _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm