gnupic: Extensions to gpasm


Previous by date: 6 Jun 2005 14:58:17 +0100 Picp GUI installer for windows, Jeff
Next by date: 6 Jun 2005 14:58:17 +0100 [gnupic] Extensions to gpasm, Bill Freeman
Previous in thread:
Next in thread:

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 


Previous by date: 6 Jun 2005 14:58:17 +0100 Picp GUI installer for windows, Jeff
Next by date: 6 Jun 2005 14:58:17 +0100 [gnupic] Extensions to gpasm, Bill Freeman
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.