Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Anyone using Forth on LPC21xx?

2005-04-27 by Peter Jakacki

Thanks Stephen, is the VFX a target resident Forth or hosted? Also do 
you have a decompile or hex dump of the DO-PRIME word? I suspect it is a 
subroutine threaded model or generates assembler code.

I tested your benchmark using my token threaded Forth and came up with 
10473ms for 100 iterations. My Forth has been written for compactness 
and not necessarily speed although it is certainly no sloth. There are a 
few switches that I can set in my compile to generate a faster model but 
I haven't lacked for speed yet. The DO-PRIME word compiles to just 53 bytes.

SEE DO-PRIME
40000548: FE 0027       FLAGS
4000054B: FE 0042       SIZE
4000054E: 11            -1
4000054F: 42            FILL
40000550: 00            0
40000551: FE 0048       SIZE
40000554: 00            0
40000555: 32            (DO)
40000556: 35            I
40000557: FE 0036       FLAGS
4000055A: 66            +
4000055B: 3F            C@
4000055C: F3 1D         if
4000055E: 35            I
4000055F: 61            2*
40000560: 03            3
40000561: 66            +
40000562: 58            DUP
40000563: 35            I
40000564: 66            +
40000565: 58            DUP
40000566: FE 005D       SIZE
40000569: 83            <
4000056A: F3 0D         if
4000056C: 58            DUP
4000056D: FE 004C       FLAGS
40000570: 66            +
40000571: 00            0
40000572: 5D            SWAP
40000573: 3E            C!
40000574: 5B            OVER
40000575: 66            +
40000576: F2 EE         again
40000578: 60            2DROP
40000579: 68            1+
4000057A: F7 DB         (LOOP)
4000057C: 5F            DROP
4000057D: FF            EXIT


*Peter*

Stephen Pelc wrote:

>The LPC2xxxx are great for us - the prices are rapidly
>decreasing and the overall performance is excellent.
>
>100 iterations of the sieve code takes about 1190ms on
>an LPC2106 at 60MHz if my benchmark results are correct.
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.