At 04:28 PM 3/11/03 -0500, Olin Lathrop wrote: > > Already know about that. INDF0 Equates to a 12 bit quantity. Using movf > > chops off 4 of the 12 bits in all cases. Say what you want about this, > > it > > does not make sense to take an obvious constant that will not fit in the > > instruction it's used in and accept it without warnings or errors. > > Requiring the user to do something like this: > > > > movf (INDF0 & 0xff), W > > > > Should be acceptable, but silent truncation is NEVER a good idea - in > > any language. > >Then you'd have cumbersome and ugly syntax on almost every file register >reference. Yuk. Since you'd have to AND the address with FFh most of the >time, it might as well be understood that it will always be done >automatically. How many registers are larger than 8 bits? I haven't done any projects with the 18F family (yet) but at first glance, the situation seems similar to dealing with the bank bits in the 14 bit family. The warning message that comes up if I get an address wrong lets me fix stupid mistakes right away and has saved many hours of debugging time. Silently truncating values does seem a bit scary. dwayne -- Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax Celebrating 19 years of Engineering Innovation (1984 - 2003) .-. .-. .-. .-. .-. .-. .-. .-. .-. .- `-' `-' `-' `-' `-' `-' `-' `-' `-' Do NOT send unsolicited commercial email to this email address. This message neither grants consent to receive unsolicited commercial email nor is intended to solicit commercial email. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body