Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/TG9541/stm8ef
Browse files Browse the repository at this point in the history
  • Loading branch information
TG9541 committed Sep 9, 2017
2 parents 1c88979 + 94b025c commit 89ef113
Show file tree
Hide file tree
Showing 7 changed files with 293 additions and 594 deletions.
1 change: 1 addition & 0 deletions CORE/globconf.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
BAREBONES = 1 ; Remove or unlink some more: hi HERE .R U.R SPACES @EXECUTE AHEAD CALL, EXIT COMPILE [COMPILE]
WORDS_EXTRACORE = 1 ; Extra core words: =0 I

REMOVE_WITHI = 1
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

TG9541/STM8EF is an extends [Dr. C.H. Ting's eForth for the *STM8S Discovery*](http://www.forth.org/svfig/kk/07-2010.html). It aims to be a very lightweight embedded "untethered" Forth system for low-end STM8 µCs with a maximum "feature-to-binary-size" ratio. TG9541/STM8EF is published as Free Open Source Software ([license](https://github.com/TG9541/stm8ef/blob/master/LICENSE.md)) with the kind permission of the original author.

![4th_640](https://user-images.githubusercontent.com/5466977/28994765-3267d78c-79d6-11e7-927f-91751cd402db.jpg)
[![STM8EF Wiki](https://user-images.githubusercontent.com/5466977/28994765-3267d78c-79d6-11e7-927f-91751cd402db.jpg)](https://github.com/TG9541/stm8ef/wiki)

The project has the following goals:

1. provide an easy to use [Forth kit](https://github.com/TG9541/stm8ef/wiki/STM8S-eForth-Programming) for STM8 µCs
2. board support for [common low-cost Chinese control boards](https://github.com/TG9541/stm8ef/wiki/STM8S-Value-Line-Gadgets)
3. maximize the product *features* * *free space* for low-end STM8 *Value Line* µCs (see below)
4. create a development environment, libraries, and encourage community support
4. collaborate with the Forth community to create a development environment, libraries, and applications

Please refer to the [Wiki on GitHub](https://github.com/TG9541/stm8ef/wiki) for more information!

# Board support:

TG9541/STM8EF provides board support for several common "Chinese gadgets", and for generic targets:
TG9541/STM8EF provides board support for generic targets and for several common "Chinese gadgets" like the following:

* [W1209](https://github.com/TG9541/stm8ef/wiki/Board-W1209) low-cost thermostat w/ 3 digit 7S-LED display, full- or half-duplex RS232
* [W1219](https://github.com/TG9541/stm8ef/wiki/Board-W1219) low cost thermostat with 2x3 digit 7S-LED display, half-duplex RS232 through PD1/SWIM
Expand Down
68 changes: 39 additions & 29 deletions defconf.inc
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@
; UNTIL WHILE WORDS [COMPILE] _TYPE dm+
NO_VARIABLE = 0 ; Disable VARIABLE and feature "VARIABLE in Flash allocates RAM"

WORDS_LINKINTER = 0 ; Link interpreter words: $" aborq ABORT ACCEPT 'BOOT CONTEXT
; CUPPER DIGIT? eval 'eval EXTRACT find ^h hi >IN $INTERPRET
; kTAP NAME? NUMBER? .OK PAD pars PRESET 'PROMPT QUERY QUIT
; SAME? ?STACK TAP TIB 'TIB #TIB TOKEN WORD
WORDS_LINKINTER = 0 ; Link interpreter words
WORDS_LINKCOMP = 0 ; Link compiler words: cp last OVERT $,n ?UNIQUE $COMPILE
WORDS_LINKRUNTI = 0 ; Link runtime words: doLit do$ doVAR donxt dodoes ?branch branch
; (+loop) $"| ."|
Expand All @@ -67,8 +64,8 @@


UNLINK_COLD = 0 ; "COLD"
UNLINK_TBOOT = 0 ; "'BOOT"
UNLINK_HI = 0 ; "hi"
UNLINK_TBOOT = 1 ; "'BOOT"
UNLINK_HI = 1 ; "hi"
UNLINK_QRX = 0 ; "?RX"
UNLINK_TXSTOR = 0 ; "TX!"
UNLINK_QRXP = 0 ; "?RXP"
Expand All @@ -78,13 +75,14 @@
UNLINK_QKEY = 0 ; "?KEY"
UNLINK_EMIT = 0 ; "EMIT"
UNLINK_DOLIT = 0 ; "doLit"
UNLINK_DOLOOP = 0 ; "(+loop)"
UNLINK_DOLOOP = 1 ; "(+loop)"
UNLINK_LEAVE = 0 ; "LEAVE"
UNLINK_DONXT = 0 ; "donxt"
UNLINK_QBRAN = 0 ; "?branch"
UNLINK_BRAN = 0 ; "branch"
UNLINK_EXECU = 0 ; "EXECUTE"
UNLINK_EXIT = 0 ; "EXIT"
UNLINK_EXIT = 1 ; "EXIT"
REMOVE_EXIT = 1 ; remove "EXIT"
UNLINK_DSTOR = 0 ; "2!"
UNLINK_DAT = 0 ; "2@"
UNLINK_DCSTOR = 0 ; "2C!"
Expand Down Expand Up @@ -112,25 +110,27 @@
UNLINK_ORR = 0 ; "OR"
UNLINK_ZLESS = 0 ; "0<"
UNLINK_SUBB = 0 ; "-"
UNLINK_CNTXT = 0 ; "CONTEXT"
UNLINK_CNTXT = 1 ; "CONTEXT"
UNLINK_CPP = 0 ; "cp"
UNLINK_BASE = 0 ; "BASE"
UNLINK_INN = 0 ; ">IN"
UNLINK_NTIB = 0 ; "#TIB"
UNLINK_TEVAL = 0 ; "'eval"
UNLINK_HLD = 0 ; "hld"
UNLINK_INN = 1 ; ">IN"
UNLINK_NTIB = 1 ; "#TIB"
UNLINK_TEVAL = 1 ; "'eval"
UNLINK_HLD = 1 ; "hld"
UNLINK_TEMIT = 0 ; "'EMIT"
UNLINK_TQKEY = 0 ; "'?KEY"
UNLINK_LAST = 0 ; "last"
UNLINK_TIB = 0 ; "TIB"
REMOVE_TIB = 1 ; remove "TIB"
UNLINK_OUTA = 0 ; "OUT"
UNLINK_BLANK = 0 ; "BL"
UNLINK_ZERO = 0 ; "0"
UNLINK_ONE = 0 ; "1"
UNLINK_MONE = 0 ; "-1"
UNLINK_TIMM = 0 ; "TIM"
UNLINK_BGG = 0 ; "BG"
UNLINK_TPROMPT = 0 ; "'PROMPT"
UNLINK_TPROMPT = 1 ; "'PROMPT"
REMOVE_TPROMPT = 1 ; remove "'PROMPT"
UNLINK_HANDD = 0 ; "HAND"
UNLINK_FILEE = 0 ; "FILE"
UNLINK_QDUP = 0 ; "?DUP"
Expand All @@ -143,6 +143,7 @@
UNLINK_MAX = 0 ; "MAX"
UNLINK_MIN = 0 ; "MIN"
UNLINK_WITHI = 0 ; "WITHIN"
REMOVE_WITHI = 0 ; remove "WITHIN"
UNLINK_UMMOD = 0 ; "UM/MOD"
UNLINK_MSMOD = 0 ; "M/MOD"
UNLINK_SLMOD = 0 ; "/MOD"
Expand Down Expand Up @@ -170,27 +171,29 @@
UNLINK_PSTOR = 0 ; "+!"
UNLINK_COUNT = 0 ; "COUNT"
UNLINK_HERE = 0 ; "HERE"
UNLINK_PAD = 0 ; "PAD"
UNLINK_ATEXE = 0 ; "@EXECUTE"
UNLINK_PAD = 1 ; "PAD"
UNLINK_ATEXE = 1 ; "@EXECUTE"
REMOVE_ATEXE = 1 ; remove "@EXECUTE"
UNLINK_CMOVE = 0 ; "CMOVE"
UNLINK_FILL = 0 ; "FILL"
UNLINK_ERASE = 0 ; "ERASE"
UNLINK_PACKS = 0 ; "PACK$"
UNLINK_DIGIT = 0 ; "DIGIT"
UNLINK_EXTRC = 0 ; "EXTRACT"
UNLINK_PACKS = 1 ; "PACK$"
UNLINK_DIGIT = 1 ; "DIGIT"
UNLINK_EXTRC = 1 ; "EXTRACT"
UNLINK_BDIGS = 0 ; "<#"
UNLINK_HOLD = 0 ; "HOLD"
UNLINK_DIG = 0 ; "#"
UNLINK_DIGS = 0 ; "#S"
UNLINK_SIGN = 0 ; "SIGN"
UNLINK_EDIGS = 0 ; "#>"
UNLINK_STR = 0 ; "str"
UNLINK_STR = 1 ; "str"
UNLINK_HEX = 0 ; "HEX"
UNLINK_DECIM = 0 ; "DECIMAL"
UNLINK_NUMBQ = 0 ; "NUMBER?"
UNLINK_DIGITQ = 0 ; "DIGIT?"
UNLINK_NUMBQ = 1 ; "NUMBER?"
UNLINK_DIGITQ = 1 ; "DIGIT?"
UNLINK_KEY = 0 ; "KEY"
UNLINK_NUFQ = 0 ; "NUF?"
REMOVE_NUFQ = 1 ; remove "NUF?"
UNLINK_SPACE = 0 ; "SPACE"
UNLINK_SPACS = 0 ; "SPACES"
UNLINK_CR = 0 ; "CR"
Expand All @@ -210,7 +213,7 @@
UNLINK_BKSLA = 0 ; "\"
UNLINK_WORDD = 0 ; "WORD"
UNLINK_TOKEN = 0 ; "TOKEN"
UNLINK_NAMET = 0 ; "NAME>"
UNLINK_NAMET = 1 ; "NAME>"
UNLINK_SAMEQ = 0 ; "SAME?"
UNLINK_CUPPER = 0 ; "CUPPER"
UNLINK_NAMEQ = 0 ; "NAME?"
Expand All @@ -230,9 +233,11 @@
UNLINK_EVAL = 0 ; "EVAL"
UNLINK_QUIT = 0 ; "QUIT"
UNLINK_TICK = 0 ; "'"
UNLINK_JSRC = 0 ; "CALL,"
UNLINK_LITER = 0 ; "LITERAL"
UNLINK_BCOMP = 0 ; "[COMPILE]"
UNLINK_COMPI = 0 ; "COMPILE"
UNLINK_STRCQ = 0 ; "$,""
UNLINK_FOR = 0 ; "FOR"
UNLINK_NEXT = 0 ; "NEXT"
UNLINK_DOO = 0 ; "DO"
Expand All @@ -252,7 +257,8 @@
UNLINK_STRQ = 0 ; '$"'
UNLINK_DOTQ = 0 ; '."'
UNLINK_UNIQU = 0 ; "?UNIQUE"
UNLINK_SCOMP = 0 ; "$COMPILE"
UNLINK_SNAME = 0 ; "$,n"
UNLINK_SCOMP = 1 ; "$COMPILE"
UNLINK_OVERT = 0 ; "OVERT"
UNLINK_COLON = 0 ; ":"
UNLINK_IMMED = 0 ; "IMMEDIATE"
Expand All @@ -262,12 +268,13 @@
UNLINK_CREAT = 0 ; "CREATE"
UNLINK_VARIA = 0 ; "VARIABLE"
UNLINK_ALLOT = 0 ; "ALLOT"
UNLINK_UTYPE = 0 ; "_TYPE"
UNLINK_DUMPP = 0 ; "dm+"
UNLINK_UTYPE = 1 ; "_TYPE"
UNLINK_DUMPP = 1 ; "dm+"
UNLINK_DUMP = 0 ; "DUMP"
UNLINK_DOTS = 0 ; ".S"
UNLINK_DOTID = 0 ; ".ID"
UNLINK_TNAME = 0 ; ">NAME"
UNLINK_TNAME = 1 ; ">NAME"
REMOVE_TNAME = 1 ; remove ">TNAME"
UNLINK_WORDS = 0 ; "WORDS"
UNLINK_EMIT7S = 0 ; "E7S"
UNLINK_PUT7S = 0 ; "P7S"
Expand All @@ -280,10 +287,13 @@
UNLINK_RPSTO = 0 ; "rp!"
UNLINK_ULOCK = 0 ; "ULOCK"
UNLINK_LOCK = 0 ; "LOCK"
UNLINK_UNLOCK_FLASH = 0 ; "ULOCKF"
UNLINK_LOCK_FLASH = 0 ; "LOCKF"
UNLINK_UNLOCK_FLASH = 1 ; "ULOCKF"
UNLINK_LOCK_FLASH = 1 ; "LOCKF"
UNLINK_NVMM = 0 ; "NVM"
UNLINK_RAMM = 0 ; "RAM"
UNLINK_RESETT = 0 ; "RESET"
UNLINK_SAVEC = 0 ; "SAVEC"
UNLINK_RESTC = 0 ; "IRET"
10 changes: 5 additions & 5 deletions docs/words.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,6 @@
; Pop data stack to byte memory.
```

```
; I ( -- n ) ( TOS STM8: -- Y,Z,N )
; Get inner FOR-NEXT or DO-LOOP index value
```

```
; R> ( -- w ) ( TOS STM8: -- Y,Z,N )
; Pop return stack to data stack.
Expand Down Expand Up @@ -200,6 +195,11 @@
; Copy second stack item to top.
```

```
; I ( -- n ) ( TOS STM8: -- Y,Z,N )
; Get inner FOR-NEXT or DO-LOOP index value
```

```
; UM+ ( u u -- udsum )
; Add two unsigned single
Expand Down
Loading

0 comments on commit 89ef113

Please sign in to comment.