Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder.erje.net!eu.feeder.erje.net!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 27 Oct 2012 09:59:48 -0500 From: Chris Hinsley Newsgroups: comp.lang.forth Date: Sat, 27 Oct 2012 15:59:48 +0100 Message-ID: <2012102715594849117-chrishinsley@gmailcom> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: well formed flag ? User-Agent: Unison/2.1.9 Lines: 26 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-BlehOCL/1YXf+/+mYOeq2BtfQwoLo3ZmFO8Ctdl3t/fkWxqws71rITOrxvSPdPk9UwjuIAPcsg+qgrS!PEDSS7t+1Mn09qhdh+FJwDMf5tlKqjKVAvqGxKffD921nu7aI4FIMzcFO/rnuK35ABI6GWc= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1779 Xref: csiph.com comp.lang.forth:16763 Folks, I'm doing some tweaking to my hobby Forth compiler and just been doing some inlineing work. I'm not very happy about the size of the x86 code for comparision words (I know I could reduce the code size if I had a full optimizing code generator, but I don't yet…) this is my code for "<" defword ">", 0, WORD_GT, WORD_INLINE_COMMA POPDSP eax cmp eax, ebx setg bl movzx ebx, bl neg ebx ret defword_end I followed the 'well formed flag' comments in Ms Rathers book for this, but the IF and TRUE, FALSE words only talk about 0 for false or not zero for true. Is it definately the case that Forth needs -1 to come from the comparason words ? Are you allowed to write code that _needs_ the -1 from the ">" ? ie if it produce just a 1, would that be incorrect ? Chris