Yahoo Groups archive

Lpc2000

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

Message

Anyone using Forth on LPC21xx?

2005-04-26 by Stephen Pelc

Peter wrote:

> I've been writing a token threaded Forth for the LPC21xx and just
> wondering if anybody else has been using Forth on this processor
> and what are their experiences?

We've implemented our VFX cross compiler for ARM. See:
  http://www.mpeltd.demon.co.uk/usbstamp.htm
                               /tiniarm.htm
                               /forth6.htm

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.

#100 CONSTANT /primes	\ -- n ; number of times to execute test

8190 CONSTANT SIZE	\ -- n
SIZE /OpBuff u> [IF]
  cr ." Sieve: Output buffer size exceeded" abort
[THEN]

OpBuff CONSTANT FLAGS	\ Alias for buffer

: DO-PRIME	\ --
  FLAGS SIZE -1 FILL
  0 SIZE 0 DO
    I FLAGS + C@ IF
      I 2* 3 + DUP I +
      BEGIN
       DUP SIZE <
      WHILE
       DUP FLAGS + 0 SWAP C!
       OVER +
      REPEAT
      2DROP  1+
    THEN
  LOOP
  DROP
;

Stephen

--
Stephen Pelc, stephen@...
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 23 80 631441, fax: +44 23 80 339691
web: http://www.mpeltd.demon.co.uk - free VFX Forth downloads

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.