Hello Matthias & all:

As I promised to generalize crc8.frt (#1) a question was raised how would
the user configure it to its use, namely, select the generating
polynomial byte and the needed bit order (#2).

I answered the question through the following amforth-shell.py
improvement which introduces a local appl_owns.py substitutions file.

Without further ado here's the patch and its use for your perusal:

Patch: http://pastebin.com/uDK7fk9N

Example:

$ cat appl_owns.py
# amforth-shell.py application specific forth substitutions

APPL_OWNS = { 'DEBUG': '1' }

$ make shell

...snip...

(AT90CAN128)> DEBUG .
1  ok

Regards, Enoch.

#1 Assuming that Matthias places it in ${AMFORTH}/lib/crc8.frt :-)
#2 With no real constant-s to pay for in the user code.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to