Yahoo Groups archive

Lpc2000

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

Thread

Anyone using Forth on LPC21xx?

Anyone using Forth on LPC21xx?

2005-04-26 by Peter Jakacki

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?

It certainly has let me fully explore the chip and push the peripherals 
interactively. Some screen dumps are shown for reference below.

*Peter*

-------------------------------------------------------------

/*
    Sieve of Eratosthenes

PJarmOS IV - 1.0
Copyright 2005 Peter Jakacki (peter@...)
Target: ACP #1 -  LPC210X 32bit ARM7 - 4293984018 1.52

*/

8190d         CONSTANT *SIZE
40001000h     CONSTANT *FLAGS

: SIEVE
    0 MS! DECIMAL 0A 0
      DO *FLAGS *SIZE 1 FILL
      0 *SIZE 0
        DO I *FLAGS + C@
          IF 3 I + I + DUP I + *SIZE <
            IF *SIZE *FLAGS + OVER I + *FLAGS +
              DO 0 I C! DUP +LOOP
            THEN
          DROP 1+
          THEN
        LOOP
      CR . ."  Primes"
      LOOP
    CR MS@ .
    ;



SIEVE
 1899 Primes
 1899 Primes
 1899 Primes
 1899 Primes
 1899 Primes
 1899 Primes
 1899 Primes
 1899 Primes
 1899 Primes
 1899 Primes
 673 ok
 ok
SEE SIEVE
4000070C: 00            0
4000070D: AF            MS!
4000070E: 9B            DECIMAL
4000070F: 0A            0A
40000710: 00            0
40000711: 11            (DO)
40000712: FE 0029       *FLAGS
40000715: FE 0044       *SIZE
40000718: 01            1
40000719: 24            FILL
4000071A: 00            0
4000071B: FE 004A       *SIZE
4000071E: 00            0
4000071F: 11            (DO)
40000720: 14            I
40000721: FE 0038       *FLAGS
40000724: 48            +
40000725: 21            C@
40000726: F3 26         if
40000728: 03            3
40000729: 14            I
4000072A: 48            +
4000072B: 14            I
4000072C: 48            +
4000072D: 3A            DUP
4000072E: 14            I
4000072F: 48            +
40000730: FE 005F       *SIZE
40000733: 65            <
40000734: F3 16         if
40000736: FE 0065       *SIZE
40000739: FE 0050       *FLAGS
4000073C: 48            +
4000073D: 3D            OVER
4000073E: 14            I
4000073F: 48            +
40000740: FE 0057       *FLAGS
40000743: 48            +
40000744: 11            (DO)
40000745: 00            0
40000746: 14            I
40000747: 20            C!
40000748: 3A            DUP
40000749: F8 FB         (+LOOP)
4000074B: 41            DROP
4000074C: 4A            1+
4000074D: F7 D2         (LOOP)
4000074F: 78            CR
40000750: C8            .
40000751: E8 str        (.")  Primes
4000075A: F7 B7         (LOOP)
4000075C: 78            CR
4000075D: AE            MS@
4000075E: C8            .
4000075F: FF            EXIT





+WORDS


    6340 ABORT              6328 QUIT               62E0 ?LINK
    62AC LINK,              622C FINIS              6204 SOURCE
    61E4 EVAL               61A4 UPPER              6150 $INTERPRET
    60B4 NUMBER             6018 DIGIT?             6000 FORTH
    5FE4 PRESET             5F48 $COMPILE           5F1C LITERAL
    5F00 COMPILE            5EE4 ;                  5ED0 OVERT
    5EB4 :                  5E94 CREATE             5E7C VARIABLE
    5E58 DS32               5E3C VALIGN             5E24 DS8
    5E04 CONSTANT           5DE8 HEADER             5DC0 COMPO
    5DA8 IMMEDIATE          5D78 WORD,              5D2C $,
    5D10 ]                  5CF4 [                  5CE0 $"
    5CCC ."                 5CB8 $,"                5CA4 (.")
    5C90 $"                 5C78 do$                5C54 SILENT
    5C3C ECHO               5C18 /*                 5C04 (
    5BF0 \                  5BD8 QUERY              5B94 ACCEPT
    5B60 KTAP               5B40 TAP                5B00 LEN
    5AD4 TYPE               5AC0 ?                  5AA0 U.N
    5A80 .                  5A6C U.                 5A54 U.R
    5A38 .R                 5A28 D.                 5A14 D.R
    59F0 NSTR               59D4 STR                59BC #>
    59A8 SIGN               5990 #S                 597C #
    5968 HOLD               5950 <#                 5938 DIGIT
    5920 '                  5900 PARSE              58A8 parse
    5830 FIND               5800 NFA>CFA            57B8 CFA>TKN
    5798 CFA>NFA            5774 NFA+               5760 HERE
    5744 C,                 5724 W,                 56F4 ,
    56E4 ALLOT              56CC RING               56BC ok
    56B0 OK                 569C PROMPT             5624 .VER
    5604 DU                 55D8 WDUMP              5580 DUMP
    5530 .S                 54F4 .LS                54C0 .H
    54AC .WORD              5490 .BYTE              545C WORDS
    53E8 +WORDS             53C4 AWORDS             53AC CR
    5394 SPACES             5380 SPACE              5354 TERMINAL
    5334 @XY                531C @Y                 5308 @X
    52EC HBAR               52C8 VBAR               529C RECT
    527C RFILL              5260 HLINE              5244 VLINE
    5228 PLOT               4FAC EMITV              4F94 VGA
    4F7C CLRSCR             4F3C CXY                4F24 BG!
    4ED4 FG!                4EB4 VIDEO              4DAC SD
    4D88 SU                 4D74 VS                 4D50 DISPLAY
    4D28 C/L                4D10 Y*                 4CFC X*
    4CE0 @VGA               40E0 SPI@               406C SPI!
    404C SPI                4038 !SPI               3F48 COP
    3F00 FLASH              3E8C BACKUP             3E28 ERASEF
    3DFC PROGRAM            3D80 PROGRAM1           3D2C .CPU
    3CF8 IAPBUF             3C84 IAP                3C70 CPSR!
    3C58 CPSR@              3BB0 TIMEOUT?           3B90 TIMER
    3B6C MS                 3B5C MS!                3B44 MS@
    3AC4 !TIMER             3AB0 TX1LED             3A9C RX1LED
    3A88 TX0LED             3A74 RX0LED             3A50 STATLED
    3A24 BAUD               39F4 BAUD1              39C0 BAUD0
    3968 PLL!               379C RX1@               3784 RX1@
    3760 TX1!               3718 COM1               3460 RX0@
    343C TX0!               33E4 COM0               31F8 AUTOBAUD
    31B0 FLUSH              3190 CONNECT            3170 CLS
    3158 HOME               3140 PRTSCN             3128 BG
    3114 FG                 30F0 REVERSE            30D4 BLINK
    30BC UNDERLINE          30A0 DIM                3088 BOLD
    3070 PLAIN              3038 NUL                3028 CON
    300C KEY                2FF8 KEY?               2FE4 CMD
    2FD0 EMIT               2FB4 MASK               2FA0 TEST
    2F84 BIT                2F6C BCLR               2F54 BSET
    2F40 b                  2F20 C+!                2EFC +!
    2ED0 CMOVE              2EBC ERASE              2E90 FILL
    2E54 NA!                2E1C NA@                2E00 H!
    2DE0 H@                 2DCC C@                 2DB4 C!
    2D98 D@                 2D78 D!                 2D64 @
    2D4C !                  2D38 ENDCASE            2D1C CASE
    2CF0 case               2CD8 NEXT               2CC4 FOR
    2C9C (DONEXT)           2C84 BOUNDS             2C6C LEAVE
    2C54 +LOOP              2C3C LOOP               2C28 DO
    2C14 J                  2C00 I                  2BEC (+LOOP)
    2BA8 (LOOP)             2B88 (DO)               2B6C @EXECUTE
    2B4C EXECUTE            2B28 CALL               2B0C AFT
    2AF4 WHILE              2AD8 REPEAT             2AC0 AGAIN
    2AA8 UNTIL              2A94 BEGIN              2A7C ELSE
    2A64 AHEAD              2A48 THEN               2A30 IF
    2A0C ?BRANCH            29E0 if                 29CC else
    299C until              297C again              2964 BRANCH
    2920 SCALE              290C S>D                28F4 DABS
    28D8 ABS                28AC DNEGATE            288C NEGATE
    2874 WITHIN             285C MIN                2844 MAX
    2814 =                  27FC U<                 27EC >
    27C8 <                  27A0 0<                 2790 0<>
    277C 0=                 276C <>                 2758 SPLIT
    273C ROR                2720 SHL                2704 SHR
    26EC 2*                 26D8 2/                 26C8 /
    26B8 MOD                26A0 /MOD               264C U/
    2634 M/DMOD             2608 M/MOD              25C8 UM/MOD
    25A4 M*                 2584 UM*                2564 *
    2548 U*                 2520 UM+                2508 1-
    24F4 1+                 24DC -                  24C4 +
    24AC NOT                2490 XOR                2474 OR
    245C AND                243C REGS               241C REG
    2400 ?STACK             23EC 2DROP              23D4 DROP
    23B0 ROT                2380 2SWAP              2360 SWAP
    2340 2OVER              2328 OVER               2308 2DUP
    22E8 ?DUP               22D0 DUP                22C0 NOP
    2294 PLACE              2270 PICK               2250 DEPTH
    2234 L>                 2224 >L                 2210 R@
    21FC R>                 21EC >R                 21D0 !LP
    21B0 !RP                219C RP!                2184 RP@
    2164 !SP                2150 SP!                2138 SP@
    2120 COLD               210C d                  20FC h
    20E8 HEX                20D4 DECIMAL            20BC BINARY
    20A0 ALIGNED            207C CELLS              2064 CELL-
    204C CELL+              2018 LIT32              1FF8 LIT16
    1FE0 LIT8               1FC0 (.")               1FAC WDTV
    1F98 WDFEED             1F84 WDTC               1F70 WDMOD
    1F5C WD                 1F4C PREFRAC            1F34 PREINT
    1F20 ALYEAR             1F0C ALMON              1EF8 ALDOY
    1EE4 ALDOW              1ED0 ALDOM              1EBC ALHOUR
    1EA8 ALMIN              1E94 ALSEC              1E80 YEAR
    1E6C MONTH              1E58 DOY                1E44 DOW
    1E30 DOM                1E1C HOUR               1E08 MINS
    1DF4 SEC                1DE0 CTIME2             1DCC CTIME1
    1DB8 CTIME0             1DA4 AMR                1D90 CIIR
    1D7C CCR                1D68 CTC                1D54 ILR
    1D40 RTC                1D2C SPINT              1D18 SPTOR
    1D04 SPTSR              1CF0 SPTCR              1CDC SPCCR
    1CC8 SPDR               1CB4 SPSR               1CA0 SPCR
    1C8C SPI                1C78 I2CONCLR           1C60 I2SCLL
    1C4C I2SCLH             1C38 I2ADR              1C24 I2DAT
    1C10 I2STAT             1BFC I2CONSET           1BE4 I2C
    1BD0 U1DLM              1BBC U1DLL              1BA8 U1SCR
    1B94 U1MSR              1B80 U1LSR              1B6C U1MCR
    1B58 U1LCR              1B44 U1FCR              1B30 U1IIR
    1B1C U1IER              1B08 U1THR              1AF4 U1RBR
    1AE0 U1                 1AD0 U0DLM              1ABC U0DLL
    1AA8 U0SCR              1A94 U0MSR              1A80 U0LSR
    1A6C U0MCR              1A58 U0LCR              1A44 U0FCR
    1A30 U0IIR              1A1C U0IER              1A08 U0THR
    19F4 U0RBR              19E0 U0                 19D0 PWMLER
    19BC PWMPCR             19A8 PWMEMR             1994 PWMCR3
    1980 PWMCR2             196C PWMCR1             1958 PWMCR0
    1944 PWMCCR             1930 PWMMR6             191C PWMMR5
    1908 PWMMR4             18F4 PWMMR3             18E0 PWMMR2
    18CC PWMMR1             18B8 PWMMR0             18A4 PWMMCR
    1890 PWMPC              187C PWMPR              1868 PWMTC
    1854 PWMTCR             1840 PWMIR              182C PWM
    1818 T1EMR              1804 T1CR3              17F0 T1CR2
    17DC T1CR1              17C8 T1CR0              17B4 T1CCR
    17A0 T1MR3              178C T1MR2              1778 T1MR1
    1764 T1MR0              1750 T1MCR              173C T1PC
    1728 T1PR               1714 T1TC               1700 T1TCR
    16EC T1IR               16D8 T1                 16C8 T0EMR
    16B4 T0CR3              16A0 T0CR2              168C T0CR1
    1678 T0CR0              1664 T0CCR              1650 T0MR3
    163C T0MR2              1628 T0MR1              1614 T0MR0
    1600 T0MCR              15EC T0PC               15D8 T0PR
    15C4 T0TC               15B0 T0TCR              159C T0IR
    1588 T0                 1578 EXTWAKE            1560 EXTINT
    154C PCONP              1538 PCON               1524 VPBDIV
    1510 VPB                14FC PLLFEED            14E4 PLLSTAT
    14CC PLLCFG             14B8 PLLCON             14A4 PLL
    1490 MEMMAP             147C MAMTIM             1468 MAMCR
    1454 MAM                1440 IOCLR              142C IODIR
    1418 IOSET              1404 IOPIN              13F0 IO
    13E0 PINSEL1            13C8 PINSEL0            13B0 PINSEL
    1394 VICVectCntl        1378 VICVectCntl0       1354 VICVectAddr
    1338 VICVectAddr0       131C VICDefVectAddr     1300 VICVectAddr
    12E4 VICProtection      12C8 VICSoftIntClr      12AC VICSoftInt
    1294 VICIntEnClr        1278 VICIntEnable       125C VICIntSelect
    1240 VICRawIntr         1228 VICFIQStatus       120C VICIRQStatus
    11F0 VIC                11DC TIB                11C8 HANDLER
    11B0 PAD                119C key                1188 emit
    1174 'EVAL              1160 NTIB               114C HLD
    1138 UNUM               1124 DPL                1110 sign
    10FC DIGITS             10E8 BASE               10D4 TEMP
    10C0 LINES              10AC ERRORS             1098 FLAGS
    1084 >IN                104C @USER              1038 UP!
    1024 AUTO               1010 VP                 1000 NP
     FF0 CP                  FE0 DP                  FD0 CURRENT
     FB8 CONTEXT             FA0 forth               F8C LAST
     F78 ATRS                F64 TCB                 F50 SYSCONS
     F38 WHITE               F24 CYAN                F10 MAGENTA
     EF8 BLUE                EE4 YELLOW              ED0 GREEN
     EBC RED                 EA8 BLACK               E94 OFF
     E80 ON                  E70 URAM                E5C -1
     E4C FF                  E3C BL                  E2C 0F
     E1C 0E                  E0C 0D                  DFC 0C
     DEC 0B                  DDC 0A                  DCC 9
     DBC 8                   DAC 7                   D9C 6
     D8C 5                   D7C 4                   D6C 3
     D5C 2                   D4C 1                   D3C 0
     ABC .REGS               A8C TRACE               A74 SLEEP
     A5C TIMING              A44 GO                  A30 STOP
     A18 @TASK               990 !TASK               914 -MS
     878 0EXIT               860 ?EXIT               84C EXIT
     83C RESET           ok
_

Re: Anyone using Forth on LPC21xx?

2005-04-26 by valdef78

--- In lpc2000@yahoogroups.com, Peter Jakacki <peterjak@t...> 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?
> 
> It certainly has let me fully explore the chip and push the 
peripherals 
> interactively. Some screen dumps are shown for reference below.
> 
> *Peter*

I didn't use Forth since a long time, but I always like it and it 
could be interesting to have a C alternative for LPC..

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

Re: Anyone using Forth on LPC21xx?

2005-04-26 by embeddedjanitor

--- In lpc2000@yahoogroups.com, "valdef78" <valdef@s...> wrote:
> 
> --- In lpc2000@yahoogroups.com, Peter Jakacki <peterjak@t...> 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?
> > 
> > It certainly has let me fully explore the chip and push the 
> peripherals 
> > interactively. Some screen dumps are shown for reference below.
> > 
> > *Peter*
> 
> I didn't use Forth since a long time, but I always like it and it 
> could be interesting to have a C alternative for LPC..

Have a look at graspForth. Google will find it. NB the licensing if 
you intend to use this commercially.

I've used Forth quite a bit for fiddling and low-level bring-up. I've 
never had the courage to use it for a whole product though.

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:
Show quoted textHide quoted text
>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.
>

Re: [lpc2000] Re: Anyone using Forth on LPC21xx?

2005-04-27 by Anton Erasmus

On 26 Apr 2005 at 6:22, valdef78 wrote:

> 
> 
> --- In lpc2000@yahoogroups.com, Peter Jakacki <peterjak@t...> 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? > > It certainly has let me fully explore
> the chip and push the peripherals > interactively. Some screen dumps
> are shown for reference below. > > *Peter*
> 
> I didn't use Forth since a long time, but I always like it and it
> could be interesting to have a C alternative for LPC..
> 
There is a yahoo armforth group. There are also quite a number of free
forths that has been converted to ARM. 

Regards
   Anton Erasmus

-- 
A J Erasmus

Anyone using Forth on LPC21xx?

2005-04-27 by Stephen Pelc

>    From: Peter Jakacki <peterjak@...>
 
> Thanks Stephen, is the VFX a target resident Forth or hosted?

It's a target resident Forth produced by a cross compiler.
You can also produce an Umbilical version.

> Also do you have a decompile or hex dump of the DO-PRIME word?

: 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
;

dis do-prime 
DO-PRIME
( 0000.FA88 0CC04CE2 .@Lb )  sub r12, r12, # $0C
( 0000.FA8C E0109FE5 `..e )  ldr r1, [ pc, # $E0 ]   ( @$FB74 = $1FFE )
( 0000.FA90 00108CE5 ...e )  str r1, [ r12, # $00 ]
( 0000.FA94 DC109FE5 \..e )  ldr r1, [ pc, # $DC ]   ( @$FB78 = $40004268 
)
( 0000.FA98 04108CE5 ...e )  str r1, [ r12, # $04 ]
( 0000.FA9C 08A08CE5 . .e )  str r10, [ r12, # $08 ]
( 0000.FAA0 00A0E0E3 . `c )  mvn r10, # $00
( 0000.FAA4 00402DE9 .@-i )  stmdb r13 ! { r14 }
( 0000.FAA8 53C6FFEB SF.k )  bl # $13FC      FILL
( 0000.FAAC 0CC04CE2 .@Lb )  sub r12, r12, # $0C
( 0000.FAB0 BC109FE5 <..e )  ldr r1, [ pc, # $BC ]   ( @$FB74 = $1FFE )
( 0000.FAB4 00108CE5 ...e )  str r1, [ r12, # $00 ]
( 0000.FAB8 0010A0E3 .. c )  mov r1, # $00
( 0000.FABC 04108CE5 ...e )  str r1, [ r12, # $04 ]
( 0000.FAC0 08A08CE5 . .e )  str r10, [ r12, # $08 ]
( 0000.FAC4 00A0A0E3 .  c )  mov r10, # $00
( 0000.FAC8 A1C2FFEB6CFB0000 !B.kl{.. )bl # $554       (DO) FB6C
( 0000.FAD0 00809DE5 ...e )  ldr r8, [ r13, # $00 ]
( 0000.FAD4 04009DE5 ...e )  ldr r0, [ r13, # $04 ]
( 0000.FAD8 008088E0 ...` )  add r8, r8, r0
( 0000.FADC 94009FE5 ...e )  ldr r0, [ pc, # $94 ]   ( @$FB78 = $40004268 
)
( 0000.FAE0 008098E0 ...` )  add .s r8, r8, r0
( 0000.FAE4 0080D8E5 ..Xe )  ldrb r8, [ r8, # $00 ]
( 0000.FAE8 000058E3 ..Xc )  cmp r8, # $00
( 0000.FAEC 1900000A .... )  b .eq # $FB58
( 0000.FAF0 00809DE5 ...e )  ldr r8, [ r13, # $00 ]
( 0000.FAF4 04009DE5 ...e )  ldr r0, [ r13, # $04 ]
( 0000.FAF8 008088E0 ...` )  add r8, r8, r0
( 0000.FAFC 8880A0E1 .. a )  mov r8, r8 lsl # $01
( 0000.FB00 038098E2 ...b )  add .s r8, r8, # $03
( 0000.FB04 00709DE5 .p.e )  ldr r7, [ r13, # $00 ]
( 0000.FB08 04009DE5 ...e )  ldr r0, [ r13, # $04 ]
( 0000.FB0C 007087E0 .p.` )  add r7, r7, r0
( 0000.FB10 087097E0 .p.` )  add .s r7, r7, r8
( 0000.FB14 08C04CE2 .@Lb )  sub r12, r12, # $08
( 0000.FB18 00808CE5 ...e )  str r8, [ r12, # $00 ]
( 0000.FB1C 04A08CE5 . .e )  str r10, [ r12, # $04 ]
( 0000.FB20 07A0A0E1 .  a )  mov r10, r7
( 0000.FB24 48009FE5 H..e )  ldr r0, [ pc, # $48 ]   ( @$FB74 = $1FFE )
( 0000.FB28 00005AE1 ..Za )  cmp r10, r0
( 0000.FB2C 060000AA ...* )  b .ge # $FB4C
( 0000.FB30 40009FE5 @..e )  ldr r0, [ pc, # $40 ]   ( @$FB78 = $40004268 
)
( 0000.FB34 00809AE0 ...` )  add .s r8, r10, r0
( 0000.FB38 0000A0E3 .. c )  mov r0, # $00
( 0000.FB3C 0000C8E5 ..He )  strb r0, [ r8, # $00 ]
( 0000.FB40 00009CE5 ...e )  ldr r0, [ r12, # $00 ]
( 0000.FB44 00A09AE0 . .` )  add .s r10, r10, r0
( 0000.FB48 F5FFFFEA u..j )  b # $FB24
( 0000.FB4C 04109CE5 ...e )  ldr r1, [ r12, # $04 ]
( 0000.FB50 01A091E2 . .b )  add .s r10, r1, # $01
( 0000.FB54 08C08CE2 .@.b )  add r12, r12, # $08
( 0000.FB58 00009DE5 ...e )  ldr r0, [ r13, # $00 ]
( 0000.FB5C 010090E2 ...b )  add .s r0, r0, # $01
( 0000.FB60 00008D75 ...u )  str .vc r0, [ r13, # $00 ]
( 0000.FB64 D9FFFF7A Y..z )  b .vc # $FAD0
( 0000.FB68 0CD08DE2 .P.b )  add r13, r13, # $0C
( 0000.FB6C 04A09CE4 . .d )  ldr r10, [ r12 ], # $04
( 0000.FB70 0080BDE8 ..=h )  ldmia r13 ! { pc }
236 bytes, 58 instructions.

> I suspect it is a subroutine threaded model or generates
> assembler code. 

The Forth system and benchmark code was produced by a VFX Forth 
cross compiler on a PC and downloaded to the Flash.

On build 883 of the compiler, 100 iterations took 1090 ms.

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

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.