# INCDIR in Sjasm

Hello everyone,

Does someone know how to use the INCDIR directive in Sjasm ?
I can't seem to make it work properly.

I've tried :

```incdir  full_path
incdir  "full_path"
incdir  ..\relative_path
incdir  "..\relative_path"```

but none of them seem to work.

Good question! I never use it myself, but I would not be surprised if it works. Maybe just not as expected.

What do you think it should do? As far as I know it just add a path to the paths Sjasm searches for include files.

So instead of 'include path/ai.asm' you could use:
incdir path
include ai.asm

It works exactly like sjoerd described. It will not include anything, just add the folder you specify to the search path for future includes.

First of all, Sjoerd, let me thank you for Sjasm
Very nice work and a lot of flexibility, the perfect tool for me.

Regarding INCDIR, I know that it only add a path and not a file, but I can't make it work !
My question was rather about the syntax, not the way it works.

Precisely, I have a source file that I include with :

```; data
include "..\GFX\patterns.bin"```

But if I try this:

```;data
incdir  "..\GFX"
include "patterns.bin"```

I have an error, sjasm does not find the file.
As I've said, I tried all the syntax possibilities (relative or full), but I have the same result.

So, what is the exact syntax ?

Could it be that incdir considers paths relative to the working directory instead of relative to the current assembler file? (not in front of my MSX-development computer right now, so, just speculating) So, in your case, I'm assuming it'll have to be "incdir "GFX", instead of "incdir "../GFX" if the working directory from where you are calling sjasm is one up from the source file.

No, I'm calling sjasm from the directory of the source file.
The directories are:

```   GFX
sources```

And I'm calling sjasm within the "sources" directory:

```c:\sources>
c:\sources>sjasm game.asm```

Strange! Then I'll let sjoerd answer, who might know better. But incdir has always worked fine for me all the times I used it. So, this error is puzzling! That being said, I don't think I ever used it with a ".." in the path, so, I wonder if that's what's making it confused.

Could you try it like this?

```;data
incdir  ../GFX
include patterns.bin```

I think the backslash is the problem. The handling of the slashes and quote signs is the real problem of course, but OK. It should indeed work the way you're using it. But it doesn't.

Hello Sjoerd,
I tried your syntax, and it works this time !
Thanks.