Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
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: 11523
try ./includes/file-to-include.asm perhaps?
2017-07-10 03:44
soci

Registered: Sep 2003
Posts: 486
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
ΛΛdZ
theK/ATL
MCM/ONSLAUGHT
Ko-Ko
Guests online: 413
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Performers  (9.3)
4 Oxyron  (9.3)
5 Censor Design  (9.3)
Top Diskmag Editors
1 Magic  (10)
2 Jazzcat  (9.5)
3 hedning  (9.2)
4 Elwix  (9.1)
5 Peter  (9.0)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 1.747 sec.