mirror of https://github.com/digarok/Appy.git
Merge branch 'main' of github.com:digarok/Appy
This commit is contained in:
commit
35c693212e
|
@ -0,0 +1,4 @@
|
||||||
|
# cadius disk files
|
||||||
|
*.2mg
|
||||||
|
# merlin assembly listings
|
||||||
|
*_output.txt
|
|
@ -29,7 +29,8 @@ Appy abstracts the tools away from a script mindset, and into a project mindset.
|
||||||
|
|
||||||
Currently it uses an `appy.yaml` file in the current project directory. The format is as follows:
|
Currently it uses an `appy.yaml` file in the current project directory. The format is as follows:
|
||||||
```
|
```
|
||||||
assemble: [main.s, grafix.s, snd.s, a.s, b.s] # <--- list of files to assemble with Merlin
|
assemble: [main.s, grafix.s, snd.s, a.s, b.s] # <--- list of files to assemble with Merlin
|
||||||
|
indent: [c.s] # <--- additional files to indent when running `appy fmt`
|
||||||
disks: # <--- define disks, can be more than one, handy for 140K + 800K
|
disks: # <--- define disks, can be more than one, handy for 140K + 800K
|
||||||
- name: mydiskimage # <---- each disk has a name (ProDOS volume name)
|
- name: mydiskimage # <---- each disk has a name (ProDOS volume name)
|
||||||
file: mydiskimage800.2mg # <---- each disk has a filename for the image it creates
|
file: mydiskimage800.2mg # <---- each disk has a filename for the image it creates
|
||||||
|
@ -45,7 +46,7 @@ disks: # <--- define disks, can be more
|
||||||
```
|
```
|
||||||
|
|
||||||
## User Overrides
|
## User Overrides
|
||||||
What if your copy of Merlin32 (assembler) is in a different location than your teammates? You can set up local binary overrides with an `appy.user.yaml` file in the same directory. It allows the following 3 program settings:
|
What if your copy of Merlin32 (assembler) is in a different location than your teammate's? You can set up local binary overrides with an `appy.user.yaml` file in the same directory. It allows the following 3 program settings:
|
||||||
```
|
```
|
||||||
# local system settings/overrides
|
# local system settings/overrides
|
||||||
programs:
|
programs:
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
assemble: [testsrc/sp.s, testsrc/pc.s, testsrc/fmt.s]
|
assemble: [testsrc/sp.s, testsrc/pc.s, testsrc/fmt.s]
|
||||||
|
indent: [testsrc/fmt2.s]
|
||||||
disks:
|
disks:
|
||||||
- name: mydiskimage
|
- name: mydiskimage
|
||||||
file: mydiskimage800.2mg
|
file: mydiskimage800.2mg
|
||||||
|
|
|
@ -6,14 +6,15 @@ import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
|
||||||
"github.com/digarok/appy/core/project"
|
"github.com/digarok/appy/core/project"
|
||||||
|
"github.com/fatih/color"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateDisk(name string, file string, size string) {
|
func CreateDisk(name string, file string, size string) {
|
||||||
fmt.Printf("Creating Disk: \"%s\" -> %s \tSize: %s\n", name, file, size)
|
fmt.Printf("Creating Disk: \"%s\" -> %s \tSize: %s\n", name, file, size)
|
||||||
|
|
||||||
cmd := exec.Command(project.LocalConf.Programs.Cadius, "CREATEVOLUME", file, name, size)
|
out, err := exec.Command(project.LocalConf.Programs.Cadius, "CREATEVOLUME", file, name, size).Output()
|
||||||
err := cmd.Run()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
color.Cyan(string(out))
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,12 +22,11 @@ func CreateDisk(name string, file string, size string) {
|
||||||
func AddFiles(disk project.Disk) {
|
func AddFiles(disk project.Disk) {
|
||||||
fmt.Printf("Add files to: \"%s\"\n", disk.Name)
|
fmt.Printf("Add files to: \"%s\"\n", disk.Name)
|
||||||
for _, file := range disk.Files {
|
for _, file := range disk.Files {
|
||||||
// fmt.Printf("%s ADDFILE %s %s %s\n", CadiusPath, disk.File, file.Output, file.Input)
|
|
||||||
fmt.Printf(" Adding file: -----> %s\n", file.Input)
|
fmt.Printf(" Adding file: -----> %s\n", file.Input)
|
||||||
|
|
||||||
cmd := exec.Command(project.LocalConf.Programs.Cadius, "ADDFILE", disk.File, file.Output, file.Input)
|
out, err := exec.Command(project.LocalConf.Programs.Cadius, "ADDFILE", disk.File, file.Output, file.Input).Output()
|
||||||
err := cmd.Run()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
color.Cyan(string(out))
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,11 @@ func Format(args []string) {
|
||||||
fmt.Printf("Formatting %v\n", filename)
|
fmt.Printf("Formatting %v\n", filename)
|
||||||
merlingo.FmtFile(filename)
|
merlingo.FmtFile(filename)
|
||||||
}
|
}
|
||||||
|
// format all indent files in appy.yaml
|
||||||
|
for _, filename := range project.AppyProj.Indent {
|
||||||
|
fmt.Printf("Formatting %v\n", filename)
|
||||||
|
merlingo.FmtFile(filename)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// format all assembly files in args
|
// format all assembly files in args
|
||||||
for _, filename := range args {
|
for _, filename := range args {
|
||||||
|
|
|
@ -13,6 +13,7 @@ type Project struct {
|
||||||
name string
|
name string
|
||||||
Disks []Disk
|
Disks []Disk
|
||||||
Assemble []string
|
Assemble []string
|
||||||
|
Indent []string
|
||||||
}
|
}
|
||||||
|
|
||||||
type Disk struct {
|
type Disk struct {
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
* formatting test
|
||||||
|
org $300 ; start
|
||||||
|
|
||||||
|
main nop
|
||||||
|
* what about this
|
||||||
|
|
||||||
|
; and this
|
||||||
|
|
||||||
|
sta :jo+1
|
||||||
|
|
||||||
|
|
||||||
|
:jo+1 lda $400
|
||||||
|
lda $400
|
||||||
|
rts
|
||||||
|
|
||||||
|
** 24 (bit) hex to 8 (nibble) / 4 byte BCD
|
||||||
|
** 24 (bit) hex to
|
||||||
|
HEXDEC mx %11
|
||||||
|
LDA #0 ; Ensure the result is clear
|
||||||
|
STA DEC8+0
|
||||||
|
STA DEC8+1
|
||||||
|
STA DEC8+2
|
||||||
|
STA DEC8+3
|
||||||
|
ReallyThisisaLoooooongLabelwith stal $e12000,y ; look at this long line
|
||||||
|
|
||||||
|
* TABS....
|
||||||
|
* $D5 $0008 sequence [Application Specific]
|
Loading…
Reference in New Issue