Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > How to include files in DASM relatively?
2017-07-10 00:05
Bago Zonde

Registered: Dec 2010
Posts: 29
How to include files in DASM relatively?

Hi guys,

I'm wondering how to include files in DASM relatively? It seems that DASM can only include them within absolute path.

Let's see the example:

main.asm
includes/functions.asm
includes/file-to-include.asm


In main.asm file I have:
include "includes/functions.asm"


And functions.asm file contains:
include "file-to-include.asm"


In this case, while compiling main.asm, DASM cannot find "file-to-include.asm" relatively, it works only when providing absolute path:
include "includes/file-to-include.asm"


I've tried -Idir option, but I'm not sure how it should work. I tried to point includes folder but it won't work.

I'm using DASM 2.20.11 20140304.
2017-07-10 00:19
chatGPZ

Registered: Dec 2001
Posts: 11100
try ./includes/file-to-include.asm perhaps?
2017-07-10 03:44
soci

Registered: Sep 2003
Posts: 473
Command line:
dasm somepath/main.asm -Isomepath/includes
Source:
    INCLUDE "functions.asm"
    INCLUDE "file-to-include.asm"

Otherwise make sure your working directory is properly set.
2017-07-10 17:52
Bago Zonde

Registered: Dec 2010
Posts: 29
@Groepaz
I wanted to avoid providing "includes" in the path.

@soci
Haha, thanks soci! It works perfectly! What I missed is that I thought that -Idir is the option switch, not -I, so no wonder -Idirincludes didn't work :D!
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Didi/Laxity
iAN CooG/HVSC
NecroPolo/Lethargy/H..
kbs/Pht/Lxt
Andy/AEG
Mike
cba
MCM/ONSLAUGHT
Guests online: 75
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.9)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 Wafer Demo  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Onscreen 5k  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Fullscreen Graphicians
1 Carrion  (9.8)
2 Joe  (9.8)
3 Duce  (9.8)
4 Mirage  (9.7)
5 Facet  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.033 sec.