Mill Computing, Inc. Forums The Mill Tools Applications Application Walkthrough Reply To: Application Walkthrough

Ivan Godard
Post count: 689

Yep, I hadn’t noticed the “code” button 🙁

The code was hand written; as you see, Mill asm is distinctly *not* humane.

The ability to write relAsm (which is what we have called specializer input) was initially supposed to exist, but then dropped when we realized that there was no need and great cost, if it could be done at all – writing graph structures is no friendlier than absAsm (what the assembler accepts).

Dave has long advocated a form of absAsm that at least calculated the belt for you, and even has a personal tool that sort-of does that that he used for some benchmarks. While there are issues that so far there are no solutions for, it looks like it could be done and would make asm easier. It remains a someday project, awaiting a volunteer and progress on higher priority projects.

Unfortunately the entire operation set contains a few NYFs, so we can’t publish it yet. However, it should be possible to write at least a few of the samples using only the known operations, or pseudo-ops standing in for ops that you don’t know the mnemonic for yet. The format I used on the slides omits belt numbers in favor of a comment indicating what was being referenced. Thus the first gcd would be:

/* code based on Rosetta C++ example:
   int gcd(int u, int v) {
   return (v != 0)?gcd(v, u%v):u;
   } */
   neqs({v}, 0), rems({u}, {v});
   retnfl({neqs}, {u});
   nop(4);           // wait for rem
   call1("gcd", {v}, {rems});

Would that help?