gnupic: Extensions to gpasm
Subject:
Extensions to gpasm
From:
Peter Onion ####@####.####
Date:
6 Jun 2005 14:58:17 +0100
Message-Id: <1118066244.8444.35.camel@ratbert.alien.bt.co.uk>
Over on the piclist I've been asking how people deal with the situation
where you want to set a number of bits in a peripheral configuration
register....
General replies are like this...
movlw (1<<C2OUT)|(1<<C1OUT)|(1<<CM2)
which I think it UGLY and easily misread!
I looked at the gpasm code for implementing things like "high" and "low"
and quickly added "bit" which converts a bit number into its byte value,
so that the above code can be written as
movlw bit C2OUT + bit C1OUT + bit CM2
which I think is much better.
Now I know this will break compatibility with MPASM, but does anyone
else think this is a useful idea ?
Peter