gnupic: gpasm
Subject:
gpasm
From:
John Duncan ####@####.####
Date:
4 Jan 2002 09:52:09 -0000
Message-Id: <3.0.1.32.20020102095044.006df35c@postoffice.qld.bom.gov.au>
Hello Listers,
I have recently had a bit of a problem with gpasm, that I am hoping
someone may be able to explain. I have an include file of subroutines
forreading and writing MChip I2C EEPROMS, that I use in my hobby
dataloggers. The type of EEPROM chip is defined in the main source file,
before the file is included.
Much of the code is common for different EEPROM chips, but the steps to
address a 24LC16B are different from a 24LC256. The diffences are defined
as macros and these macros are invoked in the body of the code. The macros
to use are selected by the type of EEPROM chip defined.
I have been using gpasm 0.9.6 for some time. I have recently upgraded to
0.9.14 , but have not had to assemble this code, until a couple of days
ago. gpasm 0.9.6 would assemble the code, without sneezing, but 0.9.14
will generate a warning telling me that I am callng a macro in column 1,
when in fact what I am doing is defining a macro, but that macro is not in
a block for which the condition is true. I don't think that my description
make a lot of sense, so I have included below a small test file that
demonstates what I mean
; mactest.asm --
; A simple test to recreate the funny with conditional
; selection of macros
list p=16f84
ifdef foo
mac1 macro
nop
sleep
endm
endif
ifndef foo
mac1 macro
nop
clrwdt
endm
endif
org 0
mac1
end
Assemble with and without defining foo
condamine:~/d501/picsrc$ gpasm mactest.asm
mactest.asm:10:Warning [206] Found call to macro in column 1.
condamine:~/d501/picsrc$
condamine:~/d501/picsrc$ gpasm -Dfoo mactest.asm
mactest.asm:17:Warning [206] Found call to macro in column 1.
condamine:~/d501/picsrc$
Could this be a bug or am I missing something?
Cheers
JD