include file issue #6

Closed
opened 2026-01-29 14:08:48 +00:00 by claunia · 1 comment
Owner

Originally created by @waltje on GitHub (Apr 26, 2023).

Including a file using the "filename" method should always consider that filename as being relative to the caller, i.e. the file doing the include.

So, if we have a file "test.asm", which does a

.include "foo.inc"

it should find "foo.inc" in the same directory as the source file (test.asm) itself.

This should also go for files included by other files, possibly in different
locations:

test.asm foo.inc xxx.inc
include "foo/foo.inc" include "bar/bla/xxx.inc"
. / foo /bar/bla/ xxx.inc

Currently, "xxx.inc" would be looked for in the "local" path relative to the
original caller, aka "test.inc". Its path is "./bar/bla/xxx.inc".

Originally created by @waltje on GitHub (Apr 26, 2023). Including a file using the "filename" method should always consider that filename as being relative to the caller, i.e. the file doing the include. So, if we have a file "test.asm", which does a .include "foo.inc" it should find "foo.inc" in the same directory as the source file (test.asm) itself. This should **also** go for files included by other files, possibly in different locations: test.asm foo.inc xxx.inc include "foo/foo.inc" include "bar/bla/xxx.inc" . / foo /bar/bla/ xxx.inc Currently, "xxx.inc" would be looked for in the "local" path relative to the original caller, aka "test.inc". Its path is "./bar/bla/xxx.inc".
claunia added the bug label 2026-01-29 14:08:48 +00:00
Author
Owner

@waltje commented on GitHub (Jun 24, 2023):

Fixed in #e4a00df.

@waltje commented on GitHub (Jun 24, 2023): Fixed in #e4a00df.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: VARCem/Vasm#6