Post 9s78AwC7b4aeYQ5K64 by bootjack@cybre.space
 (DIR) More posts by bootjack@cybre.space
 (DIR) Post #9s5R2TnbeWVjr3nPea by vertigo@mastodon.social
       2020-02-16T06:12:03Z
       
       1 likes, 0 repeats
       
       🤔 . o O ( Pondering what a Machine Forth dialect for Z80 might look like... )
       
 (DIR) Post #9s5ZUqEybnHHCIdJpo by akkartik@mastodon.social
       2020-02-16T07:46:41Z
       
       1 likes, 0 repeats
       
       @vertigo I'd somehow never encountered MachineForth before. Now you've got me reading this paper building a MachineForth for the ARM processor: http://www.euroforth.org/ef99/thomas99a.pdfAny other references most appreciated.
       
 (DIR) Post #9s5ZasD8CE1f2se7sm by clacke@libranet.de
       2020-02-16T07:58:18Z
       
       0 likes, 0 repeats
       
       @akkartik @vertigo I hadn't heard of it either. This looks like another good place to start understanding what it is:http://www.ultratechnology.com/mfp21.htm
       
 (DIR) Post #9s5dhLpxMKV2U39PIO by vertigo@mastodon.social
       2020-02-16T07:47:14Z
       
       1 likes, 0 repeats
       
       @akkartik https://colorforth.github.io/forth.html -- from Chuck Moore himself.  (Archived site; his original site is offline.)
       
 (DIR) Post #9s60jXmkClbP46f9pg by akkartik@mastodon.social
       2020-02-16T07:56:55Z
       
       0 likes, 0 repeats
       
       @vertigo Ah thanks! I'd found the original broken link but not this.I'm now reading your https://kestrelcomputer.github.io/kestrel/2015/03/11/why-not-machine-forth
       
 (DIR) Post #9s60jYPjrmnJ12uIc4 by clacke@libranet.de
       2020-02-16T13:02:22Z
       
       0 likes, 0 repeats
       
       @akkartik @vertigo Great read! And links to the ultratech article as well.I'm sure I've heard the term MISC before (Minimal ISC), but I still had to look it up.Now I'm wondering if anyone implemented Forth on an OISC, whether actual OISC or a self-enforced constraint like TrapCC or the equivalent of the movfuscator.
       
 (DIR) Post #9s78AvltAbbfF3oNCy by vertigo@mastodon.social
       2020-02-16T07:14:47Z
       
       0 likes, 0 repeats
       
       Hmmm, it looks like most of Moore's machine Forth primitives can be implemented in a small handful of Z80 instructions.The big overhead, ironically, comes when invoking subroutines.  Because of the separation of data and return stacks, there's a ton of overhead in prolog and epilog code.By which, I mean, 158 T-cycles worth of overhead (including CALL and RET timings).  The time is spent moving the return address off the data stack (SP) and onto a return stack (software managed).
       
 (DIR) Post #9s78AwC7b4aeYQ5K64 by bootjack@cybre.space
       2020-02-16T15:10:03Z
       
       0 likes, 0 repeats
       
       @vertigo is there a document that you like outlining those primitives?
       
 (DIR) Post #9s78Awrb6rlcd3URkG by vertigo@mastodon.social
       2020-02-16T16:04:03Z
       
       1 likes, 0 repeats
       
       @bootjack It really depends on the target processor architecture; however, I like to start with Chuck Moore's set of primitives as a starting point, and tweak accordingly.There are links to several documents in this thread: https://mastodon.social/web/statuses/103667413896059013 , including Chuck's original listing, which you might find of interest.