Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!think!ames!ucbcad!ucbvax!decvax!mcnc!unc!rentsch From: rentsch@unc.UUCP (Tim Rentsch) Newsgroups: comp.lang.smalltalk Subject: Re: BS on sun-3's, fix for multiplication primitive Message-ID: <315@unc.unc.UUCP> Date: Fri, 28-Nov-86 21:56:14 EST Article-I.D.: unc.315 Posted: Fri Nov 28 21:56:14 1986 Date-Received: Sat, 29-Nov-86 07:49:34 EST References: <255@unc.unc.UUCP> <699@randvax.UUCP> Reply-To: rentsch@unc.UUCP (Tim Rentsch) Distribution: net Organization: CS Dept, U. of N. Carolina, Chapel Hill Lines: 47 In article <699@randvax.UUCP> obrien@rand-unix.UUCP (Michael O'Brien) writes: > > The multiplication fooble is news to me. Thanks, Tim! Didja ever get the > process stuff in BS II to work? I just love software archaeology! No, I never did, though I did look at it for a while. The problem is, I can't figure out why it doesn't work! I am a believer in the "if you can't figure out the bug, rewrite the code from scratch" school of thought, but this never got high enough on my priority list to get rewritten. So it goes. If anyone else out there has gotten the process stuff working in BS, I would vote for a posting. (The Xerox interpreter we have has lots of systems calls but no obvious way to run a unix program -- I really miss 'unix it'. On the other hand PS has sockets, we hope to have 'rlogin' implemented soon, and as soon as we do I will give up on sun windows.) At the end of this message is the BS multiplication code diffs, for those that want it. Next message: a BS primitive for 'stat'ing files. cheers, -txr ('diff newsource/SIPrims.c oldsource/SIPrims.c' generates:) 234,247c234,236 < SmallIntegerRATest; < SmallIntegerRAConvert; < if( reg1 ){ /* if self != 0 */ < int result = reg1 * reg2; /* compute answer */ < if( result / reg1 != reg2 ){ /* if wrong answer */ < reg1 = 0x7fffffff; /* insure primitive fails */ < } else { /* else */ < reg1 = result; /* yield right answer */ < } /* fi */ < }/**** 0 * anything == 0 ****/ /* else (return self) fi */ < SmallIntegerOperationFinish; /* (done January 21, 1986 -txr) */ < /************************************************************************** < The code that failed to work correctly: (why?) < reg1 *= reg2; --- > SmallIntegerRATest; > SmallIntegerRAConvert; > reg1 *= reg2; 249d237 < ***************************************************************************/