Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/3/85; site ukma.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!ihnp4!cbosgd!ukma!sambo From: sambo@ukma.UUCP (Inventor of micro-S) Newsgroups: net.micro.pc Subject: Re: Bug in MASM 3.0 and therefore Lattice 2.15. Message-ID: <2017@ukma.UUCP> Date: Sun, 4-Aug-85 23:18:28 EDT Article-I.D.: ukma.2017 Posted: Sun Aug 4 23:18:28 1985 Date-Received: Tue, 6-Aug-85 20:05:36 EDT References: <15959@watmath.UUCP> Reply-To: sambo@ukma.UUCP (Inventor of micro-S) Distribution: net Organization: Univ. of KY Mathematical Sciences Lines: 25 Summary: This is no bug! In article <15959@watmath.UUCP> hhoeksma@watmath.UUCP (Henry Hoeksma) writes: >I disassembled movmem() and discovered >that it used the instruction REPZ MOVSB, when it should have been >REP MOVSB. I then wrote my own movmem() with the correct REP prefix, >and when I disassembled the resulting object file >it contained the REPZ prefix! It seems that MASM 3.0 (from MicroSoft) >generates the wrong opcode for the REP - namely a REPZ. I happen to have an old (July 1981) iAPX88 Book from Intel handy. Here is a quote from page 2-132 referring to the REP and REPZ prefixes: "Repeat, Repeat While Equal, Repeat While Zero, Repeat While Not Equal, and Repeat While Not Zero are mnemonics for two forms of the prefix byte that controls subsequent string instruction repetition. The dif- ferent mnemonics are provided to improve program clarity... REPE and REPZ operate identically and are physically the same prefix byte as REP." Thus, neither the Lattice C compiler nor MASM 3.0 is at fault in this parti- cular instance. ----------------------------------------- Samuel A. Figueroa, Dept. of CS, Univ. of KY, Lexington, KY 40506-0027 ARPA: ukma!sambo<@ANL-MCS>, or sambo%ukma.uucp@anl-mcs.arpa, or even anlams!ukma!sambo@ucbvax.arpa UUCP: {ucbvax,unmvax,boulder,oddjob}!anlams!ukma!sambo, or cbosgd!ukma!sambo "Micro-S is great, if only people would start using it."