Skip to content

Instantly share code, notes, and snippets.

@TG9541
Last active April 16, 2018 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TG9541/25e11f708da5fbe877a0c00dafdf8509 to your computer and use it in GitHub Desktop.
Save TG9541/25e11f708da5fbe877a0c00dafdf8509 to your computer and use it in GitHub Desktop.
ALIAS loader for STM8S003F3 EECORE dictionary demo
#require <#
\ #require $,"
#require $"
\ #require $"|
#require #
#require #>
\ #require 0
\ #require 1
\ #require -1
#require 2DROP
#require 2DUP
\ #require abort"
#require ABORT
#require ABORT"
#require ACCEPT
#require AFT
#require AGAIN
#require AHEAD
#require ALLOT
\ #require BASE
#require BL
\ #require branch
\ #require ?branch
#require CALL,
\ #require >CHAR
#require CMOVE
#require COMPILE
#require [COMPILE]
\ #require $COMPILE
#require COMPILE?
\ #require CONTEXT
#require COUNT
\ #require CP
\ #require CTOP
#require DECIMAL
#require DEPTH
#require DIGIT
\ #require DIGIT?
\ #require dm+
#require DNEGATE
\ #require do$
\ #require docon
\ #require doVAR
#require DOXCODE
#require ?DUP
#require EMIT
\ #require 'EMIT
#require EVAL
\ #require 'EVAL
#require EXECUTE
#require EXIT
#require EXTRACT
#require FILL
\ #require find
#require FOR
\ #require ^H
\ #require HLD
#require HOLD
#require IF
\ #require >IN
\ #require $INTERPRET
#require IRET
#require ?KEY
\ #require '?KEY
\ #require kTAP
#require LAST
\ #require LOCKF
#require MAX
#require MIN
\ #require *_MOD
\ #require $,n
#require NAME>
#require NAME?
#require NEGATE
\ #require next
#require NEXT
\ #require NUMBER?
\ #require NVMCONTEXT
\ #require NVMCP
\ #require PACK$
#require PAD
\ #require parse
#require PARSE
#require PICK
\ #require PRESET
\ #require 'PROMPT
#require QUERY
#require QUIT
#require RESET
#require ?RX
#require #S
\ #require SAME?
#require SAVEC
#require SIGN
#require SPACE
\ #require ?STACK
\ #require str
\ #require TAP
#require THEN
\ #require #TIB
\ #require TOKEN
#require TX!
#require TYPE
\ #require _TYPE
#require ULOCKF
#require UM*
\ #require ?UNIQUE
#require UNTIL
\ #require UPP
#require U.R
\ #require VAR
\ #require WIPE
\ #require WORD
\ #require YTEMP
@TG9541
Copy link
Author

TG9541 commented Mar 27, 2018

Please refer to STMEF #178 and HaD log
Also refer to EECORE/globconf.inc

@TG9541
Copy link
Author

TG9541 commented Apr 16, 2018

; STM8EF Global Configuration File
; Minimal config for STM8S Value Line, defaults with few extras (e.g. NVM)

        HAS_CPNVM        = 1    ; Can compile to Flash, always interpret to RAM
        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
        WORDS_EXTRAEEPR  = 1    ; Extra EEPROM lock/unlock words: LOCK ULOCK ULOCKF LOCKF

;  RESET RAM NVM LOCK ULOCK WORDS .S DUMP IMMEDIATE ALLOT VARIABLE CONSTANT CREATE ] : ; 
; OVERT ." AFT REPEAT WHILE ELSE THEN IF AGAIN UNTIL BEGIN NEXT FOR LITERAL C, , ' CR [ 
;  \ ( .( ? . U. KEY HEX HERE +! 0= ABS NOT 1+ 1- 2+ 2- 2* 2/ */ M* * / /MOD M/MOD UM/MOD 
; < U< = ROT - 0< OR AND XOR + UM+ I OVER SWAP DUP DROP NIP >R R@ R> C! C@ ! @ 2@ 2! COLD 'BOOT

        .if 1

        UNLINK_COLD      = 0    ; "COLD"
        UNLINK_TBOOT     = 1    ; "'BOOT"
        UNLINK_HI        = 1    ; "hi"
        UNLINK_QRX       = 0    ; "?RX"
        UNLINK_TXSTOR    = 0    ; "TX!"
        UNLINK_QRXP      = 0    ; "?RXP"
        UNLINK_QRX       = 0    ; "?RX"
        UNLINK_TXPSTOR   = 0    ; "TXP!"
        UNLINK_TXSTOR    = 0    ; "TX!"
        UNLINK_QKEY      = 1    ; "?KEY"
        UNLINK_EMIT      = 1    ; "EMIT"
        UNLINK_DOLIT     = 0    ; "doLit"
        UNLINK_DOPLOOP   = 1    ; "(+loop)"
        UNLINK_LEAVE     = 0    ; "LEAVE"
        UNLINK_DONXT     = 0    ; "donxt"
        UNLINK_QBRAN     = 0    ; "?branch"
        UNLINK_BRAN      = 0    ; "branch"
        UNLINK_EXECU     = 1    ; "EXECUTE"
        UNLINK_EXIT      = 1    ; "EXIT"
        REMOVE_EXIT      = 0    ; remove "EXIT"
        UNLINK_DSTOR     = 0    ; "2!"
        UNLINK_DAT       = 0    ; "2@"
        UNLINK_DCSTOR    = 0    ; "2C!"
        UNLINK_DCAT      = 0    ; "2C@"
        UNLINK_BRSS      = 0    ; "B!"
        UNLINK_AT        = 0    ; "@"
        UNLINK_STORE     = 0    ; "!"
        UNLINK_CAT       = 0    ; "C@"
        UNLINK_CSTOR     = 0    ; "C!"
        UNLINK_IGET      = 0    ; "I"
        UNLINK_RFROM     = 0    ; "R>"
        UNLINK_DOVAR     = 0    ; "doVar"
        UNLINK_RAT       = 0    ; "R@"
        UNLINK_TOR       = 0    ; ">R"
        UNLINK_NIP       = 0    ; "NIP"
        UNLINK_DROP      = 0    ; "DROP"
        UNLINK_DDROP     = 1    ; "2DROP"
        UNLINK_DUPP      = 0    ; "DUP"
        UNLINK_SWAPP     = 0    ; "SWAP"
        UNLINK_OVER      = 0    ; "OVER"
        UNLINK_UPLUS     = 0    ; "UM+"
        UNLINK_PLUS      = 0    ; "+"
        UNLINK_XORR      = 0    ; "XOR"
        UNLINK_ANDD      = 0    ; "AND"
        UNLINK_ORR       = 0    ; "OR"
        UNLINK_ZLESS     = 0    ; "0<"
        UNLINK_SUBB      = 0    ; "-"
        UNLINK_CNTXT     = 1    ; "CONTEXT"
        UNLINK_CPP       = 0    ; "cp"
        UNLINK_BASE      = 1    ; "BASE"
        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       = 1    ; "TIB"
        UNLINK_OUTA      = 0    ; "OUT"
        UNLINK_BLANK     = 1    ; "BL"
        UNLINK_ZERO      = 0    ; "0"
        UNLINK_ONE       = 0    ; "1"
        UNLINK_MONE      = 0    ; "-1"
        UNLINK_TIMM      = 0    ; "TIM"
        UNLINK_BGG       = 0    ; "BG"
        UNLINK_TPROMPT   = 1    ; "'PROMPT"
        UNLINK_HANDD     = 0    ; "HAND"
        UNLINK_FILEE     = 0    ; "FILE"
        UNLINK_QDUP      = 1    ; "?DUP"
        UNLINK_ROT       = 0    ; "ROT"
        UNLINK_DDUP      = 1    ; "2DUP"
        UNLINK_DNEGA     = 1    ; "DNEGATE"
        UNLINK_EQUAL     = 0    ; "="
        UNLINK_ULESS     = 0    ; "U<"
        UNLINK_LESS      = 0    ; "<"
        UNLINK_MAX       = 1    ; "MAX"
        UNLINK_MIN       = 1    ; "MIN"
        UNLINK_WITHI     = 1    ; "WITHIN"
        UNLINK_UMMOD     = 0    ; "UM/MOD"
        UNLINK_MSMOD     = 0    ; "M/MOD"
        UNLINK_SLMOD     = 0    ; "/MOD"
        UNLINK_MMOD      = 1    ; "MOD"
        UNLINK_SLASH     = 0    ; "/"
        UNLINK_UMSTA     = 1    ; "UM*"
        UNLINK_STAR      = 0    ; "*"
        UNLINK_MSTAR     = 0    ; "M*"
        UNLINK_SSMOD     = 1    ; "*/MOD"
        UNLINK_STASL     = 0    ; "*/"
        UNLINK_EXG       = 0    ; "EXG"
        UNLINK_TWOSL     = 0    ; "2/"
        UNLINK_CELLS     = 0    ; "2*"
        UNLINK_CELLM     = 0    ; "2-"
        UNLINK_CELLP     = 0    ; "2+"
        UNLINK_ONEM      = 0    ; "1-"
        UNLINK_ONEP      = 0    ; "1+"
        UNLINK_INVER     = 0    ; "NOT"
        UNLINK_NEGAT     = 1    ; "NEGATE"
        UNLINK_ABSS      = 0    ; "ABS"
        UNLINK_ZEQUAL    = 0    ; "0="
        UNLINK_PICK      = 1    ; "PICK"
        UNLINK_TCHAR     = 0    ; ">CHAR"
        UNLINK_DEPTH     = 0    ; "DEPTH"
        UNLINK_PSTOR     = 0    ; "+!"
        UNLINK_COUNT     = 0    ; "COUNT"
        UNLINK_HERE      = 0    ; "HERE"
        UNLINK_PAD       = 1    ; "PAD"
        UNLINK_ATEXE     = 1    ; "@EXECUTE"
        UNLINK_CMOVE     = 1    ; "CMOVE"
        UNLINK_FILL      = 1    ; "FILL"
        UNLINK_ERASE     = 1    ; "ERASE"
        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       = 1    ; "str"
        UNLINK_HEX       = 0    ; "HEX"
        UNLINK_DECIM     = 1    ; "DECIMAL"
        UNLINK_NUMBQ     = 1    ; "NUMBER?"
        UNLINK_DIGTQ     = 1    ; "DIGIT?"
        UNLINK_KEY       = 0    ; "KEY"
        UNLINK_NUFQ      = 0    ; "NUF?"
        REMOVE_NUFQ      = 1    ; remove "NUF?"
        UNLINK_SPACE     = 1    ; "SPACE"
        UNLINK_SPACS     = 1    ; "SPACES"
        UNLINK_CR        = 0    ; "CR"
        UNLINK_DOSTR     = 1    ; "do$"
        UNLINK_STRQP     = 1    ; '$"|'
        UNLINK_DOTQP     = 1    ; '."|'
        UNLINK_DOTR      = 0    ; ".R"
        UNLINK_UDOTR     = 0    ; "U.R"
        UNLINK_TYPES     = 1    ; "TYPE"
        UNLINK_UDOT      = 0    ; "U."
        UNLINK_DOT       = 0    ; "."
        UNLINK_QUEST     = 0    ; "?"
        UNLINK_PARS      = 1    ; "pars"
        UNLINK_PARSE     = 1    ; "PARSE"
        UNLINK_DOTPR     = 0    ; ".("
        UNLINK_PAREN     = 0    ; "("
        UNLINK_BKSLA     = 0    ; "\"
        UNLINK_WORDD     = 1    ; "WORD"
        UNLINK_TOKEN     = 1    ; "TOKEN"
        UNLINK_NAMET     = 0    ; "NAME>"
        UNLINK_SAMEQ     = 1    ; "SAME?"
        UNLINK_CUPPER    = 1    ; "CUPPER"
        UNLINK_NAMEQ     = 1    ; "NAME?"
        UNLINK_FIND      = 1    ; "find"
        UNLINK_BKSP      = 1    ; "^h"
        UNLINK_TAP       = 1    ; "TAP"
        UNLINK_KTAP      = 1    ; "kTAP"
        UNLINK_ACCEP     = 1    ; "ACCEPT"
        UNLINK_QUERY     = 1    ; "QUERY"
        UNLINK_ABORT     = 1    ; "ABORT"
        UNLINK_ABORQ     = 1    ; "aborq"
        UNLINK_PRESE     = 1    ; "PRESET"
        UNLINK_INTER     = 1    ; "$INTERPRET"
        UNLINK_LBRAC     = 0    ; "["
        UNLINK_DOTOK     = 1    ; ".OK"
        UNLINK_QSTAC     = 1    ; "?STACK"
        UNLINK_EVAL      = 1    ; "EVAL"
        UNLINK_QUIT      = 1    ; "QUIT"
        UNLINK_TICK      = 0    ; "'"
        UNLINK_JSRC      = 0    ; "CALL,"
        UNLINK_LITER     = 0    ; "LITERAL"
        UNLINK_BCOMP     = 0    ; "[COMPILE]"
        UNLINK_COMPI     = 0    ; "COMPILE"
        UNLINK_STRCQ     = 1    ; "$,""
        UNLINK_FOR       = 1    ; "FOR"
        UNLINK_NEXT      = 1    ; "NEXT"
        UNLINK_DOO       = 0    ; "DO"
        UNLINK_LOOP      = 0    ; "LOOP"
        UNLINK_PLOOP     = 0    ; "+LOOP"
        UNLINK_BEGIN     = 0    ; "BEGIN"
        UNLINK_UNTIL     = 1    ; "UNTIL"
        UNLINK_AGAIN     = 1    ; "AGAIN"
        UNLINK_IFF       = 1    ; "IF"
        UNLINK_THENN     = 1    ; "THEN"
        UNLINK_ELSE      = 1    ; "ELSE"
        UNLINK_AHEAD     = 1    ; "AHEAD"
        UNLINK_WHILE     = 0    ; "WHILE"
        UNLINK_REPEA     = 0    ; "REPEAT"
        UNLINK_AFT       = 1    ; "AFT"
        UNLINK_ABRTQ     = 0    ; 'ABORT"'
        UNLINK_STRQ      = 0    ; '$"'
        UNLINK_DOTQ      = 0    ; '."'
        UNLINK_UNIQU     = 0    ; "?UNIQUE"
        UNLINK_SNAME     = 1    ; "$,n"
        UNLINK_SCOMP     = 1    ; "$COMPILE"
        UNLINK_OVERT     = 0    ; "OVERT"
        UNLINK_COLON     = 0    ; ":"
        UNLINK_RBRAC     = 0    ; "]"
        UNLINK_DOESS     = 0    ; "DOES>"
        UNLINK_DODOES    = 0    ; "dodoes"
        UNLINK_CREAT     = 0    ; "CREATE"
        UNLINK_CONST     = 0    ; "CONSTANT"
        UNLINK_DOCON     = 1    ; "docon"
        UNLINK_VARIA     = 0    ; "VARIABLE"
        UNLINK_ALLOT     = 1    ; "ALLOT"
        UNLINK_IMMED     = 0    ; "IMMEDIATE"
        UNLINK_UTYPE     = 1    ; "_TYPE"
        UNLINK_DUMPP     = 1    ; "dm+"
        UNLINK_DUMP      = 0    ; "DUMP"
        REMOVE_DUMP      = 0    ; remove "DUMP"
        UNLINK_DOTS      = 0    ; ".S"
        REMOVE_DOTS      = 0    ; remove ".S"
        UNLINK_DOTID     = 0    ; ".ID"
        UNLINK_TNAME     = 1    ; ">NAME"
        REMOVE_TNAME     = 1    ; remove ">TNAME"
        UNLINK_WORDS     = 0    ; "WORDS"
        UNLINK_EMIT7S    = 0    ; "E7S"
        UNLINK_PUT7S     = 0    ; "P7S"
        UNLINK_QKEYB     = 0    ; "?KEYB"
        UNLINK_ADCSTOR   = 0    ; "ADC!"
        UNLINK_ADCAT     = 0    ; "ADC@"
        UNLINK_SPSTO     = 0    ; "sp!"
        UNLINK_SPAT      = 0    ; "sp@"
        UNLINK_RPAT      = 0    ; "rp@"
        UNLINK_RPSTO     = 0    ; "rp!"
        UNLINK_ULOCK     = 1    ; "ULOCK"
        UNLINK_LOCK      = 1    ; "LOCK"
        UNLINK_UNLOCK_FLASH = 1 ; "ULOCKF"
        UNLINK_LOCK_FLASH = 1   ; "LOCKF"
        UNLINK_NVMM      = 0    ; "NVM"
        UNLINK_RAMM      = 0    ; "RAM"
        UNLINK_RESETT    = 1    ; "RESET"
        UNLINK_SAVEC     = 1    ; "SAVEC"
        UNLINK_RESTC     = 1    ; "IRET"
        UNLINK_WIPE      = 1    ; "WIPE"
        .endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment