Lin6 is a linter for 6502 assembly code.
The linter, written in ANSI C, is a utility to format assembly code to be used with the asm6 assembler. This utility was used in the creation of Donsol Famicom and NesPaint.
- Variable names are always lowercase.
- Variable length are always padded to col25.
- Variable comments are always padded to col32.
- Constant names are always uppercase.
- Constant length are always padded to col21.
- Constant comments are always padded to col32.
- Label names are always capitalized.
- Label names aalways end with :.
- Label names are always preceeded with a linebreak.
- Label comments are always padded to col32.
- Directive names are always padded to col2.
- Directive comments are always padded to col32.
- Opcode names are always uppercase.
- Opcode names are always padded to col2.
- Opcode comments are always padded to col32.
- Inline comments are always padded to col2.
- Spacing comments are always preceeded and followed by with a linebreak.
;; Variables .enum $0000 ; Zero Page variables pos_x .dsb 1 pos_y .dsb 1 .ende ;; Constants SPRITE_Y .equ $0200 SPRITE_X .equ $0203 RESET: NOP Forever: JMP Forever NMI: RTI ;; Routines Check_Collision: LDA pos_y CMP #$88 ; Floor is at 32y BCC @done LDA #$88 STA pos_y @done: RTS ;; Tables Table_Name: .db $40,$46,$4c,$52,$58,$5e,$63,$68 ;; Vectors .pad $FFFA .dw NMI .dw RESET .dw 0 .incbin "src/sprite.chr"
Found a mistake? Submit an edit to lin6.
incoming(2): nespaint donsol famicom
Last update on 20O05, edited 3 times. +7/17fh