Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site mot.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!ut-sally!oakhill!mot!hanko From: hanko@mot.UUCP (Jim Hanko) Newsgroups: net.arch,net.micro,net.micro.68k,net.micro.pc,net.lang.c Subject: Re: M680*0 "small model" Message-ID: <171@mot.UUCP> Date: Tue, 25-Jun-85 17:54:19 EDT Article-I.D.: mot.171 Posted: Tue Jun 25 17:54:19 1985 Date-Received: Fri, 28-Jun-85 00:16:29 EDT References: <167@mot.UUCP> <223@anasazi.UUCP> Organization: Motorola Microsystems, Phoenix AZ Lines: 53 Xref: watmath net.arch:1490 net.micro:10886 net.micro.68k:968 net.micro.pc:4381 net.lang.c:5420 > I don't think it's quite fair to compare this "small model" with > the small model provided by the Intel 8086 or 8088. ... > The real problem is if your 68000 system does not have an MMU. ... > In this case, you > are limited to one "small model" process running at once, and it is > very unlikely that the range ffff8000 to ffffffff is available. You > also have to watch out for the interrupt vectors. > A fairer "small model" for the 68000 would use (Am,Dn.W) addressing > modes, with the 16-bit pointer in Dn and some kind of base address > in Am. This would provide closer to the same capability that Intel > small model provides. But of course this would be slower than the > large model! > > --- Steve Villee (asuvax!anasazi!steve) > International Anasazi, Inc. Actually, one non-MMU M680*0 "small model" would involve using two A-registers as the base of the code and data segments. Then, the d(An) modes could be substituted for the absolute short modes. (Note: other formulations are possible, including pointing to the middle of the segments, allowing 64K program and 64K data). Note that this would not "be slower than the large model!", but would in fact cause the SAME SIZE AND SPEED code to be generated as my original M680*0 "small model", which required an MMU. The only loss it suffers is that two of the A registers would no longer be available for register variables (are they segment registers? :-). The (Am,Dn.W) modes you mentioned would be used, as in the original "small model", to index into arrays after their base is loaded into an A register. eg. a[i + 1] = c; /* i int; c char; a char array */ MMU small model: non-MMU small model: (absolute short modes) (assume A5 has base address of data) LEA.W a,A0 LEA.W a(A5),A0 MOVE.W i,D0 MOVE.W i(A5),D0 MOVE.B c,1(A0,D0.W) MOVE.B c(A5),1(A0,D0.W) Both implementations require 14 bytes and 43 cycles on an M68000. ================================ Jim Hanko, UNIX group, Motorola Microsystems, Tempe, AZ U.S.A {seismo | ihnp4 } ! ut-sally ! oakhill ! mot ! hanko ================================ Disclaimer: the opinions expressed here are my own, but anyone may adopt them.