( 54K . Uxnlin ) |10 @Console/vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1 |a0 @File/vector $2 &success $1 &succ-lb $1 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2 |000 @src/buf $40 @scope/buf $40 @stats/lines $2 &tokens $2 &warnings $2 ( @|vectors ) |100 @on-reset ( -> ) ;meta #06 DEO2 .Console/type DEI ?{ ;dict/usage str/ #010f DEO BRK } ;src/on-console .Console/vector DEO2 BRK @meta $1 ( name ) "Uxnlin 0a ( desc ) "Uxntal 20 "Linter 0a ( auth ) "By 20 "Devine 20 "Lu 20 "Linvega 0a ( date ) "9 20 "Nov 20 "2026 $2 ( @|Source ) @src/on-console ( -> ) [ LIT2 03 -Console/type ] DEI GTH ?{ / #800f DEO BRK } .Console/read DEI / BRK @src/ ( str* -- ) [ LIT2 -&buf _&ptr ] STR &>w LDAk / INC2 LDAk ?/>w LDA ( >> ) @src/ ( c -- ) [ LIT2 00 &ptr -&buf ] INCk ,&ptr STR STZ2 JMP2r @src/ ( -- ) ;dict/default-scope scope/ ;&buf .File/name DEO2 #0001 .File/length DEO2 ;&c .File/read &>s DEO2k .File/succ-lb DEI ?{ POP2 POP ! } [ LIT &c $1 ] DUP #0a NEQ ?{ .stats/lines LDZ2k INC2 ROT STZ2 } piece-a/handle-char !/>s ( @|Scope ) @scope/length ( -- length* ) [ LIT2 00 _&ptr ] LDR .&buf SUB #0001 SUB2 JMP2r @scope/ ( -- ) ;&void ( >> ) @scope/ ( str* -- ) [ LIT2 -&buf _&ptr ] STR &>w LDAk LIT "/ EQU ?{ LDAk / INC2 LDAk ?/>w } POP2 #00 ( >> ) @scope/ ( c -- ) [ LIT2 00 &ptr -&buf ] INCk ,&ptr STR STZ2 JMP2r @scope/void "MACRO $1 ( @|core ) @piece-a/handle-char ( c -- ) DUP #20 GTH ?/ POP ( | Parse ) ;&buf LDAk ?{ POP2 JMP2r } DUP2 parse-token ,&ptr STR2 #0000 ;&buf STA2 JMP2r @piece-a/ ( c -- ) #00 [ LIT2 &ptr =&buf ] INC2k ,&ptr STR2 STA2 JMP2r @walk-comment ( t* -- ) ;&c .File/read DEO2 ;File/succ-lb DEI EQU ?str/ [ LIT2 &c $1 "( ] INC NEQ ?walk-comment !str/ @walk-block ( t* -- ) ;&c .File/read DEO2 ;File/succ-lb DEI EQU ?str/ [ LIT2 &c $1 "[ ] INC INC NEQ ?walk-block reset !str/ @parse-token ( t* -- ) LDAk [ LIT "( ] EQU ?walk-comment LDAk [ LIT "[ ] EQU ?walk-block LDAk [ LIT "% ] NEQ ?{ INC2k macros/ } ( blank ) LDAk #00 EQU ?str/ ( token count ) .stats/tokens LDZ2k INC2 ROT STZ2 ( new scope ) is-new-scope #00 EQU ?{ INC2k scope/ } ( macro reset scope ) LDAk LIT "% NEQ ?{ scope/ } ( include ) LDA [ LIT "~ ] EQU ?include ;rules2/end ;rules2 &>loop2 ( a ) DUP2 ;piece-b/buf scmp-wild STH str/cap INC2 ( b ) DUP2 ;piece-a/buf scmp-wild STH str/cap INC2 ANDr STHr #00 EQU ?{ LDA2k } INC2 INC2 GTH2k ?/>loop2 POP2 POP2 ( | 3 elements ) ;rules3/end ;rules3 &>loop3 ( a ) DUP2 ;piece-c/buf scmp-wild STH str/cap INC2 ( b ) DUP2 ;piece-b/buf scmp-wild STH str/cap INC2 ( c ) DUP2 ;piece-a/buf scmp-wild STH str/cap INC2 ANDr ANDr STHr #00 EQU ?{ LDA2k } INC2 INC2 GTH2k ?/>loop3 POP2 POP2 ( | tests ) unsafe-runes/ mismatch-runes/ deadzone/ fallthrough/ unnamed-buf/ private/ local/ litdup/ ( | cleanup ) ;piece-b/buf ;piece-c/buf ;piece-a/buf DUP2 ;piece-b/buf !str/ @reset ( -- ) ;piece-a/buf str/ ;piece-b/buf str/ ;piece-c/buf !str/ @include ( -- ) ;piece-a/buf str/cap #000a SUB2 ;dict/assets-tal str/cmp ?reset ;piece-a/buf+1 src/ ;src/buf .File/name DEO2 #0000 .stats/lines STZ2 !reset ( @|helpers ) @is-label ( str* -- flag ) LDAk LIT "@ EQU ?{ LDAk LIT "& EQU ?{ LDAk LIT "} EQU ?{ POP2 #00 JMP2r } } } POP2 #01 JMP2r @is-macro ( str* -- flag ) LDA LIT "% EQU JMP2r @is-new-scope ( str* -- str* flag ) LDAk [ LIT "@ ] NEQ ?/fail INC2k LDA chr/is-uc ?/fail #01 JMP2r &fail ( str* -- flag ) #00 JMP2r @is-inside-scope ( str* -- str* flag ) DUP2 ;scope/buf str/cmp-seg ?{ #00 JMP2r } DUP2 scope/length ADD2 LDA LIT "/ EQU JMP2r @is-jump ( str* -- flag ) LDAk [ LIT "? ] EQU ?/pass &strict ( str* -- flag ) DUP2 ;brk str/cmp ?/pass DUP2 ;jmp str/cmp3 ?/pass LDAk [ LIT "! ] EQU ?/pass POP2 #00 JMP2r &pass ( str* -- flag ) POP2 #01 JMP2r @is-litbyte ( str* -- flag ) LDAk [ LIT ", ] EQU ?/pass LDAk [ LIT ". ] EQU ?/pass LDAk [ LIT "# ] EQU ?/hex POP2 #00 JMP2r &hex ( str* -- flag ) str/len NIP #03 EQU JMP2r &pass ( str* -- flag ) POP2 #01 JMP2r @is-routine ( str* -- flag ) LDAk ?{ POP2 #00 JMP2r } LDAk chr/is-uc ?{ LDAk is-runic ?{ DUP2 macros/exists ?{ POP2 #01 JMP2r } } } POP2 #00 JMP2r @is-litshort ( str* -- flag ) LDAk [ LIT "; ] EQU ?/pass LDAk [ LIT "# ] EQU ?/hex POP2 #00 JMP2r &hex ( str* -- flag ) str/len NIP #05 EQU JMP2r &pass ( str* -- flag ) POP2 #01 JMP2r @is-static ( token* -- flag ) ( ) STH2k is-litshort ( ) STH2r is-litbyte ORA JMP2r @is-opcode ( string* -- f ) LDAk LIT "? EQU ?/on-found LDAk LIT "! EQU ?/on-found DUP2 ;opcodes/brk str/cmp3 ?/on-found ,&t STR2 #2000 &>l #00 OVR #03 MUL ;opcodes ADD2 [ LIT2 &t $2 ] str/cmp3 ?/on-found INC GTHk ?/>l POP2 #00 JMP2r &on-found POP2 #01 JMP2r @is-ref-rune ( c -- t ) STH ;&runes &>w LDAk STHkr EQU ?{ INC2 LDAk ?/>w } LDA STHr EQU JMP2r &runes "|$!?.,;_-= $1 @is-runic ( c -- t ) STH ;&runes &>w LDAk STHkr EQU ?{ INC2 LDAk ?/>w } LDA STHr EQU JMP2r &runes ""|{}%!?@#$%&().,;~ $1 &end @is-local ( str* -- t ) LDAk LIT "@ NEQ ?{ POP2 #00 JMP2r } LDAk is-ref-rune #00 EQU ?{ INC2 } is-inside-scope ?{ POP2 #00 JMP2r } ;scope/buf !str/cmp-seg @is-calling-local ( str* -- f ) LDAk LIT "@ EQU ?{ &>w LDA2k LIT2 "/+ NEQ2 ?{ POP2 #01 JMP2r } INC2 LDAk ?/>w } POP2 #00 JMP2r @scmp-wild ( a* b* -- flag ) OVR2 LDA [ LIT "{ ] EQU ?scmp-template OVR2 LDA [ LIT "< ] EQU ?scmp-lut !scmp-star @scmp-lut ( a* b* -- flag ) SWP2 ,&t STR2 ;dictionaries/end ;dictionaries &>l LDA2k [ LIT2 &t $2 ] str/cmp ?/dict-match #0004 ADD2 GTH2k ?/>l ,&t LDR2 str/ #0a18 DEO POP2 POP2 POP2 #00 JMP2r &dict-match ( target* to* from* -- flag ) NIP2 INC2 INC2 LDA2 SWP2 afnd INC2 ORA JMP2r @scmp-template ( a* b* -- flag ) SWP2 INC2 LDA ( ) DUP [ LIT "1 ] NEQ ?{ POP !is-litbyte } ( ) DUP [ LIT "2 ] NEQ ?{ POP !is-litshort } ( ) DUP [ LIT "% ] NEQ ?{ POP !is-routine } POP JMP2r @scmp-star ( a* b* -- f ) STH2 &>l LDAk [ LIT "* ] EQU ?/pass LDAkr [ LITr "* ] EQUr STHr ?/pass LDAk LDAkr STHr ANDk #00 EQU ?/e NEQk ?/e POP2 INC2 INC2r !/>l &e ( -- ) NIP2 POP2r EQU JMP2r &pass ( a* . b* -- f ) POP2 POP2r #01 JMP2r ( @|Tests ) @unsafe-runes/ ( -- ) ;piece-b/buf LDA ( | handlers ) ;piece-a/buf ;dict/lda str/cmp3 ?/abs ;piece-a/buf ;dict/sta str/cmp3 ?/abs ;piece-a/buf ;dict/ldz str/cmp3 ?/zep ;piece-a/buf ;dict/stz str/cmp3 ?/zep ;piece-a/buf ;dict/ldr str/cmp3 ?/rel ;piece-a/buf ;dict/str str/cmp3 ?/rel POP JMP2r &abs ( c -- ) DUP [ LIT ". ] EQU ?/fail DUP [ LIT ", ] EQU ?/fail POP JMP2r &zep ( c -- ) DUP [ LIT "; ] EQU ?/fail DUP [ LIT ", ] EQU ?/fail POP JMP2r &rel ( c -- ) DUP [ LIT ". ] EQU ?/fail DUP [ LIT "; ] EQU ?/fail POP JMP2r &fail ( c -- ) POP ;&msg ! &msg "Unsafe 00 @mismatch-runes/ ( -- ) ;piece-a/buf LDA2 ( | handlers ) DUP2 LIT2 "?& EQU2 ?/fail DUP2 LIT2 "!& EQU2 ?/fail DUP2 LIT2 "./ EQU2 ?/fail DUP2 LIT2 ",/ EQU2 ?/fail DUP2 LIT2 ";/ EQU2 ?/fail POP2 JMP2r &fail ( ab* -- ) POP2 ;&msg ! &msg "Mismatch 00 @deadzone/ ( -- ) ;piece-b/buf is-jump/strict ?{ JMP2r } ;piece-a/buf is-label ?{ ;piece-a/buf is-macro ?{ ;dead-region ! } } JMP2r @fallthrough/ ( -- ) ;piece-a/buf LDA [ LIT "@ ] NEQ ?{ ;piece-b/buf is-jump #00 EQU ?{ ;piece-a/buf+1 ;piece-b/buf+1 str/cmp #00 EQU ?{ ;fall-through ! } } } JMP2r @unnamed-buf/ ( -- ) ;piece-a/buf LDA [ LIT "$ ] NEQ ?{ ;piece-b/buf is-label ?{ ;piece-b/buf LDA LIT "" EQU ?{ ;unnamed-buf ! } } } JMP2r @private/ ( -- ) ;piece-a/buf is-calling-local ?{ JMP2r } ;call-private ! @local/ ( -- ) ;piece-a/buf is-local ?{ JMP2r } ;use-local ! @litdup/ ( -- ) ;piece-a/buf is-static ?{ JMP2r } ;piece-a/buf ;piece-b/buf str/cmp ?{ JMP2r } ;static-dup ! ( @|Macros ) @macros/exists ( str* -- true ) LDAk LIT "/ NEQ ?{ name/unpack } STH2 ,&ptr LDR2 ;&mem EQU2k ?{ &>l STH2kr OVR2 str/cmp ?/found str/cap INC2 GTH2k ?/>l } POP2 POP2 POP2r #00 JMP2r &found POP2 POP2 POP2r #01 JMP2r @macros/ ( str* -- ) &>w LDAk DUP ?{ / POP2 JMP2r } / INC2 !/>w @macros/ ( c -- ) [ LIT2 &ptr =&mem ] INC2k ,&ptr STR2 STA JMP2r @name/unpack ( str* -- buf* ) ;&buf SWP2 ;scope/buf / !/ @name/ ( str* -- ) ;&buf ,&ptr STR2 ( >> ) @name/ ( str* -- ) &>w LDAk DUP ?{ POP POP2 JMP2r } / INC2 !/>w @name/ ( c -- ) #00 [ LIT2 &ptr =&buf ] INC2k ,&ptr STR2 STA2 JMP2r ( @|print ) @ ( str* -- ) .stats/warnings LDZ2k INC2 ROT STZ2 [ LIT2 "- 18 ] DEOk DEO #2018 DEO ;piece-a/buf str/ #2018 DEO [ LIT2 "" 18 ] DEO str/ [ LIT2 "" 18 ] DEO ! @ ( str* -- ) .stats/warnings LDZ2k INC2 ROT STZ2 [ LIT2 "- 18 ] DEOk DEO #2018 DEO ;piece-b/buf str/ #2018 DEO ;piece-a/buf str/ #2018 DEO [ LIT2 "" 18 ] DEO str/ [ LIT2 "" 18 ] DEO ! @ ( str* -- ) .stats/warnings LDZ2k INC2 ROT STZ2 [ LIT2 "- 18 ] DEOk DEO #2018 DEO ;piece-c/buf str/ #2018 DEO ;piece-b/buf str/ #2018 DEO ;piece-a/buf str/ #2018 DEO [ LIT2 "" 18 ] DEO str/ [ LIT2 "" 18 ] DEO @ ( -- ) ;dict/in-txt str/ ;scope/buf str/ ;dict/at-txt str/ ;src/buf str/ [ LIT2 ": 18 ] DEO .stats/lines LDZ2 INC2 dec/ #0a18 DEO JMP2r @ ( -- ) ;dict/linted-txt str/ ;src/buf str/ #2018 DEO ;dict/with-txt str/ #2018 DEO .stats/tokens LDZ2 dec/ #2018 DEO ;dict/tokens-txt str/ [ LIT2 ", 18 ] DEO #2018 DEO .stats/warnings LDZ2 dec/ #2018 DEO ;dict/warnings-txt str/ #0a18 DEO JMP2r ( @|stdlib ) @chr/is-uc ( c -- f ) [ LIT "A ] SUB #1a LTH JMP2r @str/cmp-seg ( a* b* -- f ) STH2 &>wcs LDAk ?{ &ds POP2 LDAr STHr #00 EQU JMP2r } LDAk LDAkr STHr NEQ ?/ds INC2 INC2r !/>wcs @str/cmp ( a* b* -- f ) STH2 &>wc LDAk ?{ &d LDA LDAr STHr EQU JMP2r } LDAk LDAkr STHr NEQ ?/d INC2 INC2r !/>wc @str/cap ( str* -- end* ) LDAk ?{ JMP2r } INC2 !/cap @str/cmp3 ( a* b* -- f ) STH2 LDAkr LDAk STHr NEQ ?{ INC2r INC2 } LDA2r LDA2 STH2r EQU2 JMP2r @str/ ( str* -- ) LDAk DUP ?{ POP POP2 JMP2r } #18 DEO INC2 !/ @str/len ( str* -- len* ) STH2k /cap STH2r SUB2 JMP2r @dec/ ( short* -- ) [ LIT2r ff00 ] &>read #000a DIV2k STH2k MUL2 SUB2 STH2r INCr ORAk ?/>read POP2 &>write NIP #30 ADD #18 DEO OVRr ADDr STHkr ?/>write POP2r JMP2r ( @|old ) @str/ ( str* -- ) #0000 SWP2 STA2 JMP2r @ ( src* dst* -- ) STH2 &w LDAk #00 STH2kr STA2 INC2r INC2 LDAk ?/w POP2 POP2r JMP2r @afnd ( array* target* -- * ) STH2 &>w DUP2 STH2kr str/cmp ?/end str/cap INC2 LDAk ?/>w POP2 #ffff &end POP2r JMP2r ( Assets ) @dict/usage "usage: 20 "uxnlin.rom 20 "input.tal 0a 00 &in-txt ", 20 "in 20 00 &at-txt ", 20 "at 20 00 &linted-txt "Linted 20 00 &with-txt "with 00 &tokens-txt "tokens 00 &default-scope "@on-reset 00 &warnings-txt "warnings. 00 &assets-tal "assets.tal 00 &sta "STA 00 &lda "LDA 00 &stz "STZ 00 &ldz "LDZ 00 &str "STR 00 &ldr "LDR 00 ( @|LUTs ) @dictionaries [2 =any-1x/id =any-1x/lut =any-2x/id =any-2x/lut =anyr-2x/id =anyr-2x/lut =any2-1x/id =any2-1x/lut =anyk-20/id =anyk-20/lut =any2-2x/id =any2-2x/lut =any-12/id =any-12/lut =noswp/id =noswp/lut =noswp2/id =noswp2/lut =any1-11/id =any1-11/lut =ari1-2x/id =ari1-2x/lut =ari2-2x/id =ari2-2x/lut =logic =logic/lut ] &end @logic " 00 &lut [8 "GTH 00 "LTH 00 "EQU 00 "NEQ 00 ] 00 ( consume 1 byte ) @any-1x/id " 00 &lut [8 "INC 00 "DUP 00 "POP 00 ] 00 ( consume 2 bytes ) @any-2x/id " 00 &lut [8 "ADD 00 "SUB 00 "MUL 00 "DIV 00 "GTH 00 "LTH 00 "EQU 00 "NEQ 00 "AND 00 "ORA 00 "EOR 00 "SWP 00 "SFT 00 "LDA 00 "JCN 00 "STZ 00 "NIP 00 "STR 00 "DEO 00 "JMP2 00 "STH2 00 ] 00 ( consume 2 bytes, from return stack ) @anyr-2x/id " 00 &lut [8 "ADDr 00 "SUBr 00 "MULr 00 "DIVr 00 "GTHr 00 "LTHr 00 "EQUr 00 "NEQr 00 "ANDr 00 "ORAr 00 "EORr 00 "SWPr 00 "SFTr 00 "LDAr 00 "JCNr 00 "STZr 00 "NIPr 00 "STRr 00 "DEOr 00 "JMP2r 00 "STH2r 00 ] 00 ( consume 1 short ) @any2-1x/id " 00 &lut [8 "INC2 00 "DUP2 00 "POP2 00 ] 00 ( consume 2 bytes ) @anyk-20/id " 00 &lut [8 "JMP2k 00 "JCNk 00 "JSR2k 00 "STH2k 00 "STZk 00 "STRk 00 "DEOk 00 "POP2k 00 ] 00 ( consume 2 shorts ) @any2-2x/id " 00 &lut [8 "ADD2 00 "SUB2 00 "MUL2 00 "DIV2 00 "GTH2 00 "LTH2 00 "EQU2 00 "NEQ2 00 "AND2 00 "ORA2 00 "EOR2 00 "SWP2 00 "STA2 00 "OVR2 00 "NIP2 00 ] 00 ( consume 1 byte, make 2 bytes ) @any-12/id " 00 &lut [8 "DUPk 00 "LDZ2 00 "DEI2 00 "LDR2 00 ] 00 ( consume 2 bytes, any order ) @noswp/id " 00 &lut [8 "ADD 00 "MUL 00 "EQU 00 "NEQ 00 "ORA 00 "AND 00 "EOR 00 ] 00 ( consume 2 bytes, any order ) @noswp2/id " 00 &lut [8 "ADD2 00 "MUL2 00 "EQU2 00 "NEQ2 00 "ORA2 00 "AND2 00 "EOR2 00 ] 00 ( pop 1 bytes, push 1 byte ) @any1-11/id " 00 &lut [8 "INC 00 "LDZ 00 "STR 00 "DEI 00 ] 00 ( consume 2 bytes ) @ari1-2x/id " 00 &lut [8 "ADD 00 "SUB 00 "MUL 00 "DIV 00 "GTH 00 "LTH 00 "EQU 00 "NEQ 00 "AND 00 "ORA 00 "EOR 00 "NIP 00 "SWP 00 ] 00 ( consume 2 shorts ) @ari2-2x/id " 00 &lut [8 "ADD2 00 "SUB2 00 "MUL2 00 "DIV2 00 "GTH2 00 "LTH2 00 "EQU2 00 "NEQ2 00 "AND2 00 "ORA2 00 "EOR2 00 "NIP2 00 "SWP2 00 ] 00 @opcodes [8 "LIT "INC "POP "NIP "SWP "ROT "DUP "OVR "EQU "NEQ "GTH "LTH "JMP "JCN "JSR "STH "LDZ "STZ "LDR "STR "LDA "STA "DEI "DEO "ADD "SUB "MUL "DIV "AND "ORA "EOR "SFT &brk "BRK ] ( @|Rules ) @rules2 [5 "STH 00 "STHr 00 =redundance "STH2 00 "STH2r 00 =redundance "STHr 00 "STH 00 =redundance "STH2r 00 "STH2 00 =redundance "STH 00 "STHkr 00 =redundance "STH2 00 "STH2kr 00 =redundance "STHr 00 "STHk 00 =redundance "STH2r 00 "STH2k 00 =redundance "STH2r 00 "POP2 00 =redundance "STH2 00 "POP2r 00 =redundance "STHr 00 "POP 00 =redundance "STH 00 "POPr 00 =redundance "DUP 00 "SWP 00 =redundance "DUP2 00 "SWP2 00 =redundance "SWP 00 "SWP 00 =redundance "SWP2 00 "SWP2 00 =redundance "SWPr 00 "SWPr 00 =redundance "SWP2r 00 "SWP2r 00 =redundance "DUP 00 "POP 00 =redundance "DUP2 00 "POP2 00 =redundance "JMP2r 00 "JMP2r 00 =redundance "JMP2r 00 "JMP2 00 =redundance "JMP2r 00 "JMP 00 =redundance "JMP2r 00 "BRK 00 =redundance "JMP2 00 "JMP2r 00 =redundance "JMP2 00 "JMP2 00 =redundance "JMP2 00 "JMP 00 =redundance "JMP2 00 "BRK 00 =redundance "JMP 00 "JMP2r 00 =redundance "JMP 00 "JMP2 00 =redundance "JMP 00 "JMP 00 =redundance "JMP 00 "BRK 00 =redundance "!* 00 "JMP2r 00 =redundance "!* 00 "JMP2 00 =redundance "!* 00 "JMP 00 =redundance "!* 00 "BRK 00 =redundance "BRK 00 "BRK 00 =redundance "#ff 00 "GTH 00 =redundance "#ffff 00 "GTH2 00 =redundance "#00 00 "LTH 00 =redundance "#0000 00 "LTH2 00 =redundance "#00 00 "ADD 00 =redundance "#0000 00 "ADD2 00 =redundance "#00 00 "SUB 00 =redundance "#0000 00 "SUB2 00 =redundance "#01 00 "MUL 00 =redundance "#0001 00 "MUL2 00 =redundance "#01 00 "DIV 00 =redundance "#0001 00 "DIV2 00 =redundance "#ff 00 "AND 00 =redundance "#ffff 00 "AND2 00 =redundance ] [5 "#00 00 "ORA 00 =redundance "#0000 00 "ORA2 00 =redundance "#00 00 "EOR 00 =redundance "#0000 00 "EOR2 00 =redundance "#00 00 "SFT 00 =redundance "#00 00 "SFT2 00 =redundance "SWP 00 "POP2 00 =redundance " 00 "POP2 00 =redundance "OVR 00 "POP 00 =redundance "OVR2 00 "POP2 00 =redundance "DUP 00 "NIP 00 =redundance "DUP2 00 "NIP2 00 =redundance "SWP 00 "NIP 00 =pop "SWP2 00 "NIP2 00 =pop "OVR 00 "NIP 00 =popdup "OVR2 00 "NIP2 00 =popdup2 "SWPr 00 "STH2r 00 =sthrsthr "SWP 00 "STH2 00 =sthsth "STH2r 00 "SWP 00 =sthrsthr "STH2 00 "SWPr 00 =sthsth "#00ff 00 "GTH2 00 =ovr ] ( @|Unsafe2 ) [5 "AND 00 "JMP 00 =unsafe "ORA 00 "JMP 00 =unsafe "EOR 00 "JMP 00 =unsafe "#* 00 "JMP 00 =unsafe "#* 00 "JSR 00 =unsafe "{2} 00 "DEO* 00 =unsafe "{2} 00 "DEI* 00 =unsafe "{2} 00 "LDR* 00 =unsafe "{2} 00 "STR* 00 =unsafe "{2} 00 "LDZ* 00 =unsafe "{2} 00 "STZ* 00 =unsafe "AND2 00 "?* 00 =unsafe "ORA2 00 "?* 00 =unsafe "INC2 00 "?* 00 =unsafe "ADD2 00 "?* 00 =unsafe "SUB2 00 "?* 00 =unsafe "LDA2 00 "?* 00 =unsafe "LDZ2 00 "?* 00 =unsafe "LDR2 00 "?* 00 =unsafe "DEI2 00 "?* 00 =unsafe ] [5 "ADD 00 "INC 00 =static "ADD2 00 "INC2 00 =static "{1} 00 "INC 00 =static "{2} 00 "INC2 00 =static "{1} 00 "STHk 00 =static "{2} 00 "STH2k 00 =static "ROT* 00 "ROT* 00 =codesmell "SWP 00 "POP 00 =nip "SWP2 00 "POP2 00 =nip2 "#01 00 "ADD 00 =inc "#0001 00 "ADD2 00 =inc2 "#02 00 "ADD 00 =inc-twice "#0002 00 "ADD2 00 =inc2-twice "LDA2 00 "NIP 00 =inc2lda "POP 00 "POP 00 =pop2 "NIP 00 "POP 00 =pop2 ] [5 "NIP 00 "STH 00 =latestack "NIP2 00 "STH2 00 =latestack "POPr 00 "POPr 00 =pop2r "OVR 00 "OVR 00 =dup2 "STHk 00 "STHr 00 =dup "STH2k 00 "STH2r 00 =dup2 "#ffff 00 "NEQ2 00 =inc2ora "#02 00 "DIV 00 =sft01 "#0002 00 "DIV2 00 =sft201 "#04 00 "DIV 00 =sft02 "#0004 00 "DIV2 00 =sft202 "#08 00 "DIV 00 =sft03 "#0008 00 "DIV2 00 =sft203 "#10 00 "DIV 00 =sft04 "#0010 00 "DIV2 00 =sft204 "#20 00 "DIV 00 =sft05 "#0020 00 "DIV2 00 =sft205 "#40 00 "DIV 00 =sft06 "#0040 00 "DIV2 00 =sft206 "#80 00 "DIV 00 =sft07 "#0080 00 "DIV2 00 =sft207 "#0100 00 "DIV2 00 =sft208 "#0200 00 "DIV2 00 =sft209 "#0400 00 "DIV2 00 =sft20a "#0800 00 "DIV2 00 =sft20b "#1000 00 "DIV2 00 =sft20c "#2000 00 "DIV2 00 =sft20d "#4000 00 "DIV2 00 =sft20e "#8000 00 "DIV2 00 =sft20f "#02 00 "MUL 00 =sft10 "#0002 00 "MUL2 00 =sft210 "#04 00 "MUL 00 =sft20 "#0004 00 "MUL2 00 =sft220 "#08 00 "MUL 00 =sft30 "#0008 00 "MUL2 00 =sft230 "#10 00 "MUL 00 =sft40 "#0010 00 "MUL2 00 =sft240 "#20 00 "MUL 00 =sft50 "#0020 00 "MUL2 00 =sft250 "#40 00 "MUL 00 =sft60 "#0040 00 "MUL2 00 =sft260 "#80 00 "MUL 00 =sft70 "#0080 00 "MUL2 00 =sft270 "#0100 00 "MUL2 00 =sft280 "#0200 00 "MUL2 00 =sft290 "#0400 00 "MUL2 00 =sft2a0 "#0800 00 "MUL2 00 =sft2b0 "#1000 00 "MUL2 00 =sft2c0 "#2000 00 "MUL2 00 =sft2d0 "#4000 00 "MUL2 00 =sft2e0 "#8000 00 "MUL2 00 =sft2f0 "#80 00 "SFT2 00 =nip0 ] [5 "#0000 00 "GTH2 00 =0000neq2 "#00 00 "GTH 00 =00neq "#0001 00 "LTH2 00 =0000equ2 "#01 00 "LTH 00 =00equ "#00 00 "#01 00 =inck "#0000 00 "#0001 00 =inc2k "JSR2 00 "JMP2r 00 =jmp2 "JSR 00 "JMP2r 00 =jmp "{2} 00 "JCN_ 00 =jmp "{1} 00 "JCN_ 00 =jmp "STH2kr 00 "LDA 00 =ldakrsthr "STH2k 00 "LDAr 00 =ldaksth "#ff 00 "NEQ 00 =inc "DUP2 00 "NIP 00 =dup "{2} 00 "STH2 00 =unstashed "{1} 00 "STH 00 =unstashed "{2} 00 "JMP2 00 =uncalled "{1} 00 "JMP 00 =uncalled "{2} 00 "JCN2 00 =uncalled "{1} 00 "JCN 00 =uncalled "{2} 00 "JSR2 00 =uncalled "{1} 00 "JSR 00 =uncalled " 00 "NIP 00 =redundance " 00 "POP 00 =redundance "STH2 00 " 00 =eagerstack "STH2r 00 " 00 =eagerstack "STHr 00 "INC 00 =eagerstack "STH 00 "INCr 00 =eagerstack "STH2r 00 "INC2 00 =eagerstack "STH2 00 "INC2r 00 =eagerstack " 00 "STH2 00 =latestack "{1} 00 "STH2 00 =latestack "SWP 00 " 00 =redundance "SWP2 00 " 00 =redundance " 00 "NIP 00 =redundance " 00 "POP 00 =redundance "SWP2 00 "GTH2 00 =lth2 "SWP 00 "GTH 00 =lth "SWP2 00 "LTH2 00 =gth2 "SWP 00 "LTH 00 =gth "LDZ2 00 "NIP 00 =static "LDZ2 00 "POP 00 =static "LDR2 00 "NIP 00 =static "LDR2 00 "POP 00 =static "LDA2 00 "NIP 00 =static "LDA2 00 "POP 00 =static "LDA2* 00 "NIP 00 =static "LDA2* 00 "POP 00 =static "DEI2 00 "POP 00 =static "DEI2 00 "NIP 00 =static "#* 00 "?* 00 =static ] [5 ".* 00 "?* 00 =static ",* 00 "?* 00 =static ";* 00 "?* 00 =static "#00* 00 "ORA2 00 =ora "DUP 00 "STH 00 =keep "DUP 00 " 00 =keep "DUP2 00 " 00 =keep "DUP2 00 " 00 =keep "{2} 00 " 00 =static "{1} 00 " 00 =static "{1} 00 "{1} 00 =combine "&* 00 "!* 00 =tailjump "@* 00 "!* 00 =tailjump "{%} 00 "JMP* 00 =tailcall "} 00 "!* 00 =tailcall "|* 00 "|* 00 =redundance "{2} 00 "NIP2 00 =eagerstack "{1} 00 "NIP 00 =eagerstack ] &end @rules3 [7 "ROT 00 "ROT 00 "ROT 00 =redundance "ROT2 00 "ROT2 00 "ROT2 00 =redundance "LIT 00 "* 00 "LIT 00 =combine "LIT 00 "* 00 "{1} 00 =combine "SWP 00 "{1} 00 "SWP 00 =litrot "{1} 00 "ADD 00 "INC 00 =combine "{2} 00 "ADD2 00 "INC2 00 =combine "INC 00 "{1} 00 "ADD 00 =combine "INC2 00 "{2} 00 "ADD2 00 =combine "POP 00 "#00 00 "SWP 00 =sft208 "DUP2 00 "#0000 00 "EQU2 00 =orak00equ "OVR 00 "OVR 00 "OVR 00 =ovrk "OVR2 00 "OVR2 00 "OVR2 00 =ovr2k "STH 00 "SWP 00 "STHr 00 =rotswp "STH2 00 "SWP2 00 "STH2r 00 =rot2swp2 "STH2r 00 "ADD2 00 "STH2 00 =redundance "STH2r 00 "SUB2 00 "STH2 00 =redundance "STH2r 00 "MUL2 00 "STH2 00 =redundance "STH2r 00 "DIV2 00 "STH2 00 =redundance "STHr 00 "ADD 00 "STH 00 =redundance "STHr 00 "SUB 00 "STH 00 =redundance "STHr 00 "MUL 00 "STH 00 =redundance "STHr 00 "DIV 00 "STH 00 =redundance "#00 00 "NEQ 00 "?* 00 =redundance "#00 00 "GTH 00 "?* 00 =redundance "SFT 00 "DUP 00 "ADD 00 =redundance "SFT2 00 "DUP2 00 "ADD2 00 =redundance "ROT 00 "SWP 00 "ROT 00 =swp "ROT2 00 "SWP2 00 "ROT2 00 =swp2 "ROT 00 "NIP 00 "SWP 00 =pop "ROT2 00 "NIP2 00 "SWP2 00 =pop2 " 00 "{1} 00 " 00 =logic "#00 00 "NEQ 00 "JMP 00 =1jcn "#01 00 "EQU 00 "JMP 00 =1jcn "#00 00 "GTH 00 "JMP 00 =1jcn "#80 00 "SFT2 00 "POP 00 =nip "#08 00 "SFT2 00 "NIP 00 =pop "OVR 00 "OVR 00 " 00 =keep ] [7 "OVR2 00 "OVR2 00 " 00 =keep "{1} 00 "{1} 00 " 00 =static "{2} 00 "{2} 00 " 00 =static "LIT 00 ""* 00 " 00 =static "{1} 00 "{1} 00 "OVR 00 =static "{2} 00 "{2} 00 "OVR2 00 =static "DUP 00 "{1} 00 "SWP 00 =00ovr "DUP2 00 "{2} 00 "SWP2 00 =0000ovr2 "#0000 00 "NEQ2 00 "?* 00 =ora "#0000 00 "GTH2 00 "?* 00 =ora "LIT 00 ""* 00 "{1} 00 =combine "{1} 00 "LIT 00 ""* 00 =combine "LDZ2 00 "#0100 00 "LTH2 00 =ldz0equ "LDA2 00 "#0100 00 "LTH2 00 =lda0equ "LDR2 00 "#0100 00 "LTH2 00 =ldr0equ "LDR 00 "{1} 00 " 00 =cmporder "LDZ 00 "{1} 00 " 00 =cmporder "DEI 00 "{1} 00 " 00 =cmporder "LDR 00 "{1} 00 "SWP 00 =cmporder "LDZ 00 "{1} 00 "SWP 00 =cmporder "DEI 00 "{1} 00 "SWP 00 =cmporder "{1} 00 "SWP 00 "STH2 00 =latestack "{1} 00 "SWP 00 "STH 00 =latestack "{1} 00 "DEI 00 "STH 00 =latestack "{1} 00 "DEI2 00 "STH2 00 =latestack "NIP 00 "{1} 00 "STR 00 =eagerstack "NIP 00 "{1} 00 "STZ 00 =eagerstack "NIP 00 "{1} 00 "DEO 00 =eagerstack "NIP2 00 "{2} 00 "STA2 00 =eagerstack "STHr 00 "{1} 00 "DEO* 00 =eagerstack "STH2r 00 "{1} 00 "DEO2* 00 =eagerstack "STHr 00 "{1} 00 "STR 00 =eagerstack "STH2r 00 "{1} 00 "STR2 00 =eagerstack "STHr 00 "{1} 00 "STZ* 00 =eagerstack "STH2r 00 "{1} 00 "STZ2* 00 =eagerstack "STHr 00 "{2} 00 "STA* 00 =eagerstack ] [7 "STH2r 00 "{2} 00 "STA2* 00 =eagerstack "STHr 00 "{1} 00 "SWP 00 =eagerstack "STHr 00 "STHr 00 " 00 =eagerstack "STH2r 00 "STH2r 00 " 00 =eagerstack "STHr 00 "DUP 00 " 00 =eagerstack "STH2r 00 "DUP2 00 " 00 =eagerstack "STHkr 00 "DUP 00 " 00 =eagerstack "STH2kr 00 "DUP2 00 " 00 =eagerstack "STHkr 00 "{1} 00 "DEO* 00 =eagerstack "STH2kr 00 "{1} 00 "DEO2* 00 =eagerstack "STHkr 00 "{1} 00 "STR 00 =eagerstack "STH2kr 00 "{1} 00 "STR2 00 =eagerstack "STHkr 00 "{1} 00 "STZ* 00 =eagerstack "STH2kr 00 "{1} 00 "STZ2* 00 =eagerstack "STHkr 00 "{2} 00 "STA* 00 =eagerstack "STH2kr 00 "{2} 00 "STA2* 00 =eagerstack "STHkr 00 "{1} 00 "SWP 00 =eagerstack "STH2k 00 "{1} 00 "STH2r 00 =eagerstack "STHk 00 "{1} 00 "STHr 00 =eagerstack "{2} 00 "LDA 00 "STH 00 =eagerstack "{1} 00 "LDZ 00 "STH 00 =eagerstack "{1} 00 "LDR 00 "STH 00 =eagerstack "{2} 00 "LDA2 00 "STH2 00 =eagerstack "{1} 00 "LDZ2 00 "STH2 00 =eagerstack "{1} 00 "LDR2 00 "STH2 00 =eagerstack "{2} 00 "LDZ 00 "STH2 00 =latestack "DUP 00 "STHkr 00 "SWP 00 =latestack "DUP2 00 "STH2kr 00 "SWP2 00 =latestack "{2} 00 "ADD2 00 "INC2 00 =static "{1} 00 "ADD 00 "INC 00 =static "{2} 00 "SUB2 00 "INC2 00 =static "{1} 00 "SUB 00 "INC 00 =static "{2} 00 "{1} 00 "SFT2 00 =static "{1} 00 "{1} 00 "SFT 00 =static "JMP2r 00 "} 00 "JMP2r 00 =fall-through "{%} 00 "} 00 "JMP* 00 =tailcall ] [7 "{%} 00 "@ 00 "JMP* 00 =tailcall "{%} 00 "& 00 "JMP* 00 =tailcall "ORA 00 "ORA 00 "ORA 00 =bitora "AND 00 "AND 00 "AND 00 =bitand "EOR 00 "EOR 00 "EOR 00 =biteor "DUP2 00 "#7fff 00 "GTH2 00 =ovr7fgth "DUP2 00 "#8000 00 "LTH2 00 =ovr80lth ] &end ( @|hints ) @redundance "Redundance 00 ( opcode effects cancel each other ) @static "Static-Arithmetic 00 ( arithmetic opcode on two static literals ) @static-dup "Static-Duplicate 00 ( two identical static literals ) @keep "Unkept 00 ( opcode should use non-destructive keep mode ) @unsafe "Unsafe 00 ( bitwise opcode used in relative jump ) @unstashed "Unstashed 00 ( literal was created on the wrong stack ) @unnamed-buf "Unnamed-buffer 00 ( buffer has no label ) @latestack "Late-stack 00 ( arithmetic performed after stashing ) @eagerstack "Eager-stack 00 ( arithmetic performed before stashing ) @tokenlen "Token-length 00 ( token is longer than 24 characters ) @combine "Combine 00 ( sequences of two literal bytes ) @uncalled "Uncalled 00 ( using JSR when could be calling ) @tailcall "Tailcall 00 ( should be a jmi ) @tailjump "Tailjump 00 ( should jump to tailcall ) @fall-through "Fall-through 00 ( jumping to the next label ) @dead-region "Dead-region 00 ( unlabeled content after jumps ) @use-local "Use-local 00 ( should use local call ) @hop "Hop 00 ( jci over jmi ) @nested "Nested 00 ( nested square brackets ) @cmporder "Static-order 00 ( postfix static ) @call-private "Private-call 00 @codesmell "Code-smell 00 ( @|specifics ) @inc "INC 00 @inc2 "INC2 00 @inc-twice "INC 20 "INC 00 @inc2-twice "INC2 20 "INC2 00 @1jcn "#01 20 "JCN 00 @pop2 "POP2 00 @pop2r "POP2r 00 @ovr "OVR 00 @ovrk "OVRk 00 @ovr2k "OVR2k 00 @lth "LTH 00 @lth2 "LTH2 00 @gth "GTH 00 @gth2 "GTH2 00 @inck "INCk 00 @inc2k "INC2k 00 @brk "BRK 00 @jmp "JMP 00 @jmp2 "JMP2 00 @jmp2r "JMP2r 00 @ora "ORA 00 @nip "NIP 00 @nip2 "NIP2 00 @nip0 "NIP 20 "#00 00 @and "AND 00 @sft01 "#01 20 "SFT 00 @sft02 "#02 20 "SFT 00 @sft03 "#03 20 "SFT 00 @sft04 "#04 20 "SFT 00 @sft05 "#05 20 "SFT 00 @sft06 "#06 20 "SFT 00 @sft07 "#07 20 "SFT 00 @sft10 "#10 20 "SFT 00 @sft20 "#20 20 "SFT 00 @sft30 "#30 20 "SFT 00 @sft40 "#40 20 "SFT 00 @sft50 "#50 20 "SFT 00 @sft60 "#60 20 "SFT 00 @sft70 "#70 20 "SFT 00 @sft201 "#01 20 "SFT2 00 @sft202 "#02 20 "SFT2 00 @sft203 "#03 20 "SFT2 00 @sft204 "#04 20 "SFT2 00 @sft205 "#05 20 "SFT2 00 @sft206 "#06 20 "SFT2 00 @sft207 "#07 20 "SFT2 00 @sft208 "#08 20 "SFT2 00 @sft209 "#09 20 "SFT2 00 @sft20a "#0a 20 "SFT2 00 @sft20b "#0b 20 "SFT2 00 @sft20c "#0c 20 "SFT2 00 @sft20d "#0d 20 "SFT2 00 @sft20e "#0e 20 "SFT2 00 @sft20f "#0f 20 "SFT2 00 @sft210 "#10 20 "SFT2 00 @sft220 "#20 20 "SFT2 00 @sft230 "#30 20 "SFT2 00 @sft240 "#40 20 "SFT2 00 @sft250 "#50 20 "SFT2 00 @sft260 "#60 20 "SFT2 00 @sft270 "#70 20 "SFT2 00 @sft280 "#80 20 "SFT2 00 @sft290 "#90 20 "SFT2 00 @sft2a0 "#a0 20 "SFT2 00 @sft2b0 "#b0 20 "SFT2 00 @sft2c0 "#c0 20 "SFT2 00 @sft2d0 "#d0 20 "SFT2 00 @sft2e0 "#e0 20 "SFT2 00 @sft2f0 "#f0 20 "SFT2 00 @00ovr "#00 20 "OVR 00 @0000ovr2 "#0000 20 "OVR2 00 @pop "POP 00 @dup "DUP 00 @dup2 "DUP2 00 @dupadd "DUP 20 "ADD 00 @dup2add2 "DUP2 20 "ADD2 00 @orak00equ "ORAk 20 "#00 20 "EQU 00 @rotswp "ROT 20 "SWP 00 @rot2swp2 "ROT2 20 "SWP2 00 @ldakrsthr "LDAkr 20 "STHr 00 @ldaksth "LDAk 20 "STH 00 @inc2ora "INC2 20 "ORA 00 @0000neq2 "#0000 20 "NEQ2 00 @00neq "#00 20 "NEQ 00 @0000equ2 "#0000 20 "EQU2 00 @00equ "#00 20 "EQU 00 @inc2lda "INC2 20 "LDA 00 @ldz0equ "LDZ 20 "#00 20 "EQU 00 @lda0equ "LDA 20 "#00 20 "EQU 00 @ldr0equ "LDR 20 "#00 20 "EQU 00 @sthsth "STH 20 "STH 00 @sthrsthr "STHr 20 "STHr 00 @bitora "ORA2 20 "ORA 00 @bitand "AND2 20 "AND 00 @biteor "EOR2 20 "EOR 00 @popdup "POP 20 "DUP 00 @popdup2 "POP2 20 "DUP2 00 @dupeor "DUP 20 "EOR 00 @dupeor2 "DUP2 20 "EOR2 00 @swp "SWP 00 @swp2 "SWP2 00 @neq "NEQ 00 @equ "EQU 00 @litrot "#00 20 "ROT 00 @ovr7fgth "OVR 20 "#7f 20 "GTH 00 @ovr80lth "OVR 20 "#80 20 "LTH 00 ( @|Buffers ) @piece-a/buf 00 &buf+1 $50 @piece-b/buf 00 &buf+1 $50 @piece-c/buf 00 &buf+1 $50 @name/buf $100 @macros/mem $2000