Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in 
CSDb User Forums


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

Registered: Dec 2010
Posts: 15
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 02:19
Groepaz

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

Registered: Sep 2003
Posts: 348
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 19:52
Bago Zonde

Registered: Dec 2010
Posts: 15
@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
Slajerek/Samar
tlr
redcrab/G★P
Dymo
Bago Zonde/Commocore..
Nuckhead/Backbone So..
bugjam
TheRyk/MYD
ZeSmasher/F4CG
St☯rmfr☯nt/ExCeSs
zzarko
Guests online: 53
Top Demos
1 Uncensored  (9.7)
2 Edge of Disgrace  (9.7)
3 The Shores of Reflec..  (9.6)
4 Coma Light 13  (9.6)
5 Lunatico  (9.6)
6 Comaland 100%  (9.5)
7 Incoherent Nightmare  (9.5)
8 Wonderland XII  (9.5)
9 Comaland  (9.5)
10 Wonderland XIII  (9.5)
Top onefile Demos
1 Game of Thrones [2sid]  (9.8)
2 Dawnfall V1.1  (9.5)
3 Daah, Those Acid Pil..  (9.5)
4 Treu Love [reu]  (9.4)
5 Dawnfall  (9.3)
6 SidRok  (9.3)
7 One-Der  (9.2)
8 Tunnel Vision  (9.2)
9 Globe 2016 [reu]  (9.1)
10 Safe VSP  (9.1)
Top Groups
1 Booze Design  (9.4)
2 Censor Design  (9.4)
3 Oxyron  (9.4)
4 Crest  (9.3)
5 Arsenic  (9.3)
Top Diskmag Editors
1 Jazzcat  (9.5)
2 Peter  (9.4)
3 Newscopy  (9.4)
4 Remix  (9.3)
5 Tadpole  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2017
Page generated in: 0.29 sec.