wall@fortune.UUCP (Jim Wall) (01/22/85)
Can someone (or several someones) mail me the software aspects of replacing a 68000 with a 68010? I know there are some stack differences, are they always the same, is there more? Thanks, Jim Wall ...amd!fortune!wall
davet@oakhill.UUCP (Dave Trissel) (01/27/85)
In article <4909@fortune.UUCP> wall@fortune.UUCP (Jim Wall) writes: > > Can someone (or several someones) mail me the software aspects >of replacing a 68000 with a 68010? I know there are some stack >differences, are they always the same, is there more? The differences are: 1) All exceptions on the MC68010 have the generic vector word stacked before the Status Register and PC. The MC68000/MC68008 do not provide this vector word which identifies the exception type. 2) Both Bus exceptions and Address exceptions on the MC68000/008 stacked information AFTER the Status Register and PC concerning the bus fault. On the MC68010 these two exceptions stack the internal micromachine state which allows bus retry or simulation. The last items stacked are the Vector word, Status Register and PC just like all the other exceptions on the MC68010. 3) The MC68000/008 user instruction MOVE SR,<ea> was made privileged to allow for complete support for virtual machine systems. There are two ways to provide for compatibility here: A) change the user MOVE SR,<ea> code to use the new MC68010 instruction MOVE CCR,<ea> which has the same functionality but is not privileged. (It returns zeroes for the supervisor portion of the Status Register.) B) Include a small bit of code in the supervisor privileged exception handler to simluate the MOVE SR,<ea>. This is available from Motorola. The above should be the only differences encountered. Fortunately the MOVE SR in user code rarely occurs (although when it does it seems rampant) and the generic Vector word effects only code in some exception handlers. Motorola Semiconductors Dave Trissel Austin, Texas {ctvac,seismo,gatech,ihnp4}!ut-sally!oakhill!davet
steve@drivax.UUCP (Steve Williams) (01/30/85)
> 3) The MC68000/008 user instruction MOVE SR,<ea> was made privileged to > allow for complete support for virtual machine systems. There are two > ways to provide for compatibility here: > A) change the user MOVE SR,<ea> code to use the new MC68010 > instruction MOVE CCR,<ea> which has the same functionality > but is not privileged. (It returns zeroes for the supervisor > portion of the Status Register.) > B) Include a small bit of code in the supervisor privileged exception > handler to simluate the MOVE SR,<ea>. This is available from > Motorola. or C) Put a small bit of code in the supervisor privileged exception handler to CHANGE the MOVE SR,<ea> to a MOVE CCR,<ea>. (Set bit 9 (200H)). This takes 10 extra lines of code. The Alcyon compiler (Regulus, CP/M-68K) generates code which uses MOVE from SR instructions to save the condition codes. We found option (a) impossible, and option (b) too slow. The performance degradation from option (c) is not noticeable. An "unlovely artiface", to be sure, but it works. -Steve
davet@oakhill.UUCP (Dave Trissel) (02/05/85)
In article <87@drivax.UUCP> steve@drivax.UUCP (Steve Williams) writes: >> 3) The MC68000/008 user instruction MOVE SR,<ea> was made privileged to >> allow for complete support for virtual machine systems. There are two >> ways to provide for compatibility here: >> A) change the user MOVE SR,<ea> code to use the new MC68010 ... >> B) Include a small bit of code in the supervisor privileged exception >> handler to simluate the MOVE SR,<ea>. This is available from >> Motorola. > >or C) Put a small bit of code in the supervisor privileged exception > handler to CHANGE the MOVE SR,<ea> to a MOVE CCR,<ea>. (Set > bit 9 (200H)). This takes 10 extra lines of code. > The only problem here is that it will not work for MOVE SRs in ROM. Actually, (B) above gives 3 methods using the exception routines: 1) identical to C) (which is obviously the fastest) 2) a routine which cleverly builds a MOVE CCR on the user's stack and passes control to it. (Note this will only work if the user is allowed to execute code in his/her data space.) and 3) a full MOVE SR simulation. (Works in all cases but quite ineffecient.) Motorola Secmiconductor Inc. Dave Trissel Austin, Texas {ihnp4,seismo,ctvax,gatech}!ut-sally!oakhill!davet