an-s / sf65 Goto Github PK
View Code? Open in Web Editor NEWSource formatter, which is designed currently for ca65 source files
License: BSD 2-Clause "Simplified" License
Source formatter, which is designed currently for ca65 source files
License: BSD 2-Clause "Simplified" License
SF65 by Stefan Andree, Mar 2018. Based on: Pretty6502 v0.2 by Oscar Toledo G. http://nanochess.org/ For more information about the changes since forking, see release notes. Usage: pretty6502 [args] input.asm output.asm DON'T USE SAME OUTPUT FILE AS INPUT, though it's possible, you can DAMAGE YOUR SOURCE if this program has bugs. Arguments: -s0 Code in four columns (default) label: mnemonic operand comment -s1 Code in three columns label: mnemonic+operand comment -p0 Processor unknown -p1 Processor 6502 + DASM syntax (default) -m8 Start of mnemonic column (default) -o16 Start of operand column (default) -c32 Start of comment column (default) -t8 Use tabs of size 8 to reach column -t0 Use spaces to align (default) -a0 Align comments to nearest column -a1 Comments at line start are aligned to mnemonic (default) -n4 Nesting spacing (can be any number of spaces or multiple of tab size) -l Puts labels in its own line -dl Change directives to lowercase -du Change directives to uppercase -ml Change mnemonics to lowercase -mu Change mnemonics to uppercase -e1 Pad sectioning directives with empty lines Assumes all your labels are at start of line and there is space before mnemonic. Accepts any assembler file where ; means comment [label] mnemonic [operand] ; comment
label5:
.endscope
.endscope
<- This empty line is missing in output
anoversizedlabel
.proc firstProc
|
vs
.proc firstProc
|
anotheroversizedlabel:dec
$d020
label1
lda #$00
anoversizedlabel
inc$d020
instead of
label1
lda #$00
anoversizedlabel
inc$d020
label0
label1
macroname
label2:
anothermacroname
label3:
.FEATURE labels_without_colons ;comment after directive
EOF
instead of
.FEATURE labels_without_colons ;comment after directive
EOF
mc78:~/src/pretty6502/testfiles$ ../sf65
SF65 by Monte Carlos / Cascade, Mar 2018. Based on:
Pretty6502 v0.2 by Oscar Toledo G. http://nanochess.org/
For more information about the changes since forking, see release notes.
[...]
Accepts any assembler file where ; means comment
[label] mnemonic [operand] ; comment
Speicherzugriffsfehler (Speicherabzug geschrieben)
label0
label1
macroname
label2:
anothermacroname
label3:
.SCOPE abcde
label4:
lda #$00
sta $d020
.SCOPE fghij
label5:
.ENDSCOPE
.ENDSCOPE
anoversizedlabel
inc $d020
anotheroversizedlabel:
dec $d020
...
;a comment directly after .endproc
;a comment directly after .endproc
EOF
vs
...
;a comment directly after .endproc
EOF
label0
label1
MACRONAME
label2:
ANOTHERMACRONAME
label3:
.scope abcde
label4:
LDA #$00
STA $d020
.FEATURE labels_without_colons;comment after directive
label5:
.ENDSCOPE
.ENDSCOPE
anoversizedlabel
.SCOPEabcde
label4:
lda#$00
sta$d020
.SCOPEfghij
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.