Hello,
is there any way to add a conditional clause to control an INCLUDEBIN command?
The condition should be the existence of that file in the compilation folder, for instance
IF EXIST "SONG01.PT3"
includebin "SONG01.PT3"
ENDIF
By now it doesn't work. The file is never included when ASM6809 compiler is called
Maybe I am forgetting about a parameter that allows this construct?
Any hint would be really appreciated
cheers!
pere
DataBeg
IF NSONGS > 0
includebin "SONG01.PTM"
ENDIF
IF NSONGS > 1
includebin "SONG02.PTM"
ENDIF
IF NSONGS > 2
includebin "SONG03.PTM"
ENDIF
IF NSONGS > 3
includebin "SONG04.PTM"
ENDIF
IF NSONGS > 4
includebin "SONG05.PTM"
ENDIF
IF NSONGS > 5
includebin "SONG06.PTM"
ENDIF
IF NSONGS > 6
includebin "SONG07.PTM"
ENDIF
IF NSONGS > 7
includebin "SONG08.PTM"
ENDIF
IF NSONGS > 8
includebin "SONG09.PTM"
ENDIF
IF NSONGS > 9
includebin "SONG10.PTM"
ENDIF
EndPgm equ *
That way the data beginning is always at the same place ($3000) and the end is calculated
upon the length of the included songs.
echo ; files to include > files.inc
for %%f in (*.PTM) do echo include.bin "%%f" >> files.inc
asm6809 ...
Note the extra spaces between 'echo' and 'include.bin' to make asm6809 directives instead of labels.
Excellent, Stew!
I thought of using the 'for' construct, but did not got the smart idea of using 'echo' to add the include directives!
Thanks a lot
pere