Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Newsgroups: comp.lang.forth Subject: Re: Portability References: <51636f44$0$596$e4fe514c@dreader34.news.xs4all.nl> <5165534f$0$6079$e4fe514c@dreader36.news.xs4all.nl> <2013Apr10.175619@mips.complang.tuwien.ac.at> <2013Apr11.152441@mips.complang.tuwien.ac.at> <2013Apr15.174615@mips.complang.tuwien.ac.at> <65f39492-54f0-463a-87fa-a77ddd58a693@e5g2000yqa.googlegroups.com> From: Lars Brinkhoff Organization: nocrew Date: Wed, 17 Apr 2013 19:26:16 +0200 Message-ID: <85txn5hxvr.fsf@junk.nocrew.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:TF+72xDd+8bzu07+W0+vUsUvDo0= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 30 NNTP-Posting-Host: 85.229.87.73 X-Trace: news.sunsite.dk DXC=ZWdo[Tjn`N1@g6i]76MRQ6YSB=nbEKnk;k4967eN5?M=@ON7A^J=915:[KId_d;k;?ecS2QjHQi^7HL>PhDc7Db5:^^]o@Gl5D5 X-Complaints-To: staff@sunsite.dk Xref: csiph.com comp.lang.forth:21703 Sieur de Bienville writes: > I don't remember how the 68k CMP instruction works Finally an excuse to break out the old M68000PM/AD. CMP Operation: Destination - Source => cc Description: Subtracts the source operand from the destination data register and sets the condition codes to the result; the data register is not changed. The size of the operation can be byte, word, or long. Condition Codes: X - Not affected. N - Set if the result is negative; cleared otherwise. Z - Set if the result is zero; cleared otherwise. V - Set if an overflow occurs; cleared otherwise. C - Set if a borrow occurs; cleared otherwise. And then e.g. BLT uses this test: N && !V || !N && V. > but the IA-32 and the AMD64 CMP instruction is a nondestructive > version of the SUB instruction. So essentially the same.