Hello Matthias & All:

Matthias Trute <mtr...@web.de> writes:

> Hi Craig,
>
>> I think I found a bug in the documentation contained in the
>> bitnames.frt file for the multi-bit operations. Instead of:
>
> You're right. Thanks for telling. Revision 1465 is dedicated to you :)
>
> Matthias

This reminds me that those on architectures with 256 I/O space would be
better off using their own "bitnames" implementation for flash code
saving. Mine goes like that:

\ define a port: 0 ≤ portaddr ≤ $FF, 0 ≤ bitno ≤ 7.
: port:  ( "name" portaddr bitno -- )
   create 1 swap lshift         \ make it a bitmask
   >< or ,                      \ mask at high byte
 does>  ( -- portmask portaddr )        
   @i dup >< $ff and swap $ff and

Ideally there should be two different "bitnames.frt" to include
according to one's µC architecture. Even nicer would be to have just one
version to include and deal with the differences via compile time code
manipulation (but we don't have working [if] [else] [then] yet).

Thanks, Enoch.




------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&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