AmForth32 Reference Card

RV32IMAFC / WCH CH32V307 main@7603aec 2026-04-06T17:06:58+00:00

STACK | COMPARE | MATH | MIXED | DOUBLE | MEMORY | STRING | DICTIONARY | WORDLIST | COMPILER | FLOW | IO | OUTPUT | SYSTEM | TOOLS | FLASH | OTHER | MCU | UNCATEGORIZED | LEGEND

STACK

WordTypeStack SignatureDescriptionLocation
dupCODEWORD( x -- x x )duplicate TOSrv/words/dup.s:3
?dupCODEWORD( x -- x x | 0 )duplicate TOS if it is not zerorv/words/q-dup.s:3
swapCODEWORD( x1 x2 -- x2 x1 )swap top 2 cells on the stackrv/words/swap.s:2
overCODEWORD( x1 x2 -- x1 x2 x1 )copy NOS to the toprv/words/over.s:2
dropCODEWORD( x -- )drop TOSrv/words/drop.s:3
rotCODEWORD(x1 x2 x3 -- x2 x3 x1)rotate top 3 cells on stack left, 3OS becomes TOSrv/words/rot.s:3
-rotCODEWORD(x1 x2 x3 -- x3 x1 x2)rotate top 3 cells on stack right, TOS becomes 3OSrv/words/m-rot.s:3
tuckCODEWORD( x1 x2 -- x2 x1 x2 )insert TOS below 2nd cell of the stackrv/words/tuck.s:3
nipCODEWORD( x1 x2 -- x2 )drop NOSrv/words/nip.s:2
pickCODEWORD( xu .. x1 x0 u -- xu ... x1 x0 xu )copy u-th stack cell to the toprv/words/pick.s:3
2dupCODEWORD( d - d d )duplicate top 2 cells on the stackrv/words/2dup.s:2
2swapCODEWORD( d1 d2 -- d2 d1 )swap top two cell pairs on the stackrv/words/2swap.s:2
2overCODEWORD( d1 d2 -- d1 d2 d1 )copy 2nd cell pair to the top of the stackrv/words/2over.s:2
2dropCODEWORD( d -- )drop top cell pair from the stackrv/words/2drop.s:2
2rotCODEWORD(d1 d2 d3 -- d2 d3 d1)rotate top 3 cell pairs on stack left, 3rd pair becomes top pairrv/words/2rot.s:2
2nipCODEWORD( d2 d1 -- d1 )remove 2nd cell pair from the stackrv/words/2nip.s:2
depthCODEWORD( -- n )n is current dept of the data stackrv/words/stack.s:4
?stackCOLON( -- )throw if stack depth is negativecore/words/q-stack.s:2
sp0USER( -- addr )storage address of initial data stack pointerrv/words/sp.s:21
spUSER( -- addr )storage address of data stack pointerrv/words/sp.s:18
sp!CODEWORD( addr -- )set data stack pointer to addrrv/words/sp.s:11
sp@CODEWORD( -- addr )addr is current data stack pointerrv/words/sp.s:3
rdropCODEWORD(R: x -- )drop top of the return stackrv/words/stack.s:26
rdepthCODEWORD( -- n )n is current dept of the return stackrv/words/stack.s:15
rpUSER( -- addr )storage address for return stack pointerrv/words/rp.s:18
rp!CODEWORD( addr -- )set return stack pointer to addrrv/words/rp.s:11
rp@CODEWORD( -- addr )addr is current return stack pointerrv/words/rp.s:3
r@CODEWORD(R: x -- x )( -- x )copy top of return stack to data stackrv/words/r-fetch.s:3
r>CODEWORD(R: x -- )( -- x )move top of return stack to data stackrv/words/r-from.s:2
>rCODEWORD( x -- )(R: -- x)move TOS to return stackrv/words/to-r.s:2
nr>CODEWORD(R: xu .. x1 u -- )( -- xu .. x1 u )move u items from return stack to data stackrv/words/n_r_from.s:2
n>rCODEWORD( xu .. x1 u -- ) (R: -- xu .. x1 u)move u items from data stack to return stackrv/words/n_to_r.s:2
2r>CODEWORD(R: d -- )( -- d )move top 2 cells from return stack to data stackrv/words/2r-from.s:2
2>rCODEWORD( d -- )(R: -- d )move top two cells from data stack to return stackrv/words/2to-r.s:2
2r@CODEWORD(R: d -- d )( -- d )copy top 2 cells from return stack to data stackrv/words/2r-fetch.s:2
ldropCOLON(L: x -- )remove TOS from leave stackcore/words/lstack.s:37
ldepthCOLON( -- n )n is current depth of the leave stackcore/words/lstack.s:45
l@COLON( -- x ) (L: x -- x )copy TOS from leave stack to data stackcore/words/lstack.s:20
l>COLON( -- x ) (L: x -- )move TOS from leave stack to data stackcore/words/lstack.s:9
>lCOLON( x -- )(L: -- x )move TOS from data stack to leave stackcore/words/lstack.s:27
2l@COLON( -- x2 x1 ) (L: x1 x2 -- x1 x2 )copy cell pair from top of leave stack to data stackcore/words/lstack.s:63
2l>COLON( -- x2 x1 ) (L: x1 x2 -- )move cell pair from top of leave stack to data stackcore/words/lstack.s:53
2>lCOLON( x1 x2 -- )(L: -- x2 x1 )move cell pair from top of data stack to leave stackcore/words/lstack.s:74
lpVARIABLEleave stack pointercore/words/lstack.s:6
lp0VALUERAM_upper_leavestackstart of the leave stackcore/words/lstack.s:3

COMPARE

WordTypeStack SignatureDescriptionLocation
uminCODEWORD( u1 u2 -- u3 )u3 = min(u1, u2)rv/words/comp.s:158
umaxCODEWORD( u1 u2 -- u3 )u3 = max(u1, u2)rv/words/comp.s:168
maxCODEWORD( n1 n2 -- n3 )n3 = max(n1, n2)rv/words/comp.s:148
minCODEWORD( n1 n2 -- n3 )n3 = min(n1, n2)rv/words/comp.s:137
=CODEWORD( n1 n2 -- f )f = n1 == n2rv/words/comp.s:124
<>CODEWORD( n1 n2 -- f )f = n1 != n2rv/words/comp.s:113
>CODEWORD( n1 n2 -- f )f = n1 > n2rv/words/comp.s:60
<CODEWORD( n1 n2 -- f )f = n1 < n2rv/words/comp.s:49
<=CODEWORD( n1 n2 -- f )f = n1 <= n2rv/words/comp.s:39
>=CODEWORD( n1 n2 -- f )f = n1 >= n2rv/words/comp.s:29
0<CODEWORD( n -- f )f = n < 0rv/words/comp.s:22
0<>CODEWORD( n -- f )f = n != 0rv/words/comp.s:14
0=CODEWORD( n -- f )f = n == 0rv/words/comp.s:5
0>COLON( n -- f )f = n > 0core/words/greater-zero.s:3
withinCOLON( n min max -- f )f = min <= n < max | max < min <= n | n < max < mincore/words/within.s:3
u>CODEWORD( u1 u2 -- f )f = u1 > u2rv/words/comp.s:102
u<CODEWORD( u1 u2 -- f )f = u1 < u2rv/words/comp.s:91
u<=CODEWORD( u1 u2 -- f )f = u1 <= u2rv/words/comp.s:81
u>=CODEWORD( u1 u2 -- f )f = u1 >= u2rv/words/comp.s:71

MATH

WordTypeStack SignatureDescriptionLocation
*CODEWORD( n1 n2 -- n3 )n3 = n1 * n2rv/words/star.s:3
+CODEWORD( n1 n2 -- n3 )n3 = n1 + n2rv/words/plus.s:3
-CODEWORD( n1 n2 -- n3 )n3 = n1 - n2rv/words/minus.s:3
/CODEWORD( n1 n2 -- n3 )n3 is quotient of n1 / n2rv/words/muldiv.s:18
modCODEWORD( n1 n2 -- n3 n4 )n3 is remainder and n4 the quotient of n1 / n2rv/words/muldiv.s:27
/modCODEWORD( n1 n2 -- n3 n4 )n3 is remainder and n4 the quotient of n1 / n2rv/words/muldiv.s:46
*/COLON( n1 n2 n3 -- n4 )n4 = n1 * n2 / n3core/words/star-slash.s:1
*/modCOLON( n1 n2 n3 -- n4 n5)n5 is the quotient and n4 the remainder of n1 * n2 / n3core/words/star-slash-mod.s:1
u/modCODEWORD( u1 u2 -- u3 u4 )u3 is remainder and u4 the quotient of u1 / u2rv/words/muldiv.s:36
1-CODEWORD( n1 -- n2 )n2 = n1 - 1rv/words/1-minus.s:2
1+CODEWORD( n1 -- n2 )n2 = n1 + 1rv/words/1-plus.s:2
2-CODEWORD( n1 -- n2 )n2 = n1 - 2rv/words/2-minus.s:2
2+CODEWORD( n1 -- n2 )n2 = n1 + 2rv/words/2-plus.s:2
2/CODEWORD( n1 -- n2 )n2 = n1 / 2rv/words/2-slash.s:2
2*CODEWORD( n1 -- n2 )n2 = 2 * n1rv/words/2-star.s:2
notCOLON( f1 -- f2 )f = ~f (logical not)rv/words/logic.s:29
orCODEWORD( x1 x2 -- x3 )x3 = x1 | x2rv/words/logic.s:14
andCODEWORD( x1 x2 -- x3 )x3 = x1 & x2rv/words/logic.s:5
xorCODEWORD( x1 x2 -- x3 )x3 = x1 ^ x2rv/words/xor.s:2
invertCODEWORD( x1 -- x2 )x2 = ~x1 (bitwise)rv/words/invert.s:2
lshiftCODEWORD( x1 u -- x2 )x2 = x1 << urv/words/logic.s:43
rshiftCODEWORD( x1 u -- x2 )x2 = x1 >> urv/words/logic.s:35
ashiftCODEWORD( n1 u -- n2 )n2 = n1 >> u (arithmetic shift right, sign filled)rv/words/ashift.s:2
absCODEWORD( n1 -- n2 )n2 = abs(n1)rv/words/abs.s:2
negateCODEWORD( n1 -- n2 )n2 = -n1rv/words/negate.s:3

MIXED

WordTypeStack SignatureDescriptionLocation
m*CODEWORD( n1 n2 -- d )d = n1*n2rv/words/muldiv.s:8
m+COLON( d1 n -- d2 )d2 = d1 + ncore/words/mplus.s:3
um*CODEWORD(u1 u2 -- ud )ud = u1 * u2rv/words/umstar.s:3
um/modCOLON( ud u1 -- u2 u3 )Divide ud by u1, giving the quotient u3 and the remainder u2.core/words/um-slash-mod.s:1
sm/remCOLON( d n1 -- n2 n3 )alias for m/modcore/words/m-slash-mod.s:34
m/modCOLON( d n1 -- n2 n3 )n3 is quotient and n2 remainder of d / n1core/words/m-slash-mod.s:1

DOUBLE

WordTypeStack SignatureDescriptionLocation
s>dCODEWORD( n -- d )converts n to double cell d (MSB cell is higher in the stack)rv/words/double.s:4
d=
d0=CODEWORD( d -- f )f = d == 0rv/words/double.s:180
d0<CODEWORD( d -- f )f = d < 0rv/words/double.s:172
d>
d<
d-CODEWORD( d1 d2 - d3 )d3 = d1 - d2rv/words/d-minus.s:3
d+CODEWORD( d1 d2 -- d3 )d3 = d1 + d2rv/words/d-plus.s:3
d/
d/mod
ud*COLONunclear, maybe broken?core/words/ud-star.s:15
ud/modCODEWORD(ud1 ud2 -- ud3 ud4 )ud3 remainder, ud4 quotient of ud1 / ud2rv/words/double.s:54
d2/CODEWORD( d1 -- d2 )d2 = d1 / 2rv/words/d-2slash.s:3
d2*CODEWORD( d1 -- d2 )d2 = d1 * 2rv/words/d-2star.s:3
dnegateCODEWORD( d1 -- d2 )d2 = -d1rv/words/dnegate.s:3
dabsCOLON( d -- ud )ud = abs(d)core/words/dabs.s:2

MEMORY

WordTypeStack SignatureDescriptionLocation
!CODEWORD( x addr -- )[addr] = x; store word x at addrrv/words/store.s:3
@CODEWORD(addr -- x)x = [addr]; load word at addrrv/words/fetch.s:2
h!CODEWORD( x addr -- )[addr] = half(x); store halfword x to addrrv/words/memory.s:130
h@CODEWORD( addr -- x )x = half([addr]); load halfword at addrrv/words/memory.s:123
c!CODEWORD( c addr -- )[addr] = byte(c); store byte c to addrrv/words/memory.s:113
c@CODEWORD( addr -- c )c = byte([addr]); load byte at addrrv/words/memory.s:106
+!CODEWORD( n addr -- )[addr] = [addr] + n; add n to the word at addrrv/words/memory.s:94
fillCODEWORD( addr n c -- )fill n bytes from addr with crv/words/memory.s:61
moveCODEWORD( addr1 addr2 n -- )copy n bytes from addr1 to addr2rv/words/move.s:3
2@COLON( a -- x1 x2 )x1 = [a+cellsize], x2 = [a]core/words/2fetch.s:2
2!COLON( x1 x2 a -- )[a] = x2, [a+cellsize] = x1core/words/2store.s:2
char+CODEALIAS1PLUScore/words/char-plus.s:11
charsIMMED( n1 -- n2 )n2 = n1 * char-size (1)core/words/chars.s:2
cellsCODEWORD( n1 -- n2 )n2 = n1 * cellsizerv/words/cells.s:2
cellCONSTANTcellsizecore/words/num-constants.s:11
cell-CODEWORD( n1 -- n2 )n2 = n1 - cellsizerv/words/cell-minus.s:2
cell+CODEWORD( n1 -- n2 )n2 = n1 + cellsizerv/words/cell-plus.s:2
alignCOLONalign RAM space to cell sizecore/words/align.s:4
hereCOLONreturn address of next free space in RAMcore/words/here.s:3
allotCOLON( u -- )allocate u bytes in RAMcore/words/allot.s:3
alignedCOLONcore/words/aligned.s:12
>ramCOLONcompile new words to RAMcore/words/here.s:40
>flashCOLONcompile new words to flashcore/words/here.s:27
memmodeVALUE00 compile to RAM, -1 compile to FLASHcore/words/memmode.s:3
valignCOLON( -- )align VP to cell boundary in variable RAM poolcore/words/valign.s:3
vhereCOLON( -- addr )return variable pool pointer VPcore/words/vhere.s:3
vallotCOLON( u -- )allocate u bytes from the variable RAM poolcore/words/vallot.s:3
vpPVALUEvp0RAM pool pointercore/words/ramhere.s:7
vp.maxCONSTANTvp.maxend of the RAM poolcore/words/ramhere.s:5
vp0CONSTANTvp0start of the RAM poolcore/words/ramhere.s:3
dalignCOLON( -- )cell align dpcore/words/dalign.s:21
dhereCOLON( -- addr )return dictionary pointercore/words/dhere.s:3
dallotDEFERXT_CARETDALLOTcore/words/dallot.s:3
dpVALUEdp0.ramdictionary pointercore/words/here.s:23
dp0.ramCONSTANTdp0.ramstart of RAM dictionarycore/words/here.s:10
dp.ramVALUEdp0.ramRAM dictionary pointercore/words/here.s:12
dp.ram.maxCONSTANTdp.ram.maxend of RAM dictionarycore/words/here.s:14
dp0.flashCONSTANTdp0.flashinitial flash dictionary pointercore/words/here.s:17
dp.flashVALUEdp0.flashflash dictionary pointercore/words/here.s:20
up!CODEWORD( addr -- )set the user area pointer to addrrv/words/up.s:9
up@CODEWORD( -- addr )addr is the user area pointerrv/words/up.s:3

STRING

WordTypeStack SignatureDescriptionLocation
."IMMED(C: "ccc" -- )( -- )compiles string into dictionary to be printed at runtimecore/words/dot-quote.s:3
s"IMMED(C: "ccc" -- )( -- addr u )compiles a string to dictionary, at runtime leaves its addr/len on stackcore/words/squote.s:3
sub-string?COLON( s1 s2 -- f )f is true if s1 found in s2core/words/search.s:32
numberCOLON(addr len -- [n|d size] f)convert a string at addr to a numbercore/words/number.s:2
>numberCOLON( ud1 c-addr1 u1 -- ud2 c-addr2 u2 )convert a string to a number c-addr2/u2 is the unconverted stringcore/words/to-number.s:3
digit?COLON( c -- [ number | ] flag )tries to convert a character to a number, set flag accordinglycore/words/digit-q.s:3
toupperCOLON( c -- C )if c is a lowercase letter convert it to uppercasecore/words/to-upper.s:3
/stringCOLON( addr1 u1 n -- addr2 u2 )adjust string from addr1 to addr1+n, reduce length from u1 to u2 by ncore/words/slash-string.s:3
parseCOLON( char "ccc" -- c-addr u )parse string from the input buffer delimited by charcore/words/parse.s:3
parse-nameCOLON( "name" -- s )parse whitespace delimited string from SOURCEcore/words/parse-name.s:3
cskipCOLON( addr1 n1 c -- addr2 n2 )skips leading occurrences of c in s1, s2 starts at the 1st non-c charactercore/words/cskip.s:3
cscanCOLON( ca1 u1 c -- ca1 u2 )s2 is the longest prefix of s1 without ccore/words/cscan.s:3
searchCOLON( s1 s2 -- s3 f )search s1 for s2 leaving flag and tail string s3. No match s3==s1core/words/search.s:3
siftCOLON( s1 s2 -- s3 f )find s1 in s2 leaving flag and tail string s3core/words/search.s:39
boundsCOLON( addr len -- addr+len addr )convert a string to an address rangecore/words/bounds.s:2
compareCODEWORD( addr1 n1 addr2 n2 -- f )f is true if both strings are the same (based on WANT_IGNORECASE)rv/words/compare.s:3
countCOLON( addr -- addr+1 n )get count information out of a counted stringcore/words/count.s:3
cfg-recognizerDATAcore/words/forth-recognizer.s:5
forth-recognizerVALUEPFA_CFG_RECOGNIZERcore/words/forth-recognizer.s:3
splitCOLONcore/words/rec-split.s:11
rectype-splitDATAcore/words/rec-split.s:6
rec-splitCOLONcore/words/rec-split.s:2
rec-numCOLONcore/words/rec-intnum.s:13
rectype-dnumDATAcore/words/rec-intnum.s:8
rectype-numDATAcore/words/rec-intnum.s:3
rectype-xtDATAcore/words/rec-find.s:15
rec-findCOLONcore/words/rec-find.s:3
rectype-nullDATAcore/words/rec-null.s:3
recognizeCOLON(addr len recstack -- i*x rectype-? | rectype-null )walk the recognizer stackcore/words/recognize.s:3

DICTIONARY

WordTypeStack SignatureDescriptionLocation
'COLON( "name" -- xt )leave xt of "name" on stackcore/words/tick.s:3
c,DEFER( c -- )append c to the dictionarycore/words/ccomma.s:3
,DEFER( x -- )append x to the dictionarycore/words/comma.s:3
h,
(c,)
(,)
s,COLON( addr u -- )append string at addr to the dictionary (with count prefix)core/words/scomma.s:11
chkdalignCOLON( -- )check DP for cell alignment, throw if notcore/words/chkdalign.s:3
revealCOLON( -- )makes the newest word entry visible in its wordlistcore/words/reveal.s:3
newestDVARIABLEnewest word created, FFA[0] and WID[1]core/words/newest.s:3
latestVARIABLECFA/XT of the latest word being definedcore/words/latest.s:3
valueCOLON( x "name" -- )create value "name" with initial of xcore/words/value.s:3
toIMMED( x "name" -- )set value "name" to xcore/words/alto.s:10
isIMMED( xt "name" -- )set deferred action "name" to xtcore/words/is.s:3
variableCOLON( "<spaces>name" -- )create variable definition for namecore/words/variable.s:3
constantCOLON( -- x )(C: x "name" -- )create constant "name" with value xcore/words/constant.s:3
:nonameCOLON( -- )start an unnamed colon wordcore/words/colon-noname.s:3
headerCOLON( addr u wid -- ffa )creates header (without CF/PF) for name at addr, in wordlist widcore/words/header.s:4
findCOLON( c-addr -- 0 | xt -1 | xt 1 )search for word matching counted string, return xt if foundcore/words/find.s:3
find-xtCOLON( c-addr u -- 0 | xt -1 | xt 1 )search for word s1, return xt if foundcore/words/find-xt.s:3
forgetCOLON( "subs" -- )Remove most recent word matching substring from the RAM wordlistcore/words/forget.s:117
wordsCOLON( -- )list words visible in current search ordercore/words/words.s:11
executeCODEWORD( xt -- )execute XT at the top of the stackrv/words/execute.s:3
evaluateIMMED( a u -- )interpret a Forth string of length u starting at address acore/words/evaluate.s:49
nfa>stringCOLON( nfa -- c-addr u )Given NFA leave c-addr u stringcore/words/dictopt-newb.s:211
nfa>xtCOLON( nfa -- xt )Given NFA find XTcore/words/dictopt-newb.s:165
lfa>ffaCOLON( lfa -- ffa )Given LFA find FFAcore/words/dictopt-newb.s:216
ffa>nfaCOLON( ffa -- nfa )Given FFA find NFAcore/words/dictopt-newb.s:226
xt>stringCOLON( xt -- c-addr u )leave string associated with name of xtcore/words/xt2string.s:54
>bodyCOLON( xt -- pfa )given xt return pfacore/words/to-body.s:3
ffa>stringCOLON( ffa -- caddr u )Given FFA leave c-addr u stringcore/words/dictopt-newb.s:238
ffa2cfaCOLON( ffa -- xt )Given FFA find XTcore/words/dictopt-newb.s:205
ffa>lfaCOLON( ffa -- lfa )Given FFA find LFAcore/words/dictopt-newb.s:221
xt>ffaCOLON( xt -- ffa )Given XT find FFAcore/words/dictopt-newb.s:231
xt>nfaCOLON( xt -- nfa | 0 )Given XT find NFA , 0 if not found, [NFA]==3 if NONAME|HEADLESScore/words/dictopt-newb.s:94
xt>lfaCOLON( xt -- lfa )Given XT find LFAcore/words/dictopt-newb.s:247
?ipCOLON( a -- f )is a likely to be a valid IP addresscore/words/debugger.s:151
?nfaCOLON( nfa -- nfa )nfa when nfa!=0 and [nfa]!=3core/words/dictopt-newb.s:182
anybranch?
branch?
colon?COLON( a -- f )f is true if a contains XT of DOCOLONcore/words/dicthelp.s:83
codeword?
compile?
condbranch?
exit?COLON( a -- f )f is true if [a] is XT of EXIT | EXITIcore/words/dicthelp.s:98
literal?
loop?
sliteral?COLON( a -- f )f is true if a contains XT of DOSLITERALcore/words/dicthelp.s:38
value?
variable?
xliteral?
ip2nameCOLON( a -- u s true | u a false )convert IP a to the name of its containing word, u = a - xt (in cells)core/words/debugger.s:211
ip2xtCOLON( a -- xt u true | a false )convert IP to the XT of its containing word, u = a - xt (in cells)core/words/debugger.s:181
flag.tableCONSTANT0x100core/words/flag.s:24
flag.initCONSTANT0x080core/words/flag.s:22
flag.deferCONSTANT0x040core/words/flag.s:20
flag.valueCONSTANT0x020core/words/flag.s:18
flag.pvalueCONSTANT0x200core/words/flag.s:26
flag.immedCONSTANT0x010core/words/flag.s:16
flag.conCONSTANT0x008core/words/flag.s:14
flag.colonCONSTANT0x004core/words/flag.s:12
flag.dvarCONSTANT0x002core/words/flag.s:10
flag.varCONSTANT0x001core/words/flag.s:8
flag.codeCONSTANT0x000core/words/flag.s:6
flag.childCONSTANT0x400core/words/flag.s:28
flag.headerVALUE0x00core/words/flag.s:2

WORDLIST

WordTypeStack SignatureDescriptionLocation
empty.flashCOLON( -- )empty the flash dictionarycore/words/empty.s:50
empty.ramCOLON( -- )empty the RAM dictionarycore/words/empty.s:29
wordlistCOLON( -- wid )create a new, empty wordlistcore/words/wordlist.s:3
forth-wordlistVALUEFFA of last word; system default wordlistcore/macros.inc
ram-wordlistVALUE0FFA of last word; words compiled into RAM at runtimecore/words/ramwordlist.s:3
core-wordlistCONSTANTFFA of last word; core words compiled at build timecore/macros.inc
environmentVALUEFFA of last word; standard environment search listcore/macros.inc
arch-wordlistVALUEFFA of last word; architecture specific wordscore/macros.inc
currentVALUEXT_RAM_WORDLISTcurrent compilation wordlistcore/words/current.s:3
get-currentCOLON( -- wid )get current compilation word listcore/words/current.s:6
set-currentCOLON( wid -- )set current compilation word list to widcore/words/current.s:10
wlscopeDEFERXT_GET_CURRENTcore/words/wlscope.s:3
search-wordlistCOLON( c-addr len wid -- [ 0 ] | [ xt [-1|1]] )searches the word list wid for the word at c-addr/lencore/words/search-wordlist.s:3
show-wordlistCOLON( wid -- )list words in wordlist widcore/words/show-wordlist.s:3
traverse-wordlistCOLON( xt wid -- )execute xt (addr -- f) with FFA of each word in wordlist widcore/words/traverse-wordlist.s:3
orderCOLON( -- )show currently configured search ordercore/words/order.s:78
cfg-orderDEFERXT_ORDERDOTONLYcurrently configured search ordercore/words/order.s:16
onlyCOLON( -- )set search order to RAM dictionary modecore/words/order.s:59
coreCOLON( -- )set search order to core words only modecore/words/order.s:51
forthCOLON( -- )set search order to FLASH dictionary modecore/words/order.s:43
order.forthDATAFLASH dictionary mode search ordercore/words/order.s:36
order.coreDATAcore words only search ordercore/words/order.s:29
order.onlyDATARAM dictionary mode search ordercore/words/order.s:19
previousCOLON( -- )drop first wordlist from the search ordercore/words/order.s:183
set-orderCOLON( widn ... wid1 n -- )set search order to the list of wids on stackcore/words/order.s:147
get-orderCOLON( -- widn ... wid1 n )put wids of the search order on stackcore/words/order.s:108
order.tableNVARIABLE9core/words/order.s:133
top>COLONcore/words/order.s:10
>topCOLONcore/words/order.s:5
topVALUE0core/words/order.s:2

COMPILER

WordTypeStack SignatureDescriptionLocation
:COLON( "name" -- )create a colon word entry in the dictionarycore/words/colon.s:3
;IMMED( -- )finish colon word definitioncore/words/semicolon.s:3
;iIMMED( -- )finish interrupt colon word definitioncore/words/semicoloni.s:3
(IMMED( "ccc" -- )skip everything up to the closing bracket on the same linecore/words/l-paren.s:3
\#IMMED( "ccc" -- )skip everything up to the end of the current linecore/words/backslash.s:12
\IMMED( "ccc" -- )skip everything up to the end of the current linecore/words/backslash.s:3
recurseIMMED(C: -- )compile the XT of the word currently being defined into the dictionarycore/words/recurse.s:3
postponeIMMED(C: "name" -- )append the compilation semantics of "name" to the dictionarycore/words/postpone.s:3
immediateCOLON( -- )set FFA of last created word to immediate (RAM words only)core/words/immediate.s:40
stateVARIABLEtrue when in compilation state, false otherwisecore/words/state.s:3
createCOLON(C: "name" -- )( -- a-addr )create dictionary header for name (DATA)core/words/create.s:3
<buildsCOLON(C: "name" -- )( -- )build dictionary header for namecore/words/builds.s:3
builds>COLON(C: "name" -- )( -- )add exit <builds ... builds> ... does> ... ; (so SEE will work)core/words/builds.s:79
does>IMMED()compiles (does) followed by a jump and link to xdodoesrv/words/does.s:3
charCOLON( "name" -- c )parse name return first lettercore/words/char.s:3
[IMMED( -- )enter interpreter modecore/words/left-bracket.s:2
]COLON( -- )enter compiler modecore/words/right-bracket.s:3
[']IMMED(C: "name" -- xt )parse "name" to XT at compile timecore/words/brackettick.s:3
[compile]IMMED( -- )(C: "name" -- )compile code that will append XT of "name" to the dictionarycore/words/bracketcompile.s:3
[char]IMMED( -- )(C: "ccc" -- )compile first letter of "ccc" as literalcore/words/bracketchar.s:3
compileCOLON( -- )append the XT that follows in the calling word to the dictionarycore/words/compile.s:3
xliteralIMMEDcore/words/xliteral.s:3
literalIMMED(C: x -- )compile code that will append x as a literal to the dictionarycore/words/literal.s:3
2literalIMMED(C: d -- )compile code that will append cell pair literal to the dictionarycore/words/2literal.s:3
sliteralIMMED(C: s -- )compile code that will append s as a literal to the dictionarycore/words/sliteral.s:3
Udefer!COLONcore/words/udefer.s:7
Udefer@COLONcore/words/udefer.s:3
defer!COLON( xt1 xt2 -- )stores xt1 as the xt to be executed when xt2 is calledcore/words/defer-store.s:2
defer@COLON( xt1 -- xt2 )returns the XT associated with defer xt1core/words/defer-fetch.s:2
deferCOLON( "name" -- )create deferred word "name"core/words/defer.s:3

FLOW

WordTypeStack SignatureDescriptionLocation
?abortCOLON( f s -- )abort and type string s if f truecore/words/q-abort.s:3
abort"IMMED( f -- )abort with the enclosed string if f is truecore/words/abort-string.s:3
abortCOLON( i*x -- )(R: j*x -- )throw EABRT exception (-1)core/words/abort.s:3
trap.baseCONSTANTram_vector_basebeginning of Forth interrupt tablecore/words/traps.s:5
trap!COLON( xt n -- )TRAP: store xt at trap number n in RAM vectorcore/words/traps.s:8
throwCOLON( n -- )throw exception n if n != 0core/words/throw.s:2
catchCOLON( i*x xt -- j*x 0 | i*x n )execute XT and check for exceptionscore/words/catch.s:6
handlerUSERUSER_HANDLERused by catch/throwcore/words/catch.s:3
exitCODEWORD(R: addr -- )loads addr into IP; compiled by exitrv/words/exit.s:8
aheadIMMED( -- )(C: -- a )unconditional jump past thencore/words/ahead.s:3
ifIMMED( f -- )(C: -- a )if f is false jump past else or thencore/words/if.s:3
elseIMMED( -- )(C: a1 -- a2 )jump past thencore/words/else.s:3
thenIMMED( -- )(C: a -- )ends an if, target of forward jumpscore/words/then.s:3
beginIMMED( -- )(C: -- a )start of while/repeat, until or again loopcore/words/begin.s:3
untilIMMED( f -- )(C: a -- )if f is true jump back to begin, otherwise leave the loopcore/words/until.s:3
againIMMED( -- )(C: a -- )unconditional jump back to begincore/words/again.s:3
whileIMMED( f -- )(C: a1 -- a2 a1 )if f is false jump past repeatcore/words/while.s:3
repeatIMMED( -- )(C: a1 a2 -- )unconditional jump back to begin (over while)core/words/repeat.s:3
doIMMED( n1 n2 -- )(R: -- loop-sys )(C: -- a )(L: -- 0 )n1=limit, n2=start do .. [+]loopcore/words/do.s:3
?doIMMED( n1 n2 -- )(R: -- | loop-sys )(C: -- a1 )(L: -- 0 a2 )n1=limit, n2=start ?do .. [+]loopcore/words/qdo.s:3
iCODEWORD( -- n)inner-most loop indexrv/words/i.s:3
jCODEWORD( -- n)second loop indexrv/words/j.s:2
unloopCODEWORD(R: loop-sys -- )remove loop-sys; required if you want exit the word rather then leave the looprv/words/unloop.s:3
leaveIMMED( -- )(R: loop-sys -- )immediately leave the current DO..LOOPcore/words/leave.s:2
loopIMMED( -- )(R: loop-sys -- loop-sys | )(C: a -- )(L: i*a -- )update loop-sys and jump back to do/?do or exit loopcore/words/loop.s:3
+loopIMMED( n -- )(R: loop-sys -- loop-sys | )(C: a -- )(L: i*a -- )update loop-sys with n and jump back to do/?do or exit loopcore/words/plusloop.s:3
endloopIMMED(C: a -- )(L: i*a -- )resolve all the jumps of the do..loopcore/words/endloop.s:3
matchIMMED( x -- x )test value x for match..act..end..endmatchcore/words/match.s:3
actIMMED( x xt -- | x )apply test xt ( x -- f ) if f is t then do bodycore/words/match.s:8
endIMMED( -- )close for act in match..act..end..endmatchcore/words/match.s:21
endmatchIMMED( x -- )close for match in match..act..end..endmatchcore/words/match.s:28
caseIMMED( x -- x )test value x for case..of..endof..endcasecore/words/case.s:3
ofIMMED( x n -- | x )if x equals n do body of..endof else leave x on stackcore/words/case.s:8
endofIMMED( -- )close for of in of..endofcore/words/case.s:20
endcaseIMMED( x -- )close for case in case..of..endof..endcasecore/words/case.s:27

IO

WordTypeStack SignatureDescriptionLocation
serial-emit?CODEWORDrv/mcu/ch32v307/words/usart.s:116
serial-emitCODEWORDrv/mcu/ch32v307/words/usart.s:95
serial-key?CODEWORDrv/mcu/ch32v307/words/usart.s:79
serial-keyCODEWORDrv/mcu/ch32v307/words/usart.s:69
emit?DEFER( -- f )ready for emission?core/words/emitq.s:2
serial-emit-pauseCOLON( c -- )emit c on serial connection, pause until ablecore/words/emit.s:5
emitDEFER( c -- )emit single character, pause until ablecore/words/emit.s:2
key?DEFER( -- f )character ready to be received?core/words/keyq.s:2
serial-key-pauseCOLON( -- c )receive single character, pause until availablecore/words/key.s:5
keyDEFER( -- c )receive single character, pause until availablecore/words/key.s:2
tibCODEWORD( -- addr )terminal input buffer addressrv/words/tib.s:4
#tibVARIABLE( -- addr )[addr] is number of characters stored in TIBrv/words/tib.s:11
>inVARIABLEholds current read position in TIBcore/words/to-in.s:2
source-tibCOLON( -- s )contents of TIBcore/words/source.s:6
sourceDEFER( -- s )contents of current sourcecore/words/source.s:3
acceptCOLON( ca u1 -- u2 )receive up to u1 bytes or up to newline, store at ca; u2 is count of bytes received.core/words/accept.s:3
refill-tibCOLON( -- f )refills TIBcore/words/refill.s:9
refillDEFER( -- f )refills current sourcecore/words/refill.s:3
refill-buf-sizeCONSTANTrefill_buf_sizecore/words/refill.s:6
?crlfCOLON( c -- f )true if c is CR or LFcore/words/accept.s:44
bsCOLON( -- )emit backspacecore/words/accept.s:34

OUTPUT

WordTypeStack SignatureDescriptionLocation
.COLON( n -- )print n as signed numbercore/words/dot.s:3
u.COLON( u -- )print u as unsignedcore/words/u-dot.s:3
u.rCOLON( u u2 -- )print u as unsigned, right aligned at width u2core/words/u-dot-r.s:3
d.COLON( d -- )print d as signed numbercore/words/d-dot.s:3
d.rCOLON( d u -- )print d as signed number, right aligned at width ucore/words/d-dot-r.s:3
ud.COLON( ud -- )print ud as unsigned doublecore/words/ud-dot.s:3
ud.rCOLON( ud u -- )print ud as unsigned number, right aligned at width ucore/words/ud-dot-r.s:3
r.COLON( n -- )output n as 32 bit binary with cribcore/words/dump.s:95
r..COLON( n -- )output n as 32 bit binarycore/words/dump.s:102
hex.COLON( u -- )output u as unsigned 32 bit hexcore/words/dump.s:82
8x.COLON( u -- )display u as 8 digit hex no spacecore/words/dump.s:69
2x.COLON( u -- )display u as 2 digit hexcore/words/dump.s:59
x.COLON( u -- )display u without trailing spacecore/words/dump.s:51
.8hexCOLON( u -- )display u as 8 digit hexcore/words/dump.s:42
spacesCOLON( u -- )emit u spacescore/words/spaces.s:3
spaceCOLON( -- )emit a spacecore/words/space.s:3
blCONSTANT32space charactercore/words/bl.s:3
crCOLON( -- )emit CR then emit LFcore/words/cr.s:2
typeCOLON( s -- )emit string score/words/type.s:3
itypeCOLON( s -- )emit string score/words/type.s:14
baseUSER( -- a )holds the number conversion radixcore/words/base.s:2
binaryCOLON( -- )set base to binarycore/words/binary.s:3
hexCOLON( -- )set base to hexadecimalcore/words/hex.s:3
decimalCOLON( -- )set base to decimalcore/words/decimal.s:3
<#COLON( -- )PNO: initialize HLD to PADcore/words/sharp.s:3
signCOLON( n -- )PNO: place minus at HLD if n is negativecore/words/sign.s:3
#sCOLON( d -- 0 )PNO: convert all digits until 0 (zero) is reachedcore/words/sharp.s:24
#COLON( d1 -- d2 )PNO: convert one digitcore/words/sharp.s:8
holdCOLON( c -- )PNO: prepend character to HLD, move HLDcore/words/hold.s:6
#>COLON( d -- s )PNO: convert PNO buffer into a stringcore/words/sharp.s:30
hldVARIABLEPNO: holds current write position in PNO buffercore/words/hold.s:3
padCOLON( -- a )temporary scratch buffer (256B); a is the endcore/words/pad.s:8

SYSTEM

WordTypeStack SignatureDescriptionLocation
coldCODEWORD( i*x -- )(R: j*y -- )assembler part of the boot sequence, starting the VMrv/mcu/ch32v307/words/cold.s:2
warmCOLON( -- )high level part of the boot sequence, VM is runningrv/mcu/ch32v307/words/warm.s:31
init-ramCOLON( -- )startup/reset RAM initializationcore/words/init-ram.s:3
turnkeyDEFER( -- i*x )startup/reset actioncore/words/turnkey.s:3
appl-turnkey
quitCOLON( -- )top level frame of the VM, endless loopcore/words/quit.s:2
pauseDEFER( -- )multitasking: task switch pointcore/words/pause.s:2
interpretCOLON( i*x -- j*x )interpret SOURCE word by wordcore/words/interpret.s:3
msCOLON( u -- )u ms delay looprv/words/ms.s:3
.verCOLON( -- )show amforth versioncore/words/ver.s:3
.buildENVIRONMENT( -- )show build informationrv/mcu/ch32v307/words/build-info.s:15
build.revENVIRONMENT( -- addr u )string with build revisionrv/mcu/ch32v307/words/build-info.s:7
build.timeENVIRONMENT( -- addr u )string with build timerv/mcu/ch32v307/words/build-info.s:2
build.configENV_CONSTANT( -- u )build configuration flagsrv/mcu/ch32v307/words/build-info.s:12
archENV_CONSTANT( -- u )cpu architecture, 1=ARM/2=RVrv/words/env-arch.s:1
cpuENVIRONMENT( -- addr u )string with cpu identifierrv/mcu/ch32v307/words/env-cpu.s:8
boardENVIRONMENT( -- addr u )string with board identifierrv/mcu/ch32v307/words/env-board.s:3
versionENVIRONMENT( -- u )amforth version numbercore/words/env-forthversion.s:2
nameENVIRONMENT( -- s )amforth namecore/words/env-forthname.s:2
/userENVIRONMENT( -- u )size of the user areacore/words/env-usersize.s:2
set-baseCOLONcore/words/set-base.s:6
basesDATAcore/words/set-base.s:3
.readyDEFERXT_PROMPTREADYDEFAULTcore/words/prompt-ready.s:3
.okDEFERXT_PROMPTOKDEFAULTcore/words/prompt-ok.s:3
.inputDEFERXT_PROMPTINPUT_DEFAULTcore/words/prompt-input.s:3
.errorDEFERXT_PROMPTERROR_DEFAULTcore/words/prompt-error.s:3
first-boot.doneCOLON( -- )mark first-boot as completedcore/words/first-boot.s:11
?first-bootCOLON( -- f )booting fresh uploaded amforth for the first time?core/words/first-boot.s:7
first-boot.markerCONSTANTfirst_boot_markerinitial content of the first-boot pagecore/words/first-boot.s:4
first-boot.startCONSTANTfirst_bootaddress of the first-boot pagecore/words/first-boot.s:1

TOOLS

WordTypeStack SignatureDescriptionLocation
.sCOLON( -- )show data stack non-destructivelycore/words/dot-s.s:3
.kCOLON( nN..n1 -- )delete all entries in stackcore/words/dot-k.s:8
.rsCOLON( u -- )print return stack (top first) skipping top u cells, use raw IP addressescore/words/debugger.s:299
.btCOLON( u -- )print return stack (top first) skipping top u cells, use word namescore/words/debugger.s:250
.itcCOLON( u1 u2 -- )dump u1 XTs starting from current IP u2 cells down the return stackcore/words/debugger.s:329
dumpCOLON( a u -- )dump u lines of 16 bytes including [a]core/words/dump.s:125
?asciiCOLON( c -- f )f is true if c is printable charactercore/words/dump.s:13
vdumpCOLON( addr u -- )dump u bytes from addr as wordscore/words/vdump.s:1
breakCODEWORD( -- )activate the debugger (if enabled)rv/interpreter.s:45
debug+COLON( -- )enable debugger, break will interrupt executioncore/words/debugger.s:500
debug-COLON( -- )disable debugger, break will do nothingcore/words/debugger.s:508
||IMMED( -- )code after || is ignored during compilation if debugger is disabledcore/words/barbar.s:3
showCOLON( "name" -- )SHOW: List words containing substring namecore/words/show.s:254

FLASH

WordTypeStack SignatureDescriptionLocation
flash.cellCONSTANTflash_cellsize of the flash write cell (bytes)core/words/flash-common.s:8
flash.pageCONSTANTflash_pagesize of the flash erase page (bytes)core/words/flash-common.s:6
flash.erasedCONSTANTflash_erasedvalue of an erased flash cell (4 bytes)core/words/flash-common.s:10
flash.startCONSTANTflash.startstart of the FLASH memory regioncore/words/flash-common.s:12
flash.lowCONSTANTflash.lowstart of the core dictionary in FLASHcore/words/flash-common.s:14
flash.maxCONSTANTflash.maxend of the FLASH memory regioncore/words/flash-common.s:16
flash.eraseDEFER( addr -- )erase flash page at addrcore/words/flash-common.s:28
flushCOLON( -- )force flush (write) of flash.cachecore/words/flash-common.s:57
nalignedCODEWORD( n a1 -- a2 )a2 is a1 aligned (up) at n bytes (n must be power of 2)rv/words/naligned.s:3
!iDEFER( x addr -- )write x at addr in flashcore/words/flash-common.s:21
pv.doCOLON( xt -- )run xt ( pv-xt -- f ) for every pvalue in forth-wordlistcore/words/pvalue.s:444
pv.initCOLON( -- )replay pvarena records, set pvpcore/words/pvalue.s:303
vaddrCOLON( "name" -- addr )RAM address of value "name"core/words/pvalue.s:232
pv.storeCOLON( x addr -- )update pvalue identified by RAM addr to value xcore/words/pvalue.s:204
pvpVALUE( -- addr )address of the next free cell in active arenacore/words/pvalue.s:196
pv.reset-hardCOLON( -- )erase entire pvflash and reinitialize pvalue systemcore/words/pvalue.s:457
2!pvfDEFER( x1 x2 addr -- )[addr] = x2, [addr+cellsize] = x1 (in the PV flash)core/words/pvalue.s:188
pvflash.startCONSTANTpvflash.startstart address of PV flashcore/words/pvalue.s:183
pvflash.sizeCONSTANTpvflash.sizetotal size of PV flashcore/words/pvalue.s:180
pvflash.pageCONSTANTpvflash.pagesize of PV flash page (erase size)core/words/pvalue.s:171
pvflash.cellCONSTANTpvflash.cellsize of PV flash cell (write size)core/words/pvalue.s:174
pvflash.erasedCONSTANTpvflash.erasedvalue of a cell in erased flashcore/words/pvalue.s:177
pvflash.eraseDEFER( addr -- )erase PV flash page at addrcore/words/pvalue.s:191
pvarena.sizeCONSTANTpvarena.sizesize of pvalue arenacore/words/pvalue.s:168
pvarena.initCOLON( -- )set pvarena to whichever arena should be currentcore/words/pvalue.s:241
pvarena.swapCOLON( -- )write fresh pvalues into the dormant arena and swap arenascore/words/pvalue.s:386
pvarena.eraseCOLON( addr -- )erase arena at addrcore/words/pvalue.s:348
pvarenaVALUE( -- addr )start address of the active arenacore/words/pvalue.s:199
pvarena.dormantCOLON( -- addr )start address of the dormant arenacore/words/pvalue.s:333
pvarena1CONSTANTpvarena1_loweraddress of pvalue arena 1core/words/pvalue.s:162
pvarena2CONSTANTpvarena2_loweraddress of pvalue arena 2core/words/pvalue.s:165

OTHER

WordTypeStack SignatureDescriptionLocation
falseCONSTANT0core/words/num-constants.s:9
trueCONSTANT-1core/words/num-constants.s:8
-1CONSTANT-1core/words/num-constants.s:7
4CONSTANT4core/words/num-constants.s:6
2CONSTANT2core/words/num-constants.s:5
1CONSTANT1core/words/num-constants.s:4
0CONSTANT0core/words/num-constants.s:3
map-stackCOLONcore/words/map-stack.s:3
forget.prior
m4fixCOLONcore/words/mop.s:56
mtogCOLONcore/words/mop.s:52
mclrCOLONcore/words/mop.s:48
msetCOLONcore/words/mop.s:44

MCU

WordTypeStack SignatureDescriptionLocation
#usart1CONSTANT53USART1: interrupt trap numberrv/mcu/ch32v307/words/usart.s:183
(h!i)CODEWORD( -- )rv/mcu/ch32v307/words/flash.s:80
+PACODEWORD( mask -- )GPIO: Set bits in mask | enable port A clk if mask=0rv/mcu/ch32v307/words/gpio.s:222
+PBCODEWORD( mask -- )GPIO: Set bits in mask | enable port B clk if mask=0rv/mcu/ch32v307/words/gpio.s:290
+PCCODEWORD( mask -- )GPIO: Set bits in mask | enable port C clk if mask=0rv/mcu/ch32v307/words/gpio.s:340
+PDCODEWORD( mask -- )GPIO: Set bits in mask | enable port D clk if mask=0rv/mcu/ch32v307/words/gpio.s:406
+ledCODEWORD( -- )LED: turn on (not) on-board LED jumpered to PC0rv/mcu/ch32v307/words/led.s:112
+usart1.dmarxCODEWORD( -- )USART1: enable DMArv/mcu/ch32v307/words/usart.s:176
+usart1.intCODEWORD( -- )USART1: enable global interruptrv/mcu/ch32v307/words/usart.s:165
+usart1.int.idleCODEWORD( -- )USART1: enable idle interruptrv/mcu/ch32v307/words/usart.s:143
+usbCODEWORDrv/mcu/ch32v307/words/usb.s:191
+usb.clkCODEWORDrv/mcu/ch32v307/words/usb.s:175
-PACODEWORD( mask -- )GPIO: Clr bits in mask | disable port A clk if mask=0rv/mcu/ch32v307/words/gpio.s:237
-PBCODEWORD( mask -- )GPIO: Clr bits in mask | disable port B clk if mask=0rv/mcu/ch32v307/words/gpio.s:305
-PCCODEWORD( mask -- )GPIO: Clr bits in mask | enable port C clk if mask=0rv/mcu/ch32v307/words/gpio.s:355
-PDCODEWORD( mask -- )GPIO: Clr bits in mask | enable port D clk if mask=0rv/mcu/ch32v307/words/gpio.s:421
-ledCODEWORD( -- )LED: turn off (not) on-board LED jumpered to PC0rv/mcu/ch32v307/words/led.s:118
-usart1.int.idleCODEWORD( -- )USART1: disable idle interruptrv/mcu/ch32v307/words/usart.s:150
-usart1.rxCODEWORD( -- )USART1: disable receiverrv/mcu/ch32v307/words/usart.s:157
-usb.clkCODEWORDrv/mcu/ch32v307/words/usb.s:183
PA~CODEWORD( n -- )GPIO: make pin n a push-pull outputrv/mcu/ch32v307/words/gpio.s:253
PA~~CODEWORD( n -- )GPIO: make pin n a multiplexed push-pull outputrv/mcu/ch32v307/words/gpio.s:268
PB~CODEWORD( n -- )GPIO: make pin n a push-pull outputrv/mcu/ch32v307/words/gpio.s:321
PC~CODEWORD( n -- )GPIO: make pin n a push-pull outputrv/mcu/ch32v307/words/gpio.s:371
PC~~CODEWORD( n -- )GPIO: make pin n a multiplexed push-pull outputrv/mcu/ch32v307/words/gpio.s:386
PD~CODEWORD( n -- )GPIO: make pin n a push-pull outputrv/mcu/ch32v307/words/gpio.s:453
PD~~CODEWORD( n -- )GPIO: make pin n a multiplexed push-pull outputrv/mcu/ch32v307/words/gpio.s:468
R32_GPIOA_CFGLRCONSTANT0x40010800rv/mcu/ch32v307/words/gpio.s:17
R32_RCC_APB2PCENRCONSTANT0x40021018rv/mcu/ch32v307/words/gpio.s:24
R32_USART1_STATRCONSTANT0x40013800rv/mcu/ch32v307/words/usart.s:12
^PDCODEWORD( mask -- )GPIO: Toggle pins in maskrv/mcu/ch32v307/words/gpio.s:437
^ledCODEWORD( -- )LED: toggle (not) on-board LED jumpered to PC0rv/mcu/ch32v307/words/led.s:124
blinkCOLONrv/mcu/ch32v307/words/blink.s:10
build-typeENVIRONMENTrv/mcu/ch32v307/words/env-cpu.s:14
callotCOLONrv/mcu/ch32v307/words/flash.s:48
dp.cacheVALUE0rv/mcu/ch32v307/words/flash.s:43
flash.cacheVARIABLErv/mcu/ch32v307/words/flash.s:45
flash.unlockCODEWORD( -- )FLASH: Unlock flashrv/mcu/ch32v307/words/flash.s:128
flash.writeCOLON( dp -- )write flash.cell BEFORE dprv/mcu/ch32v307/words/flash.s:177
led.delayCODEWORD( -- )LED: make arbitary delay for blinkyrv/mcu/ch32v307/words/led.s:139
led.initCODEWORD( -- )LED: Init (not) on-board LED jumpered to PC0rv/mcu/ch32v307/words/led.s:93
led.pulseCODEWORD( u -- )LED: make arbitary delay for blinky u=[0..3]rv/mcu/ch32v307/words/led.s:147
pin.highCODEWORD( pin port -- )GPIO: make pin on port highrv/mcu/ch32v307/words/gpio.s:129
pin.inCOLON( pin port -- )GPIO: make pin on port a floating inputrv/mcu/ch32v307/words/gpio.s:45
pin.lowCODEWORD( pin port -- )GPIO: make pin on port lowrv/mcu/ch32v307/words/gpio.s:138
pin.ppCOLON( pin port -- )GPIO: make pin on port a push-pull output (10MHz)rv/mcu/ch32v307/words/gpio.s:72
pin.pp.af.fastCOLON( pin port -- )GPIO: make pin on port a push-pull alt fun output (50MHz)rv/mcu/ch32v307/words/gpio.s:91
pin.togCODEWORD( pin port -- )GPIO: toggle pin on portrv/mcu/ch32v307/words/gpio.s:148
port.disableCOLON( port -- )GPIO: enable GPIO operations on portrv/mcu/ch32v307/words/gpio.s:40
port.enableCOLON( port -- )GPIO: enable GPIO operations on portrv/mcu/ch32v307/words/gpio.s:35
portaCONSTANT( -- u )GPIO: portarv/mcu/ch32v307/words/gpio.s:18
portbCONSTANT0x40010800+ 0x400 * 1 # ( -- u ) GPIO: portbrv/mcu/ch32v307/words/gpio.s:19
portcCONSTANT0x40010800+ 0x400 * 2 # ( -- u ) GPIO: portcrv/mcu/ch32v307/words/gpio.s:20
portdCONSTANT0x40010800+ 0x400 * 3 # ( -- u ) GPIO: portdrv/mcu/ch32v307/words/gpio.s:21
porteCONSTANT0x40010800+ 0x400 * 4 # ( -- u ) GPIO: porterv/mcu/ch32v307/words/gpio.s:22
rb?CODEWORD( -- f )USB: true if byte available in USB ring bufferrv/mcu/ch32v307/words/usb.s:220
rb@CODEWORD( -- c )USB: fetch byte from USB (rx) ring bufferrv/mcu/ch32v307/words/usb.s:226
resetCODEWORD( -- )SYSTEM: reset the mcurv/mcu/ch32v307/words/reset.s:7
rxuCONSTANTUSBHS_EP3_Rx_Bufrv/mcu/ch32v307/words/usb.s:200
serialCOLON( -- )SERIAL: switch operator prompt to serial connectionrv/mcu/ch32v307/words/usart.s:223
tb!CODEWORD( c -- )USB: write byte to USB (tx) ring bufferrv/mcu/ch32v307/words/usb.s:232
txuCONSTANTUSBHS_EP4_Tx_Bufrv/mcu/ch32v307/words/usb.s:201
type0COLONrv/mcu/ch32v307/words/type0.s:3
usart1.initCOLONrv/mcu/ch32v307/words/usart.s:14
usbCOLON( -- )USB: switch operator prompt to USB connectionrv/mcu/ch32v307/words/usb.s:245
usb-emitCOLON( c -- )USB: emit c on usb connectionrv/mcu/ch32v307/words/usb.s:276
usb-emit-pauseCOLON( c -- )USB: emit c on usb connection if able or pauserv/mcu/ch32v307/words/usb.s:287
usb-emit?CODEWORD( -- f )USB: f is true if able to emitrv/mcu/ch32v307/words/usb.s:280
usb-keyCOLON( -- c )USB: fetch byte from USB connectionrv/mcu/ch32v307/words/usb.s:298
usb-key-pauseCOLON( -- c )USB: fetch byte from USB connection if able or pauserv/mcu/ch32v307/words/usb.s:302
usb-key?COLON( -- f )USB: f true if byte avaible in usb connectionrv/mcu/ch32v307/words/usb.s:294
usb.rbCONSTANT( -- a )USB: start of USB recieve ring bufferrv/mcu/ch32v307/words/usb.s:217
usb.tbCONSTANT( -- a )USB: start of USB transmit ring bufferrv/mcu/ch32v307/words/usb.s:218
wch-turnkeyCOLON( -- )SYSTEM:rv/mcu/ch32v307/words/applturnkey.s:2
~!iCOLONrv/mcu/ch32v307/words/flash.s:58
~,COLONrv/mcu/ch32v307/words/flash.s:278
~PDCODEWORD( n -- )GPIO: make pin n a floating inputrv/mcu/ch32v307/words/gpio.s:483
~c!iCOLONrv/mcu/ch32v307/words/flash.s:74
~c,COLONrv/mcu/ch32v307/words/flash.s:209
~dallotCOLONrv/mcu/ch32v307/words/flash.s:219
~flash.eraseCODEWORD( a-flash -- )FLASH: Erase 4K page flash-a is inrv/mcu/ch32v307/words/flash.s:140
~pvflash.eraseCODEALIAS( addr -- )erase flash page at addrrv/mcu/ch32v307/words/flash.s:193
~~PDCODEWORD( n -- )GPIO: make pin n a floating input with pulluprv/mcu/ch32v307/words/gpio.s:498

UNCATEGORIZED

WordTypeStack SignatureDescriptionLocation
(aligned)CODEWORD( c-addr -- a-addr )rv/words/do-aligned.s:2
(create)COLON(C: "name" -- )parse name, write header, set newestcore/words/do-create.s:3
(does)COLON(R: addr -- )addr of the synthetic jump after (does), stored in child's CFArv/words/does.s:56
(exit)CODEWORD(R: addr -- )loads addr into IP; compiled by semicolonrv/words/exit.s:3
(exitd)CODEWORD( -- )exit from a debugger wordrv/interpreter.s:36
(exiti)CODEWORDreturn from interrupt handler; compiled by ;i.rv/words/exiti.s:3
(pp)COLONcore/words/alto.s:71
(qdocheck)COLONcore/words/qdo.s:13
(see)COLON( xt -- )deconstruct word from XTcore/words/see.s:702
.charCOLONcore/words/mlc.s:128
1msCODEWORD( -- )1ms delay loop (96MHz system clock)rv/words/1ms.s:2
1sCODEWORD( -- )SYSTEM: 1s delay loop (96MHz system clock)rv/words/1ms.s:16
:immedCOLON( -- )define an immediate word (for mcu that's can't use immediate)core/words/immediate.s:26
;dIMMEDcore/words/debugger2.s:18
REGABICONSTANTREGABIcore/words/dicthelp.s:268
REGITCCONSTANTREGITCcore/words/dicthelp.s:269
REGNUMCONSTANTREGNUMcore/words/dicthelp.s:267
XT.DONEXTCONSTANTDO_NEXTcore/words/dicthelp.s:9
[defined]IMMED( "name" -- f )f is true if name definedcore/words/immediate.s:56
[undefined]IMMED( "name -- f )f is true if name undefinedcore/words/immediate.s:71
^,COLON( x -- )append x to RAM dictionarycore/words/comma.s:5
^c,COLONcore/words/ccomma.s:5
^dallotCOLONcore/words/dallot.s:5
ccountVARIABLEcore/words/mlc.s:109
cimagVARIABLEcore/words/mlc.s:106
count_and_test?COLONcore/words/mlc.s:144
crealVARIABLEcore/words/mlc.s:105
debug.breakUSERUSER_DEBUG_BREAKXT of debugger, invoked when BREAK is reachedcore/words/debugger2.s:5
debug.nextUSERUSER_DEBUG_NEXTnext debug action, 0 if nonecore/words/debugger2.s:2
debug.rdepthCONSTANT2step until rdepth, argument is desired rdepthcore/words/debugger.s:388
debug.stepCONSTANT1single step, no argumentcore/words/debugger.s:385
debug_bufCODEWORD( -- addr )debugger input buffer addressrv/interpreter.s:57
dec.COLON( n -- )print n in base 10core/words/output.s:11
docellCOLONcore/words/mlc.s:211
doescapeCOLONcore/words/mlc.s:177
dorowCOLONcore/words/mlc.s:221
escapes?COLONcore/words/mlc.s:139
flag.aliasCONSTANT0x800core/words/flag.s:30
init.dp.flashCOLON( -- )set dp.flash to the first erased cell after end of flash dictionarycore/words/here.s:87
init_varsCOLONcore/words/mlc.s:155
mandelbrotCOLONcore/words/mlc.s:237
maxiterCONSTANT20core/words/mlc.s:100
maxvalCONSTANT20core/words/mlc.s:102
minvalCONSTANT-19core/words/mlc.s:101
oddCODEWORDrv/words/do-defer.s:9
pfa.oddCONSTANTPFA_ODDrv/words/do-defer.s:17
ppIMMEDcore/words/alto.s:59
qnopCOLONcore/words/qnop.s:3
r'@CODEWORD(R: x1 x2 -- x1 x2 )( -- x1 )copy second cell of return stack to data stackrv/words/r-fetch.s:11
rescaleCONSTANT640core/words/mlc.s:103
s_escapeCONSTANT2560core/words/mlc.s:104
seeCOLON( "name" -- )deconstruct word "name"core/words/see.s:805
show.flashCOLONcore/words/show.s:278
show.pageCOLONcore/words/show.s:288
show.ramCOLONcore/words/show.s:268
synonymCOLON( "<spaces>new-name" "name" -- )create alias of existing wordcore/words/synonym.s:19
tpileVARIABLE( -- f )transpiling statuscore/words/tpile.s:13
tpile+COLON( -- )enable transpiling during compilationcore/words/tpile.s:16
tpile-COLON( -- )disable transpiling during compilationcore/words/tpile.s:20
zi_sqCOLONcore/words/mlc.s:120
zimagVARIABLEcore/words/mlc.s:108
zr_sqCOLONcore/words/mlc.s:112
zrealVARIABLEcore/words/mlc.s:107

LEGEND

Parameter notation

symbolmeaning
nsigned number, single cell
uunsigned number, single cell
dsigned number, double cell ( low high )
udunsigned number, double cell ( low high )
xsingle cell
flogical flag, 0 is false, not 0 is true
acell aligned address
cacharacter aligned address
facell aligned address in FLASH
xtexecution token (XT)
ccharacter (byte)
sstring = ( address length ) cell pair
i*xsome unknown number of cells
"name"name consumed from input buffer
"ccc"string consumed from input buffer
widXT of a wordlist word
ffaflag field address
lfalink field address
nfaname field address
cfacode field address (same as XT)
pfaparameter field address
loop-sysdo..loop index/limit state

Stack notation

notationstack
( -- )parameter/data stack
(R: -- )return stack
(C: -- )control flow stack (data stack at compile time)
(L: -- )leave stack
( -- j*x | i*x )alternative outcomes
( -- [ j*x ] i*x )optional outcomes
( xu .. x1 )u values of type x indexed 1 to u

Other terminology

termmeaning
TOStop of stack
NOSnext on stack
3OS, 4OS3rd, 4th, ... on stack
TIBterminal input buffer
PNOpictured numeric output