29.15.1. nanoForth

Odkazy:

V rámci hledání co nejjednoduššho procesoru pro jazyk Forth jsem našel nanoForth.

Tabulka 29.31. Tabulka instrukcí nanoForth

kódinstr.slovoPSP efektRSP efektpopis
0add+( n1 n2 → n3 )( → )addition
1nandNAND( n1 n2 → n3 )( → )negative and
2xorXOR( n1 n2 → n3 )( → )exclusive-or
3ashr2/( n1 → n2 )( → )arithmetic shift right, sign retained
4fetch@( addr → n )( → )fetch cell at addr
5store!( n addr → )( → )store n to cell at addr
6litLIT( → n ) "value"( → )push inline cell, PSP++
7dupDUP( n → n n )( → )duplicate
8swapSWAP( n1 n2 → n2 n1 )( → )exchange
9dropDROP( n → )( → )discard
Ator>R( n → )( → n )pop parameter stack to return stack
BrfromR>( → n )( n → )pop return stack to parameter stack
CenterCALL( → )( → PC)DOCOL, NEST - call subroutine
DexitSEMIS( → )( addr → )RETURN - return from subroutine
EzjmpJZ( n → )( → )jump if false
FiptorBEGIN( → )( → ip )push IP (next instruction fetch addr) to R
 NOP ( → )( → )no operation
Licence Creative Commons
Elektronika a počítače, jejímž autorem je Radek Hnilica, podléhá licenci Creative Commons Uveďte autora-Nevyužívejte dílo komerčně-Zachovejte licenci 3.0 Česká republika .