gnupic: Re: [gnupic] GPasm maint
Subject:
Re: [gnupic] GPasm maint
From:
Rob Hamerling ####@####.####
Date:
4 Jul 2008 16:04:53 -0000
Message-Id: <486E4A27.4060604@gmail.com>
Hi David,
[RobH]
>> I wanted to use GPasm under ComStation (OS/2).
>> ...
>> I encountered some problems, both during compile and use of GPasm,
>> which I would like to report and discuss. Looking in the bug tracker
>> there seems not to be much maintenance activity.... Is GPasm still
>> maintained? And is this mailing list a good place to discuss these
>> issues?
David wrote:
> Yes and yes. 0.13.6 was released less than 2 months ago. One man can
> only do so much, especially as a hobby, but I try to apply user patches
> as they come in, fix some critical bugs as they turn up, and make a
> release now and then. And we have a few fairly helpful users that submit
> huge patches on occasion.
Thanks David for the encouragement.
About building GPASM: I got a couple of warnings. This might be related
to the compiler I use, or related the macro defines like HAVE_MALLOC_H,
etc) in my makefile. Most warnings do not worry me (like missing
prototype for unlink). There is one that may be important:
> parse.c(422): Warning! W129: #endif matches #if in different source file 'parse.y'
I think there must be an '#endif' missing in parse.y
Probably an issue with optimisation of LibGPUtils:
> gpcoffgen.c(434): Warning! W124: Comparison result always 0
> gpcoffgen.c(447): Warning! W124: Comparison result always 0
> gpprocessor.c(649): Warning! W124: Comparison result always 0
> gpprocessor.c(668): Warning! W124: Comparison result always 0
An error I 'circumvented' by excluding vsnprintf from the library
> vsnprintf.c(42): Error! E1055: Unable to open 'config.h'
I cannot find 'config.h', nor do I see any possible macro definition to
prevent it being included. So I (temporarily) left out the module from
the library (just lucky that GPasm seems not to need it?).
> If you have specific bugs, go ahead and file those in the tracker, but
> for any free-format discussion, this is the place. Fire away.
If you prefer these to be reported in the tracker, then I'll do.
-------------------
About using GPasm: I get a syntax error on a #v() expression. I saw in
the tracker an entry about #v(), but I don't understand the remarks (I'm
hardly familiar with PIC assembly). The program I tried to assemble is
the 'TinyBld' bootloader, a 16F88 variant. I think the error is quite
'isolated'. An include file contains the following code:
> RoundResult SET 0
> Round macro aa,bb
> LOCAL rr = aa/bb
> LOCAL d1 = aa - rr*bb
> LOCAL d2 = (rr+1)*bb - aa
> RoundResult = rr
> if d1 >= d2
> RoundResult++
> endif
> endm
>
> AbsResult SET 0
> Abs macro nr
> if nr>=0
> AbsResult = nr
> else
> AbsResult = -nr
> endif
> endm
>
> Round xtal,(16*baud)
> spbrg_value EQU RoundResult-1
>
> Round xtal,(16*(spbrg_value+1))
> baud_real EQU RoundResult
> Abs(baud_real-baud)
> errpercent EQU AbsResult*100/baud
> if errpercent > 4
> ERROR big error in baudrate: #v(errpercent)%
> endif
> if errpercent >= 2
> MESSG baudrate not exact: #v(errpercent)%
> endif
Both the ERROR and MESSG statements just here above cause:
> Error [103] : syntax error
MPASM (run under XP in a Virtual PC) doesn't complain.
Also candidate for a (new) tracker entry?
Regards, Rob.
--
Rob Hamerling, Vianen, NL (http://www.robh.nl/)