-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Michael,

>> These are the *definitions* of the constants for later use. The 
>> WANT_TWI option includes the file device.inc at compile time and
> Where, exactly, is the WANT_TWI option supposed to be set?  In the 
> project file?

I just updated the template.asm in the code repository to describe
the general way to use WANT-options and where they come from.

> I've tried this, but don't see the above constants appearing in the
> dictionary of the flashed Uno.

Please check the LST file from the assembler if the options are
spelled correctly or some other error that may happened. On my
system the lst file looks as follows:

> grep TWI *
 template.asm:.set WANT_TWI = 1
 template.lst:                 .set WANT_TWI = 0
 template.lst:                 .set WANT_TWI = 1
 template.lst:                 .if WANT_TWI == 1
 template.lst:                 ; TWI Bit Rate register
 template.lst:                 ; TWI Control Register
 template.lst:                 ; TWI Status Register
 template.lst:                 ; TWI Data register
 template.lst:                 ; TWI (Slave) Address register
> 

Note the .if WANT_TWI line. The lines that follow this one are the
assembler definitions for the TWI registers.

>> Never do so.
> I fully understand the unnecessary re-definition of numbers and
> the problems it creates.  Let me re-phrase my question in this
> regards: Taking the 'device.asm' file as an example ... my copy
> shows a line ".set WANT_TWI = 0".  If TWI is to be set  = 1 (which
> is what I'm after), what action on my part makes that happen (aside
> from the amforth-shell method)?

The assembler is a bit cruel here. If you .set a symbol to a value,
the value can be changed any time, if you .equ a symbol to a value,
the value cannot be changed afterwards. Thus .set-ing a WANT option
to 0 *initially* can easily be changed to 1 afterwards.

> It's becoming clearer to me that I don't quite have a grasp on the 
> overall development cycle needed to get specific functions
> incorporated into a hex file.  Is this explained somewhere such
> that a layperson, like myself, can understand it?

Write forth code. If really necessary use the assembler inside forth
(some examples are only recently posted here). Extending the assembler
sources is only for the brave ones among us. After all, its a forth
interpreter not a general purpose assembler framework. *I* could use
it that way (not surprisingly) but I don't recommend it for others.

Matthias

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlJqtDwACgkQ9bEHdGEMFjOsWACg23Vc6IOkY7fNEzOluyFCPY3Q
9A8AoJ2jso6AL4+MS6U+cmWbGFyt+7sw
=Gial
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
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