On 2 Mar 2007, at 14:14, Rich Mellor wrote:

>>
>> 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.
>

MOVEM.L A7,-(A7) puts the value of A7 on the stack and decrements the  
stack pointer. In the 68020+ series the stack pointer is decremented  
AFTER the value of A7 is stored. For the other processors A7 is  
decremented BEFORE.

George
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to