トップ 差分 一覧 ソース 検索 ヘルプ RSS ログイン

ST-forth

 Forth 言語

詳しくはhttps://ja.wikipedia.org/wiki/Forthを見てもらって

はじめに

学生時代に FORTH と言う言語に出会って、
また、最近作成しようとしたら、資料がみつからないのでメモをして行きます。

まあ、8bit のマイコンを触っているせいなんだけれど。。

基本は スタック4つ+メモリで動く

辞書構造 (WikiPedia より)

structure
 byte:       flag           \ 3bit flags + length of word's name
 char-array: name           \ name's runtime length isn't known at compile time
 address:    previous       \ link field, backward ptr to previous word
 address:    codeword       \ ptr to the code to execute this word
 any-array:  parameterfield \ unknown length of data, words, or opcodes
end-structure forthword

History

STM8

STM32 forth

Arduino-FVM

32-bit RISC-V Forth

cForth

Sample

http://phaendal.hatenablog.com/entry/2015/09/30/122848