感謝政昌兄指點,做個筆記:
2020.08.08 星期六
11:26 陳厚成 eforth64 沒有任何 alignment , 我試了一下, here 是指在單數的位置上!
I have no idea how to deal with that.
12:22 吳政昌 here 指在單數位址上沒問題
12:24 陳厚成 喔,感謝!確實。我一時以為 dictionary 也要以 cell 為單位,非也。
12:25 吳政昌 code 或 create 或 : 會先把 here 調整成 aligned
12:26 吳政昌 看設計。可能 aligned 成可被 16 整除或偶數。
12:32 吳政昌 原始的 eforth 對性能比較不講究,所以不重視 alignment。
12:37 陳厚成 原來是在 code, create, : 這些小關鍵處下手,感謝政昌兄指點。
12:50 吳政昌 nfa, cfa 或 dfa 都是指向 aligned 的位址。所以是在建立這些欄位時就算好。
並根據這些 align 好 here。其他就靠使用 FORTH 的人來維持資料的 alignment 了。
13:00 陳厚成 這又更精準了
12:51 吳政昌 我以前用 FPC 時,完全沒有 alignment 的概念。
12:54 吳政昌 也從來沒用過 aligned align faligned falign 這些指令。
12:56 吳政昌 因為自己開發 FORTH,又看了 FORTH APPLICATION TECHNIQUES 才懂得用。
13:00 吳政昌 @陳厚成 如果要自己開發 FORTH,一定要看 Forth standard 網站
13:01 吳政昌 比如這兒對 create 的說明
13:02 吳政昌 就提到要對 data space 做 alignment。
code space 不需要。但我通常會 aligned 到能被 16 整除。x86 系統比較不必省 memory\