From 5c1390ac57e22fc9ab83e9a24ff1eb5c64941a35 Mon Sep 17 00:00:00 2001 From: Dagen Brock Date: Sat, 11 Feb 2023 09:01:48 -0600 Subject: [PATCH] Add assembler macro variable --- .gitignore | 3 ++- appy.yaml | 1 + core/assembler.go | 3 ++- core/project/project.go | 10 ++++++---- testsrc/fmt.s | 5 +++-- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 5acfdfc..b959e80 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # cadius disk files -*.2mg +*.2mg +*.po # merlin assembly listings *_output.txt \ No newline at end of file diff --git a/appy.yaml b/appy.yaml index c32c619..f3f8f6c 100644 --- a/appy.yaml +++ b/appy.yaml @@ -1,4 +1,5 @@ assemble: [testsrc/sp.s, testsrc/pc.s, testsrc/fmt.s] +assembleflags: "-V" indent: [testsrc/fmt2.s] disks: - name: mydiskimage diff --git a/core/assembler.go b/core/assembler.go index 10b69f7..cd15e25 100644 --- a/core/assembler.go +++ b/core/assembler.go @@ -13,8 +13,9 @@ func Assemble() { // assemble all files in list for _, filename := range project.AppyProj.Assemble { fmt.Printf("Assembling %v\n", filename) + fmt.Printf(">> %v %v %v\n", project.LocalConf.Programs.Merlin32, project.AppyProj.AssembleFlags, filename) - out, err := exec.Command(project.LocalConf.Programs.Merlin32, "-V", filename).Output() + out, err := exec.Command(project.LocalConf.Programs.Merlin32, project.AppyProj.AssembleFlags, filename).Output() if err != nil { color.Cyan(string(out)) log.Fatal(err) diff --git a/core/project/project.go b/core/project/project.go index 3420792..fab1ebf 100644 --- a/core/project/project.go +++ b/core/project/project.go @@ -10,10 +10,11 @@ import ( ) type Project struct { - name string - Disks []Disk - Assemble []string - Indent []string + name string + Disks []Disk + Assemble []string + Indent []string + AssembleFlags string } type Disk struct { @@ -47,6 +48,7 @@ var LocalConf LocalConfig func SelfConfigure() { AppyProj.name = "Default" + AppyProj.AssembleFlags = "" LocalConf.Programs.Merlin32 = Merlin32Path LocalConf.Programs.Cadius = CadiusPath LocalConf.Programs.Gsplus = GsplusPath diff --git a/testsrc/fmt.s b/testsrc/fmt.s index 70a02af..641ce86 100644 --- a/testsrc/fmt.s +++ b/testsrc/fmt.s @@ -9,7 +9,7 @@ main nop sta :jo+1 -:jo+1 lda $400 +:jo lda $400 lda $400 rts @@ -21,7 +21,8 @@ HEXDEC mx %11 STA DEC8+1 STA DEC8+2 STA DEC8+3 -ReallyThisisaLoooooongLabelwith stal $e12000,y ; look at this long line +ReallyThisisaLoooooongLabelwith stal $e12000,x ; look at this long line * TABS.... * $D5 $0008 sequence [Application Specific] +DEC8 ds 24 \ No newline at end of file