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

Registered: Sep 2003
Posts: 375
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: 23
@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
Mister NOP
Nuckhead/Backbone So..
Knight Rider/Formby ..
Compyx/Focus
TWW/Creators
insane/altair^rab^tscc
Guests online: 62
Top Demos
1 Uncensored  (9.7)
2 Edge of Disgrace  (9.7)
3 Coma Light 13  (9.6)
4 The Shores of Reflec..  (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 Pandemoniac Part 2 o..  (9.6)
2 FMX Music Demo  (9.6)
3 Daah, Those Acid Pil..  (9.5)
4 Dawnfall V1.1  (9.5)
5 Synthesis  (9.5)
6 Dawnfall  (9.4)
7 Treu Love [reu]  (9.4)
8 Field Sort  (9.4)
9 KAOS 64  (9.3)
10 One-Der  (9.2)
Top Groups
1 Oxyron  (9.4)
2 Booze Design  (9.4)
3 Censor Design  (9.3)
4 Crest  (9.3)
5 The Judges  (9.3)
Top Mega Swappers
1 Nightshade  (9.4)
2 Aslive  (9.3)
3 R.C.S.  (9.3)
4 Dishy  (9.2)
5 Calypso  (9.2)

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