FORTH
Úvod






Vytvořeno 20.12.2012
Aktualizováno 20.12.2012
DIOS Forth
(c) 2012 Luboš Pěkný

  DIOS Forth 1.0 is first, simple, version 32-bit Forth for PIC32mx795, module Duinomite mini.
Words can be compiled to RAM or flash. RAM for testing or often changed words, flash for embedded applications. Words are from Forth-83, ANS Forth, not all implemented, writed in C MPLAB.

  DIOS is low level layer (Device Input Output Services), interrupt buffered routines for service devices, pheripheries on chip PIC32. EMIT call directly UART TX, but is posible call DEFER or DIOS services. Now are supported devices: timer1, uarts, I/O pins, AD converter, PWM.

  Maximal speed Forth virtual machine for 80MHz PIC32 is 4 Mps (as 4 millions forth words per second), empty DO LOOP is 2.3 Mps (millions cycles per second). For comparison with other systems to see benchmark tests in directory \bench.

  Used memory: 16kB Duinomite boot, 43kB flash, 48kB RAM (12kB uarts, 16kB dictionary, 16kB RAM).
  Free memory: about 440 kB flash, 80kB RAM (PIC32mx795).

  Compiled with C MPLAB 8.83, C32 2.02, gcc 4.5.1. Tested with DUINOMITE-MINI (PIC32MX795F512H 80MHz), uart2 115200 Bd, windows terminal Forfiter.exe 1.6 .


 
DIOS Forth 1.0
DIOSForth.zip - download
 
DUINOMITE  PIC32MX795F512H-80MHz
DIOS Forth 1.0      (c)2012 L.P.

> words
PWM ADC PIN COM TIM1 ccall devcall devhead ;flash >flash flash ms coretim words ver .s dump \ #> #s # <# hold ( .( ." u.r .r u. . type spaces space cr defer! defer@ defer to (to) value variable constant literal s" ; : postpone immediate does> <builds create (create) [compile] compile ['] ' s, w, c, ,  ascii allot align link> >body cold quit source refill interpret word parse number find count accept hex decimal bin ] [ bye abort" abort endcase endof of case unloop leave recurse exit again repeat until while begin else then if +loop loop ?do do >resolve >mark <resolve <mark #tib tib state pad >in base bl within d< d> d<> d= u<= u>= u< u> 0> 0< 0= <= >= < > <> = not orl andl xor
or and invert negate 1- 1+ abs max min 2/ 2* << >> >>a */ u*/ mod / /mod  u/mod m/mod um/mod sqrt um* m* * d- d+ - + heap! heap head! head here! here move fill +! w! c! ! w@ c@ @ nop k j i ?key key ?emit emit rp@ sp@ rdepth! rdepth depth! depth r@ r> >r 2swap swap -rot rot -roll roll stick pick 2over over nip ?dup 2dup dup 2drop drop (val) (?branch) (branch) (+loop) (loop) (?do) (do) (defer) (does) (var) (con) (slit) (lit) (colon) execute (exit)
 ok
>

Forfiter 1.6, 2.0
forfiter
 
Forth File Terminal - terminál a uploader pro PC, Win98, XP. Funkce přenos souboru, include souboru, vyhledávání, krokování, crc kontrola, detekce OK a ??, /n a ?? . Navržen pro AmForth, DIOS Forth, od v.2.0 také FlashForth.
Forfiter.zip
Forfiter2.zip