Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!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 18:53:11 -0500 From: Chris Hinsley Newsgroups: comp.lang.forth Date: Sun, 28 Oct 2012 00:53:11 +0100 Message-ID: <2012102800531128996-chrishinsley@gmailcom> References: <2012102715594849117-chrishinsley@gmailcom> <201210271603106615-chrishinsley@gmailcom> <1315f2d4-5da9-42dc-af23-d7d7a9f9018b@l12g2000vbj.googlegroups.com> <2012102719252825860-chrishinsley@gmailcom> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: well formed flag ? User-Agent: Unison/2.1.9 Lines: 40 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-scjZtzbxaTm52ZOFAcEatv/wgfnSdczxWef/iQA92wm76k8cBnfOksrWTmoJCO9LvnnlIQA253+Vjdk!FShkSWeuwNt+/c3QdXupi1b1K+VfijeO8+lLvi/EI+Qw4pBHhklXXjJbbhH82zdTQXksmrM= 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: 2698 Xref: csiph.com comp.lang.forth:16794 On 2012-10-27 22:08:25 +0000, Alex McDonald said: > On Oct 27, 7:25 pm, Chris Hinsley wrote: >>>> : < ( 2 -- 1 ) >>>> \ ' nseopt compiles; code=$4014DF len=16 type=1 >>>> \ defined in src\kernel\gkernel32.f at line 564 >>>> ( $0 )    mov     edx eax                           \ 8BD0 >>>> ( $2 )    or      ecx $-1                           \ 83C9FF >>>> ( $5 )    xor     eax eax                           \ 33C0 >>>> ( $7 )    cmp     dword { $0 ebp } edx              \ 395500 >>>> ( $A )    cmovl   eax ecx                           \ 0F4CC1 >>>> ( $D )    add     ebp $4                            \ 83C504 >>>> ( $10 )   ret                                       \ C3 ( end ) ok >> >>>> EAX is top of stack, EBP is the stack pointer and { EBP } is next to >>>> top. >> >>         defword "<", 0, WORD_LT, WORD_INLINE_COMMA >>         cmp [ebp], ebx >>         setl bl >>         sub ebp, byte 4 >>         movzx ebx, bl >>         neg ebx >>         ret >>         defword_end >> >> This is shorter at 14 bytes rather than 16 ! ;) >> >> Chris > > Yes, but it may run slower. Not sure about that, its 1 instruction less, and should probably shedule ok on a modern micro op x86 design. Only hard benchmarks would tell. I'll probably leave it as that for now, better than what I had. Regards Chris