gnupic@linuxhacker.org

gnupic@linuxhacker.org


Subject: More nocturnal programming problems
From: David Willmore
Date: Mon, 15 Mar 2004 05:13:17 -0500


Hello, again.

Same situation as before, sorry.

Can anyone enlighten me as to why:

msg_len		EQU	(message_end - message_start)

message_start:
	retlw	b'00000000'
 [... etc ...]
	retlw	b'11111111'
message_end:

Gives me a:
/usr/home/willmore/src/pic/test/10/test.asm:35:Error [116] Value of symbol "message_len"
differs on second pass
 pass 1=0,  pass 2=125
Error code : 256

It seems that it's upset that when it first evaluates the
expression, it has no values for message_end and message_start,
so their difference is 0, but after having a longer look at
things, it decides that it's now 125.  This causes a bit of
confusion and an error.

Again, am I missing some common trick or am I expecting
the wrong things out of my tools?  i.e. pilot error or
pilot error. :)

Cheers,
David

gnupic@linuxhacker.org