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: 11386
try ./includes/file-to-include.asm perhaps?
2017-07-10 03:44
soci

Registered: Sep 2003
Posts: 480
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
Flashback
K-reator/CMS/F4CG
REBEL 1/HF
Guests online: 91
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 No Listen  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 Tim  (9.7)

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