[A86] Re: SDCC v2.3.0


[Prev][Next][Index][Thread]

[A86] Re: SDCC v2.3.0




> Van: rabidcow@juno.com
> 
> On Tue, 16 Oct 2001 16:05:03 +0200 "Henk Poley" <HPoley@DDS.nl> writes:
> > I'm afraid there's no Z80 compiler that has the 'inline' function 
> > (as in
> > GCC, etc.).
> 
> Inlining *can* be done to some degree in the preprocessor, and if you're
> just using the language to structure the program, that might be
> sufficient.

Something like this could be done 'inline', but wouldn't that just be some
sort of macro then?

--------
int i = 0;

blah(int foobar) inline
{
	i++;
	do_something(foobar, i);
}

main()
{
	int var1 = 4;
	blah(6);
	blah(var1);
}
---would translate to-----
int i = 0;

blah(int foobar) inline
{
	i++;
	do_something(foobar, i);
}

main()
{
	int var1 = 4;
	i++;
	do_something(6, i);
	i++;
	do_something(var1, i);
}
[SDCC would then see that 'var1' equals 4 all the time, and use 4 as input
of 'do_something()']
-----------

>  (er... they *do* have a preprocessor, right?)

Off coarse.

> > > There's this wonderful thing called make that was designed for 
> > > this... :)
> > 
> > Ever got make working on a Windows machine? !!Without downloading 
> > CygWin!!
> 
> Yeah, it came with MSVC.  Never use it directly myself, they've got a
> nice make-make that deals with it for me, but it's still there.  'course
> I suppose not everyone has a working version of make, so free versions
> are important, but if the ones out there don't work (which they should,
> how's the make from UnxUtils or djgpp?), write one.

MS make isn't (fully) compatible to GNU make, as far as I know. And I don't
have/use MS Visual C(++).

	Henk Poley <><