Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: rickman Newsgroups: comp.lang.forth Subject: Re: EXIT THEN Date: Mon, 13 Feb 2017 00:02:01 -0500 Organization: A noiseless patient Spider Lines: 56 Message-ID: References: <20170211075559.5d4b2fc3@_> <-9WdneZj9upxHALFnZ2dnUU7-T3NnZ2d@supernews.com> <877f4wv22e.fsf@nightsong.com> <88caa00e-b9e6-4620-95a2-fd232a8f49a9@googlegroups.com> <20170212120909.5e42585f@t530.lan> <20170212164250.22867950@_> <6177f3b6-c5f1-4909-871a-2f4c533413d6@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 13 Feb 2017 05:00:17 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="aa8b9ac927b6be8ad54db2c77eabed3e"; logging-data="20359"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FWR1Da1UD9rF1j1pZ1Yx+" User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 In-Reply-To: <6177f3b6-c5f1-4909-871a-2f4c533413d6@googlegroups.com> Cancel-Lock: sha1:TTt8W0UAqTwzVwdqGmhfD2xBT1U= Xref: csiph.com comp.lang.forth:54829 On 2/12/2017 4:52 PM, Julian Fondren wrote: > On Sunday, February 12, 2017 at 3:42:04 PM UTC-6, Rod Pemberton wrote: >> >> Apparently, you have objections to the following? >> >> : ROVER >R OVER R> SWAP ; >> > > VFX Forth doesn't do as well with return-stack ops. > > : third >r over r> swap ; ok > see third > THIRD > ( 080C0A30 53 ) PUSH EBX > ( 080C0A31 5B ) POP EBX > ( 080C0A32 8D6DFC ) LEA EBP, [EBP+-04] > ( 080C0A35 895D00 ) MOV [EBP], EBX > ( 080C0A38 8B5D08 ) MOV EBX, [EBP+08] > ( 080C0A3B C3 ) NEXT, > ( 12 bytes, 6 instructions ) > ok > : third 2 pick ; > THIRD is redefined ok > see third > THIRD > ( 080C0A60 8D6DFC ) LEA EBP, [EBP+-04] > ( 080C0A63 895D00 ) MOV [EBP], EBX > ( 080C0A66 8B5D08 ) MOV EBX, [EBP+08] > ( 080C0A69 C3 ) NEXT, > ( 10 bytes, 4 instructions ) > ok > : third dup 2over drop nip ; > THIRD is redefined ok > see third > THIRD > ( 080C0A90 8D6DFC ) LEA EBP, [EBP+-04] > ( 080C0A93 895D00 ) MOV [EBP], EBX > ( 080C0A96 8B5D08 ) MOV EBX, [EBP+08] > ( 080C0A99 C3 ) NEXT, > ( 10 bytes, 4 instructions ) > ok The "third" example of third is a bit much isn't it? What about just : third 2over nip ; But I guess that doesn't know if there is a fourth item on the stack and could cause an error? It wouldn't on the GA144, lol. Odd that the third third is compiled efficiently. Odder is that VFX adds pointless instructions to the first third. I'd say that rises to the level of being a bug. -- Rick C