Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!microsoft!w-colinp From: w-colinp@microsoft.UUCP (Colin Plumb) Newsgroups: comp.arch Subject: Re: Endian wars Message-ID: <38@microsoft.UUCP> Date: 31 Jan 89 22:02:57 GMT References: <6133@columbia.edu> <5124@aldebaran.UUCP> <7@microsoft.UUCP> <213@nbires.nbi.com> Reply-To: w-colinp@microsoft.uucp (Colin Plumb) Distribution: na Organization: very little Lines: 18 maa@nbires.UUCP (Mark Armbrust) wrote: > Seems to me that the following would be a bit faster: > > @: lodsd 5 clocks to execute > mov ebx, eax 2 > shr ebx, 16 3 > and ax, bx 3 > and al, ah 3 > loopnz @ 12 (28 clocks/13 bytes) But won't work. Consider "\1\2\4\8". BTW, Microsoft uses leading-count strings extensively. I'm not so sure about the 255-character limit the byte count imposes, but the arbitrary contents are nice, and people who've never used Real Software don't seem to notice. (Quick: who's run into Unix's 10K command-line limit?) -- -Colin (uunet!microsof!w-colinp)