I am preparing overall knowledge on building a Forth interpreter and want to disassemble some of the generic Forth code words such as +
, -
, *
, etc.
My Gforth (I currently have version 0.7.3, installed on Ubuntu Linux) will allow me to disassemble colon definitions that I make with the command see
, as well as the single code word .
. But when I try it with other code words, see +
or see /
, I get an error that says, Code +
, and then I'm not able to type in my terminal anymore, even when I press control-c.
I should be able to decompile/disassemble the code words, as shown by the Gforth manual: https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Decompilation-Tutorial.html
Has anyone else had this issue, and do you know how to fix it?
see +
displays the lineCode +
, followed by a disassembly of that word. GForth 0.7.0 on Windows. I guess there is a bug in the disassembler of GForth 0.7.3 on Ubuntu. – OceanidCode +
was displayed and the terminal locked up. Very likely a bug, either insee
, or, more likely, in the disassembler. – OceanidCode +
again, followed by the error messagesh: line 0: type: gdb: not found
. Probably it tried to use gdb in a script to disassemble. But that was then followed, after a few seconds, by a hexdump andend-code
. No lock-up of the terminal, but not a disassembly either. – Oceanidsudo gforth
. I generally don't recommend this, but it really seems that gforth uses gdb to disassemble, and somehow, if not started withsudo
, gdb won't start or waits for permission or some such. Hmmm... – Oceanidsee
doesn't work properly. – OceanidError in sourced command file: Cannot access memory at
. But at least Ctrl-D gives you your gforth prompt back. – Manor