gnupic: gpsim's gui
Subject:
Re: gpsim's gui
From:
Scott Dattalo ####@####.####
Date:
14 Oct 2004 08:08:44 +0100
Message-Id: <Pine.LNX.4.60.0410132339100.15000@ruckus.brouhaha.com>
On Wed, 13 Oct 2004, Craig Franklin wrote:
> Scott Dattalo wrote:
>
>> On Wed, 13 Oct 2004, Scott Dattalo wrote:
>>
>>> It's a start. And just to be clear, are the new directives are in the
>>> main branch of gputils? It looks like gpasm/directive.c CVS version 1.49
>>> has the new changes.
>>
>>
>> And also, what is the syntax right now. I tried things like
>>
>> .direct a PORTC==0
>>
>> And I get a syntax error.
>>
>
> .direct "a", "PORTC==0"
>
> or
>
> .direct 0x60 + 1, "PORTC==0"
>
> or
>
> .assert "PORTC==0"
I hadn't tried putting the quotes around the command... Now it's time to
start hammering out the details!
Craig,
I'm wondering if we're going to want to either pass more information to
the simulator or to place more responsibility on the assembler to parse
expressions. One of the assertions that I see being written is of the
type:
.assert "some_register & bit_mask == value"
For example,
#define SFLAGS ((1<<C)|(1<<Z))
.assert "status & SFLAGS == (1<<C)"
Unfortunately, constants like those defined in the .inc files are not
passed through to the .o files. They are passed through for absolute-mode
assemblies. (I can see a problem with several .o files defining the same
constants and [potentially] confusing the linker). Another option is for
the simulator to parse the .asm files and try to determine the values of
constants. However, this has the drawback that the constant may be defined
in two different ways depending on ifdef's.
Any ideas here?
Scott