gnupic: gpsim's gui


Previous by date: 14 Oct 2004 12:56:15 +0100 Re: gpsim's gui, Scott Dattalo
Next by date: 14 Oct 2004 12:56:15 +0100 Re: gpsim's gui, Craig Franklin
Previous in thread: 14 Oct 2004 12:56:15 +0100 Re: gpsim's gui, Scott Dattalo
Next in thread: 14 Oct 2004 12:56:15 +0100 Re: gpsim's gui, Craig Franklin

Subject: Re: gpsim's gui
From: Vangelis Rokas ####@####.####
Date: 14 Oct 2004 12:56:15 +0100
Message-Id: <Pine.LNX.4.61.0410141449560.20315@odyssey>

On Wed, 13 Oct 2004, Craig Franklin wrote:

> .direct "a", "PORTC==0"
>
> or
>
> .direct 0x60 + 1, "PORTC==0"
>
> or
>
> .assert "PORTC==0"

Any ideas for integrating with C language?

writing:

 	assert(PORTC==0);

in pic16 port, would emit a directive like:

 	.direct "a", "PORTC==0"

but symbol PORTC isn't known as PORTC but as _PORTC. I guess gpsim will emit
an error there.

I see 2 solutions here:

1. The easy way
Declare assert as macro which calls an _assrt function which
emits:
 	 .assert "a", "0"


2. The hard way
To let gpsim know about symbols like PORTC via the def directive.

Is this possible?

I guess [2] needs a lot of work, so I'll stick [1] for the time being


regards,
Vangelis

Previous by date: 14 Oct 2004 12:56:15 +0100 Re: gpsim's gui, Scott Dattalo
Next by date: 14 Oct 2004 12:56:15 +0100 Re: gpsim's gui, Craig Franklin
Previous in thread: 14 Oct 2004 12:56:15 +0100 Re: gpsim's gui, Scott Dattalo
Next in thread: 14 Oct 2004 12:56:15 +0100 Re: gpsim's gui, Craig Franklin


Powered by ezmlm-browse 0.20.