1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-25 11:32:07 +00:00

Added byte casting fragments

This commit is contained in:
jespergravgaard 2017-11-25 00:10:21 +01:00
parent 96f2610d25
commit c8e3b36893
10 changed files with 11 additions and 3 deletions

View File

@ -115,6 +115,7 @@ public class AsmFragmentManager {
synths.add(new FragmentSynthesis("zpsby1=(.*)", ".*=.*zpsby1.*", null, "asby=$1", "sta {zpsby1}\n", mapZpsby));
synths.add(new FragmentSynthesis("_deref_cowo1=(.*)", null, null, "aby=$1", "sta {cowo1}\n", mapConst));
synths.add(new FragmentSynthesis("_deref_zpptrby1=(.*)", ".*=.*zpptrby1.*", null, "aby=$1", "ldy #0\n" + "sta ({zpptrby1}),y\n", mapZpptrby));
synths.add(new FragmentSynthesis("cowo1_derefidx_zpby1=(.*)", null, null, "aby=$1", "ldx {zpby1}\n"+"sta {cowo1},x\n", mapZpby));
synths.add(new FragmentSynthesis("(.*)=xby(.*)", ".*=.*as?by.*", "txa\n", "$1=aby$2", null, null));
synths.add(new FragmentSynthesis("(.*)=yby(.*)", ".*=.*as?by.*", "tya\n", "$1=aby$2", null, null));

View File

@ -0,0 +1 @@
txa

View File

@ -0,0 +1 @@
tya

View File

@ -1,3 +0,0 @@
lda {zpby2}
ldx {zpby1}
sta {cowo1},x

View File

@ -0,0 +1 @@
tax

View File

@ -0,0 +1,2 @@
sty $ff
ldx $ff

View File

@ -0,0 +1 @@
ldx {zpsby1}

View File

@ -0,0 +1 @@
tay

View File

@ -0,0 +1,2 @@
stx $ff
ldy $ff

View File

@ -0,0 +1 @@
ldy {zpsby1}