-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAssembleProject.bat
41 lines (30 loc) · 970 Bytes
/
AssembleProject.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@echo off
REM Script to generate assembly file of project
REM DASM Specific variables
set DASMDir=DASM
set DASMPath="%DASMDir%/Dasm.exe"
set OutputDir=Output/
set SourceDir=Source/
set DefaultArgs=-f3 -v5
set LogModifer=-l
set OutputModifer=-o
set IncludeModifier=-Idir
echo Directory is %DASMDir%
echo Path is %DASMPath%
echo OutputDir is %OutputDir%
echo SourceDir is %SourceDir%
echo Default args are %DefaultArgs%
echo LogModifer is %LogModifer%
echo OutputModifer is %OutputModifer%
echo IncludeModifer is %IncludeModifier%
REM Use default if none provided
set DefaultOutputName=ExampleProgram
set OutputName=%DefaultOutputName%
if NOT "%1"=="" set OutputName=%1
echo Using output prefix of %OutputName%
REM Run DASM
set Command=%DASMPath% %SourceDir%%OutputName%.asm %LogModifer%%OutputDir%%OutputName%.txt %DefaultArgs% %OutputModifer%%OutputDir%%OutputName%.bin -DNO_ILLEGAL_OPCODES=1
echo command call looks like %Command%
call %Command%
pause
EXIT