gnupic: Error [157] Can't evaluate expression


Previous by date: 27 Aug 2001 19:04:21 -0000 Subscription for mailing list, Otkup Servi i Prodaja polovnih i novih racunara i opreme
Next by date: 27 Aug 2001 19:04:21 -0000 Re: Error [157] Can't evaluate expression, Eric Smith
Previous in thread:
Next in thread: 27 Aug 2001 19:04:21 -0000 Re: Error [157] Can't evaluate expression, Eric Smith

Subject: Error [157] Can't evaluate expression
From: Kevin Olalde ####@####.####
Date: 27 Aug 2001 19:04:21 -0000
Message-Id: <3B8A99B0.F5218CF9@home.com>

Hi, I'm trying to compile the below macro, but get the error in the subject
line.  gpasm seems to be having trouble with this line:

	IF	ALIGNED&&!(Base&(1<<BIT)) ; aligned ?

Is there something here that's not supported? 

Thanks,
ko



;+++++
;	INC_BUFFER advance buffer pointers wrap if necessary 
;
;	If buffer size is power of two, and buffer is aligned
;	on an multiple of twice it size, this macro generates
;	two instructions, Otherwise it generates six instructions.
;	Originator:  Eric Smith, ####@####.#### for non-comercial use.

INC_BUFFER MACRO	Pointer, Base, Size	
	LOCAL	POWER_OF2, ALIGNED,BIT,VALUE

POWER_OF2	SET	!(Size&(Size-1))	; calculate if power of 2
ALIGNED		SET	POWER_OF2&&((Base&(Size-1))==0) ; calculate if aligned

	IF	ALIGNED

VALUE	SET	Size
BIT	SET	0

	WHILE	VALUE>1
BIT	SET	BIT+1
VALUE	SET	VALUE>>1
	ENDW

	ENDIF

	INCF	Pointer,F	; increase pointer

	IF	ALIGNED&&!(Base&(1<<BIT)) ; aligned ?
	BCF	Pointer,BIT	; yep clear bit
	ELSE
	MOVF	Pointer,W	; nope
	XORLW	Base+Size
	MOVLW	Base
	BTFSC	STATUS,Z
	MOVWF	Pointer
	ENDIF

	ENDM

Previous by date: 27 Aug 2001 19:04:21 -0000 Subscription for mailing list, Otkup Servi i Prodaja polovnih i novih racunara i opreme
Next by date: 27 Aug 2001 19:04:21 -0000 Re: Error [157] Can't evaluate expression, Eric Smith
Previous in thread:
Next in thread: 27 Aug 2001 19:04:21 -0000 Re: Error [157] Can't evaluate expression, Eric Smith


Powered by ezmlm-browse 0.20.