From 95a37590872420877975096517c8c6f29c2e0c0f Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sat, 2 May 2020 11:38:51 +0200 Subject: [PATCH] Renamed a few VIC II registers --- .../kickc/model/CallingConventionStack.java | 1 - .../kickc/passes/Pass1CallStack.java | 4 +- src/main/kc/include/mos6569.h | 14 +- .../dk/camelot64/kickc/test/TestPrograms.java | 17 + src/test/kc/address-7.c | 4 +- src/test/kc/asm-uses-0.c | 4 +- src/test/kc/bgblack.c | 2 +- src/test/kc/bgblacklib.c | 2 +- src/test/kc/bitmap-circle-2.c | 2 +- src/test/kc/bitmap-circle.c | 2 +- src/test/kc/bitmap-line-anim-1.c | 4 +- src/test/kc/bitmap-line-anim-2.c | 4 +- src/test/kc/bitmap-plot-0.c | 4 +- src/test/kc/bitmap-plot-1.c | 4 +- src/test/kc/bitmap-plot-2.c | 6 +- src/test/kc/bitmap-plotter.c | 8 +- src/test/kc/c64dtv-8bppcharstretch.c | 4 +- src/test/kc/c64dtv-8bppchunkystretch.c | 4 +- src/test/kc/c64dtv-color.c | 4 +- src/test/kc/c64dtv-gfxmodes.c | 108 +- src/test/kc/cast-precedence-problem.c | 6 +- src/test/kc/clobber-a-problem.c | 6 +- .../kc/complex/ataritempest/ataritempest.c | 6 +- src/test/kc/complex/clearscreen/clearscreen.c | 20 +- src/test/kc/complex/medusa/medusa.c | 2 +- src/test/kc/complex/prebob/grid-bobs.c | 8 +- src/test/kc/complex/prebob/vogel-bobs.c | 8 +- src/test/kc/complex/prebob/vogel-sprites.c | 16 +- .../complex/spritescroller/spritescroller.c | 10 +- src/test/kc/complex/tetris/test-sprites.c | 2 +- src/test/kc/complex/tetris/tetris-render.c | 14 +- src/test/kc/complex/tetris/tetris-sprites.c | 6 +- src/test/kc/complex/tetris/tetris.c | 6 +- src/test/kc/complex/xmega65/xmega65.c | 6 +- src/test/kc/constantmin.c | 4 +- src/test/kc/constants.c | 8 +- src/test/kc/double-import.c | 2 +- src/test/kc/examples/3d/3d.c | 2 +- src/test/kc/examples/kernalload/kernalload.c | 2 +- src/test/kc/examples/linking/linking.c | 6 +- .../examples/multiplexer/simple-multiplexer.c | 2 +- src/test/kc/examples/rotate/rotate.c | 2 +- .../kc/examples/sinsprites/sinus-sprites.c | 2 +- src/test/kc/examples/zpcode/zpcode.c | 8 +- src/test/kc/function-pointer-noarg-2.c | 8 +- src/test/kc/function-pointer-noarg-3.c | 8 +- src/test/kc/function-pointer-noarg-call-2.c | 8 +- src/test/kc/function-pointer-noarg-call-3.c | 8 +- src/test/kc/function-pointer-noarg-call-4.c | 4 +- src/test/kc/function-pointer-noarg-call-5.c | 8 +- src/test/kc/function-pointer-noarg-call.c | 4 +- src/test/kc/function-pointer-noarg.c | 8 +- src/test/kc/function-pointer-return.c | 12 +- src/test/kc/global-pc-multiple.c | 6 +- src/test/kc/global-pc.c | 4 +- src/test/kc/hex2dec.c | 14 +- src/test/kc/imported.c | 2 +- src/test/kc/importing.c | 2 +- src/test/kc/incd020.c | 6 +- src/test/kc/inline-function.c | 6 +- src/test/kc/irq-hardware-clobber-jsr.c | 6 +- src/test/kc/irq-hardware-clobber.c | 6 +- src/test/kc/irq-hardware-stack.c | 6 +- src/test/kc/irq-hardware.c | 6 +- src/test/kc/irq-kernel-minimal.c | 4 +- src/test/kc/irq-kernel.c | 6 +- src/test/kc/irq-local-var-overlap-problem.c | 10 +- src/test/kc/irq-raster.c | 6 +- src/test/kc/irq-volatile-bool-problem.c | 6 +- src/test/kc/keyboard-glitch.c | 10 +- src/test/kc/kickasm-uses-prevent-deletion.c | 6 +- src/test/kc/line-anim.c | 2 +- src/test/kc/localscope-simple.c | 6 +- src/test/kc/longbranch-interrupt-problem.c | 4 +- src/test/kc/loop-problem2.c | 8 +- src/test/kc/loophead-problem-3.c | 4 +- src/test/kc/min-fmul-16.c | 6 +- .../multiplexer-irq/simple-multiplexer-irq.c | 12 +- src/test/kc/multiply-1.c | 12 + src/test/kc/multiply-2.c | 15 + src/test/kc/multiply-3.c | 31 + src/test/kc/number-inference-sum.c | 4 +- src/test/kc/ptr-complex.c | 4 +- src/test/kc/scan-desire-problem.c | 12 +- src/test/kc/screen-show-spiral-buckets.c | 8 +- src/test/kc/signed-words.c | 2 +- src/test/kc/sprite-font.c | 2 +- src/test/kc/struct-pointer-to-member-2.c | 8 +- src/test/kc/struct-pointer-to-member.c | 6 +- src/test/kc/test-interrupt-notype.c | 4 +- src/test/kc/test-interrupt-volatile-write.c | 4 +- src/test/kc/test-interrupt-volatile.c | 4 +- src/test/kc/test-interrupt.c | 4 +- src/test/kc/test-kasm-pc.c | 4 +- src/test/kc/test-keyboard-space.c | 4 +- src/test/kc/test-multiply-16bit.c | 8 +- src/test/kc/test-multiply-8bit.c | 10 +- src/test/kc/true-inline-words.c | 6 +- src/test/kc/unused-vars.c | 2 +- src/test/ref/asm-uses-0.asm | 6 +- src/test/ref/asm-uses-0.cfg | 2 +- src/test/ref/asm-uses-0.log | 34 +- src/test/ref/asm-uses-0.sym | 2 +- src/test/ref/bgblack.asm | 6 +- src/test/ref/bgblack.cfg | 2 +- src/test/ref/bgblack.log | 30 +- src/test/ref/bgblack.sym | 2 +- src/test/ref/bitmap-circle-2.asm | 6 +- src/test/ref/bitmap-circle-2.cfg | 2 +- src/test/ref/bitmap-circle-2.log | 32 +- src/test/ref/bitmap-circle-2.sym | 2 +- src/test/ref/bitmap-circle.asm | 6 +- src/test/ref/bitmap-circle.cfg | 2 +- src/test/ref/bitmap-circle.log | 32 +- src/test/ref/bitmap-circle.sym | 2 +- src/test/ref/bitmap-line-anim-1.asm | 12 +- src/test/ref/bitmap-line-anim-1.cfg | 4 +- src/test/ref/bitmap-line-anim-1.log | 76 +- src/test/ref/bitmap-line-anim-1.sym | 4 +- src/test/ref/bitmap-line-anim-2.asm | 12 +- src/test/ref/bitmap-line-anim-2.cfg | 4 +- src/test/ref/bitmap-line-anim-2.log | 72 +- src/test/ref/bitmap-line-anim-2.sym | 4 +- src/test/ref/bitmap-plot-0.asm | 10 +- src/test/ref/bitmap-plot-0.cfg | 4 +- src/test/ref/bitmap-plot-0.log | 54 +- src/test/ref/bitmap-plot-0.sym | 2 +- src/test/ref/bitmap-plot-1.asm | 10 +- src/test/ref/bitmap-plot-1.cfg | 4 +- src/test/ref/bitmap-plot-1.log | 54 +- src/test/ref/bitmap-plot-1.sym | 2 +- src/test/ref/bitmap-plot-2.asm | 16 +- src/test/ref/bitmap-plot-2.cfg | 6 +- src/test/ref/bitmap-plot-2.log | 82 +- src/test/ref/bitmap-plot-2.sym | 4 +- src/test/ref/bitmap-plotter.asm | 14 +- src/test/ref/bitmap-plotter.cfg | 6 +- src/test/ref/bitmap-plotter.log | 72 +- src/test/ref/bitmap-plotter.sym | 2 +- src/test/ref/c64dtv-8bppcharstretch.asm | 10 +- src/test/ref/c64dtv-8bppcharstretch.cfg | 4 +- src/test/ref/c64dtv-8bppcharstretch.log | 54 +- src/test/ref/c64dtv-8bppcharstretch.sym | 2 +- src/test/ref/c64dtv-8bppchunkystretch.asm | 10 +- src/test/ref/c64dtv-8bppchunkystretch.cfg | 4 +- src/test/ref/c64dtv-8bppchunkystretch.log | 54 +- src/test/ref/c64dtv-8bppchunkystretch.sym | 2 +- src/test/ref/c64dtv-color.asm | 10 +- src/test/ref/c64dtv-color.cfg | 4 +- src/test/ref/c64dtv-color.log | 54 +- src/test/ref/c64dtv-color.sym | 2 +- src/test/ref/c64dtv-gfxmodes.asm | 187 ++- src/test/ref/c64dtv-gfxmodes.cfg | 68 +- src/test/ref/c64dtv-gfxmodes.log | 1038 ++++++++--------- src/test/ref/c64dtv-gfxmodes.sym | 11 +- src/test/ref/cast-precedence-problem.asm | 10 +- src/test/ref/cast-precedence-problem.cfg | 4 +- src/test/ref/cast-precedence-problem.log | 58 +- src/test/ref/cast-precedence-problem.sym | 2 +- src/test/ref/clobber-a-problem.asm | 10 +- src/test/ref/clobber-a-problem.cfg | 4 +- src/test/ref/clobber-a-problem.log | 50 +- src/test/ref/clobber-a-problem.sym | 2 +- .../ref/complex/ataritempest/ataritempest.asm | 10 +- .../ref/complex/ataritempest/ataritempest.cfg | 4 +- .../ref/complex/ataritempest/ataritempest.log | 46 +- .../ref/complex/ataritempest/ataritempest.sym | 2 +- .../ref/complex/clearscreen/clearscreen.asm | 10 +- .../ref/complex/clearscreen/clearscreen.cfg | 4 +- .../ref/complex/clearscreen/clearscreen.log | 82 +- .../ref/complex/clearscreen/clearscreen.sym | 2 +- src/test/ref/complex/medusa/medusa.asm | 6 +- src/test/ref/complex/medusa/medusa.cfg | 2 +- src/test/ref/complex/medusa/medusa.log | 30 +- src/test/ref/complex/medusa/medusa.sym | 2 +- src/test/ref/complex/prebob/grid-bobs.asm | 18 +- src/test/ref/complex/prebob/grid-bobs.cfg | 8 +- src/test/ref/complex/prebob/grid-bobs.log | 114 +- src/test/ref/complex/prebob/grid-bobs.sym | 2 +- src/test/ref/complex/prebob/vogel-bobs.asm | 18 +- src/test/ref/complex/prebob/vogel-bobs.cfg | 8 +- src/test/ref/complex/prebob/vogel-bobs.log | 122 +- src/test/ref/complex/prebob/vogel-bobs.sym | 2 +- src/test/ref/complex/prebob/vogel-sprites.asm | 36 +- src/test/ref/complex/prebob/vogel-sprites.cfg | 16 +- src/test/ref/complex/prebob/vogel-sprites.log | 218 ++-- src/test/ref/complex/prebob/vogel-sprites.sym | 4 +- .../complex/spritescroller/spritescroller.asm | 10 +- .../complex/spritescroller/spritescroller.cfg | 2 +- .../complex/spritescroller/spritescroller.log | 46 +- .../complex/spritescroller/spritescroller.sym | 2 +- src/test/ref/complex/tetris/test-sprites.asm | 12 +- src/test/ref/complex/tetris/test-sprites.cfg | 4 +- src/test/ref/complex/tetris/test-sprites.log | 56 +- src/test/ref/complex/tetris/test-sprites.sym | 2 +- src/test/ref/complex/tetris/tetris.asm | 52 +- src/test/ref/complex/tetris/tetris.cfg | 18 +- src/test/ref/complex/tetris/tetris.log | 290 ++--- src/test/ref/complex/tetris/tetris.sym | 12 +- src/test/ref/complex/xmega65/xmega65.asm | 10 +- src/test/ref/complex/xmega65/xmega65.cfg | 4 +- src/test/ref/complex/xmega65/xmega65.log | 54 +- src/test/ref/complex/xmega65/xmega65.sym | 2 +- src/test/ref/constantmin.asm | 2 +- src/test/ref/constantmin.log | 30 +- src/test/ref/constantmin.sym | 2 +- src/test/ref/constants.asm | 14 +- src/test/ref/constants.cfg | 6 +- src/test/ref/constants.log | 76 +- src/test/ref/constants.sym | 2 +- src/test/ref/double-import.asm | 6 +- src/test/ref/double-import.cfg | 2 +- src/test/ref/double-import.log | 30 +- src/test/ref/double-import.sym | 2 +- src/test/ref/examples/3d/3d.asm | 6 +- src/test/ref/examples/3d/3d.cfg | 2 +- src/test/ref/examples/3d/3d.log | 34 +- src/test/ref/examples/3d/3d.sym | 2 +- .../ref/examples/kernalload/kernalload.asm | 6 +- .../ref/examples/kernalload/kernalload.cfg | 2 +- .../ref/examples/kernalload/kernalload.log | 36 +- .../ref/examples/kernalload/kernalload.sym | 2 +- src/test/ref/examples/linking/linking.asm | 10 +- src/test/ref/examples/linking/linking.cfg | 4 +- src/test/ref/examples/linking/linking.log | 46 +- src/test/ref/examples/linking/linking.sym | 2 +- .../multiplexer/simple-multiplexer.asm | 6 +- .../multiplexer/simple-multiplexer.cfg | 2 +- .../multiplexer/simple-multiplexer.log | 34 +- .../multiplexer/simple-multiplexer.sym | 2 +- src/test/ref/examples/rotate/rotate.asm | 6 +- src/test/ref/examples/rotate/rotate.cfg | 2 +- src/test/ref/examples/rotate/rotate.log | 34 +- src/test/ref/examples/rotate/rotate.sym | 2 +- .../ref/examples/sinsprites/sinus-sprites.asm | 6 +- .../ref/examples/sinsprites/sinus-sprites.cfg | 2 +- .../ref/examples/sinsprites/sinus-sprites.log | 34 +- .../ref/examples/sinsprites/sinus-sprites.sym | 2 +- src/test/ref/examples/zpcode/zpcode.asm | 14 +- src/test/ref/examples/zpcode/zpcode.cfg | 6 +- src/test/ref/examples/zpcode/zpcode.log | 72 +- src/test/ref/examples/zpcode/zpcode.sym | 2 +- src/test/ref/function-pointer-noarg-2.log | 8 +- src/test/ref/function-pointer-noarg-3.asm | 12 +- src/test/ref/function-pointer-noarg-3.cfg | 4 +- src/test/ref/function-pointer-noarg-3.log | 56 +- src/test/ref/function-pointer-noarg-3.sym | 4 +- .../ref/function-pointer-noarg-call-2.asm | 12 +- .../ref/function-pointer-noarg-call-2.cfg | 4 +- .../ref/function-pointer-noarg-call-2.log | 56 +- .../ref/function-pointer-noarg-call-2.sym | 4 +- .../ref/function-pointer-noarg-call-3.asm | 12 +- .../ref/function-pointer-noarg-call-3.cfg | 4 +- .../ref/function-pointer-noarg-call-3.log | 56 +- .../ref/function-pointer-noarg-call-3.sym | 4 +- .../ref/function-pointer-noarg-call-4.asm | 6 +- .../ref/function-pointer-noarg-call-4.cfg | 2 +- .../ref/function-pointer-noarg-call-4.log | 28 +- .../ref/function-pointer-noarg-call-4.sym | 2 +- .../ref/function-pointer-noarg-call-5.asm | 12 +- .../ref/function-pointer-noarg-call-5.cfg | 4 +- .../ref/function-pointer-noarg-call-5.log | 56 +- .../ref/function-pointer-noarg-call-5.sym | 4 +- src/test/ref/function-pointer-noarg-call.asm | 6 +- src/test/ref/function-pointer-noarg-call.cfg | 2 +- src/test/ref/function-pointer-noarg-call.log | 28 +- src/test/ref/function-pointer-noarg-call.sym | 2 +- src/test/ref/function-pointer-noarg.asm | 12 +- src/test/ref/function-pointer-noarg.cfg | 4 +- src/test/ref/function-pointer-noarg.log | 56 +- src/test/ref/function-pointer-noarg.sym | 4 +- src/test/ref/function-pointer-return.asm | 12 +- src/test/ref/function-pointer-return.cfg | 4 +- src/test/ref/function-pointer-return.log | 64 +- src/test/ref/function-pointer-return.sym | 4 +- src/test/ref/global-pc-multiple.asm | 10 +- src/test/ref/global-pc-multiple.cfg | 4 +- src/test/ref/global-pc-multiple.log | 54 +- src/test/ref/global-pc-multiple.sym | 2 +- src/test/ref/global-pc.asm | 6 +- src/test/ref/global-pc.cfg | 2 +- src/test/ref/global-pc.log | 28 +- src/test/ref/global-pc.sym | 2 +- src/test/ref/hex2dec.asm | 26 +- src/test/ref/hex2dec.cfg | 12 +- src/test/ref/hex2dec.log | 134 +-- src/test/ref/hex2dec.sym | 2 +- src/test/ref/importing.asm | 6 +- src/test/ref/importing.cfg | 2 +- src/test/ref/importing.log | 30 +- src/test/ref/importing.sym | 2 +- src/test/ref/incd020.asm | 10 +- src/test/ref/incd020.cfg | 4 +- src/test/ref/incd020.log | 46 +- src/test/ref/incd020.sym | 2 +- src/test/ref/inline-function.asm | 10 +- src/test/ref/inline-function.cfg | 4 +- src/test/ref/inline-function.log | 58 +- src/test/ref/inline-function.sym | 2 +- src/test/ref/irq-hardware-clobber-jsr.asm | 16 +- src/test/ref/irq-hardware-clobber-jsr.cfg | 6 +- src/test/ref/irq-hardware-clobber-jsr.log | 78 +- src/test/ref/irq-hardware-clobber-jsr.sym | 4 +- src/test/ref/irq-hardware-clobber.asm | 10 +- src/test/ref/irq-hardware-clobber.cfg | 4 +- src/test/ref/irq-hardware-clobber.log | 50 +- src/test/ref/irq-hardware-clobber.sym | 2 +- src/test/ref/irq-hardware-stack.asm | 10 +- src/test/ref/irq-hardware-stack.cfg | 4 +- src/test/ref/irq-hardware-stack.log | 50 +- src/test/ref/irq-hardware-stack.sym | 2 +- src/test/ref/irq-hardware.asm | 10 +- src/test/ref/irq-hardware.cfg | 4 +- src/test/ref/irq-hardware.log | 50 +- src/test/ref/irq-hardware.sym | 2 +- src/test/ref/irq-kernel-minimal.asm | 10 +- src/test/ref/irq-kernel-minimal.cfg | 4 +- src/test/ref/irq-kernel-minimal.log | 50 +- src/test/ref/irq-kernel-minimal.sym | 2 +- src/test/ref/irq-kernel.asm | 10 +- src/test/ref/irq-kernel.cfg | 4 +- src/test/ref/irq-kernel.log | 50 +- src/test/ref/irq-kernel.sym | 2 +- .../ref/irq-local-var-overlap-problem.asm | 18 +- .../ref/irq-local-var-overlap-problem.cfg | 8 +- .../ref/irq-local-var-overlap-problem.log | 82 +- .../ref/irq-local-var-overlap-problem.sym | 2 +- src/test/ref/irq-raster.asm | 10 +- src/test/ref/irq-raster.cfg | 4 +- src/test/ref/irq-raster.log | 50 +- src/test/ref/irq-raster.sym | 2 +- src/test/ref/irq-volatile-bool-problem.asm | 10 +- src/test/ref/irq-volatile-bool-problem.cfg | 4 +- src/test/ref/irq-volatile-bool-problem.log | 46 +- src/test/ref/irq-volatile-bool-problem.sym | 2 +- src/test/ref/keyboard-glitch.asm | 22 +- src/test/ref/keyboard-glitch.cfg | 8 +- src/test/ref/keyboard-glitch.log | 110 +- src/test/ref/keyboard-glitch.sym | 4 +- .../ref/kickasm-uses-prevent-deletion.asm | 10 +- .../ref/kickasm-uses-prevent-deletion.cfg | 4 +- .../ref/kickasm-uses-prevent-deletion.log | 50 +- .../ref/kickasm-uses-prevent-deletion.sym | 2 +- src/test/ref/line-anim.asm | 6 +- src/test/ref/line-anim.cfg | 2 +- src/test/ref/line-anim.log | 28 +- src/test/ref/line-anim.sym | 2 +- src/test/ref/localscope-simple.asm | 8 +- src/test/ref/localscope-simple.cfg | 4 +- src/test/ref/localscope-simple.log | 48 +- src/test/ref/localscope-simple.sym | 2 +- src/test/ref/longbranch-interrupt-problem.asm | 6 +- src/test/ref/longbranch-interrupt-problem.cfg | 2 +- src/test/ref/longbranch-interrupt-problem.log | 30 +- src/test/ref/longbranch-interrupt-problem.sym | 2 +- src/test/ref/loop-problem2.asm | 14 +- src/test/ref/loop-problem2.cfg | 6 +- src/test/ref/loop-problem2.log | 76 +- src/test/ref/loop-problem2.sym | 2 +- src/test/ref/loophead-problem-3.asm | 12 +- src/test/ref/loophead-problem-3.cfg | 4 +- src/test/ref/loophead-problem-3.log | 56 +- src/test/ref/loophead-problem-3.sym | 4 +- src/test/ref/min-fmul-16.asm | 10 +- src/test/ref/min-fmul-16.cfg | 4 +- src/test/ref/min-fmul-16.log | 46 +- src/test/ref/min-fmul-16.sym | 2 +- .../simple-multiplexer-irq.asm | 28 +- .../simple-multiplexer-irq.cfg | 12 +- .../simple-multiplexer-irq.log | 162 +-- .../simple-multiplexer-irq.sym | 4 +- src/test/ref/number-inference-sum.asm | 6 +- src/test/ref/number-inference-sum.cfg | 2 +- src/test/ref/number-inference-sum.log | 30 +- src/test/ref/number-inference-sum.sym | 2 +- src/test/ref/ptr-complex.asm | 6 +- src/test/ref/ptr-complex.cfg | 2 +- src/test/ref/ptr-complex.log | 28 +- src/test/ref/ptr-complex.sym | 2 +- src/test/ref/scan-desire-problem.asm | 36 +- src/test/ref/scan-desire-problem.cfg | 12 +- src/test/ref/scan-desire-problem.log | 192 +-- src/test/ref/scan-desire-problem.sym | 12 +- src/test/ref/screen-show-spiral-buckets.asm | 18 +- src/test/ref/screen-show-spiral-buckets.cfg | 8 +- src/test/ref/screen-show-spiral-buckets.log | 82 +- src/test/ref/screen-show-spiral-buckets.sym | 2 +- src/test/ref/signed-words.asm | 6 +- src/test/ref/signed-words.cfg | 2 +- src/test/ref/signed-words.log | 36 +- src/test/ref/signed-words.sym | 2 +- src/test/ref/struct-pointer-to-member-2.asm | 12 +- src/test/ref/struct-pointer-to-member-2.cfg | 4 +- src/test/ref/struct-pointer-to-member-2.log | 68 +- src/test/ref/struct-pointer-to-member-2.sym | 4 +- src/test/ref/struct-pointer-to-member.asm | 6 +- src/test/ref/struct-pointer-to-member.cfg | 2 +- src/test/ref/struct-pointer-to-member.log | 34 +- src/test/ref/struct-pointer-to-member.sym | 2 +- src/test/ref/test-interrupt-notype.asm | 6 +- src/test/ref/test-interrupt-notype.cfg | 2 +- src/test/ref/test-interrupt-notype.log | 28 +- src/test/ref/test-interrupt-notype.sym | 2 +- .../ref/test-interrupt-volatile-write.asm | 6 +- .../ref/test-interrupt-volatile-write.cfg | 2 +- .../ref/test-interrupt-volatile-write.log | 30 +- .../ref/test-interrupt-volatile-write.sym | 2 +- src/test/ref/test-interrupt-volatile.asm | 6 +- src/test/ref/test-interrupt-volatile.cfg | 2 +- src/test/ref/test-interrupt-volatile.log | 30 +- src/test/ref/test-interrupt-volatile.sym | 2 +- src/test/ref/test-interrupt.asm | 6 +- src/test/ref/test-interrupt.cfg | 2 +- src/test/ref/test-interrupt.log | 28 +- src/test/ref/test-interrupt.sym | 2 +- src/test/ref/test-kasm-pc.asm | 8 +- src/test/ref/test-kasm-pc.cfg | 2 +- src/test/ref/test-kasm-pc.log | 34 +- src/test/ref/test-kasm-pc.sym | 2 +- src/test/ref/test-keyboard-space.asm | 10 +- src/test/ref/test-keyboard-space.cfg | 4 +- src/test/ref/test-keyboard-space.log | 50 +- src/test/ref/test-keyboard-space.sym | 2 +- src/test/ref/test-multiply-16bit.asm | 14 +- src/test/ref/test-multiply-16bit.cfg | 6 +- src/test/ref/test-multiply-16bit.log | 88 +- src/test/ref/test-multiply-16bit.sym | 2 +- src/test/ref/test-multiply-8bit.asm | 18 +- src/test/ref/test-multiply-8bit.cfg | 8 +- src/test/ref/test-multiply-8bit.log | 114 +- src/test/ref/test-multiply-8bit.sym | 2 +- src/test/ref/true-inline-words.asm | 10 +- src/test/ref/true-inline-words.cfg | 4 +- src/test/ref/true-inline-words.log | 58 +- src/test/ref/true-inline-words.sym | 2 +- 435 files changed, 4362 insertions(+), 4296 deletions(-) create mode 100644 src/test/kc/multiply-1.c create mode 100644 src/test/kc/multiply-2.c create mode 100644 src/test/kc/multiply-3.c diff --git a/src/main/java/dk/camelot64/kickc/model/CallingConventionStack.java b/src/main/java/dk/camelot64/kickc/model/CallingConventionStack.java index f0b76238e..cbde676f9 100644 --- a/src/main/java/dk/camelot64/kickc/model/CallingConventionStack.java +++ b/src/main/java/dk/camelot64/kickc/model/CallingConventionStack.java @@ -69,7 +69,6 @@ public class CallingConventionStack { return paramOffsetConstant.getConstantRef(); } - /** * Get the number of bytes that needed on the stack to pass parameters/return value to/from a procedure * diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass1CallStack.java b/src/main/java/dk/camelot64/kickc/passes/Pass1CallStack.java index 9fdcdb20b..3b88488be 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass1CallStack.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass1CallStack.java @@ -158,7 +158,7 @@ public class Pass1CallStack extends Pass2SsaOptimization { } } - // Convert callprepare(xxx,yyy,) stackpush(type)=xxx, ...; + // Convert callprepare(xxx,yyy,) to stackpush(type)=xxx, ...; for(ControlFlowBlock block : getGraph().getAllBlocks()) { ListIterator stmtIt = block.getStatements().listIterator(); while(stmtIt.hasNext()) { @@ -258,7 +258,7 @@ public class Pass1CallStack extends Pass2SsaOptimization { } /** - * Generate stack push stackpull(type)=xxx assignments + * Generate stack push stackpush(type)=xxx assignments * * @param value The value to push * @param symbolType The type of the value diff --git a/src/main/kc/include/mos6569.h b/src/main/kc/include/mos6569.h index c48ff3d43..88c0d8831 100644 --- a/src/main/kc/include/mos6569.h +++ b/src/main/kc/include/mos6569.h @@ -62,7 +62,7 @@ const unsigned int SPRITE_PTRS = $3f8; char * const SPRITES_XPOS = $d000; char * const SPRITES_YPOS = $d001; char * const SPRITES_XMSB = $d010; -char * const SPRITES_COLS = $d027; +char * const SPRITES_COLOR = $d027; char* const SPRITES_ENABLE = $d015; char* const SPRITES_EXPAND_Y = $d017; char* const SPRITES_PRIORITY = $d01b; @@ -70,12 +70,12 @@ char* const SPRITES_MC = $d01c; char* const SPRITES_EXPAND_X = $d01d; char* const RASTER = $d012; -char* const BORDERCOL = $d020; -char* const BGCOL = $d021; -char* const BGCOL1 = $d021; -char* const BGCOL2 = $d022; -char* const BGCOL3 = $d023; -char* const BGCOL4 = $d024; +char* const BORDER_COLOR = $d020; +char* const BG_COLOR = $d021; +char* const BG_COLOR0 = $d021; +char* const BG_COLOR1 = $d022; +char* const BG_COLOR2 = $d023; +char* const BG_COLOR3 = $d024; char* const SPRITES_MC1 = $d025; char* const SPRITES_MC2 = $d026; diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index d36f690ce..7ae97e105 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -40,6 +40,23 @@ public class TestPrograms { public TestPrograms() { } + /* TODO: Add support for var*var + @Test + public void testMultiply3() throws IOException, URISyntaxException { + compileAndCompare("multiply-3.c"); + } + */ + + @Test + public void testMultiply2() throws IOException, URISyntaxException { + compileAndCompare("multiply-2.c"); + } + + @Test + public void testMultiply1() throws IOException, URISyntaxException { + compileAndCompare("multiply-1.c"); + } + @Test public void testStructPointerToMember2() throws IOException, URISyntaxException { compileAndCompare("struct-pointer-to-member-2.c"); diff --git a/src/test/kc/address-7.c b/src/test/kc/address-7.c index 69b80849a..8e0a97d9e 100644 --- a/src/test/kc/address-7.c +++ b/src/test/kc/address-7.c @@ -1,9 +1,9 @@ // Test declaring a variable as at a hard-coded address // Changing border color using an __address variable -volatile char __address(0xd020) bgcol; +volatile char __address(0xd020) BG_COLOR; void main() { - bgcol = 0; + BG_COLOR = 0; } diff --git a/src/test/kc/asm-uses-0.c b/src/test/kc/asm-uses-0.c index 78d75ccd1..43d624c63 100644 --- a/src/test/kc/asm-uses-0.c +++ b/src/test/kc/asm-uses-0.c @@ -6,9 +6,9 @@ void main() { } } -char* const BGCOL = 0xd020; +char* const BG_COLOR = 0xd020; // Function only used inside the inline asm void init() { - *BGCOL = 0; + *BG_COLOR = 0; } diff --git a/src/test/kc/bgblack.c b/src/test/kc/bgblack.c index 18fedde2c..b2f97e25f 100644 --- a/src/test/kc/bgblack.c +++ b/src/test/kc/bgblack.c @@ -1,4 +1,4 @@ #include "bgblacklib.c" void main() { - *BGCOL = BLACK; + *BG_COLOR = BLACK; } diff --git a/src/test/kc/bgblacklib.c b/src/test/kc/bgblacklib.c index 9ff84f45a..4b66b0222 100644 --- a/src/test/kc/bgblacklib.c +++ b/src/test/kc/bgblacklib.c @@ -1,2 +1,2 @@ -char* const BGCOL = 0xd021; +char* const BG_COLOR = 0xd021; const char BLACK = 0x00; \ No newline at end of file diff --git a/src/test/kc/bitmap-circle-2.c b/src/test/kc/bitmap-circle-2.c index 7ef437abd..77c3d304f 100644 --- a/src/test/kc/bitmap-circle-2.c +++ b/src/test/kc/bitmap-circle-2.c @@ -10,7 +10,7 @@ void main() { fill(BITMAP,40*25*8,0); fill(SCREEN,40*25,$16); - *BORDERCOL = BLUE; + *BORDER_COLOR = BLUE; *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3; *VIC_MEMORY = (byte)((((word)SCREEN&$3fff)/$40)|(((word)BITMAP&$3fff)/$400)); diff --git a/src/test/kc/bitmap-circle.c b/src/test/kc/bitmap-circle.c index 30a60b95c..0640115ca 100644 --- a/src/test/kc/bitmap-circle.c +++ b/src/test/kc/bitmap-circle.c @@ -14,7 +14,7 @@ void main() { fill(BITMAP,40*25*8,0); fill(SCREEN,40*25,$16); - *BORDERCOL = BLUE; + *BORDER_COLOR = BLUE; *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3; *VIC_MEMORY = (byte)((((word)SCREEN&$3fff)/$40)|(((word)BITMAP&$3fff)/$400)); diff --git a/src/test/kc/bitmap-line-anim-1.c b/src/test/kc/bitmap-line-anim-1.c index 2f71457bb..96d68b4f6 100644 --- a/src/test/kc/bitmap-line-anim-1.c +++ b/src/test/kc/bitmap-line-anim-1.c @@ -10,8 +10,8 @@ byte* const BITMAP = $2000; byte next=0; void main() { - *BORDERCOL = 0; - *BGCOL = 0; + *BORDER_COLOR = 0; + *BG_COLOR = 0; *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3; *VIC_MEMORY = (byte)((((word)SCREEN&$3fff)/$40)|(((word)BITMAP&$3fff)/$400)); bitmap_init(BITMAP); diff --git a/src/test/kc/bitmap-line-anim-2.c b/src/test/kc/bitmap-line-anim-2.c index 007fb71ef..bc289c55a 100644 --- a/src/test/kc/bitmap-line-anim-2.c +++ b/src/test/kc/bitmap-line-anim-2.c @@ -10,8 +10,8 @@ byte* const BITMAP = $2000; word next=0; void main() { - *BORDERCOL = 0; - *BGCOL = 0; + *BORDER_COLOR = 0; + *BG_COLOR = 0; *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3; *VIC_MEMORY = (byte)((((word)SCREEN&$3fff)/$40)|(((word)BITMAP&$3fff)/$400)); bitmap_init(BITMAP, SCREEN); diff --git a/src/test/kc/bitmap-plot-0.c b/src/test/kc/bitmap-plot-0.c index 45322eca9..84f4f8a4d 100644 --- a/src/test/kc/bitmap-plot-0.c +++ b/src/test/kc/bitmap-plot-0.c @@ -51,9 +51,9 @@ void init_irq() { // Interrupt Routine counting frames interrupt(hardware_clobber) void irq() { - *BGCOL = WHITE; + *BG_COLOR = WHITE; if(frame_cnt) frame_cnt++; - *BGCOL = BLACK; + *BG_COLOR = BLACK; // Acknowledge the IRQ *IRQ_STATUS = IRQ_RASTER; } \ No newline at end of file diff --git a/src/test/kc/bitmap-plot-1.c b/src/test/kc/bitmap-plot-1.c index 8c613e23c..aa0849dc9 100644 --- a/src/test/kc/bitmap-plot-1.c +++ b/src/test/kc/bitmap-plot-1.c @@ -58,9 +58,9 @@ void init_irq() { // Interrupt Routine counting frames interrupt(hardware_clobber) void irq() { - *BGCOL = WHITE; + *BG_COLOR = WHITE; if(frame_cnt) frame_cnt++; - *BGCOL = BLACK; + *BG_COLOR = BLACK; // Acknowledge the IRQ *IRQ_STATUS = IRQ_RASTER; } \ No newline at end of file diff --git a/src/test/kc/bitmap-plot-2.c b/src/test/kc/bitmap-plot-2.c index c3d00d90c..b5eb9a016 100644 --- a/src/test/kc/bitmap-plot-2.c +++ b/src/test/kc/bitmap-plot-2.c @@ -41,7 +41,7 @@ void main() { if(r>=512*12+256) break; } while(true) - (*BORDERCOL)++; + (*BORDER_COLOR)++; } // Counts frames - updated by the IRQ @@ -67,9 +67,9 @@ void init_irq() { // Interrupt Routine counting frames interrupt(hardware_clobber) void irq() { - *BGCOL = WHITE; + *BG_COLOR = WHITE; if(frame_cnt) frame_cnt++; - *BGCOL = BLACK; + *BG_COLOR = BLACK; // Acknowledge the IRQ *IRQ_STATUS = IRQ_RASTER; } \ No newline at end of file diff --git a/src/test/kc/bitmap-plotter.c b/src/test/kc/bitmap-plotter.c index e840c7994..69544f769 100644 --- a/src/test/kc/bitmap-plotter.c +++ b/src/test/kc/bitmap-plotter.c @@ -9,7 +9,7 @@ byte* D016 = $d016; byte MCM = %00010000; byte CSEL = %00001000; byte* D018 = $d018; -byte* BGCOL = $d020; +byte* BG_COLOR = $d020; byte* FGCOL = $d021; byte* COLS = $d800; @@ -19,7 +19,7 @@ byte* SCREEN = $400; byte* const BITMAP = $2000; void main() { - *BGCOL = 0; + *BG_COLOR = 0; *FGCOL = 0; *D011 = BMM|DEN|RSEL|3; *D018 = (byte)(((word)SCREEN/$40)|((word)BITMAP/$400)); @@ -27,9 +27,9 @@ void main() { init_plot_tables(); do { do {} while (*RASTER!=$ff); - (*BGCOL)++; + (*BG_COLOR)++; plots(); - (*BGCOL)--; + (*BG_COLOR)--; } while (true); } diff --git a/src/test/kc/c64dtv-8bppcharstretch.c b/src/test/kc/c64dtv-8bppcharstretch.c index b0e101964..2b5e9119f 100644 --- a/src/test/kc/c64dtv-8bppcharstretch.c +++ b/src/test/kc/c64dtv-8bppcharstretch.c @@ -60,14 +60,14 @@ void main() { } *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3; - *BORDERCOL = 0; + *BORDER_COLOR = 0; byte rst = $42; while(*RASTER!=rst) {} asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } do { rst = *RASTER; *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | (rst&7); - *BORDERCOL = rst*$10; + *BORDER_COLOR = rst*$10; asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } } while (rst!=$f2); } diff --git a/src/test/kc/c64dtv-8bppchunkystretch.c b/src/test/kc/c64dtv-8bppchunkystretch.c index f5b3f4d1c..44eaf4eae 100644 --- a/src/test/kc/c64dtv-8bppchunkystretch.c +++ b/src/test/kc/c64dtv-8bppchunkystretch.c @@ -51,14 +51,14 @@ void main() { } *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3; - *BORDERCOL = 0; + *BORDER_COLOR = 0; byte rst = $42; while(*RASTER!=rst) {} asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } do { rst = *RASTER; *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | (rst&7); - *BORDERCOL = rst*$10; + *BORDER_COLOR = rst*$10; asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } } while (rst!=$f2); } diff --git a/src/test/kc/c64dtv-color.c b/src/test/kc/c64dtv-color.c index d9d46fadf..95ff70e68 100644 --- a/src/test/kc/c64dtv-color.c +++ b/src/test/kc/c64dtv-color.c @@ -13,10 +13,10 @@ void main() { while(*RASTER!=$40) { } // Create rasterbars - *BGCOL = 0; + *BG_COLOR = 0; for (byte r : $31..$ff) { asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } - (*BGCOL)++; + (*BG_COLOR)++; } // Rotate palette diff --git a/src/test/kc/c64dtv-gfxmodes.c b/src/test/kc/c64dtv-gfxmodes.c index bb198177b..db0598c46 100644 --- a/src/test/kc/c64dtv-gfxmodes.c +++ b/src/test/kc/c64dtv-gfxmodes.c @@ -66,8 +66,8 @@ void menu() { // Char Colors for(byte* c=COLS;c!=COLS+1000;c++) *c=LIGHT_GREEN; // Screen colors - *BGCOL = 0; - *BORDERCOL = 0; + *BG_COLOR = 0; + *BORDER_COLOR = 0; // Display menu Text print_set_screen(SCREEN); print_cls(); @@ -173,7 +173,7 @@ void mode_ctrl() { if(ctrl != dtv_control) { dtv_control = ctrl; *DTV_CONTROL = ctrl; - *BORDERCOL = ctrl; + *BORDER_COLOR = ctrl; } } } @@ -184,7 +184,7 @@ void mode_ctrl() { // Normal VIC Adressing: // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & CharData[7:0] & RowCounter[2:0] ) // Pixel Shifter (1) -// - 0: 4bpp BgColor0[3:0] +// - 0: 4bpp BG_COLORor0[3:0] // - 1: 4bpp ColorData[3:0] void mode_stdchar() { byte* const SCREEN = $8000; @@ -211,8 +211,8 @@ void mode_stdchar() { DTV_PALETTE[i] = DTV_PALETTE_DEFAULT[i]; } // Screen colors - *BGCOL = 0; - *BORDERCOL = 0; + *BG_COLOR = 0; + *BORDER_COLOR = 0; // Char Colors and screen chars byte* col=COLORS; byte* ch=SCREEN; @@ -232,10 +232,10 @@ void mode_stdchar() { // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & "00" & CharData[5:0] & RowCounter[2:0] ) // GfxData Pixel Shifter (1) // - 0: 4bpp Background Color -// - CharData[7:6] 00: 4bpp BgColor0[3:0] -// - CharData[7:6] 01: 4bpp BgColor1[3:0] -// - CharData[7:6] 10: 4bpp BgColor2[3:0] -// - CharData[7:6] 11: 4bpp BgColor3[3:0] +// - CharData[7:6] 00: 4bpp BG_COLORor0[3:0] +// - CharData[7:6] 01: 4bpp BG_COLORor1[3:0] +// - CharData[7:6] 10: 4bpp BG_COLORor2[3:0] +// - CharData[7:6] 11: 4bpp BG_COLORor3[3:0] // - 1: 4bpp ColorData[3:0] void mode_ecmchar() { byte* const SCREEN = $8000; @@ -262,11 +262,11 @@ void mode_ecmchar() { DTV_PALETTE[i] = DTV_PALETTE_DEFAULT[i]; } // Screen colors - *BORDERCOL = 0; - *BGCOL1 = 0; - *BGCOL2 = 2; - *BGCOL3 = 5; - *BGCOL4 = 6; + *BORDER_COLOR = 0; + *BG_COLOR = 0; + *BG_COLOR1 = 2; + *BG_COLOR2 = 5; + *BG_COLOR3 = 6; // Char Colors and screen chars byte* col=COLORS; byte* ch=SCREEN; @@ -286,12 +286,12 @@ void mode_ecmchar() { // Normal VIC Adressing: // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & CharData[7:0] & RowCounter[2:0] ) // GfxData Pixel Shifter (1) if ColorData[3:3] = 0: -// - 0: 4bpp BgColor0[3:0] +// - 0: 4bpp BG_COLORor0[3:0] // - 1: 4bpp ColorData[2:0] // GfxData Pixel Shifter (2) if ColorData[3:3] = 1: -// - 00: 4bpp BgColor0[3:0] -// - 01: 4bpp BgColor1[3:0] -// - 10: 4bpp BgColor2[3:0] +// - 00: 4bpp BG_COLORor0[3:0] +// - 01: 4bpp BG_COLORor1[3:0] +// - 10: 4bpp BG_COLORor2[3:0] // - 11: 4bpp ColorData[2:0]// Standard Character Mode (LINEAR/HICOL/CHUNK/COLDIS/ECM/MCM/BMM = 0) void mode_mcchar() { byte* const SCREEN = $8000; @@ -318,10 +318,10 @@ void mode_mcchar() { DTV_PALETTE[i] = DTV_PALETTE_DEFAULT[i]; } // Screen colors - *BORDERCOL = 0; - *BGCOL1 = BLACK; - *BGCOL2 = GREEN; - *BGCOL3 = BLUE; + *BORDER_COLOR = 0; + *BG_COLOR = BLACK; + *BG_COLOR1 = GREEN; + *BG_COLOR2 = BLUE; // Char Colors and screen chars byte* col=COLORS; byte* ch=SCREEN; @@ -364,8 +364,8 @@ void mode_stdbitmap() { DTV_PALETTE[i] = DTV_PALETTE_DEFAULT[i]; } // Screen colors - *BGCOL = BLACK; - *BORDERCOL = BLACK; + *BG_COLOR = BLACK; + *BORDER_COLOR = BLACK; // Bitmap Colors byte* ch=SCREEN; for(byte cy: 0..24 ) { @@ -393,7 +393,7 @@ void mode_stdbitmap() { // Normal VIC Adressing: // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & CharData[7:0] & RowCounter[2:0] ) // Pixel Shifter (1) -// - 0: 8bpp BgColor0[7:0] +// - 0: 8bpp BG_COLORor0[7:0] // - 1: 8bpp ColorData[7:0] void mode_hicolstdchar() { byte* const SCREEN = $8000; @@ -420,8 +420,8 @@ void mode_hicolstdchar() { DTV_PALETTE[i] = i; } // Screen colors - *BGCOL = 0; - *BORDERCOL = 0; + *BG_COLOR = 0; + *BORDER_COLOR = 0; // Char Colors and screen chars byte* col=COLORS; byte* ch=SCREEN; @@ -443,10 +443,10 @@ void mode_hicolstdchar() { // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & "00" & CharData[5:0] & RowCounter[2:0] ) // GfxData Pixel Shifter (1) // - 0: 8bpp Background Color -// - CharData[7:6] 00: 8bpp BgColor0[7:0] -// - CharData[7:6] 01: 8bpp BgColor1[7:0] -// - CharData[7:6] 10: 8bpp BgColor2[7:0] -// - CharData[7:6] 11: 8bpp BgColor3[7:0] +// - CharData[7:6] 00: 8bpp BG_COLORor0[7:0] +// - CharData[7:6] 01: 8bpp BG_COLORor1[7:0] +// - CharData[7:6] 10: 8bpp BG_COLORor2[7:0] +// - CharData[7:6] 11: 8bpp BG_COLORor3[7:0] // - 1: 8bpp ColorData[7:0] void mode_hicolecmchar() { byte* const SCREEN = $8000; @@ -473,11 +473,11 @@ void mode_hicolecmchar() { DTV_PALETTE[i] = i; } // Screen colors - *BORDERCOL = 0; - *BGCOL1 = $50; - *BGCOL2 = $54; - *BGCOL3 = $58; - *BGCOL4 = $5c; + *BORDER_COLOR = 0; + *BG_COLOR = $50; + *BG_COLOR1 = $54; + *BG_COLOR2 = $58; + *BG_COLOR3 = $5c; // Char Colors and screen chars byte* col=COLORS; byte* ch=SCREEN; @@ -497,12 +497,12 @@ void mode_hicolecmchar() { // Normal VIC Adressing: // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & CharData[7:0] & RowCounter[2:0] ) //GfxData Pixel Shifter (1) if ColorData[3:3] = 0: -// - 0: 8bpp BgColor0[7:0] +// - 0: 8bpp BG_COLORor0[7:0] // - 1: 8bpp ColorData[7:4] "0" & Color[2:0] //GfxData Pixel Shifter (2) if ColorData[3:3] = 1: -// - 00: 8bpp BgColor0[7:0] -// - 01: 8bpp BgColor1[7:0] -// - 10: 8bpp BgColor2[7:0] +// - 00: 8bpp BG_COLORor0[7:0] +// - 01: 8bpp BG_COLORor1[7:0] +// - 10: 8bpp BG_COLORor2[7:0] // - 11: 8bpp ColorData[7:4] "0" & Color[2:0] void mode_hicolmcchar() { byte* const SCREEN = $8000; @@ -529,10 +529,10 @@ void mode_hicolmcchar() { DTV_PALETTE[i] = i; } // Screen colors - *BORDERCOL = 0; - *BGCOL1 = $50; - *BGCOL2 = $54; - *BGCOL3 = $58; + *BORDER_COLOR = 0; + *BG_COLOR = $50; + *BG_COLOR1 = $54; + *BG_COLOR2 = $58; // Char Colors and screen chars byte* col=COLORS; byte* ch=SCREEN; @@ -552,10 +552,10 @@ void mode_hicolmcchar() { // Resolution: 320x200 // Linear Adressing // GfxData/PlaneA Pixel Shifter (1), CharData/PlaneB Pixel Shifter (1): -// - Plane A = 0 Plane B = 0: 8bpp BgColor0[7:0] +// - Plane A = 0 Plane B = 0: 8bpp BG_COLORor0[7:0] // - Plane A = 0 Plane B = 1: 8bpp "0000" & ColorData[7:4] // - Plane A = 1 Plane B = 0: 8bpp "0000" & ColorData[3:0] -// - Plane A = 1 Plane B = 1: 8bpp BgColor1[7:0] +// - Plane A = 1 Plane B = 1: 8bpp BG_COLORor1[7:0] void mode_twoplanebitmap() { byte* const PLANEA = $4000; byte* const PLANEB = $6000; @@ -588,9 +588,9 @@ void mode_twoplanebitmap() { DTV_PALETTE[i] = i; } // Screen colors - *BORDERCOL = $00; - *BGCOL1 = $70; // Color for bits 00 - *BGCOL2 = $d4; // Color for bits 11 + *BORDER_COLOR = $00; + *BG_COLOR = $70; // Color for bits 00 + *BG_COLOR1 = $d4; // Color for bits 11 // Colors for bits 01 / 10 byte* col=COLORS; for(byte cy: 0..24 ) { @@ -658,7 +658,7 @@ void mode_sixsfred() { DTV_PALETTE[i] = i; } // Screen colors - *BORDERCOL = $00; + *BORDER_COLOR = $00; // Colors for high 4 bits of 8bpp byte* col=COLORS; for(byte cy: 0..24 ) { @@ -724,7 +724,7 @@ void mode_sixsfred2() { DTV_PALETTE[i] = i; } // Screen colors - *BORDERCOL = $00; + *BORDER_COLOR = $00; // Colors for high 4 bits of 8bpp byte* col=COLORS; for(byte cy: 0..24 ) { @@ -788,7 +788,7 @@ void mode_8bpppixelcell() { *DTV_PLANEB_MODULO_LO = 0; *DTV_PLANEB_MODULO_HI = 0; // Border color - *BORDERCOL = $00; + *BORDER_COLOR = $00; // DTV Palette - Grey Tones for(byte i : 0..$f) { DTV_PALETTE[i] = i; @@ -849,7 +849,7 @@ void mode_8bppchunkybmm() { *DTV_PLANEB_MODULO_LO = 0; *DTV_PLANEB_MODULO_HI = 0; // Border color - *BORDERCOL = $00; + *BORDER_COLOR = $00; // DTV Palette - Grey Tones for(byte i : 0..$f) { DTV_PALETTE[i] = i; diff --git a/src/test/kc/cast-precedence-problem.c b/src/test/kc/cast-precedence-problem.c index 785700a05..727ff2812 100644 --- a/src/test/kc/cast-precedence-problem.c +++ b/src/test/kc/cast-precedence-problem.c @@ -10,10 +10,10 @@ void main() { byte sumb = min+max; byte midb = (sumb>>1)+1; SCREEN[1] = midb; - byte* BGCOL = $d021; + byte* BG_COLOR = $d021; if(SCREEN[0]==SCREEN[1]) { - *BGCOL = 5; + *BG_COLOR = 5; } else { - *BGCOL = 2; + *BG_COLOR = 2; } } diff --git a/src/test/kc/clobber-a-problem.c b/src/test/kc/clobber-a-problem.c index c5dc0aaa4..5f6f66f91 100644 --- a/src/test/kc/clobber-a-problem.c +++ b/src/test/kc/clobber-a-problem.c @@ -1,5 +1,5 @@ -byte* BORDERCOL = $d020; +byte* BORDER_COLOR = $d020; byte* RASTER = $d012; byte DARK_GREY = $b; byte BLACK = 0; @@ -13,7 +13,7 @@ void main() { volatile byte irq_raster_next = 0; interrupt(hardware_clobber) void irq() { - *BORDERCOL = DARK_GREY; + *BORDER_COLOR = DARK_GREY; irq_raster_next += 21; // Setup next interrupt byte raster_next = irq_raster_next; @@ -21,5 +21,5 @@ interrupt(hardware_clobber) void irq() { raster_next -=1; } *RASTER = raster_next; - *BORDERCOL = BLACK; + *BORDER_COLOR = BLACK; } \ No newline at end of file diff --git a/src/test/kc/complex/ataritempest/ataritempest.c b/src/test/kc/complex/ataritempest/ataritempest.c index 2b7afa1e7..9d63a6dd1 100644 --- a/src/test/kc/complex/ataritempest/ataritempest.c +++ b/src/test/kc/complex/ataritempest/ataritempest.c @@ -4,7 +4,7 @@ #pragma link("ataritempest.ld") -char* const BGCOL = 0xc01a; +char* const BG_COLOR = 0xc01a; #pragma data_seg(RomData) char MESSAGE[] = "hello world"; @@ -17,11 +17,11 @@ void entryPoint() { } void interrupt(HARDWARE_ALL) nmiHandler() { - (*BGCOL)++; + (*BG_COLOR)++; } void main() { - (*BGCOL)++; + (*BG_COLOR)++; } #pragma data_seg(Vectors) diff --git a/src/test/kc/complex/clearscreen/clearscreen.c b/src/test/kc/complex/clearscreen/clearscreen.c index e839ab09c..b7c4bb05e 100644 --- a/src/test/kc/complex/clearscreen/clearscreen.c +++ b/src/test/kc/complex/clearscreen/clearscreen.c @@ -181,7 +181,7 @@ void processChars() { // Enable the sprite *SPRITES_ENABLE |= bitmask; // Set the sprite color - SPRITES_COLS[processing->id] = processing->col; + SPRITES_COLOR[processing->id] = processing->col; // Set sprite pointer *(SCREEN+SPRITE_PTRS+processing->id) = processing->ptr; // Set status @@ -274,7 +274,7 @@ void initSprites() { for( char* sp = SPRITE_DATA; spx, >y); x += rowOffsetX; y += rowOffsetY; - *BORDERCOL = 2; + *BORDER_COLOR = 2; } rowX += colOffsetX; rowY += colOffsetY; } origX += 0x0100; rowOffsetY += 0x0080; - *BORDERCOL = 0; + *BORDER_COLOR = 0; if(keyboard_key_pressed(KEY_SPACE)) { break; } diff --git a/src/test/kc/complex/prebob/vogel-bobs.c b/src/test/kc/complex/prebob/vogel-bobs.c index 7b79f8a04..331160ee2 100644 --- a/src/test/kc/complex/prebob/vogel-bobs.c +++ b/src/test/kc/complex/prebob/vogel-bobs.c @@ -80,22 +80,22 @@ void main() { char angle = 0; while(true) { do { } while (*RASTER<$f8); - *BORDERCOL = 0xf; + *BORDER_COLOR = 0xf; renderBobCleanup(); signed char r = 30; char a = angle; for(char i: 0..NUM_BOBS-1) { //kickasm {{ .break }} - *BORDERCOL = 1; + *BORDER_COLOR = 1; int x = mulf8s(r, COS[a]) + 75*0x100; int y = mulf8s(r, SIN[a])*2 + 90*0x100; - *BORDERCOL = 2; + *BORDER_COLOR = 2; a += 98; r += 3; renderBob(>x, >y); } angle += 3; - *BORDERCOL = 0; + *BORDER_COLOR = 0; if(keyboard_key_pressed(KEY_SPACE)) { break; } diff --git a/src/test/kc/complex/prebob/vogel-sprites.c b/src/test/kc/complex/prebob/vogel-sprites.c index 63177ab89..97e77fd09 100644 --- a/src/test/kc/complex/prebob/vogel-sprites.c +++ b/src/test/kc/complex/prebob/vogel-sprites.c @@ -51,7 +51,7 @@ void init() { // Enable & initialize sprites *SPRITES_ENABLE = 0xff; for(char i: 0..7) { - SPRITES_COLS[i] = GREEN; + SPRITES_COLOR[i] = GREEN; } mulf_init(); // Clear screen @@ -70,12 +70,12 @@ void loop() { char angle = 0; while(true) { do { } while (*RASTER<0xd8); - *BORDERCOL = 0xf; + *BORDER_COLOR = 0xf; signed char r = 30; char a = angle; for(char i: 0..NUM_BOBS-1) { //kickasm {{ .break }} - *BORDERCOL = 6; + *BORDER_COLOR = 6; int x = mulf8s(r, COS[a])*2 + 125*0x100; PLEX_XPOS[i] = >x; int y = mulf8s(r, SIN[a])*2 + 125*0x100; @@ -83,21 +83,21 @@ void loop() { a += 98; r += 3; } - *BORDERCOL = 3; + *BORDER_COLOR = 3; plexSort(); angle += 3; - *BORDERCOL = BLACK; + *BORDER_COLOR = BLACK; // Sort the sprites by y-position while((*D011&VIC_RST8)!=0) {} // Show the sprites for( char i: 0..PLEX_COUNT-1) { - *BORDERCOL = BLACK; + *BORDER_COLOR = BLACK; char rasterY = plexFreeNextYpos(); while(*RASTER -byte* const BGCOL = $d021; +byte* const BG_COLOR = $d021; const byte GREEN = 5; const byte RED = 2 ; void main() { print_cls(); - *BGCOL = GREEN; + *BG_COLOR = GREEN; test_bytes(); test_sbytes(); } @@ -24,7 +24,7 @@ void assert_byte(byte* msg, byte b, byte c) { print_str(msg); print_str(" "); if(b!=c) { - *BGCOL = RED; + *BG_COLOR = RED; print_str("fail!"); } else { print_str("ok"); @@ -50,7 +50,7 @@ void assert_sbyte(byte* msg, signed byte b, signed byte c) { print_str(msg); print_str(" "); if(b!=c) { - *BGCOL = RED; + *BG_COLOR = RED; print_str("fail!"); } else { print_str("ok"); diff --git a/src/test/kc/double-import.c b/src/test/kc/double-import.c index f46f2d444..2ee8c9d7a 100644 --- a/src/test/kc/double-import.c +++ b/src/test/kc/double-import.c @@ -2,5 +2,5 @@ #include "imported.c" void main() { - *BGCOL = RED; + *BG_COLOR = RED; } \ No newline at end of file diff --git a/src/test/kc/examples/3d/3d.c b/src/test/kc/examples/3d/3d.c index 9621442ae..00e25d7fc 100644 --- a/src/test/kc/examples/3d/3d.c +++ b/src/test/kc/examples/3d/3d.c @@ -161,7 +161,7 @@ void sprites_init() { char* sprites_ptr = SCREEN+$3f8; for(char i: 0..7) { sprites_ptr[i] = (char)(SPRITE/$40); - SPRITES_COLS[i] = GREEN; //8+i; + SPRITES_COLOR[i] = GREEN; //8+i; } } diff --git a/src/test/kc/examples/kernalload/kernalload.c b/src/test/kc/examples/kernalload/kernalload.c index 6398b842d..63e97c577 100644 --- a/src/test/kc/examples/kernalload/kernalload.c +++ b/src/test/kc/examples/kernalload/kernalload.c @@ -34,7 +34,7 @@ void main() { // Show the loaded sprite on screen VICII->SPRITES_ENABLE = %00000001; SPRITES_PTR[0] = toSpritePtr(LOAD_SPRITE); - SPRITES_COLS[0] = GREEN; + SPRITES_COLOR[0] = GREEN; SPRITES_XPOS[0] = 0x15; SPRITES_YPOS[0] = 0x33; } diff --git a/src/test/kc/examples/linking/linking.c b/src/test/kc/examples/linking/linking.c index 1b83c41bc..2984a5e46 100644 --- a/src/test/kc/examples/linking/linking.c +++ b/src/test/kc/examples/linking/linking.c @@ -6,15 +6,15 @@ #pragma link("linking.ld") -char* BGCOL = 0xd021; +char* BG_COLOR = 0xd021; void main() { for(char i:0..255) base[i] = i; while(true) { - fillscreen(*BGCOL); - (*BGCOL)++; + fillscreen(*BG_COLOR); + (*BG_COLOR)++; } } diff --git a/src/test/kc/examples/multiplexer/simple-multiplexer.c b/src/test/kc/examples/multiplexer/simple-multiplexer.c index f50033bf1..40872a727 100644 --- a/src/test/kc/examples/multiplexer/simple-multiplexer.c +++ b/src/test/kc/examples/multiplexer/simple-multiplexer.c @@ -42,7 +42,7 @@ void init() { // Enable & initialize sprites VICII->SPRITES_ENABLE = $ff; for(char ss: 0..7) { - SPRITES_COLS[ss] = GREEN; + SPRITES_COLOR[ss] = GREEN; } } diff --git a/src/test/kc/examples/rotate/rotate.c b/src/test/kc/examples/rotate/rotate.c index 3eef218e6..7c64544df 100644 --- a/src/test/kc/examples/rotate/rotate.c +++ b/src/test/kc/examples/rotate/rotate.c @@ -29,7 +29,7 @@ void init() { char* sprites_ptr = SCREEN+$3f8; for(char i: 0..7) { sprites_ptr[i] = (char)(SPRITE/$40); - SPRITES_COLS[i] = GREEN; + SPRITES_COLOR[i] = GREEN; } } diff --git a/src/test/kc/examples/sinsprites/sinus-sprites.c b/src/test/kc/examples/sinsprites/sinus-sprites.c index 95364c002..aa6cde92f 100644 --- a/src/test/kc/examples/sinsprites/sinus-sprites.c +++ b/src/test/kc/examples/sinsprites/sinus-sprites.c @@ -112,7 +112,7 @@ void place_sprites() { sprites_ptr[j] = spr_id++; SPRITES_XPOS[j2] = spr_x; SPRITES_YPOS[j2] = 80; - SPRITES_COLS[j] = col; + SPRITES_COLOR[j] = col; spr_x = spr_x + 32; col = col^($7^$5); j2++; diff --git a/src/test/kc/examples/zpcode/zpcode.c b/src/test/kc/examples/zpcode/zpcode.c index e2b06c211..bf1cb804a 100644 --- a/src/test/kc/examples/zpcode/zpcode.c +++ b/src/test/kc/examples/zpcode/zpcode.c @@ -5,7 +5,7 @@ #pragma link("zpcode.ld") char* RASTER = 0xd012; -char* BGCOL = 0xd020; +char* BG_COLOR = 0xd020; void main() { asm { sei } @@ -20,14 +20,14 @@ void main() { loop(); // Call code on zeropage zpLoop(); - *BGCOL = 0; + *BG_COLOR = 0; } } // Code in "normal" memory void loop() { for(char i:0..100) { - (*BGCOL)--; + (*BG_COLOR)--; } } @@ -41,6 +41,6 @@ char zpCodeData[] = kickasm {{ #pragma code_seg(ZpCode) void zpLoop() { for(char i:0..100) { - (*BGCOL)++; + (*BG_COLOR)++; } } diff --git a/src/test/kc/function-pointer-noarg-2.c b/src/test/kc/function-pointer-noarg-2.c index 4ac556396..6c70ad442 100644 --- a/src/test/kc/function-pointer-noarg-2.c +++ b/src/test/kc/function-pointer-noarg-2.c @@ -15,11 +15,11 @@ void main() { } void fn1() { - byte* const BORDERCOL = $d020; - (*BORDERCOL)++; + byte* const BORDER_COLOR = $d020; + (*BORDER_COLOR)++; } void fn2() { - byte* const BGCOL = $d021; - (*BGCOL)++; + byte* const BG_COLOR = $d021; + (*BG_COLOR)++; } \ No newline at end of file diff --git a/src/test/kc/function-pointer-noarg-3.c b/src/test/kc/function-pointer-noarg-3.c index 1b3efb9e9..dab7330a4 100644 --- a/src/test/kc/function-pointer-noarg-3.c +++ b/src/test/kc/function-pointer-noarg-3.c @@ -25,11 +25,11 @@ ff: }} void fn1() { - byte* const BORDERCOL = $d020; - (*BORDERCOL)++; + byte* const BORDER_COLOR = $d020; + (*BORDER_COLOR)++; } void fn2() { - byte* const BGCOL = $d021; - (*BGCOL)++; + byte* const BG_COLOR = $d021; + (*BG_COLOR)++; } \ No newline at end of file diff --git a/src/test/kc/function-pointer-noarg-call-2.c b/src/test/kc/function-pointer-noarg-call-2.c index 26de3772a..3ac568234 100644 --- a/src/test/kc/function-pointer-noarg-call-2.c +++ b/src/test/kc/function-pointer-noarg-call-2.c @@ -18,11 +18,11 @@ void main() { } void fn1() { - byte* const BORDERCOL = $d020; - (*BORDERCOL)++; + byte* const BORDER_COLOR = $d020; + (*BORDER_COLOR)++; } void fn2() { - byte* const BGCOL = $d021; - (*BGCOL)++; + byte* const BG_COLOR = $d021; + (*BG_COLOR)++; } \ No newline at end of file diff --git a/src/test/kc/function-pointer-noarg-call-3.c b/src/test/kc/function-pointer-noarg-call-3.c index 0f60fee33..0421357cd 100644 --- a/src/test/kc/function-pointer-noarg-call-3.c +++ b/src/test/kc/function-pointer-noarg-call-3.c @@ -16,11 +16,11 @@ void()* getfn(byte b) { } void fn1() { - byte* const BORDERCOL = $d020; - (*BORDERCOL)++; + byte* const BORDER_COLOR = $d020; + (*BORDER_COLOR)++; } void fn2() { - byte* const BGCOL = $d021; - (*BGCOL)++; + byte* const BG_COLOR = $d021; + (*BG_COLOR)++; } \ No newline at end of file diff --git a/src/test/kc/function-pointer-noarg-call-4.c b/src/test/kc/function-pointer-noarg-call-4.c index 2422d0d54..399337135 100644 --- a/src/test/kc/function-pointer-noarg-call-4.c +++ b/src/test/kc/function-pointer-noarg-call-4.c @@ -12,7 +12,7 @@ void()* getfn(byte b) { } void fn1() { - byte* const BORDERCOL = $d020; - (*BORDERCOL)++; + byte* const BORDER_COLOR = $d020; + (*BORDER_COLOR)++; } diff --git a/src/test/kc/function-pointer-noarg-call-5.c b/src/test/kc/function-pointer-noarg-call-5.c index de840d4c3..3fb660a67 100644 --- a/src/test/kc/function-pointer-noarg-call-5.c +++ b/src/test/kc/function-pointer-noarg-call-5.c @@ -1,13 +1,13 @@ // Tests calling into arrays of pointers to non-args no-return functions void fn1() { - byte* const BORDERCOL = $d020; - (*BORDERCOL)++; + byte* const BORDER_COLOR = $d020; + (*BORDER_COLOR)++; } void fn2() { - byte* const BGCOL = $d021; - (*BGCOL)++; + byte* const BG_COLOR = $d021; + (*BG_COLOR)++; } void()* fns[2] = { &fn1, &fn2 }; diff --git a/src/test/kc/function-pointer-noarg-call.c b/src/test/kc/function-pointer-noarg-call.c index aef59d025..741d39183 100644 --- a/src/test/kc/function-pointer-noarg-call.c +++ b/src/test/kc/function-pointer-noarg-call.c @@ -1,8 +1,8 @@ // Tests creating, assigning and calling pointers to non-args no-return functions void fn1() { - byte* const BORDERCOL = $d020; - (*BORDERCOL)++; + byte* const BORDER_COLOR = $d020; + (*BORDER_COLOR)++; } void main() { diff --git a/src/test/kc/function-pointer-noarg.c b/src/test/kc/function-pointer-noarg.c index c10a930d3..9fb25a3ab 100644 --- a/src/test/kc/function-pointer-noarg.c +++ b/src/test/kc/function-pointer-noarg.c @@ -14,11 +14,11 @@ void main() { } void fn1() { - byte* const BORDERCOL = $d020; - (*BORDERCOL)++; + byte* const BORDER_COLOR = $d020; + (*BORDER_COLOR)++; } void fn2() { - byte* const BGCOL = $d021; - (*BGCOL)++; + byte* const BG_COLOR = $d021; + (*BG_COLOR)++; } \ No newline at end of file diff --git a/src/test/kc/function-pointer-return.c b/src/test/kc/function-pointer-return.c index a46f4dc18..688bc3be2 100644 --- a/src/test/kc/function-pointer-return.c +++ b/src/test/kc/function-pointer-return.c @@ -18,13 +18,13 @@ void main() { } byte fn1() { - byte* const BORDERCOL = $d020; - (*BORDERCOL)++; - return *BORDERCOL; + byte* const BORDER_COLOR = $d020; + (*BORDER_COLOR)++; + return *BORDER_COLOR; } byte fn2() { - byte* const BGCOL = $d021; - (*BGCOL)++; - return *BGCOL; + byte* const BG_COLOR = $d021; + (*BG_COLOR)++; + return *BG_COLOR; } \ No newline at end of file diff --git a/src/test/kc/global-pc-multiple.c b/src/test/kc/global-pc-multiple.c index 2ad66b28a..8bb725cac 100644 --- a/src/test/kc/global-pc-multiple.c +++ b/src/test/kc/global-pc-multiple.c @@ -1,7 +1,7 @@ // Test setting the program PC through a #pc directive -byte* const BGCOL = 0xd021; +byte* const BG_COLOR = 0xd021; byte* const RASTER = 0xd012; #pragma pc(0x1000) @@ -12,12 +12,12 @@ void main() { if(*RASTER<30) incScreen(); else - *BGCOL = 0; + *BG_COLOR = 0; } } #pragma pc(0x2000) void incScreen() { - *BGCOL = *RASTER; + *BG_COLOR = *RASTER; } \ No newline at end of file diff --git a/src/test/kc/global-pc.c b/src/test/kc/global-pc.c index 647b3bd6f..269225b72 100644 --- a/src/test/kc/global-pc.c +++ b/src/test/kc/global-pc.c @@ -2,14 +2,14 @@ #pragma pc(0x1000) -byte* const BGCOL = 0xd021; +byte* const BG_COLOR = 0xd021; byte* const RASTER = 0xd012; void main() { asm { sei } while(true) { byte col = *RASTER; - *BGCOL = col; + *BG_COLOR = col; } } diff --git a/src/test/kc/hex2dec.c b/src/test/kc/hex2dec.c index 878dcf525..4a51b6e61 100644 --- a/src/test/kc/hex2dec.c +++ b/src/test/kc/hex2dec.c @@ -2,7 +2,7 @@ unsigned char * const control = 0xd011; unsigned char * const raster = 0xd012; -unsigned char * const bordercol = 0xd020; +unsigned char * const BORDER_COLOR = 0xd020; void main() { asm { sei } @@ -12,15 +12,15 @@ void main() { unsigned char rst = (*control&0x80)|(*raster>>1); } while (rst!=0x30); unsigned char *screen = 0x0400; - *bordercol = 1; + *BORDER_COLOR = 1; unsigned char time_start = *raster; - utoa16w(00000, screen); (*bordercol)++; screen += 40; - utoa16w(01234, screen); (*bordercol)++; screen += 40; - utoa16w(05678, screen); (*bordercol)++; screen += 40; - utoa16w(09999, screen); (*bordercol)++; screen += 40; + utoa16w(00000, screen); (*BORDER_COLOR)++; screen += 40; + utoa16w(01234, screen); (*BORDER_COLOR)++; screen += 40; + utoa16w(05678, screen); (*BORDER_COLOR)++; screen += 40; + utoa16w(09999, screen); (*BORDER_COLOR)++; screen += 40; utoa16w(58888, screen); unsigned char time_end = *raster; - *bordercol = 0; + *BORDER_COLOR = 0; unsigned char time = time_end - time_start; utoa10w((unsigned int)time, screen+80); byte msg[] = "raster lines"; diff --git a/src/test/kc/imported.c b/src/test/kc/imported.c index 0306f3f1f..cd43324d4 100644 --- a/src/test/kc/imported.c +++ b/src/test/kc/imported.c @@ -1,2 +1,2 @@ -byte * const BGCOL = $d021; +byte * const BG_COLOR = $d021; const byte RED = 2; diff --git a/src/test/kc/importing.c b/src/test/kc/importing.c index b0beea3cd..b06eaa6c7 100644 --- a/src/test/kc/importing.c +++ b/src/test/kc/importing.c @@ -3,5 +3,5 @@ void main() { byte* screen = $0400; *screen = 1; - *BGCOL = RED; + *BG_COLOR = RED; } \ No newline at end of file diff --git a/src/test/kc/incd020.c b/src/test/kc/incd020.c index 8efd17c0b..a2817d732 100644 --- a/src/test/kc/incd020.c +++ b/src/test/kc/incd020.c @@ -1,10 +1,10 @@ // Incrementing / decrementing pointer content should result in code modifying the memory location - eg. inc $d020. // Currently it does not but instead leads to just reading the value a few times. -byte* BGCOL = $d020; +byte* BG_COLOR = $d020; void main() { do { - ++*BGCOL; - (*BGCOL)--; + ++*BG_COLOR; + (*BG_COLOR)--; } while (true); } \ No newline at end of file diff --git a/src/test/kc/inline-function.c b/src/test/kc/inline-function.c index 534205c01..85fa47cc2 100644 --- a/src/test/kc/inline-function.c +++ b/src/test/kc/inline-function.c @@ -3,7 +3,7 @@ byte* RASTER = $d012; byte* D018 = $d018; -byte* BGCOL = $d021; +byte* BG_COLOR = $d021; byte* screen = $0400; byte* charset1 = $1000; @@ -14,10 +14,10 @@ void main() { while(true) { while(*RASTER!=$ff) {} *D018 = toD018(screen, charset1); - *BGCOL = $6; + *BG_COLOR = $6; while(*RASTER!=$62) {} *D018 = toD018(screen, charset2); - *BGCOL = $b; + *BG_COLOR = $b; } } diff --git a/src/test/kc/irq-hardware-clobber-jsr.c b/src/test/kc/irq-hardware-clobber-jsr.c index 80449c598..d9ed5c958 100644 --- a/src/test/kc/irq-hardware-clobber-jsr.c +++ b/src/test/kc/irq-hardware-clobber-jsr.c @@ -17,7 +17,7 @@ void main() { *HARDWARE_IRQ = &irq; asm { cli } while(true) { - (*BORDERCOL)++; + (*BORDER_COLOR)++; } } @@ -27,8 +27,8 @@ interrupt(hardware_clobber) void irq() { } void do_irq() { - *BGCOL = WHITE; - *BGCOL = BLACK; + *BG_COLOR = WHITE; + *BG_COLOR = BLACK; // Acknowledge the IRQ *IRQ_STATUS = IRQ_RASTER; } \ No newline at end of file diff --git a/src/test/kc/irq-hardware-clobber.c b/src/test/kc/irq-hardware-clobber.c index 04bfe37e4..903f107f2 100644 --- a/src/test/kc/irq-hardware-clobber.c +++ b/src/test/kc/irq-hardware-clobber.c @@ -10,7 +10,7 @@ const byte IRQ_RASTER = %00000001; const byte IRQ_COLLISION_BG = %00000010; const byte IRQ_COLLISION_SPRITE = %00000100; const byte IRQ_LIGHTPEN = %00001000; -byte* const BGCOL = $d020; +byte* const BG_COLOR = $d020; byte* const FGCOL = $d021; const byte WHITE = 1; const byte BLACK = 0; @@ -51,8 +51,8 @@ void main() { // Interrupt Routine interrupt(hardware_clobber) void irq() { - *BGCOL = WHITE; - *BGCOL = BLACK; + *BG_COLOR = WHITE; + *BG_COLOR = BLACK; // Acknowledge the IRQ *IRQ_STATUS = IRQ_RASTER; } \ No newline at end of file diff --git a/src/test/kc/irq-hardware-stack.c b/src/test/kc/irq-hardware-stack.c index 29e48f90f..c4d1f4c8e 100644 --- a/src/test/kc/irq-hardware-stack.c +++ b/src/test/kc/irq-hardware-stack.c @@ -10,7 +10,7 @@ const byte IRQ_RASTER = %00000001; const byte IRQ_COLLISION_BG = %00000010; const byte IRQ_COLLISION_SPRITE = %00000100; const byte IRQ_LIGHTPEN = %00001000; -byte* const BGCOL = $d020; +byte* const BG_COLOR = $d020; byte* const FGCOL = $d021; const byte WHITE = 1; const byte BLACK = 0; @@ -51,8 +51,8 @@ void main() { // Interrupt Routine interrupt(hardware_stack) void irq() { - *BGCOL = WHITE; - *BGCOL = BLACK; + *BG_COLOR = WHITE; + *BG_COLOR = BLACK; // Acknowledge the IRQ *IRQ_STATUS = IRQ_RASTER; } \ No newline at end of file diff --git a/src/test/kc/irq-hardware.c b/src/test/kc/irq-hardware.c index f01489aab..501fb4fbc 100644 --- a/src/test/kc/irq-hardware.c +++ b/src/test/kc/irq-hardware.c @@ -10,7 +10,7 @@ const byte IRQ_RASTER = %00000001; const byte IRQ_COLLISION_BG = %00000010; const byte IRQ_COLLISION_SPRITE = %00000100; const byte IRQ_LIGHTPEN = %00001000; -byte* const BGCOL = $d020; +byte* const BG_COLOR = $d020; byte* const FGCOL = $d021; const byte WHITE = 1; const byte BLACK = 0; @@ -51,8 +51,8 @@ void main() { // Interrupt Routine interrupt(hardware_all) void irq() { - *BGCOL = WHITE; - *BGCOL = BLACK; + *BG_COLOR = WHITE; + *BG_COLOR = BLACK; // Acknowledge the IRQ *IRQ_STATUS = IRQ_RASTER; } \ No newline at end of file diff --git a/src/test/kc/irq-kernel-minimal.c b/src/test/kc/irq-kernel-minimal.c index 0f586ac9f..24285196b 100644 --- a/src/test/kc/irq-kernel-minimal.c +++ b/src/test/kc/irq-kernel-minimal.c @@ -11,6 +11,6 @@ void main() { // The Interrupt Handler interrupt(kernel_keyboard) void irq() { - *BGCOL = WHITE; - *BGCOL = BLACK; + *BG_COLOR = WHITE; + *BG_COLOR = BLACK; } \ No newline at end of file diff --git a/src/test/kc/irq-kernel.c b/src/test/kc/irq-kernel.c index f65f4aca2..cc5316186 100644 --- a/src/test/kc/irq-kernel.c +++ b/src/test/kc/irq-kernel.c @@ -9,7 +9,7 @@ const byte IRQ_RASTER = %00000001; const byte IRQ_COLLISION_BG = %00000010; const byte IRQ_COLLISION_SPRITE = %00000100; const byte IRQ_LIGHTPEN = %00001000; -byte* const BGCOL = $d020; +byte* const BG_COLOR = $d020; const byte WHITE = 1; const byte BLACK = 0; @@ -32,8 +32,8 @@ void main() { // Interrupt Routine interrupt(kernel_keyboard) void irq() { - *BGCOL = WHITE; - *BGCOL = BLACK; + *BG_COLOR = WHITE; + *BG_COLOR = BLACK; // Acknowledge the IRQ *IRQ_STATUS = IRQ_RASTER; } \ No newline at end of file diff --git a/src/test/kc/irq-local-var-overlap-problem.c b/src/test/kc/irq-local-var-overlap-problem.c index df81a9efe..5cf6aa977 100644 --- a/src/test/kc/irq-local-var-overlap-problem.c +++ b/src/test/kc/irq-local-var-overlap-problem.c @@ -6,7 +6,7 @@ byte* const VIC_CONTROL = $d011; byte* const IRQ_STATUS = $d019; byte* const IRQ_ENABLE = $d01a; const byte IRQ_RASTER = %00000001; -byte* const BGCOL = $d020; +byte* const BG_COLOR = $d020; byte* const FGCOL = $d021; byte* const CIA1_INTERRUPT = $dc0d; @@ -36,7 +36,7 @@ void main() { } interrupt(kernel_min) void irq() { - (*BGCOL)++; + (*BG_COLOR)++; for( byte i: 0..10 ) for( byte j: 0..10 ) for( byte k: 0..10 ) { @@ -44,19 +44,19 @@ interrupt(kernel_min) void irq() { sub_irq(); } *IRQ_STATUS = IRQ_RASTER; - (*BGCOL)--; + (*BG_COLOR)--; } void sub_main() { for( byte i: 0..10 ) for( byte j: 0..10 ) for( byte k: 0..10 ) - *BGCOL = i+j+k; + *BG_COLOR = i+j+k; } void sub_irq() { for( byte i: 0..10 ) for( byte j: 0..10 ) for( byte k: 0..10 ) - *BGCOL = i+j+k; + *BG_COLOR = i+j+k; } \ No newline at end of file diff --git a/src/test/kc/irq-raster.c b/src/test/kc/irq-raster.c index 9c3f7930f..11313db5e 100644 --- a/src/test/kc/irq-raster.c +++ b/src/test/kc/irq-raster.c @@ -9,7 +9,7 @@ const byte IRQ_RASTER = %00000001; const byte IRQ_COLLISION_BG = %00000010; const byte IRQ_COLLISION_SPRITE = %00000100; const byte IRQ_LIGHTPEN = %00001000; -byte* const BGCOL = $d020; +byte* const BG_COLOR = $d020; const byte WHITE = 1; const byte BLACK = 0; @@ -32,8 +32,8 @@ void main() { // Interrupt Routine interrupt void irq() { - *BGCOL = WHITE; - *BGCOL = BLACK; + *BG_COLOR = WHITE; + *BG_COLOR = BLACK; // Acknowledge the IRQ *IRQ_STATUS = IRQ_RASTER; } \ No newline at end of file diff --git a/src/test/kc/irq-volatile-bool-problem.c b/src/test/kc/irq-volatile-bool-problem.c index 113956331..5258a805d 100644 --- a/src/test/kc/irq-volatile-bool-problem.c +++ b/src/test/kc/irq-volatile-bool-problem.c @@ -7,7 +7,7 @@ byte* const VIC_CONTROL = $d011; byte* const IRQ_STATUS = $d019; byte* const IRQ_ENABLE = $d01a; const byte IRQ_RASTER = %00000001; -byte* const BGCOL = $d020; +byte* const BG_COLOR = $d020; byte* const CIA1_INTERRUPT = $dc0d; const byte CIA_INTERRUPT_CLEAR = $7f; @@ -34,10 +34,10 @@ void main() { volatile bool framedone = false; interrupt(kernel_min) void irq() { - (*BGCOL)++; + (*BG_COLOR)++; *IRQ_STATUS = IRQ_RASTER; if (*RASTER>50) { framedone = false; } - (*BGCOL)--; + (*BG_COLOR)--; } \ No newline at end of file diff --git a/src/test/kc/keyboard-glitch.c b/src/test/kc/keyboard-glitch.c index 561640431..7288e8189 100644 --- a/src/test/kc/keyboard-glitch.c +++ b/src/test/kc/keyboard-glitch.c @@ -2,14 +2,14 @@ // The glitch is caused by the "normal" C64 interrupt occuring just as the keyboard is read. // Press "I" to disable interrupts (red border) // Press "E" to enable interrupts (green border) -// Press "C" to enter pressed state (increaded bgcol) - and "SPACE" to leave presssed state again. +// Press "C" to enter pressed state (increaded BG_COLOR) - and "SPACE" to leave presssed state again. // Holding SPACE will sometimes trigger the pressed state when normal interrupts are enabled (green border) // but never when they are disabled (red border) #include #include void main() { - *BORDERCOL = GREEN; + *BORDER_COLOR = GREEN; while(true) { menu(); } @@ -25,12 +25,12 @@ void menu() { return; } if(keyboard_key_pressed(KEY_I)!=0) { - *BORDERCOL = RED; + *BORDER_COLOR = RED; asm { sei } return; } if(keyboard_key_pressed(KEY_E)!=0) { - *BORDERCOL = GREEN; + *BORDER_COLOR = GREEN; asm { cli } return; } @@ -39,7 +39,7 @@ void menu() { } void pressed() { - (*BGCOL)++; + (*BG_COLOR)++; // Wait for key press while(true) { if(keyboard_key_pressed(KEY_SPACE)!=0) { diff --git a/src/test/kc/kickasm-uses-prevent-deletion.c b/src/test/kc/kickasm-uses-prevent-deletion.c index a4d84cd37..cc40f1640 100644 --- a/src/test/kc/kickasm-uses-prevent-deletion.c +++ b/src/test/kc/kickasm-uses-prevent-deletion.c @@ -2,7 +2,7 @@ // The vector used when the KERNAL serves IRQ interrupts void()** const KERNEL_IRQ = $0314; -byte* const BGCOL = $d021; +byte* const BG_COLOR = $d021; const byte BLACK = $0; const byte WHITE = $1; @@ -21,8 +21,8 @@ void main() { // The Interrupt Handler interrupt(kernel_keyboard) void irq() { - *BGCOL = WHITE; - *BGCOL = BLACK; + *BG_COLOR = WHITE; + *BG_COLOR = BLACK; } diff --git a/src/test/kc/line-anim.c b/src/test/kc/line-anim.c index 0df551438..4611c5d21 100644 --- a/src/test/kc/line-anim.c +++ b/src/test/kc/line-anim.c @@ -47,7 +47,7 @@ void main() { } while(true) { while(*RASTER!=$ff) {} - (*BORDERCOL)++; + (*BORDER_COLOR)++; } } diff --git a/src/test/kc/localscope-simple.c b/src/test/kc/localscope-simple.c index b10c3e817..2363be985 100644 --- a/src/test/kc/localscope-simple.c +++ b/src/test/kc/localscope-simple.c @@ -1,16 +1,16 @@ // Tests anonymous scopes inside functions -byte* const BGCOL = $d021; +byte* const BG_COLOR = $d021; void main() { { byte i = 0; - *BGCOL = i; + *BG_COLOR = i; } { byte i = 1; - *BGCOL = i; + *BG_COLOR = i; } } \ No newline at end of file diff --git a/src/test/kc/longbranch-interrupt-problem.c b/src/test/kc/longbranch-interrupt-problem.c index 8085bbbbc..b718dd37c 100644 --- a/src/test/kc/longbranch-interrupt-problem.c +++ b/src/test/kc/longbranch-interrupt-problem.c @@ -1,7 +1,7 @@ // Tests that long branch fixing works with interrupt exits (to $ea81) void()** const KERNEL_IRQ = $0314; -byte* const BGCOL = $d020; +byte* const BG_COLOR = $d020; volatile byte col = 0; void main() { @@ -17,7 +17,7 @@ interrupt(kernel_min) void irq() { asm { lda $dc0d } - *BGCOL = col; + *BG_COLOR = col; if(col!=0) { col++; } diff --git a/src/test/kc/loop-problem2.c b/src/test/kc/loop-problem2.c index f9db239e2..d55095790 100644 --- a/src/test/kc/loop-problem2.c +++ b/src/test/kc/loop-problem2.c @@ -1,4 +1,4 @@ -byte* const BORDERCOL = $d020; +byte* const BORDER_COLOR = $d020; byte* const SCREEN = $0400; void main() { @@ -14,11 +14,11 @@ void print_cls() { void mode_ctrl() { while(true) { - byte before = *BORDERCOL; + byte before = *BORDER_COLOR; if(before==$ff) { - *BORDERCOL = 2; + *BORDER_COLOR = 2; } else { - *BORDERCOL = 3; + *BORDER_COLOR = 3; } } } diff --git a/src/test/kc/loophead-problem-3.c b/src/test/kc/loophead-problem-3.c index 639550771..8595812dd 100644 --- a/src/test/kc/loophead-problem-3.c +++ b/src/test/kc/loophead-problem-3.c @@ -7,6 +7,6 @@ void main() { dword result = mul16u(4,123); word kaputt = kaputt; + *BORDER_COLOR = kaputt; } \ No newline at end of file diff --git a/src/test/kc/min-fmul-16.c b/src/test/kc/min-fmul-16.c index db8e531d7..d3edef0c3 100644 --- a/src/test/kc/min-fmul-16.c +++ b/src/test/kc/min-fmul-16.c @@ -1,7 +1,7 @@ #include byte* RASTER = $d012; -byte* BORDERCOL = $d020; +byte* BORDER_COLOR = $d020; byte* SCREEN = $400; void main() { @@ -11,9 +11,9 @@ void main() { asm { sei } while(true) { while(*RASTER!=$ff) {} - (*BORDERCOL)++; + (*BORDER_COLOR)++; dword r = mulf16u(a, b); - (*BORDERCOL)--; + (*BORDER_COLOR)--; print_ulong(r); print_set_screen(SCREEN); } diff --git a/src/test/kc/multiplexer-irq/simple-multiplexer-irq.c b/src/test/kc/multiplexer-irq/simple-multiplexer-irq.c index f95dd084f..a53ca9d08 100644 --- a/src/test/kc/multiplexer-irq/simple-multiplexer-irq.c +++ b/src/test/kc/multiplexer-irq/simple-multiplexer-irq.c @@ -36,7 +36,7 @@ void init() { // Enable & initialize sprites *SPRITES_ENABLE = 0xff; for(char ss: 0..7) { - SPRITES_COLS[ss] = GREEN; + SPRITES_COLOR[ss] = GREEN; } // enable the interrupt asm { sei } @@ -53,7 +53,7 @@ volatile bool framedone = true; interrupt(kernel_min) void plex_irq() { asm { sei } - *BORDERCOL = WHITE; + *BORDER_COLOR = WHITE; char rasterY; do { plexShowSprite(); @@ -66,7 +66,7 @@ interrupt(kernel_min) void plex_irq() { *RASTER = 0x0; framedone = true; } - *BORDERCOL = 0; + *BORDER_COLOR = 0; asm { cli } } @@ -76,7 +76,7 @@ void loop() { char sin_idx = 0; while(true) { while(!framedone) { } - *BORDERCOL = RED; + *BORDER_COLOR = RED; // Assign sinus positions char y_idx = sin_idx; for(char sy: 0..PLEX_COUNT-1) { @@ -85,9 +85,9 @@ void loop() { } sin_idx +=1; // Sort the sprites by y-position - (*BORDERCOL)++; + (*BORDER_COLOR)++; plexSort(); - *BORDERCOL = GREEN; + *BORDER_COLOR = GREEN; framedone = false; } diff --git a/src/test/kc/multiply-1.c b/src/test/kc/multiply-1.c new file mode 100644 index 000000000..af9dbf8ce --- /dev/null +++ b/src/test/kc/multiply-1.c @@ -0,0 +1,12 @@ +// Test compile-time and run-time multiplication +// Compile-time multiplication + +char * const SCREEN = 0x0400; + +void main() { + char c1 = 4; + char c2 = c1*2; + c2++; + char c3 = c1*c2; + SCREEN[0] = c3; +} \ No newline at end of file diff --git a/src/test/kc/multiply-2.c b/src/test/kc/multiply-2.c new file mode 100644 index 000000000..39e5d21e7 --- /dev/null +++ b/src/test/kc/multiply-2.c @@ -0,0 +1,15 @@ +// Test compile-time and run-time multiplication +// var*const multiplication - converted to shift/add + +char * const SCREEN = 0x0400; + +void main() { + char i=0; + for(char c1=0;c1<5;c1++) { + // const*const + char c2 = 3*2+1; + // var*const + char c3 = c1*c2; + SCREEN[i++] = c3; + } +} \ No newline at end of file diff --git a/src/test/kc/multiply-3.c b/src/test/kc/multiply-3.c new file mode 100644 index 000000000..20762ebfc --- /dev/null +++ b/src/test/kc/multiply-3.c @@ -0,0 +1,31 @@ +// Test compile-time and run-time multiplication +// var*var multiplication - converted to call + +char * const SCREEN = 0x0400; + +void main() { + char i = 0; + for(char c1=0;c1<5;c1++) { + for(char c2=0;c2<5;c2++) { + // var*var + char c3 = (char)mul8u(c1,7); + char c4 = (char)mul8u(c2,5); + SCREEN[i++] = (char)mul8u(c3, c4); + } + } +} + +// Perform binary multiplication of two unsigned 8-bit chars into a 16-bit unsigned int +unsigned int mul8u(__ma char a, __ma char b) { + unsigned int res = 0; + unsigned int mb = b; + while(a!=0) { + if( (a&1) != 0) { + res = res + mb; + } + a = a>>1; + mb = mb<<1; + } + return res; +} + diff --git a/src/test/kc/number-inference-sum.c b/src/test/kc/number-inference-sum.c index 655ba890c..7d188413b 100644 --- a/src/test/kc/number-inference-sum.c +++ b/src/test/kc/number-inference-sum.c @@ -3,7 +3,7 @@ void main() { word* const screen = 0x0400; - byte* const bgcol = 0xd020; + byte* const BG_COLOR = 0xd020; const byte RED = 2; byte b1 = 250; @@ -11,6 +11,6 @@ void main() { word w = b2+1; screen[0] = w; - if((w)>255) *bgcol = RED; + if((w)>255) *BG_COLOR = RED; } \ No newline at end of file diff --git a/src/test/kc/ptr-complex.c b/src/test/kc/ptr-complex.c index 468ee114c..179fb72e4 100644 --- a/src/test/kc/ptr-complex.c +++ b/src/test/kc/ptr-complex.c @@ -28,8 +28,8 @@ void main() { --*(byte*)($d000+$21); // Increment on a const named pointer - byte* BGCOL = $d020; - ++*BGCOL; + byte* BG_COLOR = $d020; + ++*BG_COLOR; } \ No newline at end of file diff --git a/src/test/kc/scan-desire-problem.c b/src/test/kc/scan-desire-problem.c index 8b0c4b135..da3cd84c7 100644 --- a/src/test/kc/scan-desire-problem.c +++ b/src/test/kc/scan-desire-problem.c @@ -32,11 +32,11 @@ void init() { lda #$5b // as there are more than 256 rasterlines, the topmost bit of $d011 serves as sta $d011 // the 8th bit for the rasterline we want our irq to be triggered. } - *BORDERCOL = BLACK; - *BGCOL1 = BLACK; - *BGCOL2 = RED; - *BGCOL3 = BLUE; - *BGCOL4 = GREEN; + *BORDER_COLOR = BLACK; + *BG_COLOR = BLACK; + *BG_COLOR1 = RED; + *BG_COLOR2 = BLUE; + *BG_COLOR3 = GREEN; } void init_sprites() { @@ -44,7 +44,7 @@ void init_sprites() { *SPRITES_EXPAND_X = 0; *SPRITES_EXPAND_Y = 0; *SPRITES_XMSB = 0; - *SPRITES_COLS = WHITE; + *SPRITES_COLOR = WHITE; *SPRITES_MC = 0; } diff --git a/src/test/kc/screen-show-spiral-buckets.c b/src/test/kc/screen-show-spiral-buckets.c index fb3a61863..cac3a3339 100644 --- a/src/test/kc/screen-show-spiral-buckets.c +++ b/src/test/kc/screen-show-spiral-buckets.c @@ -42,7 +42,7 @@ void main() { byte bucket_idx = 0; while(true) { do { } while (*RASTER!=0xff); - (*BORDERCOL)++; + (*BORDER_COLOR)++; word* bucket = BUCKETS[bucket_idx]; byte bucket_size = BUCKET_SIZES[bucket_idx]; if(bucket_size>0) { @@ -65,7 +65,7 @@ void main() { // Found something to fill! byte* fill = SCREEN_FILL+min_offset; *fill = FILL_CHAR; - (*BORDERCOL)--; + (*BORDER_COLOR)--; continue; } } @@ -73,10 +73,10 @@ void main() { bucket_idx++; if(bucket_idx==NUM_BUCKETS) { // All buckets complete - exit loop! - (*BORDERCOL)--; + (*BORDER_COLOR)--; break; } - (*BORDERCOL)--; + (*BORDER_COLOR)--; } while(true) (*(COLS+999))++; diff --git a/src/test/kc/signed-words.c b/src/test/kc/signed-words.c index 9d41b04c6..b69a7bff4 100644 --- a/src/test/kc/signed-words.c +++ b/src/test/kc/signed-words.c @@ -19,7 +19,7 @@ void init() { *SPRITES_EXPAND_Y = 0; SPRITES_XPOS[0] = 100; SPRITES_YPOS[0] = 100; - SPRITES_COLS[0] = WHITE; + SPRITES_COLOR[0] = WHITE; SPRITES_PTR[0] = (byte)(SPRITE/$40); for(byte* sc=SCREEN; sc!=SCREEN+1000; sc++ ) { *sc = ' '; diff --git a/src/test/kc/sprite-font.c b/src/test/kc/sprite-font.c index fdfde7883..79a755959 100644 --- a/src/test/kc/sprite-font.c +++ b/src/test/kc/sprite-font.c @@ -14,7 +14,7 @@ void main() { *SPRITES_ENABLE = 1; SPRITES_XPOS[0] = 100; SPRITES_YPOS[0] = 100; - SPRITES_COLS[0] = WHITE; + SPRITES_COLOR[0] = WHITE; SPRITES[0] = toSpritePtr(SPRITE); memset(SPRITE,0,64); asm { jsr GENERATOR } diff --git a/src/test/kc/struct-pointer-to-member-2.c b/src/test/kc/struct-pointer-to-member-2.c index 7f465431f..09ed56b61 100644 --- a/src/test/kc/struct-pointer-to-member-2.c +++ b/src/test/kc/struct-pointer-to-member-2.c @@ -13,11 +13,11 @@ struct SCREEN_COLORS { struct SCREEN_COLORS COLORS; // The border color -char * const BORDERCOL = &COLORS.BORDER; +char * const BORDER_COLOR = &COLORS.BORDER; // The background color -char * const BGCOL = &COLORS.BG0; +char * const BG_COLOR = &COLORS.BG0; void main() { - *BORDERCOL = 0; - *BGCOL = 6; + *BORDER_COLOR = 0; + *BG_COLOR = 6; } \ No newline at end of file diff --git a/src/test/kc/struct-pointer-to-member.c b/src/test/kc/struct-pointer-to-member.c index dc0f3d995..245beccbc 100644 --- a/src/test/kc/struct-pointer-to-member.c +++ b/src/test/kc/struct-pointer-to-member.c @@ -13,11 +13,11 @@ struct SCREEN_COLORS { struct SCREEN_COLORS* const COLORS = 0xd020; // The border color -char * const BORDERCOL = &COLORS->BORDER; +char * const BORDER_COLOR = &COLORS->BORDER; // The background color -char * const BGCOL = &COLORS->BG0; +char * const BG_COLOR = &COLORS->BG0; void main() { COLORS->BORDER = 0; - *BGCOL = 6; + *BG_COLOR = 6; } \ No newline at end of file diff --git a/src/test/kc/test-interrupt-notype.c b/src/test/kc/test-interrupt-notype.c index ade39d81a..bad346b33 100644 --- a/src/test/kc/test-interrupt-notype.c +++ b/src/test/kc/test-interrupt-notype.c @@ -1,5 +1,5 @@ void()** const KERNEL_IRQ = $0314; -byte* const BGCOL = $d020; +byte* const BG_COLOR = $d020; byte* const FGCOL = $d021; void main() { @@ -10,7 +10,7 @@ void main() { } interrupt void irq() { - (*BGCOL)++; + (*BG_COLOR)++; asm { lda $dc0d } diff --git a/src/test/kc/test-interrupt-volatile-write.c b/src/test/kc/test-interrupt-volatile-write.c index d182d2792..b6baec62d 100644 --- a/src/test/kc/test-interrupt-volatile-write.c +++ b/src/test/kc/test-interrupt-volatile-write.c @@ -2,7 +2,7 @@ // Currently fails because the modification is optimized away void()** const KERNEL_IRQ = $0314; -byte* const BGCOL = $d020; +byte* const BG_COLOR = $d020; volatile byte col = 0; void main() { @@ -18,7 +18,7 @@ interrupt(kernel_min) void irq() { asm { lda $dc0d } - *BGCOL = col; + *BG_COLOR = col; if(col!=0) { col++; } else { diff --git a/src/test/kc/test-interrupt-volatile.c b/src/test/kc/test-interrupt-volatile.c index b5ac10450..d50825a8c 100644 --- a/src/test/kc/test-interrupt-volatile.c +++ b/src/test/kc/test-interrupt-volatile.c @@ -1,5 +1,5 @@ void()** const KERNEL_IRQ = $0314; -byte* const BGCOL = $d020; +byte* const BG_COLOR = $d020; volatile byte col = 0; void main() { @@ -13,5 +13,5 @@ interrupt(kernel_min) void irq() { asm { lda $dc0d } - *BGCOL = col; + *BG_COLOR = col; } diff --git a/src/test/kc/test-interrupt.c b/src/test/kc/test-interrupt.c index c9f7c1c4e..6962bd521 100644 --- a/src/test/kc/test-interrupt.c +++ b/src/test/kc/test-interrupt.c @@ -1,5 +1,5 @@ void()** const KERNEL_IRQ = $0314; -byte* const BGCOL = $d020; +byte* const BG_COLOR = $d020; byte* const FGCOL = $d021; void main() { @@ -10,7 +10,7 @@ void main() { } interrupt(kernel_min) void irq() { - (*BGCOL)++; + (*BG_COLOR)++; asm { lda $dc0d } diff --git a/src/test/kc/test-kasm-pc.c b/src/test/kc/test-kasm-pc.c index 954b48139..abccaeba3 100644 --- a/src/test/kc/test-kasm-pc.c +++ b/src/test/kc/test-kasm-pc.c @@ -3,10 +3,10 @@ byte* TABLE = $2000; void main() { - byte* BORDERCOL = $d020; + byte* BORDER_COLOR = $d020; byte i=0; while(true) { - *BORDERCOL = TABLE[i++]; + *BORDER_COLOR = TABLE[i++]; } } diff --git a/src/test/kc/test-keyboard-space.c b/src/test/kc/test-keyboard-space.c index 912a2c08c..aca998d7a 100644 --- a/src/test/kc/test-keyboard-space.c +++ b/src/test/kc/test-keyboard-space.c @@ -6,9 +6,9 @@ void main() { while(true) { do {} while (*RASTER!=$ff); if(keyboard_key_pressed(KEY_SPACE)!=0) { - *BGCOL = GREEN; + *BG_COLOR = GREEN; } else { - *BGCOL = BLUE; + *BG_COLOR = BLUE; } } } diff --git a/src/test/kc/test-multiply-16bit.c b/src/test/kc/test-multiply-16bit.c index 8086e20a1..9b584ec57 100644 --- a/src/test/kc/test-multiply-16bit.c +++ b/src/test/kc/test-multiply-16bit.c @@ -3,10 +3,10 @@ #include #include -byte* BGCOL = $d021; +byte* BG_COLOR = $d021; void main() { - *BGCOL = 5; + *BG_COLOR = 5; print_cls(); mulf_init(); mul16u_compare(); @@ -61,7 +61,7 @@ void mul16u_compare() { ok = 0; } if(ok==0) { - *BGCOL = 2; + *BG_COLOR = 2; mul16u_error(a,b, ms, mn, mf); return; } @@ -106,7 +106,7 @@ void mul16s_compare() { ok = 0; } if(ok==0) { - *BGCOL = 2; + *BG_COLOR = 2; mul16s_error(a,b, ms, mn, mf); return; } diff --git a/src/test/kc/test-multiply-8bit.c b/src/test/kc/test-multiply-8bit.c index a67f0ebad..54f47c1d2 100644 --- a/src/test/kc/test-multiply-8bit.c +++ b/src/test/kc/test-multiply-8bit.c @@ -3,10 +3,10 @@ #include #include -byte* BGCOL = $d021; +byte* BG_COLOR = $d021; void main() { - *BGCOL = 5; + *BG_COLOR = 5; print_cls(); mulf_init(); mulf_init_asm(); @@ -109,7 +109,7 @@ void mulf_tables_cmp() { byte* asm_sqr = mula_sqr1_lo; for( byte* kc_sqr=mulf_sqr1_lo; kc_sqr@1] @@ -132,9 +132,9 @@ main: { // init // Function only used inside the inline asm init: { - // [6] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [6] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL + sta BG_COLOR jmp __breturn // init::@return __breturn: @@ -145,7 +145,7 @@ init: { REGISTER UPLIFT POTENTIAL REGISTERS Statement asm { jsrinit } always clobbers reg byte a reg byte x reg byte y -Statement [6] *((const nomodify byte*) BGCOL) ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [6] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a REGISTER UPLIFT SCOPES Uplift Scope [main] @@ -164,7 +164,7 @@ ASSEMBLER BEFORE OPTIMIZATION :BasicUpstart(__bbegin) .pc = $80d "Program" // Global Constants & labels - .label BGCOL = $d020 + .label BG_COLOR = $d020 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -192,9 +192,9 @@ main: { // init // Function only used inside the inline asm init: { - // [6] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [6] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL + sta BG_COLOR jmp __breturn // init::@return __breturn: @@ -227,7 +227,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (void()) init() (label) init::@return (void()) main() @@ -245,7 +245,7 @@ Score: 24 :BasicUpstart(main) .pc = $80d "Program" // Global Constants & labels - .label BGCOL = $d020 + .label BG_COLOR = $d020 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] // @1 @@ -265,10 +265,10 @@ main: { // init // Function only used inside the inline asm init: { - // *BGCOL = 0 - // [6] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 0 + // [6] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL + sta BG_COLOR // init::@return // } // [7] return diff --git a/src/test/ref/asm-uses-0.sym b/src/test/ref/asm-uses-0.sym index 3bcdbc607..ab955b739 100644 --- a/src/test/ref/asm-uses-0.sym +++ b/src/test/ref/asm-uses-0.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (void()) init() (label) init::@return (void()) main() diff --git a/src/test/ref/bgblack.asm b/src/test/ref/bgblack.asm index b0eb92dcc..9b273c3b0 100644 --- a/src/test/ref/bgblack.asm +++ b/src/test/ref/bgblack.asm @@ -2,11 +2,11 @@ :BasicUpstart(main) .pc = $80d "Program" .const BLACK = 0 - .label BGCOL = $d021 + .label BG_COLOR = $d021 main: { - // *BGCOL = BLACK + // *BG_COLOR = BLACK lda #BLACK - sta BGCOL + sta BG_COLOR // } rts } diff --git a/src/test/ref/bgblack.cfg b/src/test/ref/bgblack.cfg index e3eb5ea7d..7e68673f4 100644 --- a/src/test/ref/bgblack.cfg +++ b/src/test/ref/bgblack.cfg @@ -10,7 +10,7 @@ (void()) main() main: scope:[main] from @1 - [4] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [4] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK to:main::@return main::@return: scope:[main] from main [5] return diff --git a/src/test/ref/bgblack.log b/src/test/ref/bgblack.log index 2928ea021..e6fd441ea 100644 --- a/src/test/ref/bgblack.log +++ b/src/test/ref/bgblack.log @@ -5,7 +5,7 @@ CONTROL FLOW GRAPH SSA (void()) main() main: scope:[main] from @1 - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK to:main::@return main::@return: scope:[main] from main return @@ -22,7 +22,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const nomodify byte) BLACK = (byte) 0 (void()) main() (label) main::@return @@ -56,7 +56,7 @@ FINAL CONTROL FLOW GRAPH (void()) main() main: scope:[main] from @1 - [4] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [4] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK to:main::@return main::@return: scope:[main] from main [5] return @@ -78,7 +78,7 @@ Target platform is c64basic / MOS6502X .pc = $80d "Program" // Global Constants & labels .const BLACK = 0 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -95,9 +95,9 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [4] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -107,7 +107,7 @@ main: { // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [4] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [4] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( main:2 [ ] { } ) always clobbers reg byte a REGISTER UPLIFT SCOPES Uplift Scope [main] @@ -124,7 +124,7 @@ ASSEMBLER BEFORE OPTIMIZATION .pc = $80d "Program" // Global Constants & labels .const BLACK = 0 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -141,9 +141,9 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [4] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -174,7 +174,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) BLACK = (byte) 0 (void()) main() (label) main::@return @@ -191,7 +191,7 @@ Score: 12 .pc = $80d "Program" // Global Constants & labels .const BLACK = 0 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] // @1 @@ -200,10 +200,10 @@ Score: 12 // @end // main main: { - // *BGCOL = BLACK - // [4] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // *BG_COLOR = BLACK + // [4] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // main::@return // } // [5] return diff --git a/src/test/ref/bgblack.sym b/src/test/ref/bgblack.sym index 7192cd411..3ffff7f27 100644 --- a/src/test/ref/bgblack.sym +++ b/src/test/ref/bgblack.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) BLACK = (byte) 0 (void()) main() (label) main::@return diff --git a/src/test/ref/bitmap-circle-2.asm b/src/test/ref/bitmap-circle-2.asm index 5787e4c85..71ba939ba 100644 --- a/src/test/ref/bitmap-circle-2.asm +++ b/src/test/ref/bitmap-circle-2.asm @@ -5,7 +5,7 @@ .const VIC_DEN = $10 .const VIC_RSEL = 8 .const BLUE = 6 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D011 = $d011 .label VIC_MEMORY = $d018 .label SCREEN = $400 @@ -34,9 +34,9 @@ main: { lda #>SCREEN sta.z fill.addr+1 jsr fill - // *BORDERCOL = BLUE + // *BORDER_COLOR = BLUE lda #BLUE - sta BORDERCOL + sta BORDER_COLOR // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 diff --git a/src/test/ref/bitmap-circle-2.cfg b/src/test/ref/bitmap-circle-2.cfg index a70e6a7c6..ece67c896 100644 --- a/src/test/ref/bitmap-circle-2.cfg +++ b/src/test/ref/bitmap-circle-2.cfg @@ -18,7 +18,7 @@ main::@4: scope:[main] from main [7] call fill to:main::@5 main::@5: scope:[main] from main::@4 - [8] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLUE + [8] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLUE [9] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [10] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 to:main::@1 diff --git a/src/test/ref/bitmap-circle-2.log b/src/test/ref/bitmap-circle-2.log index 0a5d6ebb4..fa66efc80 100644 --- a/src/test/ref/bitmap-circle-2.log +++ b/src/test/ref/bitmap-circle-2.log @@ -18,7 +18,7 @@ main::@4: scope:[main] from main call fill to:main::@5 main::@5: scope:[main] from main::@4 - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLUE + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLUE *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(number) 3 *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(number) $3fff/(number) $40|(word)(const nomodify byte*) BITMAP&(number) $3fff/(number) $400 (signed word) main::i#0 ← (signed word) 1 @@ -282,7 +282,7 @@ SYMBOL TABLE SSA (label) @end (const nomodify byte*) BITMAP = (byte*)(number) $2000 (const nomodify byte) BLUE = (byte) 6 -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify byte*) D011 = (byte*)(number) $d011 (byte) MOS6526_CIA::INTERRUPT (byte) MOS6526_CIA::PORT_A @@ -898,7 +898,7 @@ main::@4: scope:[main] from main [7] call fill to:main::@5 main::@5: scope:[main] from main::@4 - [8] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLUE + [8] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLUE [9] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [10] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 to:main::@1 @@ -1305,7 +1305,7 @@ Target platform is c64basic / MOS6502X .const VIC_DEN = $10 .const VIC_RSEL = 8 .const BLUE = 6 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D011 = $d011 .label VIC_MEMORY = $d018 .label SCREEN = $400 @@ -1371,9 +1371,9 @@ main: { jmp __b5 // main::@5 __b5: - // [8] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 + // [8] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 lda #BLUE - sta BORDERCOL + sta BORDER_COLOR // [9] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 @@ -1997,7 +1997,7 @@ fill: { bitmask: .byte $80, $40, $20, $10, 8, 4, 2, 1 REGISTER UPLIFT POTENTIAL REGISTERS -Statement [8] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLUE [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [8] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLUE [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [9] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [10] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [12] if((signed word) main::i#2<(signed word) $b4) goto main::@2 [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a @@ -2051,7 +2051,7 @@ Removing always clobbered register reg byte a as potential for zp[1]:16 [ fill:: Statement [79] if((byte*) fill::addr#2!=(byte*) fill::end#0) goto fill::@2 [ fill::val#4 fill::end#0 fill::addr#2 ] ( main:2::fill:5 [ fill::val#4 fill::end#0 fill::addr#2 ] { } main:2::fill:7 [ fill::val#4 fill::end#0 fill::addr#2 ] { } ) always clobbers reg byte a Statement [81] *((byte*) fill::addr#2) ← (byte) fill::val#4 [ fill::val#4 fill::end#0 fill::addr#2 ] ( main:2::fill:5 [ fill::val#4 fill::end#0 fill::addr#2 ] { } main:2::fill:7 [ fill::val#4 fill::end#0 fill::addr#2 ] { } ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp[1]:16 [ fill::val#4 ] -Statement [8] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLUE [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [8] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLUE [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [9] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [10] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [12] if((signed word) main::i#2<(signed word) $b4) goto main::@2 [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a @@ -2185,7 +2185,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const VIC_DEN = $10 .const VIC_RSEL = 8 .const BLUE = 6 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D011 = $d011 .label VIC_MEMORY = $d018 .label SCREEN = $400 @@ -2249,9 +2249,9 @@ main: { jmp __b5 // main::@5 __b5: - // [8] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 + // [8] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 lda #BLUE - sta BORDERCOL + sta BORDER_COLOR // [9] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 @@ -2946,7 +2946,7 @@ FINAL SYMBOL TABLE (label) @end (const nomodify byte*) BITMAP = (byte*) 8192 (const nomodify byte) BLUE = (byte) 6 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) D011 = (byte*) 53265 (byte) MOS6526_CIA::INTERRUPT (byte) MOS6526_CIA::PORT_A @@ -3171,7 +3171,7 @@ Score: 51752 .const VIC_DEN = $10 .const VIC_RSEL = 8 .const BLUE = 6 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D011 = $d011 .label VIC_MEMORY = $d018 .label SCREEN = $400 @@ -3221,10 +3221,10 @@ main: { sta.z fill.addr+1 jsr fill // main::@5 - // *BORDERCOL = BLUE - // [8] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = BLUE + // [8] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 lda #BLUE - sta BORDERCOL + sta BORDER_COLOR // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 // [9] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 diff --git a/src/test/ref/bitmap-circle-2.sym b/src/test/ref/bitmap-circle-2.sym index 69a65c155..c449658ba 100644 --- a/src/test/ref/bitmap-circle-2.sym +++ b/src/test/ref/bitmap-circle-2.sym @@ -3,7 +3,7 @@ (label) @end (const nomodify byte*) BITMAP = (byte*) 8192 (const nomodify byte) BLUE = (byte) 6 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) D011 = (byte*) 53265 (byte) MOS6526_CIA::INTERRUPT (byte) MOS6526_CIA::PORT_A diff --git a/src/test/ref/bitmap-circle.asm b/src/test/ref/bitmap-circle.asm index 9c5d003ef..beb0f1627 100644 --- a/src/test/ref/bitmap-circle.asm +++ b/src/test/ref/bitmap-circle.asm @@ -8,7 +8,7 @@ .const VIC_DEN = $10 .const VIC_RSEL = 8 .const BLUE = 6 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D011 = $d011 .label VIC_MEMORY = $d018 .label SCREEN = $400 @@ -36,9 +36,9 @@ main: { lda #>SCREEN sta.z fill.addr+1 jsr fill - // *BORDERCOL = BLUE + // *BORDER_COLOR = BLUE lda #BLUE - sta BORDERCOL + sta BORDER_COLOR // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 diff --git a/src/test/ref/bitmap-circle.cfg b/src/test/ref/bitmap-circle.cfg index de819607e..7f6560429 100644 --- a/src/test/ref/bitmap-circle.cfg +++ b/src/test/ref/bitmap-circle.cfg @@ -18,7 +18,7 @@ main::@2: scope:[main] from main [7] call fill to:main::@3 main::@3: scope:[main] from main::@2 - [8] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLUE + [8] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLUE [9] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [10] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 [11] call circle diff --git a/src/test/ref/bitmap-circle.log b/src/test/ref/bitmap-circle.log index 929afae2d..9ee61cc7b 100644 --- a/src/test/ref/bitmap-circle.log +++ b/src/test/ref/bitmap-circle.log @@ -18,7 +18,7 @@ main::@2: scope:[main] from main call fill to:main::@3 main::@3: scope:[main] from main::@2 - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLUE + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLUE *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(number) 3 *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(number) $3fff/(number) $40|(word)(const nomodify byte*) BITMAP&(number) $3fff/(number) $400 (signed word) circle::xc#0 ← (number) $64 @@ -258,7 +258,7 @@ SYMBOL TABLE SSA (label) @end (const nomodify byte*) BITMAP = (byte*)(number) $2000 (const nomodify byte) BLUE = (byte) 6 -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify byte*) D011 = (byte*)(number) $d011 (byte) MOS6526_CIA::INTERRUPT (byte) MOS6526_CIA::PORT_A @@ -827,7 +827,7 @@ main::@2: scope:[main] from main [7] call fill to:main::@3 main::@3: scope:[main] from main::@2 - [8] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLUE + [8] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLUE [9] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [10] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 [11] call circle @@ -1202,7 +1202,7 @@ Target platform is c64basic / MOS6502X .const VIC_DEN = $10 .const VIC_RSEL = 8 .const BLUE = 6 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D011 = $d011 .label VIC_MEMORY = $d018 .label SCREEN = $400 @@ -1267,9 +1267,9 @@ main: { jmp __b3 // main::@3 __b3: - // [8] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 + // [8] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 lda #BLUE - sta BORDERCOL + sta BORDER_COLOR // [9] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 @@ -1809,7 +1809,7 @@ fill: { bitmask: .byte $80, $40, $20, $10, 8, 4, 2, 1 REGISTER UPLIFT POTENTIAL REGISTERS -Statement [8] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLUE [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [8] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLUE [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [9] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [10] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [15] if((signed word) circle::x1#10<=(signed word) circle::y#13) goto circle::@2 [ circle::x1#10 circle::y#13 circle::p#3 ] ( main:2::circle:11 [ circle::x1#10 circle::y#13 circle::p#3 ] { } ) always clobbers reg byte a @@ -1854,7 +1854,7 @@ Removing always clobbered register reg byte a as potential for zp[1]:14 [ fill:: Statement [70] if((byte*) fill::addr#2!=(byte*) fill::end#0) goto fill::@2 [ fill::val#4 fill::end#0 fill::addr#2 ] ( main:2::fill:5 [ fill::val#4 fill::end#0 fill::addr#2 ] { } main:2::fill:7 [ fill::val#4 fill::end#0 fill::addr#2 ] { } ) always clobbers reg byte a Statement [72] *((byte*) fill::addr#2) ← (byte) fill::val#4 [ fill::val#4 fill::end#0 fill::addr#2 ] ( main:2::fill:5 [ fill::val#4 fill::end#0 fill::addr#2 ] { } main:2::fill:7 [ fill::val#4 fill::end#0 fill::addr#2 ] { } ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp[1]:14 [ fill::val#4 ] -Statement [8] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLUE [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [8] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLUE [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [9] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [10] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [15] if((signed word) circle::x1#10<=(signed word) circle::y#13) goto circle::@2 [ circle::x1#10 circle::y#13 circle::p#3 ] ( main:2::circle:11 [ circle::x1#10 circle::y#13 circle::p#3 ] { } ) always clobbers reg byte a @@ -1979,7 +1979,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const VIC_DEN = $10 .const VIC_RSEL = 8 .const BLUE = 6 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D011 = $d011 .label VIC_MEMORY = $d018 .label SCREEN = $400 @@ -2042,9 +2042,9 @@ main: { jmp __b3 // main::@3 __b3: - // [8] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 + // [8] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 lda #BLUE - sta BORDERCOL + sta BORDER_COLOR // [9] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 @@ -2640,7 +2640,7 @@ FINAL SYMBOL TABLE (label) @end (const nomodify byte*) BITMAP = (byte*) 8192 (const nomodify byte) BLUE = (byte) 6 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) D011 = (byte*) 53265 (byte) MOS6526_CIA::INTERRUPT (byte) MOS6526_CIA::PORT_A @@ -2855,7 +2855,7 @@ Score: 6073 .const VIC_DEN = $10 .const VIC_RSEL = 8 .const BLUE = 6 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D011 = $d011 .label VIC_MEMORY = $d018 .label SCREEN = $400 @@ -2904,10 +2904,10 @@ main: { sta.z fill.addr+1 jsr fill // main::@3 - // *BORDERCOL = BLUE - // [8] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = BLUE + // [8] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 lda #BLUE - sta BORDERCOL + sta BORDER_COLOR // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 // [9] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 diff --git a/src/test/ref/bitmap-circle.sym b/src/test/ref/bitmap-circle.sym index 3c435b041..d684a7df1 100644 --- a/src/test/ref/bitmap-circle.sym +++ b/src/test/ref/bitmap-circle.sym @@ -3,7 +3,7 @@ (label) @end (const nomodify byte*) BITMAP = (byte*) 8192 (const nomodify byte) BLUE = (byte) 6 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) D011 = (byte*) 53265 (byte) MOS6526_CIA::INTERRUPT (byte) MOS6526_CIA::PORT_A diff --git a/src/test/ref/bitmap-line-anim-1.asm b/src/test/ref/bitmap-line-anim-1.asm index 61f97c422..8336a31be 100644 --- a/src/test/ref/bitmap-line-anim-1.asm +++ b/src/test/ref/bitmap-line-anim-1.asm @@ -6,19 +6,19 @@ .const VIC_BMM = $20 .const VIC_DEN = $10 .const VIC_RSEL = 8 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 .label D011 = $d011 .label VIC_MEMORY = $d018 .label SCREEN = $400 .label BITMAP = $2000 .label next = 2 main: { - // *BORDERCOL = 0 + // *BORDER_COLOR = 0 lda #0 - sta BORDERCOL - // *BGCOL = 0 - sta BGCOL + sta BORDER_COLOR + // *BG_COLOR = 0 + sta BG_COLOR // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 diff --git a/src/test/ref/bitmap-line-anim-1.cfg b/src/test/ref/bitmap-line-anim-1.cfg index 8345704b4..432c37184 100644 --- a/src/test/ref/bitmap-line-anim-1.cfg +++ b/src/test/ref/bitmap-line-anim-1.cfg @@ -10,8 +10,8 @@ (void()) main() main: scope:[main] from @1 - [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 - [5] *((const nomodify byte*) BGCOL) ← (byte) 0 + [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 + [5] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [6] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [7] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 [8] call bitmap_init diff --git a/src/test/ref/bitmap-line-anim-1.log b/src/test/ref/bitmap-line-anim-1.log index d9addf704..e82307927 100644 --- a/src/test/ref/bitmap-line-anim-1.log +++ b/src/test/ref/bitmap-line-anim-1.log @@ -569,8 +569,8 @@ bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2 (void()) main() main: scope:[main] from @2 (byte) next#12 ← phi( @2/(byte) next#9 ) - *((const nomodify byte*) BORDERCOL) ← (number) 0 - *((const nomodify byte*) BGCOL) ← (number) 0 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 + *((const nomodify byte*) BG_COLOR) ← (number) 0 *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(number) 3 *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(number) $3fff/(number) $40|(word)(const nomodify byte*) BITMAP&(number) $3fff/(number) $400 (byte*) bitmap_init::bitmap#0 ← (const nomodify byte*) BITMAP @@ -639,9 +639,9 @@ SYMBOL TABLE SSA (label) @3 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const nomodify byte*) BITMAP = (byte*)(number) $2000 -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify byte*) D011 = (byte*)(number) $d011 (byte) MOS6526_CIA::INTERRUPT (byte) MOS6526_CIA::PORT_A @@ -1279,8 +1279,8 @@ Adding number conversion cast (unumber) bitmap_line_ydxi::$6 in (number~) bitmap Adding number conversion cast (unumber) 1 in (byte~) bitmap_line_ydxd::$0 ← (byte) bitmap_line_ydxd::xd#2 >> (number) 1 Adding number conversion cast (unumber) 1 in (number~) bitmap_line_ydxd::$6 ← (byte) bitmap_line_ydxd::y1#2 + (number) 1 Adding number conversion cast (unumber) bitmap_line_ydxd::$6 in (number~) bitmap_line_ydxd::$6 ← (byte) bitmap_line_ydxd::y1#2 + (unumber)(number) 1 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BGCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BG_COLOR) ← (number) 0 Adding number conversion cast (unumber) VIC_BMM|VIC_DEN|VIC_RSEL|3 in *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(number) 3 Adding number conversion cast (unumber) 3 in *((const nomodify byte*) D011) ← ((unumber)) (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(number) 3 Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(number) $3fff/(number) $40|(word)(const nomodify byte*) BITMAP&(number) $3fff/(number) $400 @@ -1297,8 +1297,8 @@ Successful SSA optimization PassNAddNumberTypeConversions Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80 Inlining cast *((byte*) bitmap_clear::bitmap#2) ← (unumber)(number) 0 Inlining cast (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$0 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BGCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BG_COLOR) ← (unumber)(number) 0 Inlining cast *((const nomodify byte*) D011) ← (unumber)(const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(unumber)(number) 3 Inlining cast (byte) bitmap_line::x0#0 ← (unumber)(number) 0 Inlining cast (byte) bitmap_line::y0#0 ← (unumber)(number) 0 @@ -1919,8 +1919,8 @@ FINAL CONTROL FLOW GRAPH (void()) main() main: scope:[main] from @1 - [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 - [5] *((const nomodify byte*) BGCOL) ← (byte) 0 + [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 + [5] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [6] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [7] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 [8] call bitmap_init @@ -2575,8 +2575,8 @@ Target platform is c64basic / MOS6502X .const VIC_BMM = $20 .const VIC_DEN = $10 .const VIC_RSEL = 8 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 .label D011 = $d011 .label VIC_MEMORY = $d018 .label SCREEN = $400 @@ -2598,12 +2598,12 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL - // [5] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [5] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL + sta BG_COLOR // [6] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 @@ -3387,8 +3387,8 @@ bitmap_init: { REGISTER UPLIFT POTENTIAL REGISTERS Equivalence Class zp[1]:48 [ bitmap_init::$7 ] has ALU potential. -Statement [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [5] *((const nomodify byte*) BGCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [5] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [6] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [7] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [39] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (const byte) bitmap_line::y1#0 [ bitmap_line_xdyi::x1#1 bitmap_line_xdyi::xd#1 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] ( main:2::bitmap_line:15::bitmap_line_xdyi:32 [ next#4 bitmap_line_xdyi::x1#1 bitmap_line_xdyi::xd#1 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] { { next#4 = bitmap_line::x1#0 bitmap_line_xdyi::x1#1 } { bitmap_line_xdyi::xd#1 = bitmap_line::xd#1 } } ) always clobbers reg byte a @@ -3473,8 +3473,8 @@ Removing always clobbered register reg byte a as potential for zp[1]:24 [ bitmap Statement [115] *((const to_nomodify byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 [ bitmap_init::x#2 bitmap_init::bits#3 ] ( main:2::bitmap_init:8 [ bitmap_init::x#2 bitmap_init::bits#3 ] { } ) always clobbers reg byte a Statement [130] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::bitmap_init:8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:25 [ bitmap_init::y#2 bitmap_init::y#1 ] -Statement [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [5] *((const nomodify byte*) BGCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [5] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [6] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [7] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [39] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (const byte) bitmap_line::y1#0 [ bitmap_line_xdyi::x1#1 bitmap_line_xdyi::xd#1 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] ( main:2::bitmap_line:15::bitmap_line_xdyi:32 [ next#4 bitmap_line_xdyi::x1#1 bitmap_line_xdyi::xd#1 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] { { next#4 = bitmap_line::x1#0 bitmap_line_xdyi::x1#1 } { bitmap_line_xdyi::xd#1 = bitmap_line::xd#1 } } ) always clobbers reg byte a reg byte x @@ -3511,8 +3511,8 @@ Statement [114] *((const to_nomodify byte*) bitmap_plot_xhi + (byte) bitmap_init Statement [115] *((const to_nomodify byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 [ bitmap_init::x#2 bitmap_init::bits#3 ] ( main:2::bitmap_init:8 [ bitmap_init::x#2 bitmap_init::bits#3 ] { } ) always clobbers reg byte a Statement [123] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$10 ] ( main:2::bitmap_init:8 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$10 ] { } ) always clobbers reg byte a Statement [130] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::bitmap_init:8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] { } ) always clobbers reg byte a -Statement [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [5] *((const nomodify byte*) BGCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [5] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [6] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [7] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [39] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (const byte) bitmap_line::y1#0 [ bitmap_line_xdyi::x1#1 bitmap_line_xdyi::xd#1 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] ( main:2::bitmap_line:15::bitmap_line_xdyi:32 [ next#4 bitmap_line_xdyi::x1#1 bitmap_line_xdyi::xd#1 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] { { next#4 = bitmap_line::x1#0 bitmap_line_xdyi::x1#1 } { bitmap_line_xdyi::xd#1 = bitmap_line::xd#1 } } ) always clobbers reg byte a reg byte x @@ -3704,8 +3704,8 @@ ASSEMBLER BEFORE OPTIMIZATION .const VIC_BMM = $20 .const VIC_DEN = $10 .const VIC_RSEL = 8 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 .label D011 = $d011 .label VIC_MEMORY = $d018 .label SCREEN = $400 @@ -3727,12 +3727,12 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL - // [5] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [5] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL + sta BG_COLOR // [6] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 @@ -4623,9 +4623,9 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte*) BITMAP = (byte*) 8192 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) D011 = (byte*) 53265 (byte) MOS6526_CIA::INTERRUPT (byte) MOS6526_CIA::PORT_A @@ -4957,8 +4957,8 @@ Score: 30221 .const VIC_BMM = $20 .const VIC_DEN = $10 .const VIC_RSEL = 8 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 .label D011 = $d011 .label VIC_MEMORY = $d018 .label SCREEN = $400 @@ -4972,13 +4972,13 @@ Score: 30221 // @end // main main: { - // *BORDERCOL = 0 - // [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 0 + // [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL - // *BGCOL = 0 - // [5] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 - sta BGCOL + sta BORDER_COLOR + // *BG_COLOR = 0 + // [5] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta BG_COLOR // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 // [6] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 diff --git a/src/test/ref/bitmap-line-anim-1.sym b/src/test/ref/bitmap-line-anim-1.sym index 53865e1a0..30a4e8d29 100644 --- a/src/test/ref/bitmap-line-anim-1.sym +++ b/src/test/ref/bitmap-line-anim-1.sym @@ -1,9 +1,9 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte*) BITMAP = (byte*) 8192 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) D011 = (byte*) 53265 (byte) MOS6526_CIA::INTERRUPT (byte) MOS6526_CIA::PORT_A diff --git a/src/test/ref/bitmap-line-anim-2.asm b/src/test/ref/bitmap-line-anim-2.asm index a438c5d30..06aef3b66 100644 --- a/src/test/ref/bitmap-line-anim-2.asm +++ b/src/test/ref/bitmap-line-anim-2.asm @@ -8,19 +8,19 @@ .const VIC_RSEL = 8 .const WHITE = 1 .const PURPLE = 4 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 .label D011 = $d011 .label VIC_MEMORY = $d018 .label SCREEN = $400 .label BITMAP = $2000 .label next = 2 main: { - // *BORDERCOL = 0 + // *BORDER_COLOR = 0 lda #0 - sta BORDERCOL - // *BGCOL = 0 - sta BGCOL + sta BORDER_COLOR + // *BG_COLOR = 0 + sta BG_COLOR // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 diff --git a/src/test/ref/bitmap-line-anim-2.cfg b/src/test/ref/bitmap-line-anim-2.cfg index bdeb85f41..e9cbc1417 100644 --- a/src/test/ref/bitmap-line-anim-2.cfg +++ b/src/test/ref/bitmap-line-anim-2.cfg @@ -10,8 +10,8 @@ (void()) main() main: scope:[main] from @1 - [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 - [5] *((const nomodify byte*) BGCOL) ← (byte) 0 + [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 + [5] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [6] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [7] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 [8] call bitmap_init diff --git a/src/test/ref/bitmap-line-anim-2.log b/src/test/ref/bitmap-line-anim-2.log index 171dffff6..d5a08bdaf 100644 --- a/src/test/ref/bitmap-line-anim-2.log +++ b/src/test/ref/bitmap-line-anim-2.log @@ -471,8 +471,8 @@ main: scope:[main] from @3 (word) next#13 ← phi( @3/(word) next#11 ) (byte*) bitmap_screen#12 ← phi( @3/(byte*) bitmap_screen#14 ) (byte*) bitmap_gfx#13 ← phi( @3/(byte*) bitmap_gfx#15 ) - *((const nomodify byte*) BORDERCOL) ← (number) 0 - *((const nomodify byte*) BGCOL) ← (number) 0 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 + *((const nomodify byte*) BG_COLOR) ← (number) 0 *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(number) 3 *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(number) $3fff/(number) $40|(word)(const nomodify byte*) BITMAP&(number) $3fff/(number) $400 (byte*) bitmap_init::gfx#0 ← (const nomodify byte*) BITMAP @@ -556,9 +556,9 @@ SYMBOL TABLE SSA (label) @4 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const nomodify byte*) BITMAP = (byte*)(number) $2000 -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify byte*) D011 = (byte*)(number) $d011 (byte) MOS6526_CIA::INTERRUPT (byte) MOS6526_CIA::PORT_A @@ -1140,8 +1140,8 @@ Adding number conversion cast (unumber) sgn_u16::$1 in (number~) sgn_u16::$1 ← Adding number conversion cast (unumber) 0 in (bool~) sgn_u16::$2 ← (number) 0 != (unumber~) sgn_u16::$1 Adding number conversion cast (unumber) -1 in (word) sgn_u16::return#2 ← (number) -1 Adding number conversion cast (unumber) 1 in (word) sgn_u16::return#3 ← (number) 1 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BGCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BG_COLOR) ← (number) 0 Adding number conversion cast (unumber) VIC_BMM|VIC_DEN|VIC_RSEL|3 in *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(number) 3 Adding number conversion cast (unumber) 3 in *((const nomodify byte*) D011) ← ((unumber)) (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(number) 3 Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(number) $3fff/(number) $40|(word)(const nomodify byte*) BITMAP&(number) $3fff/(number) $400 @@ -1160,8 +1160,8 @@ Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80 Inlining cast (byte) memset::c#1 ← (unumber)(number) 0 Inlining cast (word) sgn_u16::return#2 ← (unumber)(number) -1 Inlining cast (word) sgn_u16::return#3 ← (unumber)(number) 1 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BGCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BG_COLOR) ← (unumber)(number) 0 Inlining cast *((const nomodify byte*) D011) ← (unumber)(const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(unumber)(number) 3 Inlining cast (word) bitmap_line::x1#0 ← (unumber)(number) 0 Inlining cast (word) bitmap_line::y1#0 ← (unumber)(number) 0 @@ -1701,8 +1701,8 @@ FINAL CONTROL FLOW GRAPH (void()) main() main: scope:[main] from @1 - [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 - [5] *((const nomodify byte*) BGCOL) ← (byte) 0 + [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 + [5] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [6] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [7] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 [8] call bitmap_init @@ -2294,8 +2294,8 @@ Target platform is c64basic / MOS6502X .const VIC_RSEL = 8 .const WHITE = 1 .const PURPLE = 4 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 .label D011 = $d011 .label VIC_MEMORY = $d018 .label SCREEN = $400 @@ -2317,12 +2317,12 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL - // [5] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [5] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL + sta BG_COLOR // [6] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 @@ -3185,8 +3185,8 @@ bitmap_init: { REGISTER UPLIFT POTENTIAL REGISTERS Equivalence Class zp[1]:65 [ bitmap_init::$4 ] has ALU potential. -Statement [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [5] *((const nomodify byte*) BGCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [5] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [6] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [7] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [12] (word) bitmap_line::x2#0 ← (word) next#5 [ next#5 bitmap_line::x2#0 ] ( main:2 [ next#5 bitmap_line::x2#0 ] { { next#5 = bitmap_line::x2#0 } } ) always clobbers reg byte a @@ -3238,8 +3238,8 @@ Statement [99] *((byte*) memset::dst#2) ← (byte) memset::c#4 [ memset::c#4 mem Removing always clobbered register reg byte y as potential for zp[1]:25 [ memset::c#4 ] Statement [118] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::bitmap_init:8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:30 [ bitmap_init::y#2 bitmap_init::y#1 ] -Statement [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [5] *((const nomodify byte*) BGCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [5] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [6] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [7] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|(word)(const nomodify byte*) BITMAP&(word) $3fff/(word) $400 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [12] (word) bitmap_line::x2#0 ← (word) next#5 [ next#5 bitmap_line::x2#0 ] ( main:2 [ next#5 bitmap_line::x2#0 ] { { next#5 = bitmap_line::x2#0 } } ) always clobbers reg byte a @@ -3404,8 +3404,8 @@ ASSEMBLER BEFORE OPTIMIZATION .const VIC_RSEL = 8 .const WHITE = 1 .const PURPLE = 4 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 .label D011 = $d011 .label VIC_MEMORY = $d018 .label SCREEN = $400 @@ -3427,12 +3427,12 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL - // [5] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [5] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL + sta BG_COLOR // [6] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 @@ -4373,9 +4373,9 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte*) BITMAP = (byte*) 8192 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) D011 = (byte*) 53265 (byte) MOS6526_CIA::INTERRUPT (byte) MOS6526_CIA::PORT_A @@ -4684,8 +4684,8 @@ Score: 30186 .const VIC_RSEL = 8 .const WHITE = 1 .const PURPLE = 4 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 .label D011 = $d011 .label VIC_MEMORY = $d018 .label SCREEN = $400 @@ -4699,13 +4699,13 @@ Score: 30186 // @end // main main: { - // *BORDERCOL = 0 - // [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 0 + // [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL - // *BGCOL = 0 - // [5] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 - sta BGCOL + sta BORDER_COLOR + // *BG_COLOR = 0 + // [5] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta BG_COLOR // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 // [6] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 diff --git a/src/test/ref/bitmap-line-anim-2.sym b/src/test/ref/bitmap-line-anim-2.sym index 73099dff2..b8f7e3e99 100644 --- a/src/test/ref/bitmap-line-anim-2.sym +++ b/src/test/ref/bitmap-line-anim-2.sym @@ -1,9 +1,9 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte*) BITMAP = (byte*) 8192 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) D011 = (byte*) 53265 (byte) MOS6526_CIA::INTERRUPT (byte) MOS6526_CIA::PORT_A diff --git a/src/test/ref/bitmap-plot-0.asm b/src/test/ref/bitmap-plot-0.asm index 236734b49..cde17c25f 100644 --- a/src/test/ref/bitmap-plot-0.asm +++ b/src/test/ref/bitmap-plot-0.asm @@ -19,7 +19,7 @@ .const WHITE = 1 .const OFFSET_STRUCT_MOS6526_CIA_INTERRUPT = $d .label RASTER = $d012 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label VIC_CONTROL = $d011 .label D011 = $d011 .label D018 = $d018 @@ -340,9 +340,9 @@ bitmap_init: { // Interrupt Routine counting frames irq: { sta rega+1 - // *BGCOL = WHITE + // *BG_COLOR = WHITE lda #WHITE - sta BGCOL + sta BG_COLOR // if(frame_cnt) lda #0 cmp.z frame_cnt @@ -350,9 +350,9 @@ irq: { // frame_cnt++; inc.z frame_cnt __b1: - // *BGCOL = BLACK + // *BG_COLOR = BLACK lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER diff --git a/src/test/ref/bitmap-plot-0.cfg b/src/test/ref/bitmap-plot-0.cfg index 6c3b98e84..9dd1a62a6 100644 --- a/src/test/ref/bitmap-plot-0.cfg +++ b/src/test/ref/bitmap-plot-0.cfg @@ -175,14 +175,14 @@ bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from - [80] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE + [80] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [81] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 to:irq::@2 irq::@2: scope:[irq] from irq [82] (volatile byte) frame_cnt ← ++ (volatile byte) frame_cnt to:irq::@1 irq::@1: scope:[irq] from irq irq::@2 - [83] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [83] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [84] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq::@1 diff --git a/src/test/ref/bitmap-plot-0.log b/src/test/ref/bitmap-plot-0.log index 18ac0e246..c17a50dc2 100644 --- a/src/test/ref/bitmap-plot-0.log +++ b/src/test/ref/bitmap-plot-0.log @@ -355,13 +355,13 @@ init_irq::@return: scope:[init_irq] from init_irq interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from - *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE (bool~) irq::$1 ← (number) 0 != (volatile byte) frame_cnt (bool~) irq::$0 ← ! (bool~) irq::$1 if((bool~) irq::$0) goto irq::@1 to:irq::@2 irq::@1: scope:[irq] from irq irq::@2 - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@2: scope:[irq] from irq @@ -390,7 +390,7 @@ SYMBOL TABLE SSA (label) @4 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const byte*) BITMAP = (byte*)(number) $2000 (const nomodify byte) BLACK = (byte) 0 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*)(number) $dc00 @@ -1428,14 +1428,14 @@ bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from - [80] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE + [80] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [81] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 to:irq::@2 irq::@2: scope:[irq] from irq [82] (volatile byte) frame_cnt ← ++ (volatile byte) frame_cnt to:irq::@1 irq::@1: scope:[irq] from irq irq::@2 - [83] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [83] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [84] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq::@1 @@ -1702,7 +1702,7 @@ Target platform is c64basic / MOS6502X .const WHITE = 1 .const OFFSET_STRUCT_MOS6526_CIA_INTERRUPT = $d .label RASTER = $d012 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label VIC_CONTROL = $d011 .label D011 = $d011 .label D018 = $d018 @@ -2249,9 +2249,9 @@ irq: { sta rega+1 stx regx+1 sty regy+1 - // [80] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [80] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL + sta BG_COLOR // [81] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp.z frame_cnt @@ -2264,9 +2264,9 @@ irq: { jmp __b1 // irq::@1 __b1: - // [83] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [83] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [84] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -2329,9 +2329,9 @@ Statement [56] *((byte*) memset::dst#2) ← (byte) memset::c#4 [ memset::c#4 mem Removing always clobbered register reg byte y as potential for zp[1]:12 [ memset::c#4 ] Statement [75] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:6 [ frame_cnt bitmap_init::y#2 bitmap_init::yoffs#1 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:17 [ bitmap_init::y#2 bitmap_init::y#1 ] -Statement [80] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a +Statement [80] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a Statement [81] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a -Statement [83] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a +Statement [83] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a Statement [84] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [ ] ( [ ] { } ) always clobbers reg byte a Statement [85] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y Statement [1] (volatile byte) frame_cnt ← (byte) 1 [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a @@ -2365,9 +2365,9 @@ Statement [54] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 Statement [56] *((byte*) memset::dst#2) ← (byte) memset::c#4 [ memset::c#4 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt memset::c#4 memset::end#0 memset::dst#2 ] { } main:3::bitmap_clear:8::memset:47 [ frame_cnt memset::c#4 memset::end#0 memset::dst#2 ] { } ) always clobbers reg byte a reg byte y Statement [68] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:3::bitmap_init:6 [ frame_cnt bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] { } ) always clobbers reg byte a Statement [75] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:6 [ frame_cnt bitmap_init::y#2 bitmap_init::yoffs#1 ] { } ) always clobbers reg byte a -Statement [80] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a +Statement [80] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a Statement [81] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a -Statement [83] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a +Statement [83] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a Statement [84] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [ ] ( [ ] { } ) always clobbers reg byte a Statement [85] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y Potential registers zp[2]:2 [ main::x#2 main::x#1 ] : zp[2]:2 , @@ -2476,7 +2476,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const WHITE = 1 .const OFFSET_STRUCT_MOS6526_CIA_INTERRUPT = $d .label RASTER = $d012 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label VIC_CONTROL = $d011 .label D011 = $d011 .label D018 = $d018 @@ -2979,9 +2979,9 @@ bitmap_init: { irq: { // entry interrupt(HARDWARE_CLOBBER) sta rega+1 - // [80] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [80] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL + sta BG_COLOR // [81] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp.z frame_cnt @@ -2994,9 +2994,9 @@ irq: { jmp __b1 // irq::@1 __b1: - // [83] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [83] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [84] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -3128,7 +3128,7 @@ FINAL SYMBOL TABLE (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const byte*) BITMAP = (byte*) 8192 (const nomodify byte) BLACK = (byte) 0 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 @@ -3391,7 +3391,7 @@ Score: 3175 .const WHITE = 1 .const OFFSET_STRUCT_MOS6526_CIA_INTERRUPT = $d .label RASTER = $d012 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label VIC_CONTROL = $d011 .label D011 = $d011 .label D018 = $d018 @@ -3864,10 +3864,10 @@ bitmap_init: { irq: { // entry interrupt(HARDWARE_CLOBBER) sta rega+1 - // *BGCOL = WHITE - // [80] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // *BG_COLOR = WHITE + // [80] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL + sta BG_COLOR // if(frame_cnt) // [81] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 @@ -3879,10 +3879,10 @@ irq: { inc.z frame_cnt // irq::@1 __b1: - // *BGCOL = BLACK - // [83] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // *BG_COLOR = BLACK + // [83] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // [84] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ diff --git a/src/test/ref/bitmap-plot-0.sym b/src/test/ref/bitmap-plot-0.sym index 5a70f293b..a3e562535 100644 --- a/src/test/ref/bitmap-plot-0.sym +++ b/src/test/ref/bitmap-plot-0.sym @@ -2,7 +2,7 @@ (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const byte*) BITMAP = (byte*) 8192 (const nomodify byte) BLACK = (byte) 0 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 diff --git a/src/test/ref/bitmap-plot-1.asm b/src/test/ref/bitmap-plot-1.asm index 1ef9d80b1..d26977d07 100644 --- a/src/test/ref/bitmap-plot-1.asm +++ b/src/test/ref/bitmap-plot-1.asm @@ -26,7 +26,7 @@ .const SIZEOF_SIGNED_WORD = 2 .const OFFSET_STRUCT_MOS6526_CIA_INTERRUPT = $d .label RASTER = $d012 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label VIC_CONTROL = $d011 .label D011 = $d011 .label D018 = $d018 @@ -1048,9 +1048,9 @@ divr16u: { // Interrupt Routine counting frames irq: { sta rega+1 - // *BGCOL = WHITE + // *BG_COLOR = WHITE lda #WHITE - sta BGCOL + sta BG_COLOR // if(frame_cnt) lda #0 cmp.z frame_cnt @@ -1058,9 +1058,9 @@ irq: { // frame_cnt++; inc.z frame_cnt __b1: - // *BGCOL = BLACK + // *BG_COLOR = BLACK lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER diff --git a/src/test/ref/bitmap-plot-1.cfg b/src/test/ref/bitmap-plot-1.cfg index 729b73394..1c7277935 100644 --- a/src/test/ref/bitmap-plot-1.cfg +++ b/src/test/ref/bitmap-plot-1.cfg @@ -446,14 +446,14 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from - [225] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE + [225] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [226] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 to:irq::@2 irq::@2: scope:[irq] from irq [227] (volatile byte) frame_cnt ← ++ (volatile byte) frame_cnt to:irq::@1 irq::@1: scope:[irq] from irq irq::@2 - [228] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [228] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [229] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq::@1 diff --git a/src/test/ref/bitmap-plot-1.log b/src/test/ref/bitmap-plot-1.log index aba50f5a4..edb75a51a 100644 --- a/src/test/ref/bitmap-plot-1.log +++ b/src/test/ref/bitmap-plot-1.log @@ -875,13 +875,13 @@ init_irq::@return: scope:[init_irq] from init_irq interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from - *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE (bool~) irq::$1 ← (number) 0 != (volatile byte) frame_cnt (bool~) irq::$0 ← ! (bool~) irq::$1 if((bool~) irq::$0) goto irq::@1 to:irq::@2 irq::@1: scope:[irq] from irq irq::@2 - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@2: scope:[irq] from irq @@ -914,7 +914,7 @@ SYMBOL TABLE SSA (label) @5 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const byte*) BITMAP = (byte*)(number) $2000 (const nomodify byte) BLACK = (byte) 0 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*)(number) $dc00 @@ -3162,14 +3162,14 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from - [225] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE + [225] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [226] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 to:irq::@2 irq::@2: scope:[irq] from irq [227] (volatile byte) frame_cnt ← ++ (volatile byte) frame_cnt to:irq::@1 irq::@1: scope:[irq] from irq irq::@2 - [228] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [228] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [229] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq::@1 @@ -3843,7 +3843,7 @@ Target platform is c64basic / MOS6502X .const SIZEOF_SIGNED_WORD = 2 .const OFFSET_STRUCT_MOS6526_CIA_INTERRUPT = $d .label RASTER = $d012 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label VIC_CONTROL = $d011 .label D011 = $d011 .label D018 = $d018 @@ -5643,9 +5643,9 @@ irq: { sta rega+1 stx regx+1 sty regy+1 - // [225] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [225] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL + sta BG_COLOR // [226] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp.z frame_cnt @@ -5658,9 +5658,9 @@ irq: { jmp __b1 // irq::@1 __b1: - // [228] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [228] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [229] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -5812,9 +5812,9 @@ Removing always clobbered register reg byte a as potential for zp[1]:64 [ divr16 Statement [217] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:130::divr16u:198 [ frame_cnt divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::return#0 = divr16u::return#2 } } main:3::sin16s_gen2:6::div32u16u:130::divr16u:202 [ frame_cnt div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::rem#10 = divr16u::rem#4 rem16u#1 } { divr16u::return#0 = divr16u::return#3 } } ) always clobbers reg byte a Statement [219] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:130::divr16u:198 [ frame_cnt divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::return#0 = divr16u::return#2 } } main:3::sin16s_gen2:6::div32u16u:130::divr16u:202 [ frame_cnt div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::rem#10 = divr16u::rem#4 rem16u#1 } { divr16u::return#0 = divr16u::return#3 } } ) always clobbers reg byte a Statement [223] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:130::divr16u:198 [ frame_cnt divr16u::return#0 rem16u#1 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::return#0 = divr16u::return#2 } } main:3::sin16s_gen2:6::div32u16u:130::divr16u:202 [ frame_cnt div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::rem#10 = divr16u::rem#4 rem16u#1 } { divr16u::return#0 = divr16u::return#3 } } ) always clobbers reg byte a -Statement [225] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a +Statement [225] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a Statement [226] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a -Statement [228] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a +Statement [228] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a Statement [229] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [ ] ( [ ] { } ) always clobbers reg byte a Statement [230] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y Statement [1] (volatile byte) frame_cnt ← (byte) 1 [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a @@ -5934,9 +5934,9 @@ Statement [213] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ div Statement [217] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:130::divr16u:198 [ frame_cnt divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::return#0 = divr16u::return#2 } } main:3::sin16s_gen2:6::div32u16u:130::divr16u:202 [ frame_cnt div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::rem#10 = divr16u::rem#4 rem16u#1 } { divr16u::return#0 = divr16u::return#3 } } ) always clobbers reg byte a Statement [219] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:130::divr16u:198 [ frame_cnt divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::return#0 = divr16u::return#2 } } main:3::sin16s_gen2:6::div32u16u:130::divr16u:202 [ frame_cnt div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::rem#10 = divr16u::rem#4 rem16u#1 } { divr16u::return#0 = divr16u::return#3 } } ) always clobbers reg byte a Statement [223] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:130::divr16u:198 [ frame_cnt divr16u::return#0 rem16u#1 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::return#0 = divr16u::return#2 } } main:3::sin16s_gen2:6::div32u16u:130::divr16u:202 [ frame_cnt div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::rem#10 = divr16u::rem#4 rem16u#1 } { divr16u::return#0 = divr16u::return#3 } } ) always clobbers reg byte a -Statement [225] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a +Statement [225] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a Statement [226] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a -Statement [228] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a +Statement [228] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a Statement [229] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [ ] ( [ ] { } ) always clobbers reg byte a Statement [230] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y Potential registers zp[2]:2 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] : zp[2]:2 , @@ -6204,7 +6204,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const SIZEOF_SIGNED_WORD = 2 .const OFFSET_STRUCT_MOS6526_CIA_INTERRUPT = $d .label RASTER = $d012 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label VIC_CONTROL = $d011 .label D011 = $d011 .label D018 = $d018 @@ -7699,9 +7699,9 @@ divr16u: { irq: { // entry interrupt(HARDWARE_CLOBBER) sta rega+1 - // [225] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [225] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL + sta BG_COLOR // [226] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp.z frame_cnt @@ -7714,9 +7714,9 @@ irq: { jmp __b1 // irq::@1 __b1: - // [228] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [228] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [229] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -7991,7 +7991,7 @@ FINAL SYMBOL TABLE (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const byte*) BITMAP = (byte*) 8192 (const nomodify byte) BLACK = (byte) 0 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 @@ -8509,7 +8509,7 @@ Score: 20648 .const SIZEOF_SIGNED_WORD = 2 .const OFFSET_STRUCT_MOS6526_CIA_INTERRUPT = $d .label RASTER = $d012 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label VIC_CONTROL = $d011 .label D011 = $d011 .label D018 = $d018 @@ -9951,10 +9951,10 @@ divr16u: { irq: { // entry interrupt(HARDWARE_CLOBBER) sta rega+1 - // *BGCOL = WHITE - // [225] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // *BG_COLOR = WHITE + // [225] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL + sta BG_COLOR // if(frame_cnt) // [226] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 @@ -9966,10 +9966,10 @@ irq: { inc.z frame_cnt // irq::@1 __b1: - // *BGCOL = BLACK - // [228] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // *BG_COLOR = BLACK + // [228] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // [229] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ diff --git a/src/test/ref/bitmap-plot-1.sym b/src/test/ref/bitmap-plot-1.sym index b065ea8ff..8174634ab 100644 --- a/src/test/ref/bitmap-plot-1.sym +++ b/src/test/ref/bitmap-plot-1.sym @@ -2,7 +2,7 @@ (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const byte*) BITMAP = (byte*) 8192 (const nomodify byte) BLACK = (byte) 0 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 diff --git a/src/test/ref/bitmap-plot-2.asm b/src/test/ref/bitmap-plot-2.asm index 5259f6fd9..d36bfceb2 100644 --- a/src/test/ref/bitmap-plot-2.asm +++ b/src/test/ref/bitmap-plot-2.asm @@ -26,8 +26,8 @@ .const SIZEOF_SIGNED_WORD = 2 .const OFFSET_STRUCT_MOS6526_CIA_INTERRUPT = $d .label RASTER = $d012 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 .label VIC_CONTROL = $d011 .label D011 = $d011 .label D018 = $d018 @@ -275,8 +275,8 @@ main: { bpl __b7 jmp __b2 __b7: - // (*BORDERCOL)++; - inc BORDERCOL + // (*BORDER_COLOR)++; + inc BORDER_COLOR jmp __b7 } // Plot a single dot in the bitmap @@ -1085,9 +1085,9 @@ divr16u: { // Interrupt Routine counting frames irq: { sta rega+1 - // *BGCOL = WHITE + // *BG_COLOR = WHITE lda #WHITE - sta BGCOL + sta BG_COLOR // if(frame_cnt) lda #0 cmp.z frame_cnt @@ -1095,9 +1095,9 @@ irq: { // frame_cnt++; inc.z frame_cnt __b1: - // *BGCOL = BLACK + // *BG_COLOR = BLACK lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER diff --git a/src/test/ref/bitmap-plot-2.cfg b/src/test/ref/bitmap-plot-2.cfg index b4f9a1f90..29973255a 100644 --- a/src/test/ref/bitmap-plot-2.cfg +++ b/src/test/ref/bitmap-plot-2.cfg @@ -103,7 +103,7 @@ main::@5: scope:[main] from main::@15 main::@4 main::@6 [55] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@7 to:main::@1 main::@7: scope:[main] from main::@5 main::@7 - [56] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [56] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) to:main::@7 (void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) @@ -465,14 +465,14 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from - [234] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE + [234] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [235] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 to:irq::@2 irq::@2: scope:[irq] from irq [236] (volatile byte) frame_cnt ← ++ (volatile byte) frame_cnt to:irq::@1 irq::@1: scope:[irq] from irq irq::@2 - [237] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [237] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [238] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq::@1 diff --git a/src/test/ref/bitmap-plot-2.log b/src/test/ref/bitmap-plot-2.log index 74a33c6a4..5ad4f6429 100644 --- a/src/test/ref/bitmap-plot-2.log +++ b/src/test/ref/bitmap-plot-2.log @@ -901,7 +901,7 @@ main::@10: scope:[main] from main::@9 (byte*) bitmap_screen#19 ← phi( main::@9/(byte*) bitmap_screen#13 ) (byte*) bitmap_gfx#20 ← phi( main::@9/(byte*) bitmap_gfx#14 ) (word) rem16u#28 ← phi( main::@9/(word) rem16u#24 ) - *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) to:main::@9 main::@return: scope:[main] from main::@9 (byte*) bitmap_screen#9 ← phi( main::@9/(byte*) bitmap_screen#13 ) @@ -937,13 +937,13 @@ init_irq::@return: scope:[init_irq] from init_irq interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from - *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE (bool~) irq::$1 ← (number) 0 != (volatile byte) frame_cnt (bool~) irq::$0 ← ! (bool~) irq::$1 if((bool~) irq::$0) goto irq::@1 to:irq::@2 irq::@1: scope:[irq] from irq irq::@2 - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@2: scope:[irq] from irq @@ -976,10 +976,10 @@ SYMBOL TABLE SSA (label) @5 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const byte*) BITMAP = (byte*)(number) $2000 (const nomodify byte) BLACK = (byte) 0 -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*)(number) $dc00 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f (const nomodify byte*) D011 = (byte*)(number) $d011 @@ -2991,7 +2991,7 @@ main::@5: scope:[main] from main::@15 main::@4 main::@6 [55] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@7 to:main::@1 main::@7: scope:[main] from main::@5 main::@7 - [56] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [56] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) to:main::@7 (void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) @@ -3353,14 +3353,14 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from - [234] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE + [234] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [235] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 to:irq::@2 irq::@2: scope:[irq] from irq [236] (volatile byte) frame_cnt ← ++ (volatile byte) frame_cnt to:irq::@1 irq::@1: scope:[irq] from irq irq::@2 - [237] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [237] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [238] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq::@1 @@ -4049,8 +4049,8 @@ Target platform is c64basic / MOS6502X .const SIZEOF_SIGNED_WORD = 2 .const OFFSET_STRUCT_MOS6526_CIA_INTERRUPT = $d .label RASTER = $d012 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 .label VIC_CONTROL = $d011 .label D011 = $d011 .label D018 = $d018 @@ -4491,8 +4491,8 @@ main: { jmp __b1 // main::@7 __b7: - // [56] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // [56] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __b7 } // bitmap_plot @@ -5897,9 +5897,9 @@ irq: { sta rega+1 stx regx+1 sty regy+1 - // [234] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [234] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL + sta BG_COLOR // [235] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp.z frame_cnt @@ -5912,9 +5912,9 @@ irq: { jmp __b1 // irq::@1 __b1: - // [237] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [237] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [238] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -6077,9 +6077,9 @@ Removing always clobbered register reg byte a as potential for zp[1]:67 [ divr16 Statement [226] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:139::divr16u:207 [ frame_cnt divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::return#0 = divr16u::return#2 } } main:3::sin16s_gen2:6::div32u16u:139::divr16u:211 [ frame_cnt div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::rem#10 = divr16u::rem#4 rem16u#1 } { divr16u::return#0 = divr16u::return#3 } } ) always clobbers reg byte a Statement [228] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:139::divr16u:207 [ frame_cnt divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::return#0 = divr16u::return#2 } } main:3::sin16s_gen2:6::div32u16u:139::divr16u:211 [ frame_cnt div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::rem#10 = divr16u::rem#4 rem16u#1 } { divr16u::return#0 = divr16u::return#3 } } ) always clobbers reg byte a Statement [232] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:139::divr16u:207 [ frame_cnt divr16u::return#0 rem16u#1 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::return#0 = divr16u::return#2 } } main:3::sin16s_gen2:6::div32u16u:139::divr16u:211 [ frame_cnt div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::rem#10 = divr16u::rem#4 rem16u#1 } { divr16u::return#0 = divr16u::return#3 } } ) always clobbers reg byte a -Statement [234] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a +Statement [234] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a Statement [235] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a -Statement [237] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a +Statement [237] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a Statement [238] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [ ] ( [ ] { } ) always clobbers reg byte a Statement [239] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y Statement [1] (volatile byte) frame_cnt ← (byte) 1 [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a @@ -6209,9 +6209,9 @@ Statement [222] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ div Statement [226] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:139::divr16u:207 [ frame_cnt divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::return#0 = divr16u::return#2 } } main:3::sin16s_gen2:6::div32u16u:139::divr16u:211 [ frame_cnt div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::rem#10 = divr16u::rem#4 rem16u#1 } { divr16u::return#0 = divr16u::return#3 } } ) always clobbers reg byte a Statement [228] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:139::divr16u:207 [ frame_cnt divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::return#0 = divr16u::return#2 } } main:3::sin16s_gen2:6::div32u16u:139::divr16u:211 [ frame_cnt div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::rem#10 = divr16u::rem#4 rem16u#1 } { divr16u::return#0 = divr16u::return#3 } } ) always clobbers reg byte a Statement [232] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:139::divr16u:207 [ frame_cnt divr16u::return#0 rem16u#1 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::return#0 = divr16u::return#2 } } main:3::sin16s_gen2:6::div32u16u:139::divr16u:211 [ frame_cnt div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] { { div32u16u::return#0 = div32u16u::return#2 } { divr16u::rem#10 = divr16u::rem#4 rem16u#1 } { divr16u::return#0 = divr16u::return#3 } } ) always clobbers reg byte a -Statement [234] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a +Statement [234] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a Statement [235] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 [ frame_cnt ] ( [ frame_cnt ] { } ) always clobbers reg byte a -Statement [237] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a +Statement [237] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a Statement [238] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [ ] ( [ ] { } ) always clobbers reg byte a Statement [239] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y Potential registers zp[2]:2 [ main::idx_x#11 main::idx_x#10 main::idx_x#1 ] : zp[2]:2 , @@ -6485,8 +6485,8 @@ ASSEMBLER BEFORE OPTIMIZATION .const SIZEOF_SIGNED_WORD = 2 .const OFFSET_STRUCT_MOS6526_CIA_INTERRUPT = $d .label RASTER = $d012 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 .label VIC_CONTROL = $d011 .label D011 = $d011 .label D018 = $d018 @@ -6872,8 +6872,8 @@ main: { jmp __b1 // main::@7 __b7: - // [56] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // [56] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __b7 } // bitmap_plot @@ -8040,9 +8040,9 @@ divr16u: { irq: { // entry interrupt(HARDWARE_CLOBBER) sta rega+1 - // [234] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [234] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL + sta BG_COLOR // [235] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp.z frame_cnt @@ -8055,9 +8055,9 @@ irq: { jmp __b1 // irq::@1 __b1: - // [237] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [237] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [238] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -8350,10 +8350,10 @@ FINAL SYMBOL TABLE (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const byte*) BITMAP = (byte*) 8192 (const nomodify byte) BLACK = (byte) 0 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f (const nomodify byte*) D011 = (byte*) 53265 @@ -8881,8 +8881,8 @@ Score: 20833 .const SIZEOF_SIGNED_WORD = 2 .const OFFSET_STRUCT_MOS6526_CIA_INTERRUPT = $d .label RASTER = $d012 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 .label VIC_CONTROL = $d011 .label D011 = $d011 .label D018 = $d018 @@ -9234,9 +9234,9 @@ main: { jmp __b2 // main::@7 __b7: - // (*BORDERCOL)++; - // [56] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // (*BORDER_COLOR)++; + // [56] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __b7 } // bitmap_plot @@ -10379,10 +10379,10 @@ divr16u: { irq: { // entry interrupt(HARDWARE_CLOBBER) sta rega+1 - // *BGCOL = WHITE - // [234] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // *BG_COLOR = WHITE + // [234] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL + sta BG_COLOR // if(frame_cnt) // [235] if((byte) 0==(volatile byte) frame_cnt) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 @@ -10394,10 +10394,10 @@ irq: { inc.z frame_cnt // irq::@1 __b1: - // *BGCOL = BLACK - // [237] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // *BG_COLOR = BLACK + // [237] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // [238] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ diff --git a/src/test/ref/bitmap-plot-2.sym b/src/test/ref/bitmap-plot-2.sym index 1173a9742..d85b8bdc2 100644 --- a/src/test/ref/bitmap-plot-2.sym +++ b/src/test/ref/bitmap-plot-2.sym @@ -2,10 +2,10 @@ (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const byte*) BITMAP = (byte*) 8192 (const nomodify byte) BLACK = (byte) 0 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f (const nomodify byte*) D011 = (byte*) 53265 diff --git a/src/test/ref/bitmap-plotter.asm b/src/test/ref/bitmap-plotter.asm index 649ca949f..d6cdb6652 100644 --- a/src/test/ref/bitmap-plotter.asm +++ b/src/test/ref/bitmap-plotter.asm @@ -9,13 +9,13 @@ .label D011 = $d011 .label RASTER = $d012 .label D018 = $d018 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label SCREEN = $400 main: { - // *BGCOL = 0 + // *BG_COLOR = 0 lda #0 - sta BGCOL + sta BG_COLOR // *FGCOL = 0 sta FGCOL // *D011 = BMM|DEN|RSEL|3 @@ -33,12 +33,12 @@ main: { lda #$ff cmp RASTER bne __b1 - // (*BGCOL)++; - inc BGCOL + // (*BG_COLOR)++; + inc BG_COLOR // plots() jsr plots - // (*BGCOL)--; - dec BGCOL + // (*BG_COLOR)--; + dec BG_COLOR jmp __b1 } plots: { diff --git a/src/test/ref/bitmap-plotter.cfg b/src/test/ref/bitmap-plotter.cfg index 49749900c..52c026134 100644 --- a/src/test/ref/bitmap-plotter.cfg +++ b/src/test/ref/bitmap-plotter.cfg @@ -10,7 +10,7 @@ (void()) main() main: scope:[main] from @1 - [4] *((const byte*) BGCOL) ← (byte) 0 + [4] *((const byte*) BG_COLOR) ← (byte) 0 [5] *((const byte*) FGCOL) ← (byte) 0 [6] *((const byte*) D011) ← (const byte) BMM|(const byte) DEN|(const byte) RSEL|(byte) 3 [7] *((const byte*) D018) ← (byte)(word)(const byte*) SCREEN/(byte) $40|(word)(const nomodify byte*) BITMAP/(word) $400 @@ -24,11 +24,11 @@ main::@1: scope:[main] from main::@1 main::@3 main::@4 [11] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@1 to:main::@2 main::@2: scope:[main] from main::@1 - [12] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) + [12] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) [13] call plots to:main::@4 main::@4: scope:[main] from main::@2 - [14] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) + [14] *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) to:main::@1 (void()) plots() diff --git a/src/test/ref/bitmap-plotter.log b/src/test/ref/bitmap-plotter.log index c502fade8..f7f97d4a2 100644 --- a/src/test/ref/bitmap-plotter.log +++ b/src/test/ref/bitmap-plotter.log @@ -5,7 +5,7 @@ CONTROL FLOW GRAPH SSA (void()) main() main: scope:[main] from @1 - *((const byte*) BGCOL) ← (number) 0 + *((const byte*) BG_COLOR) ← (number) 0 *((const byte*) FGCOL) ← (number) 0 (byte~) main::$0 ← (const byte) BMM | (const byte) DEN (byte~) main::$1 ← (byte~) main::$0 | (const byte) RSEL @@ -27,11 +27,11 @@ main::@1: scope:[main] from main::@1 main::@4 main::@5 if((bool~) main::$7) goto main::@1 to:main::@2 main::@2: scope:[main] from main::@1 - *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) + *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) call plots to:main::@5 main::@5: scope:[main] from main::@2 - *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) + *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) if(true) goto main::@1 to:main::@return main::@return: scope:[main] from main::@5 @@ -191,7 +191,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const byte*) BGCOL = (byte*)(number) $d020 +(const byte*) BG_COLOR = (byte*)(number) $d020 (const nomodify byte*) BITMAP = (byte*)(number) $2000 (const byte) BMM = (byte) $20 (const byte*) D011 = (byte*)(number) $d011 @@ -327,7 +327,7 @@ SYMBOL TABLE SSA (const byte*) plots_x[] = { (byte) $3c, (byte) $50, (byte) $6e, (byte) $50, (byte) $3c, (byte) $28, (byte) $a, (byte) $28 } (const byte*) plots_y[] = { (byte) $a, (byte) $28, (byte) $3c, (byte) $50, (byte) $6e, (byte) $50, (byte) $3c, (byte) $28 } -Adding number conversion cast (unumber) 0 in *((const byte*) BGCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const byte*) BG_COLOR) ← (number) 0 Adding number conversion cast (unumber) 0 in *((const byte*) FGCOL) ← (number) 0 Adding number conversion cast (unumber) 3 in (number~) main::$2 ← (byte~) main::$1 | (number) 3 Adding number conversion cast (unumber) main::$2 in (number~) main::$2 ← (byte~) main::$1 | (unumber)(number) 3 @@ -355,7 +355,7 @@ Adding number conversion cast (unumber) 0 in *((byte*) init_screen::b#3) ← (nu Adding number conversion cast (unumber) $400 in (byte*~) init_screen::$1 ← (const byte*) SCREEN + (number) $400 Adding number conversion cast (unumber) $14 in *((byte*) init_screen::c#3) ← (number) $14 Successful SSA optimization PassNAddNumberTypeConversions -Inlining cast *((const byte*) BGCOL) ← (unumber)(number) 0 +Inlining cast *((const byte*) BG_COLOR) ← (unumber)(number) 0 Inlining cast *((const byte*) FGCOL) ← (unumber)(number) 0 Inlining cast (byte) init_plot_tables::bits#2 ← (unumber)(number) $80 Inlining cast *((byte*) init_screen::b#3) ← (unumber)(number) 0 @@ -596,7 +596,7 @@ FINAL CONTROL FLOW GRAPH (void()) main() main: scope:[main] from @1 - [4] *((const byte*) BGCOL) ← (byte) 0 + [4] *((const byte*) BG_COLOR) ← (byte) 0 [5] *((const byte*) FGCOL) ← (byte) 0 [6] *((const byte*) D011) ← (const byte) BMM|(const byte) DEN|(const byte) RSEL|(byte) 3 [7] *((const byte*) D018) ← (byte)(word)(const byte*) SCREEN/(byte) $40|(word)(const nomodify byte*) BITMAP/(word) $400 @@ -610,11 +610,11 @@ main::@1: scope:[main] from main::@1 main::@3 main::@4 [11] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@1 to:main::@2 main::@2: scope:[main] from main::@1 - [12] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) + [12] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) [13] call plots to:main::@4 main::@4: scope:[main] from main::@2 - [14] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) + [14] *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) to:main::@1 (void()) plots() @@ -868,7 +868,7 @@ Target platform is c64basic / MOS6502X .label D011 = $d011 .label RASTER = $d012 .label D018 = $d018 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label SCREEN = $400 // @begin @@ -887,9 +887,9 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [4] *((const byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL + sta BG_COLOR // [5] *((const byte*) FGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta FGCOL @@ -922,8 +922,8 @@ main: { jmp __b2 // main::@2 __b2: - // [12] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [12] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // [13] call plots // [15] phi from main::@2 to plots [phi:main::@2->plots] plots_from___b2: @@ -931,8 +931,8 @@ main: { jmp __b4 // main::@4 __b4: - // [14] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BGCOL + // [14] *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BG_COLOR jmp __b1 } // plots @@ -1283,7 +1283,7 @@ init_screen: { REGISTER UPLIFT POTENTIAL REGISTERS Equivalence Class zp[1]:31 [ init_plot_tables::$6 ] has ALU potential. -Statement [4] *((const byte*) BGCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [4] *((const byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [5] *((const byte*) FGCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [6] *((const byte*) D011) ← (const byte) BMM|(const byte) DEN|(const byte) RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [7] *((const byte*) D018) ← (byte)(word)(const byte*) SCREEN/(byte) $40|(word)(const nomodify byte*) BITMAP/(word) $400 [ ] ( main:2 [ ] { } ) always clobbers reg byte a @@ -1307,7 +1307,7 @@ Statement [62] if((byte*) init_screen::b#2!=(const nomodify byte*) BITMAP+(word) Statement [64] if((byte*) init_screen::c#2!=(const byte*) SCREEN+(word) $400) goto init_screen::@4 [ init_screen::c#2 ] ( main:2::init_screen:8 [ init_screen::c#2 ] { } ) always clobbers reg byte a Statement [66] *((byte*) init_screen::c#2) ← (byte) $14 [ init_screen::c#2 ] ( main:2::init_screen:8 [ init_screen::c#2 ] { } ) always clobbers reg byte a reg byte y Statement [68] *((byte*) init_screen::b#2) ← (byte) 0 [ init_screen::b#2 ] ( main:2::init_screen:8 [ init_screen::b#2 ] { } ) always clobbers reg byte a reg byte y -Statement [4] *((const byte*) BGCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [4] *((const byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [5] *((const byte*) FGCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [6] *((const byte*) D011) ← (const byte) BMM|(const byte) DEN|(const byte) RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [7] *((const byte*) D018) ← (byte)(word)(const byte*) SCREEN/(byte) $40|(word)(const nomodify byte*) BITMAP/(word) $400 [ ] ( main:2 [ ] { } ) always clobbers reg byte a @@ -1408,7 +1408,7 @@ ASSEMBLER BEFORE OPTIMIZATION .label D011 = $d011 .label RASTER = $d012 .label D018 = $d018 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label SCREEN = $400 // @begin @@ -1427,9 +1427,9 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [4] *((const byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL + sta BG_COLOR // [5] *((const byte*) FGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta FGCOL @@ -1462,8 +1462,8 @@ main: { jmp __b2 // main::@2 __b2: - // [12] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [12] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // [13] call plots // [15] phi from main::@2 to plots [phi:main::@2->plots] plots_from___b2: @@ -1471,8 +1471,8 @@ main: { jmp __b4 // main::@4 __b4: - // [14] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BGCOL + // [14] *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BG_COLOR jmp __b1 } // plots @@ -1851,7 +1851,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const byte*) BGCOL = (byte*) 53280 +(const byte*) BG_COLOR = (byte*) 53280 (const nomodify byte*) BITMAP = (byte*) 8192 (const byte) BMM = (byte) $20 (const byte*) D011 = (byte*) 53265 @@ -1977,7 +1977,7 @@ Score: 6531 .label D011 = $d011 .label RASTER = $d012 .label D018 = $d018 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label SCREEN = $400 // @begin @@ -1988,10 +1988,10 @@ Score: 6531 // @end // main main: { - // *BGCOL = 0 - // [4] *((const byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 0 + // [4] *((const byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL + sta BG_COLOR // *FGCOL = 0 // [5] *((const byte*) FGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 sta FGCOL @@ -2021,17 +2021,17 @@ main: { cmp RASTER bne __b1 // main::@2 - // (*BGCOL)++; - // [12] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // (*BG_COLOR)++; + // [12] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // plots() // [13] call plots // [15] phi from main::@2 to plots [phi:main::@2->plots] jsr plots // main::@4 - // (*BGCOL)--; - // [14] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BGCOL + // (*BG_COLOR)--; + // [14] *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BG_COLOR jmp __b1 } // plots diff --git a/src/test/ref/bitmap-plotter.sym b/src/test/ref/bitmap-plotter.sym index 867927f13..cb4091d61 100644 --- a/src/test/ref/bitmap-plotter.sym +++ b/src/test/ref/bitmap-plotter.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const byte*) BGCOL = (byte*) 53280 +(const byte*) BG_COLOR = (byte*) 53280 (const nomodify byte*) BITMAP = (byte*) 8192 (const byte) BMM = (byte) $20 (const byte*) D011 = (byte*) 53265 diff --git a/src/test/ref/c64dtv-8bppcharstretch.asm b/src/test/ref/c64dtv-8bppcharstretch.asm index 2476f2201..46d7ec68e 100644 --- a/src/test/ref/c64dtv-8bppcharstretch.asm +++ b/src/test/ref/c64dtv-8bppcharstretch.asm @@ -20,7 +20,7 @@ .const DTV_CHUNKY = $40 .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label VIC_CONTROL = $d011 .label VIC_CONTROL2 = $d016 .label VIC_MEMORY = $d018 @@ -181,9 +181,9 @@ main: { // *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3 lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 sta VIC_CONTROL - // *BORDERCOL = 0 + // *BORDER_COLOR = 0 lda #0 - sta BORDERCOL + sta BORDER_COLOR __b3: // while(*RASTER!=rst) lda #$42 @@ -224,8 +224,8 @@ main: { asl asl asl - // *BORDERCOL = rst*$10 - sta BORDERCOL + // *BORDER_COLOR = rst*$10 + sta BORDER_COLOR // asm nop nop diff --git a/src/test/ref/c64dtv-8bppcharstretch.cfg b/src/test/ref/c64dtv-8bppcharstretch.cfg index a04ce5c07..21084d333 100644 --- a/src/test/ref/c64dtv-8bppcharstretch.cfg +++ b/src/test/ref/c64dtv-8bppcharstretch.cfg @@ -45,7 +45,7 @@ main::@1: scope:[main] from main::@1 main::@6 main::@2: scope:[main] from main::@1 main::@5 asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } [32] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 - [33] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [33] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 to:main::@3 main::@3: scope:[main] from main::@2 main::@3 [34] if(*((const nomodify byte*) RASTER)!=(byte) $42) goto main::@3 @@ -59,7 +59,7 @@ main::@5: scope:[main] from main::@4 main::@5 [38] (byte~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (byte~) main::$3 [39] *((const nomodify byte*) VIC_CONTROL) ← (byte~) main::$4 [40] (byte~) main::$5 ← (byte) main::rst#1 << (byte) 4 - [41] *((const nomodify byte*) BORDERCOL) ← (byte~) main::$5 + [41] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$5 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } [43] if((byte) main::rst#1!=(byte) $f2) goto main::@5 to:main::@2 diff --git a/src/test/ref/c64dtv-8bppcharstretch.log b/src/test/ref/c64dtv-8bppcharstretch.log index da5e087f1..f08ae1153 100644 --- a/src/test/ref/c64dtv-8bppcharstretch.log +++ b/src/test/ref/c64dtv-8bppcharstretch.log @@ -56,7 +56,7 @@ main::@2: scope:[main] from main::@1 main::@6 main::@3: scope:[main] from main::@2 asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(number) 3 - *((const nomodify byte*) BORDERCOL) ← (number) 0 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 (byte) main::rst#0 ← (byte) $42 to:main::@4 main::@4: scope:[main] from main::@3 main::@4 @@ -73,7 +73,7 @@ main::@6: scope:[main] from main::@5 main::@6 (number~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (number~) main::$3 *((const nomodify byte*) VIC_CONTROL) ← (number~) main::$4 (number~) main::$5 ← (byte) main::rst#1 * (number) $10 - *((const nomodify byte*) BORDERCOL) ← (number~) main::$5 + *((const nomodify byte*) BORDER_COLOR) ← (number~) main::$5 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } (bool~) main::$6 ← (byte) main::rst#1 != (number) $f2 if((bool~) main::$6) goto main::@6 @@ -245,7 +245,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify byte*) CHARGEN = (byte*)(number) $d000 (const nomodify byte*) CHARSET8 = (byte*)(number) $8000 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*)(number) $dd00 @@ -539,7 +539,7 @@ Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_ME Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← ((unumber)) (byte)(word)(const nomodify byte*) SCREEN&(unumber)(number) $3fff/(number) $40|(unumber)>(word)(const nomodify byte*) SCREEN&(number) $3fff/(number) 4 Adding number conversion cast (unumber) VIC_DEN|VIC_ECM|VIC_RSEL|3 in *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(number) 3 Adding number conversion cast (unumber) 3 in *((const nomodify byte*) VIC_CONTROL) ← ((unumber)) (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(number) 3 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 Adding number conversion cast (unumber) 7 in (number~) main::$3 ← (byte) main::rst#1 & (number) 7 Adding number conversion cast (unumber) main::$3 in (number~) main::$3 ← (byte) main::rst#1 & (unumber)(number) 7 Adding number conversion cast (unumber) main::$4 in (number~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (unumber~) main::$3 @@ -579,7 +579,7 @@ Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OF Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← (unumber)(unumber)(number) 3^(byte)(word)(const nomodify byte*) SCREEN/(unumber)(number) $4000 Inlining cast *((const nomodify byte*) VIC_MEMORY) ← (unumber)(byte)(word)(const nomodify byte*) SCREEN&(unumber)(number) $3fff/(unumber)(number) $40|(unumber)>(word)(const nomodify byte*) SCREEN&(unumber)(number) $3fff/(unumber)(number) 4 Inlining cast *((const nomodify byte*) VIC_CONTROL) ← (unumber)(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(unumber)(number) 3 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 53266 Simplifying constant pointer cast (byte*) 53280 @@ -949,7 +949,7 @@ main::@1: scope:[main] from main::@1 main::@6 main::@2: scope:[main] from main::@1 main::@5 asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } [32] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 - [33] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [33] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 to:main::@3 main::@3: scope:[main] from main::@2 main::@3 [34] if(*((const nomodify byte*) RASTER)!=(byte) $42) goto main::@3 @@ -963,7 +963,7 @@ main::@5: scope:[main] from main::@4 main::@5 [38] (byte~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (byte~) main::$3 [39] *((const nomodify byte*) VIC_CONTROL) ← (byte~) main::$4 [40] (byte~) main::$5 ← (byte) main::rst#1 << (byte) 4 - [41] *((const nomodify byte*) BORDERCOL) ← (byte~) main::$5 + [41] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$5 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } [43] if((byte) main::rst#1!=(byte) $f2) goto main::@5 to:main::@2 @@ -1321,7 +1321,7 @@ Target platform is c64basic / MOS6502X .const DTV_CHUNKY = $40 .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label VIC_CONTROL = $d011 .label VIC_CONTROL2 = $d016 .label VIC_MEMORY = $d018 @@ -1527,9 +1527,9 @@ main: { // [32] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 sta VIC_CONTROL - // [33] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [33] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR jmp __b3 // main::@3 __b3: @@ -1583,9 +1583,9 @@ main: { asl asl sta.z __5 - // [41] *((const nomodify byte*) BORDERCOL) ← (byte~) main::$5 -- _deref_pbuc1=vbuz1 + // [41] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$5 -- _deref_pbuc1=vbuz1 lda.z __5 - sta BORDERCOL + sta BORDER_COLOR // asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } nop nop @@ -1952,7 +1952,7 @@ Statement [25] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (byte) 3^ Statement [26] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|>(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) 4 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } always clobbers reg byte x Statement [32] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [33] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [33] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [34] if(*((const nomodify byte*) RASTER)!=(byte) $42) goto main::@3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [38] (byte~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (byte~) main::$3 [ main::rst#1 main::$4 ] ( main:2 [ main::rst#1 main::$4 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:18 [ main::rst#1 ] @@ -2001,7 +2001,7 @@ Statement [25] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (byte) 3^ Statement [26] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|>(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) 4 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } always clobbers reg byte x Statement [32] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [33] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [33] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [34] if(*((const nomodify byte*) RASTER)!=(byte) $42) goto main::@3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [37] (byte~) main::$3 ← (byte) main::rst#1 & (byte) 7 [ main::rst#1 main::$3 ] ( main:2 [ main::rst#1 main::$3 ] { } ) always clobbers reg byte a Statement [38] (byte~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (byte~) main::$3 [ main::rst#1 main::$4 ] ( main:2 [ main::rst#1 main::$4 ] { } ) always clobbers reg byte a @@ -2111,7 +2111,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const DTV_CHUNKY = $40 .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label VIC_CONTROL = $d011 .label VIC_CONTROL2 = $d016 .label VIC_MEMORY = $d018 @@ -2309,9 +2309,9 @@ main: { // [32] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 sta VIC_CONTROL - // [33] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [33] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR jmp __b3 // main::@3 __b3: @@ -2359,8 +2359,8 @@ main: { asl asl asl - // [41] *((const nomodify byte*) BORDERCOL) ← (byte~) main::$5 -- _deref_pbuc1=vbuaa - sta BORDERCOL + // [41] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$5 -- _deref_pbuc1=vbuaa + sta BORDER_COLOR // asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } nop nop @@ -2773,7 +2773,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) CHARGEN = (byte*) 53248 (const nomodify byte*) CHARSET8 = (byte*) 32768 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*) 56576 @@ -3033,7 +3033,7 @@ Score: 75375 .const DTV_CHUNKY = $40 .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label VIC_CONTROL = $d011 .label VIC_CONTROL2 = $d016 .label VIC_MEMORY = $d018 @@ -3237,10 +3237,10 @@ main: { // [32] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 sta VIC_CONTROL - // *BORDERCOL = 0 - // [33] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 0 + // [33] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // main::@3 __b3: // while(*RASTER!=rst) @@ -3291,9 +3291,9 @@ main: { asl asl asl - // *BORDERCOL = rst*$10 - // [41] *((const nomodify byte*) BORDERCOL) ← (byte~) main::$5 -- _deref_pbuc1=vbuaa - sta BORDERCOL + // *BORDER_COLOR = rst*$10 + // [41] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$5 -- _deref_pbuc1=vbuaa + sta BORDER_COLOR // asm // asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } nop diff --git a/src/test/ref/c64dtv-8bppcharstretch.sym b/src/test/ref/c64dtv-8bppcharstretch.sym index c2f864762..a7f52dbaf 100644 --- a/src/test/ref/c64dtv-8bppcharstretch.sym +++ b/src/test/ref/c64dtv-8bppcharstretch.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) CHARGEN = (byte*) 53248 (const nomodify byte*) CHARSET8 = (byte*) 32768 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*) 56576 diff --git a/src/test/ref/c64dtv-8bppchunkystretch.asm b/src/test/ref/c64dtv-8bppchunkystretch.asm index 5ff21b7d5..f10e2c029 100644 --- a/src/test/ref/c64dtv-8bppchunkystretch.asm +++ b/src/test/ref/c64dtv-8bppchunkystretch.asm @@ -19,7 +19,7 @@ .const DTV_CHUNKY = $40 .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label VIC_CONTROL = $d011 .label VIC_CONTROL2 = $d016 .label VIC_MEMORY = $d018 @@ -154,9 +154,9 @@ main: { // *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3 lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 sta VIC_CONTROL - // *BORDERCOL = 0 + // *BORDER_COLOR = 0 lda #0 - sta BORDERCOL + sta BORDER_COLOR __b3: // while(*RASTER!=rst) lda #$42 @@ -197,8 +197,8 @@ main: { asl asl asl - // *BORDERCOL = rst*$10 - sta BORDERCOL + // *BORDER_COLOR = rst*$10 + sta BORDER_COLOR // asm nop nop diff --git a/src/test/ref/c64dtv-8bppchunkystretch.cfg b/src/test/ref/c64dtv-8bppchunkystretch.cfg index dad6a6248..a624959e9 100644 --- a/src/test/ref/c64dtv-8bppchunkystretch.cfg +++ b/src/test/ref/c64dtv-8bppchunkystretch.cfg @@ -39,7 +39,7 @@ main::@1: scope:[main] from main::@1 main::@6 main::@2: scope:[main] from main::@1 main::@5 asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } [26] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 - [27] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [27] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 to:main::@3 main::@3: scope:[main] from main::@2 main::@3 [28] if(*((const nomodify byte*) RASTER)!=(byte) $42) goto main::@3 @@ -53,7 +53,7 @@ main::@5: scope:[main] from main::@4 main::@5 [32] (byte~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (byte~) main::$3 [33] *((const nomodify byte*) VIC_CONTROL) ← (byte~) main::$4 [34] (byte~) main::$5 ← (byte) main::rst#1 << (byte) 4 - [35] *((const nomodify byte*) BORDERCOL) ← (byte~) main::$5 + [35] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$5 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } [37] if((byte) main::rst#1!=(byte) $f2) goto main::@5 to:main::@2 diff --git a/src/test/ref/c64dtv-8bppchunkystretch.log b/src/test/ref/c64dtv-8bppchunkystretch.log index fd0e876da..62f71ed29 100644 --- a/src/test/ref/c64dtv-8bppchunkystretch.log +++ b/src/test/ref/c64dtv-8bppchunkystretch.log @@ -50,7 +50,7 @@ main::@2: scope:[main] from main::@1 main::@6 main::@3: scope:[main] from main::@2 asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(number) 3 - *((const nomodify byte*) BORDERCOL) ← (number) 0 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 (byte) main::rst#0 ← (byte) $42 to:main::@4 main::@4: scope:[main] from main::@3 main::@4 @@ -67,7 +67,7 @@ main::@6: scope:[main] from main::@5 main::@6 (number~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (number~) main::$3 *((const nomodify byte*) VIC_CONTROL) ← (number~) main::$4 (number~) main::$5 ← (byte) main::rst#1 * (number) $10 - *((const nomodify byte*) BORDERCOL) ← (number~) main::$5 + *((const nomodify byte*) BORDER_COLOR) ← (number~) main::$5 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } (bool~) main::$6 ← (byte) main::rst#1 != (number) $f2 if((bool~) main::$6) goto main::@6 @@ -159,7 +159,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify byte*) CHUNKY = (byte*)(number) $8000 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*)(number) $dd00 (const nomodify byte) DTV_BADLINE_OFF = (byte) $20 @@ -377,7 +377,7 @@ Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_ME Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← ((unumber)) (byte)(word)(const nomodify byte*) CHUNKY&(unumber)(number) $3fff/(number) $40|(unumber)>(word)(const nomodify byte*) CHUNKY&(number) $3fff/(number) 4 Adding number conversion cast (unumber) VIC_DEN|VIC_ECM|VIC_RSEL|3 in *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(number) 3 Adding number conversion cast (unumber) 3 in *((const nomodify byte*) VIC_CONTROL) ← ((unumber)) (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(number) 3 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 Adding number conversion cast (unumber) 7 in (number~) main::$3 ← (byte) main::rst#1 & (number) 7 Adding number conversion cast (unumber) main::$3 in (number~) main::$3 ← (byte) main::rst#1 & (unumber)(number) 7 Adding number conversion cast (unumber) main::$4 in (number~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (unumber~) main::$3 @@ -399,7 +399,7 @@ Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OF Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← (unumber)(unumber)(number) 3^(byte)(word)(const nomodify byte*) CHUNKY/(unumber)(number) $4000 Inlining cast *((const nomodify byte*) VIC_MEMORY) ← (unumber)(byte)(word)(const nomodify byte*) CHUNKY&(unumber)(number) $3fff/(unumber)(number) $40|(unumber)>(word)(const nomodify byte*) CHUNKY&(unumber)(number) $3fff/(unumber)(number) 4 Inlining cast *((const nomodify byte*) VIC_CONTROL) ← (unumber)(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(unumber)(number) 3 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 Inlining cast (byte*) gfx_init_chunky::gfxb#2 ← (byte*)(number) $4000 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 53266 @@ -656,7 +656,7 @@ main::@1: scope:[main] from main::@1 main::@6 main::@2: scope:[main] from main::@1 main::@5 asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } [26] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 - [27] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [27] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 to:main::@3 main::@3: scope:[main] from main::@2 main::@3 [28] if(*((const nomodify byte*) RASTER)!=(byte) $42) goto main::@3 @@ -670,7 +670,7 @@ main::@5: scope:[main] from main::@4 main::@5 [32] (byte~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (byte~) main::$3 [33] *((const nomodify byte*) VIC_CONTROL) ← (byte~) main::$4 [34] (byte~) main::$5 ← (byte) main::rst#1 << (byte) 4 - [35] *((const nomodify byte*) BORDERCOL) ← (byte~) main::$5 + [35] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$5 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } [37] if((byte) main::rst#1!=(byte) $f2) goto main::@5 to:main::@2 @@ -915,7 +915,7 @@ Target platform is c64basic / MOS6502X .const DTV_CHUNKY = $40 .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label VIC_CONTROL = $d011 .label VIC_CONTROL2 = $d016 .label VIC_MEMORY = $d018 @@ -1091,9 +1091,9 @@ main: { // [26] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 sta VIC_CONTROL - // [27] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [27] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR jmp __b3 // main::@3 __b3: @@ -1147,9 +1147,9 @@ main: { asl asl sta.z __5 - // [35] *((const nomodify byte*) BORDERCOL) ← (byte~) main::$5 -- _deref_pbuc1=vbuz1 + // [35] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$5 -- _deref_pbuc1=vbuz1 lda.z __5 - sta BORDERCOL + sta BORDER_COLOR // asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } nop nop @@ -1370,7 +1370,7 @@ Statement [19] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (byte) 3^ Statement [20] *((const nomodify byte*) VIC_MEMORY) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } always clobbers reg byte x Statement [26] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [27] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [27] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [28] if(*((const nomodify byte*) RASTER)!=(byte) $42) goto main::@3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [32] (byte~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (byte~) main::$3 [ main::rst#1 main::$4 ] ( main:2 [ main::rst#1 main::$4 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:10 [ main::rst#1 ] @@ -1402,7 +1402,7 @@ Statement [19] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (byte) 3^ Statement [20] *((const nomodify byte*) VIC_MEMORY) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } always clobbers reg byte x Statement [26] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [27] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [27] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [28] if(*((const nomodify byte*) RASTER)!=(byte) $42) goto main::@3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [31] (byte~) main::$3 ← (byte) main::rst#1 & (byte) 7 [ main::rst#1 main::$3 ] ( main:2 [ main::rst#1 main::$3 ] { } ) always clobbers reg byte a Statement [32] (byte~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (byte~) main::$3 [ main::rst#1 main::$4 ] ( main:2 [ main::rst#1 main::$4 ] { } ) always clobbers reg byte a @@ -1477,7 +1477,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const DTV_CHUNKY = $40 .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label VIC_CONTROL = $d011 .label VIC_CONTROL2 = $d016 .label VIC_MEMORY = $d018 @@ -1645,9 +1645,9 @@ main: { // [26] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 sta VIC_CONTROL - // [27] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [27] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR jmp __b3 // main::@3 __b3: @@ -1695,8 +1695,8 @@ main: { asl asl asl - // [35] *((const nomodify byte*) BORDERCOL) ← (byte~) main::$5 -- _deref_pbuc1=vbuaa - sta BORDERCOL + // [35] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$5 -- _deref_pbuc1=vbuaa + sta BORDER_COLOR // asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } nop nop @@ -1958,7 +1958,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) CHUNKY = (byte*) 32768 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*) 56576 (const nomodify byte) DTV_BADLINE_OFF = (byte) $20 @@ -2165,7 +2165,7 @@ Score: 19882 .const DTV_CHUNKY = $40 .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label VIC_CONTROL = $d011 .label VIC_CONTROL2 = $d016 .label VIC_MEMORY = $d018 @@ -2337,10 +2337,10 @@ main: { // [26] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 sta VIC_CONTROL - // *BORDERCOL = 0 - // [27] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 0 + // [27] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // main::@3 __b3: // while(*RASTER!=rst) @@ -2391,9 +2391,9 @@ main: { asl asl asl - // *BORDERCOL = rst*$10 - // [35] *((const nomodify byte*) BORDERCOL) ← (byte~) main::$5 -- _deref_pbuc1=vbuaa - sta BORDERCOL + // *BORDER_COLOR = rst*$10 + // [35] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$5 -- _deref_pbuc1=vbuaa + sta BORDER_COLOR // asm // asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } nop diff --git a/src/test/ref/c64dtv-8bppchunkystretch.sym b/src/test/ref/c64dtv-8bppchunkystretch.sym index 92b4c04de..afbc969ed 100644 --- a/src/test/ref/c64dtv-8bppchunkystretch.sym +++ b/src/test/ref/c64dtv-8bppchunkystretch.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) CHUNKY = (byte*) 32768 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*) 56576 (const nomodify byte) DTV_BADLINE_OFF = (byte) $20 diff --git a/src/test/ref/c64dtv-color.asm b/src/test/ref/c64dtv-color.asm index 67ff75942..edd1cf354 100644 --- a/src/test/ref/c64dtv-color.asm +++ b/src/test/ref/c64dtv-color.asm @@ -7,7 +7,7 @@ .const DTV_HIGHCOLOR = 4 .const DTV_BADLINE_OFF = $20 .label RASTER = $d012 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // Feature enables or disables the extra C64 DTV features .label DTV_FEATURE = $d03f // Controls the graphics modes of the C64 DTV @@ -28,10 +28,10 @@ main: { lda #$40 cmp RASTER bne __b1 - // *BGCOL = 0 + // *BG_COLOR = 0 // Create rasterbars lda #0 - sta BGCOL + sta BG_COLOR ldx #$31 __b3: // asm @@ -60,8 +60,8 @@ main: { nop nop nop - // (*BGCOL)++; - inc BGCOL + // (*BG_COLOR)++; + inc BG_COLOR // for (byte r : $31..$ff) inx cpx #0 diff --git a/src/test/ref/c64dtv-color.cfg b/src/test/ref/c64dtv-color.cfg index 8cffefe39..905ed5e9c 100644 --- a/src/test/ref/c64dtv-color.cfg +++ b/src/test/ref/c64dtv-color.cfg @@ -18,12 +18,12 @@ main::@1: scope:[main] from main main::@1 main::@4 [7] if(*((const nomodify byte*) RASTER)!=(byte) $40) goto main::@1 to:main::@2 main::@2: scope:[main] from main::@1 - [8] *((const nomodify byte*) BGCOL) ← (byte) 0 + [8] *((const nomodify byte*) BG_COLOR) ← (byte) 0 to:main::@3 main::@3: scope:[main] from main::@2 main::@3 [9] (byte) main::r#2 ← phi( main::@2/(byte) $31 main::@3/(byte) main::r#1 ) asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } - [11] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + [11] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) [12] (byte) main::r#1 ← ++ (byte) main::r#2 [13] if((byte) main::r#1!=(byte) 0) goto main::@3 to:main::@4 diff --git a/src/test/ref/c64dtv-color.log b/src/test/ref/c64dtv-color.log index fe1fef7b6..fee857041 100644 --- a/src/test/ref/c64dtv-color.log +++ b/src/test/ref/c64dtv-color.log @@ -18,13 +18,13 @@ main::@2: scope:[main] from main::@1 main::@2 if((bool~) main::$0) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@2 - *((const nomodify byte*) BGCOL) ← (number) 0 + *((const nomodify byte*) BG_COLOR) ← (number) 0 (byte) main::r#0 ← (byte) $31 to:main::@4 main::@4: scope:[main] from main::@3 main::@4 (byte) main::r#2 ← phi( main::@3/(byte) main::r#0 main::@4/(byte) main::r#1 ) asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } - *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) (byte) main::r#1 ← (byte) main::r#2 + rangenext($31,$ff) (bool~) main::$2 ← (byte) main::r#1 != rangelast($31,$ff) if((bool~) main::$2) goto main::@4 @@ -55,7 +55,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const nomodify byte) DTV_BADLINE_OFF = (byte) $20 (const nomodify byte) DTV_BORDER_OFF = (byte) 2 (const nomodify byte*) DTV_CONTROL = (byte*)(number) $d03c @@ -170,9 +170,9 @@ SYMBOL TABLE SSA (byte) main::r#2 Adding number conversion cast (unumber) $40 in (bool~) main::$0 ← *((const nomodify byte*) RASTER) != (number) $40 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BGCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BG_COLOR) ← (number) 0 Successful SSA optimization PassNAddNumberTypeConversions -Inlining cast *((const nomodify byte*) BGCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BG_COLOR) ← (unumber)(number) 0 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 53266 Simplifying constant pointer cast (byte*) 53281 @@ -263,12 +263,12 @@ main::@1: scope:[main] from main main::@1 main::@4 [7] if(*((const nomodify byte*) RASTER)!=(byte) $40) goto main::@1 to:main::@2 main::@2: scope:[main] from main::@1 - [8] *((const nomodify byte*) BGCOL) ← (byte) 0 + [8] *((const nomodify byte*) BG_COLOR) ← (byte) 0 to:main::@3 main::@3: scope:[main] from main::@2 main::@3 [9] (byte) main::r#2 ← phi( main::@2/(byte) $31 main::@3/(byte) main::r#1 ) asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } - [11] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + [11] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) [12] (byte) main::r#1 ← ++ (byte) main::r#2 [13] if((byte) main::r#1!=(byte) 0) goto main::@3 to:main::@4 @@ -397,7 +397,7 @@ Target platform is c64basic / MOS6502X .const DTV_HIGHCOLOR = 4 .const DTV_BADLINE_OFF = $20 .label RASTER = $d012 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // Feature enables or disables the extra C64 DTV features .label DTV_FEATURE = $d03f // Controls the graphics modes of the C64 DTV @@ -440,10 +440,10 @@ main: { jmp __b2 // main::@2 __b2: - // [8] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [8] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Create rasterbars lda #0 - sta BGCOL + sta BG_COLOR // [9] phi from main::@2 to main::@3 [phi:main::@2->main::@3] __b3_from___b2: // [9] phi (byte) main::r#2 = (byte) $31 [phi:main::@2->main::@3#0] -- vbuz1=vbuc1 @@ -482,8 +482,8 @@ main: { nop nop nop - // [11] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [11] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // [12] (byte) main::r#1 ← ++ (byte) main::r#2 -- vbuz1=_inc_vbuz1 inc.z r // [13] if((byte) main::r#1!=(byte) 0) goto main::@3 -- vbuz1_neq_0_then_la1 @@ -525,13 +525,13 @@ REGISTER UPLIFT POTENTIAL REGISTERS Statement [5] *((const nomodify byte*) DTV_FEATURE) ← (const nomodify byte) DTV_FEATURE_ENABLE [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [6] *((const nomodify byte*) DTV_CONTROL) ← (const nomodify byte) DTV_HIGHCOLOR|(const nomodify byte) DTV_BORDER_OFF|(const nomodify byte) DTV_BADLINE_OFF [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [7] if(*((const nomodify byte*) RASTER)!=(byte) $40) goto main::@1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [8] *((const nomodify byte*) BGCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [8] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [15] *((const nomodify byte*) DTV_PALETTE + (byte) main::c#2) ← *((const byte*) main::palette + (byte) main::c#2) [ main::c#2 ] ( main:2 [ main::c#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::c#2 main::c#1 ] Statement [5] *((const nomodify byte*) DTV_FEATURE) ← (const nomodify byte) DTV_FEATURE_ENABLE [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [6] *((const nomodify byte*) DTV_CONTROL) ← (const nomodify byte) DTV_HIGHCOLOR|(const nomodify byte) DTV_BORDER_OFF|(const nomodify byte) DTV_BADLINE_OFF [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [7] if(*((const nomodify byte*) RASTER)!=(byte) $40) goto main::@1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [8] *((const nomodify byte*) BGCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [8] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [15] *((const nomodify byte*) DTV_PALETTE + (byte) main::c#2) ← *((const byte*) main::palette + (byte) main::c#2) [ main::c#2 ] ( main:2 [ main::c#2 ] { } ) always clobbers reg byte a Potential registers zp[1]:2 [ main::r#2 main::r#1 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:3 [ main::c#2 main::c#1 ] : zp[1]:3 , reg byte x , reg byte y , @@ -562,7 +562,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const DTV_HIGHCOLOR = 4 .const DTV_BADLINE_OFF = $20 .label RASTER = $d012 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // Feature enables or disables the extra C64 DTV features .label DTV_FEATURE = $d03f // Controls the graphics modes of the C64 DTV @@ -603,10 +603,10 @@ main: { jmp __b2 // main::@2 __b2: - // [8] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [8] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Create rasterbars lda #0 - sta BGCOL + sta BG_COLOR // [9] phi from main::@2 to main::@3 [phi:main::@2->main::@3] __b3_from___b2: // [9] phi (byte) main::r#2 = (byte) $31 [phi:main::@2->main::@3#0] -- vbuxx=vbuc1 @@ -644,8 +644,8 @@ main: { nop nop nop - // [11] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [11] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // [12] (byte) main::r#1 ← ++ (byte) main::r#2 -- vbuxx=_inc_vbuxx inx // [13] if((byte) main::r#1!=(byte) 0) goto main::@3 -- vbuxx_neq_0_then_la1 @@ -712,7 +712,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) DTV_BADLINE_OFF = (byte) $20 (const nomodify byte) DTV_BORDER_OFF = (byte) 2 (const nomodify byte*) DTV_CONTROL = (byte*) 53308 @@ -837,7 +837,7 @@ Score: 10174 .const DTV_HIGHCOLOR = 4 .const DTV_BADLINE_OFF = $20 .label RASTER = $d012 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // Feature enables or disables the extra C64 DTV features .label DTV_FEATURE = $d03f // Controls the graphics modes of the C64 DTV @@ -871,11 +871,11 @@ main: { cmp RASTER bne __b1 // main::@2 - // *BGCOL = 0 - // [8] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 0 + // [8] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Create rasterbars lda #0 - sta BGCOL + sta BG_COLOR // [9] phi from main::@2 to main::@3 [phi:main::@2->main::@3] // [9] phi (byte) main::r#2 = (byte) $31 [phi:main::@2->main::@3#0] -- vbuxx=vbuc1 ldx #$31 @@ -910,9 +910,9 @@ main: { nop nop nop - // (*BGCOL)++; - // [11] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // (*BG_COLOR)++; + // [11] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // for (byte r : $31..$ff) // [12] (byte) main::r#1 ← ++ (byte) main::r#2 -- vbuxx=_inc_vbuxx inx diff --git a/src/test/ref/c64dtv-color.sym b/src/test/ref/c64dtv-color.sym index b28a8f7f4..ad34df2b7 100644 --- a/src/test/ref/c64dtv-color.sym +++ b/src/test/ref/c64dtv-color.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) DTV_BADLINE_OFF = (byte) $20 (const nomodify byte) DTV_BORDER_OFF = (byte) 2 (const nomodify byte*) DTV_CONTROL = (byte*) 53308 diff --git a/src/test/ref/c64dtv-gfxmodes.asm b/src/test/ref/c64dtv-gfxmodes.asm index d136005d4..584ffc217 100644 --- a/src/test/ref/c64dtv-gfxmodes.asm +++ b/src/test/ref/c64dtv-gfxmodes.asm @@ -48,12 +48,11 @@ .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 .label RASTER = $d012 - .label BORDERCOL = $d020 - .label BGCOL = $d021 - .label BGCOL1 = $d021 - .label BGCOL2 = $d022 - .label BGCOL3 = $d023 - .label BGCOL4 = $d024 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 + .label BG_COLOR1 = $d022 + .label BG_COLOR2 = $d023 + .label BG_COLOR3 = $d024 .label VIC_CONTROL = $d011 .label VIC_CONTROL2 = $d016 .label VIC_MEMORY = $d018 @@ -182,12 +181,12 @@ menu: { beq !__b3+ jmp __b3 !__b3: - // *BGCOL = 0 + // *BG_COLOR = 0 // Screen colors lda #0 - sta BGCOL - // *BORDERCOL = 0 - sta BORDERCOL + sta BG_COLOR + // *BORDER_COLOR = 0 + sta BORDER_COLOR // print_set_screen(SCREEN) // Display menu Text jsr print_set_screen @@ -382,9 +381,9 @@ mode_8bppchunkybmm: { sta DTV_PLANEB_MODULO_LO // *DTV_PLANEB_MODULO_HI = 0 sta DTV_PLANEB_MODULO_HI - // *BORDERCOL = $00 + // *BORDER_COLOR = $00 // Border color - sta BORDERCOL + sta BORDER_COLOR tax // DTV Palette - Grey Tones __b1: @@ -586,9 +585,9 @@ mode_ctrl: { // *DTV_CONTROL = ctrl txa sta DTV_CONTROL - // *BORDERCOL = ctrl + // *BORDER_COLOR = ctrl txa - sta BORDERCOL + sta BORDER_COLOR jmp __b1 } // Determines whether a specific key is currently pressed by accessing the matrix directly @@ -716,9 +715,9 @@ mode_8bpppixelcell: { sta DTV_PLANEB_MODULO_LO // *DTV_PLANEB_MODULO_HI = 0 sta DTV_PLANEB_MODULO_HI - // *BORDERCOL = $00 + // *BORDER_COLOR = $00 // Border color - sta BORDERCOL + sta BORDER_COLOR tax // DTV Palette - Grey Tones __b1: @@ -926,10 +925,10 @@ mode_sixsfred: { inx cpx #$10 bne __b1 - // *BORDERCOL = $00 + // *BORDER_COLOR = $00 // Screen colors lda #0 - sta BORDERCOL + sta BORDER_COLOR lda #COLORS @@ -1035,10 +1034,10 @@ mode_sixsfred: { // Resolution: 320x200 // Linear Adressing // GfxData/PlaneA Pixel Shifter (1), CharData/PlaneB Pixel Shifter (1): -// - Plane A = 0 Plane B = 0: 8bpp BgColor0[7:0] +// - Plane A = 0 Plane B = 0: 8bpp BG_COLORor0[7:0] // - Plane A = 0 Plane B = 1: 8bpp "0000" & ColorData[7:4] // - Plane A = 1 Plane B = 0: 8bpp "0000" & ColorData[3:0] -// - Plane A = 1 Plane B = 1: 8bpp BgColor1[7:0] +// - Plane A = 1 Plane B = 1: 8bpp BG_COLORor1[7:0] mode_twoplanebitmap: { .label PLANEA = $4000 .label PLANEB = $6000 @@ -1116,17 +1115,17 @@ mode_twoplanebitmap: { inx cpx #$10 bne __b1 - // *BORDERCOL = $00 + // *BORDER_COLOR = $00 // Screen colors lda #0 - sta BORDERCOL - // *BGCOL1 = $70 + sta BORDER_COLOR + // *BG_COLOR = $70 lda #$70 - sta BGCOL1 - // *BGCOL2 = $d4 + sta BG_COLOR + // *BG_COLOR1 = $d4 // Color for bits 00 lda #$d4 - sta BGCOL2 + sta BG_COLOR1 lda #COLORS @@ -1328,10 +1327,10 @@ mode_sixsfred2: { inx cpx #$10 bne __b1 - // *BORDERCOL = $00 + // *BORDER_COLOR = $00 // Screen colors lda #0 - sta BORDERCOL + sta BORDER_COLOR lda #COLORS @@ -1445,12 +1444,12 @@ mode_sixsfred2: { // Normal VIC Adressing: // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & CharData[7:0] & RowCounter[2:0] ) //GfxData Pixel Shifter (1) if ColorData[3:3] = 0: -// - 0: 8bpp BgColor0[7:0] +// - 0: 8bpp BG_COLORor0[7:0] // - 1: 8bpp ColorData[7:4] "0" & Color[2:0] //GfxData Pixel Shifter (2) if ColorData[3:3] = 1: -// - 00: 8bpp BgColor0[7:0] -// - 01: 8bpp BgColor1[7:0] -// - 10: 8bpp BgColor2[7:0] +// - 00: 8bpp BG_COLORor0[7:0] +// - 01: 8bpp BG_COLORor1[7:0] +// - 10: 8bpp BG_COLORor2[7:0] // - 11: 8bpp ColorData[7:4] "0" & Color[2:0] mode_hicolmcchar: { .label SCREEN = $8000 @@ -1506,19 +1505,19 @@ mode_hicolmcchar: { inx cpx #$10 bne __b1 - // *BORDERCOL = 0 + // *BORDER_COLOR = 0 // Screen colors lda #0 - sta BORDERCOL - // *BGCOL1 = $50 + sta BORDER_COLOR + // *BG_COLOR = $50 lda #$50 - sta BGCOL1 - // *BGCOL2 = $54 + sta BG_COLOR + // *BG_COLOR1 = $54 lda #$54 - sta BGCOL2 - // *BGCOL3 = $58 + sta BG_COLOR1 + // *BG_COLOR2 = $58 lda #$58 - sta BGCOL3 + sta BG_COLOR2 lda #SCREEN @@ -1584,10 +1583,10 @@ mode_hicolmcchar: { // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & "00" & CharData[5:0] & RowCounter[2:0] ) // GfxData Pixel Shifter (1) // - 0: 8bpp Background Color -// - CharData[7:6] 00: 8bpp BgColor0[7:0] -// - CharData[7:6] 01: 8bpp BgColor1[7:0] -// - CharData[7:6] 10: 8bpp BgColor2[7:0] -// - CharData[7:6] 11: 8bpp BgColor3[7:0] +// - CharData[7:6] 00: 8bpp BG_COLORor0[7:0] +// - CharData[7:6] 01: 8bpp BG_COLORor1[7:0] +// - CharData[7:6] 10: 8bpp BG_COLORor2[7:0] +// - CharData[7:6] 11: 8bpp BG_COLORor3[7:0] // - 1: 8bpp ColorData[7:0] mode_hicolecmchar: { .label SCREEN = $8000 @@ -1643,22 +1642,22 @@ mode_hicolecmchar: { inx cpx #$10 bne __b1 - // *BORDERCOL = 0 + // *BORDER_COLOR = 0 // Screen colors lda #0 - sta BORDERCOL - // *BGCOL1 = $50 + sta BORDER_COLOR + // *BG_COLOR = $50 lda #$50 - sta BGCOL1 - // *BGCOL2 = $54 + sta BG_COLOR + // *BG_COLOR1 = $54 lda #$54 - sta BGCOL2 - // *BGCOL3 = $58 + sta BG_COLOR1 + // *BG_COLOR2 = $58 lda #$58 - sta BGCOL3 - // *BGCOL4 = $5c + sta BG_COLOR2 + // *BG_COLOR3 = $5c lda #$5c - sta BGCOL4 + sta BG_COLOR3 lda #SCREEN @@ -1723,7 +1722,7 @@ mode_hicolecmchar: { // Normal VIC Adressing: // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & CharData[7:0] & RowCounter[2:0] ) // Pixel Shifter (1) -// - 0: 8bpp BgColor0[7:0] +// - 0: 8bpp BG_COLORor0[7:0] // - 1: 8bpp ColorData[7:0] mode_hicolstdchar: { .label SCREEN = $8000 @@ -1779,12 +1778,12 @@ mode_hicolstdchar: { inx cpx #$10 bne __b1 - // *BGCOL = 0 + // *BG_COLOR = 0 // Screen colors lda #0 - sta BGCOL - // *BORDERCOL = 0 - sta BORDERCOL + sta BG_COLOR + // *BORDER_COLOR = 0 + sta BORDER_COLOR lda #SCREEN @@ -1896,12 +1895,12 @@ mode_stdbitmap: { inx cpx #$10 bne __b1 - // *BGCOL = BLACK + // *BG_COLOR = BLACK // Screen colors lda #BLACK - sta BGCOL - // *BORDERCOL = BLACK - sta BORDERCOL + sta BG_COLOR + // *BORDER_COLOR = BLACK + sta BORDER_COLOR lda #SCREEN @@ -2430,12 +2429,12 @@ bitmap_init: { // Normal VIC Adressing: // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & CharData[7:0] & RowCounter[2:0] ) // GfxData Pixel Shifter (1) if ColorData[3:3] = 0: -// - 0: 4bpp BgColor0[3:0] +// - 0: 4bpp BG_COLORor0[3:0] // - 1: 4bpp ColorData[2:0] // GfxData Pixel Shifter (2) if ColorData[3:3] = 1: -// - 00: 4bpp BgColor0[3:0] -// - 01: 4bpp BgColor1[3:0] -// - 10: 4bpp BgColor2[3:0] +// - 00: 4bpp BG_COLORor0[3:0] +// - 01: 4bpp BG_COLORor1[3:0] +// - 10: 4bpp BG_COLORor2[3:0] // - 11: 4bpp ColorData[2:0]// Standard Character Mode (LINEAR/HICOL/CHUNK/COLDIS/ECM/MCM/BMM = 0) mode_mcchar: { .label SCREEN = $8000 @@ -2490,19 +2489,19 @@ mode_mcchar: { inx cpx #$10 bne __b1 - // *BORDERCOL = 0 + // *BORDER_COLOR = 0 // Screen colors lda #0 - sta BORDERCOL - // *BGCOL1 = BLACK + sta BORDER_COLOR + // *BG_COLOR = BLACK lda #BLACK - sta BGCOL1 - // *BGCOL2 = GREEN + sta BG_COLOR + // *BG_COLOR1 = GREEN lda #GREEN - sta BGCOL2 - // *BGCOL3 = BLUE + sta BG_COLOR1 + // *BG_COLOR2 = BLUE lda #BLUE - sta BGCOL3 + sta BG_COLOR2 lda #SCREEN @@ -2574,10 +2573,10 @@ mode_mcchar: { // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & "00" & CharData[5:0] & RowCounter[2:0] ) // GfxData Pixel Shifter (1) // - 0: 4bpp Background Color -// - CharData[7:6] 00: 4bpp BgColor0[3:0] -// - CharData[7:6] 01: 4bpp BgColor1[3:0] -// - CharData[7:6] 10: 4bpp BgColor2[3:0] -// - CharData[7:6] 11: 4bpp BgColor3[3:0] +// - CharData[7:6] 00: 4bpp BG_COLORor0[3:0] +// - CharData[7:6] 01: 4bpp BG_COLORor1[3:0] +// - CharData[7:6] 10: 4bpp BG_COLORor2[3:0] +// - CharData[7:6] 11: 4bpp BG_COLORor3[3:0] // - 1: 4bpp ColorData[3:0] mode_ecmchar: { .label SCREEN = $8000 @@ -2632,21 +2631,21 @@ mode_ecmchar: { inx cpx #$10 bne __b1 - // *BORDERCOL = 0 + // *BORDER_COLOR = 0 // Screen colors lda #0 - sta BORDERCOL - // *BGCOL1 = 0 - sta BGCOL1 - // *BGCOL2 = 2 + sta BORDER_COLOR + // *BG_COLOR = 0 + sta BG_COLOR + // *BG_COLOR1 = 2 lda #2 - sta BGCOL2 - // *BGCOL3 = 5 + sta BG_COLOR1 + // *BG_COLOR2 = 5 lda #5 - sta BGCOL3 - // *BGCOL4 = 6 + sta BG_COLOR2 + // *BG_COLOR3 = 6 lda #6 - sta BGCOL4 + sta BG_COLOR3 lda #SCREEN @@ -2717,7 +2716,7 @@ mode_ecmchar: { // Normal VIC Adressing: // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & CharData[7:0] & RowCounter[2:0] ) // Pixel Shifter (1) -// - 0: 4bpp BgColor0[3:0] +// - 0: 4bpp BG_COLORor0[3:0] // - 1: 4bpp ColorData[3:0] mode_stdchar: { .label SCREEN = $8000 @@ -2772,12 +2771,12 @@ mode_stdchar: { inx cpx #$10 bne __b1 - // *BGCOL = 0 + // *BG_COLOR = 0 // Screen colors lda #0 - sta BGCOL - // *BORDERCOL = 0 - sta BORDERCOL + sta BG_COLOR + // *BORDER_COLOR = 0 + sta BORDER_COLOR lda #SCREEN diff --git a/src/test/ref/c64dtv-gfxmodes.cfg b/src/test/ref/c64dtv-gfxmodes.cfg index 5cc9c7a4d..d186b4813 100644 --- a/src/test/ref/c64dtv-gfxmodes.cfg +++ b/src/test/ref/c64dtv-gfxmodes.cfg @@ -43,8 +43,8 @@ menu::@2: scope:[menu] from menu::@1 menu::@3 [24] if((byte*) menu::c#2!=(const nomodify byte*) COLS+(word) $3e8) goto menu::@3 to:menu::@4 menu::@4: scope:[menu] from menu::@2 - [25] *((const nomodify byte*) BGCOL) ← (byte) 0 - [26] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [25] *((const nomodify byte*) BG_COLOR) ← (byte) 0 + [26] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [27] call print_set_screen to:menu::@29 menu::@29: scope:[menu] from menu::@4 @@ -230,7 +230,7 @@ mode_8bppchunkybmm: scope:[mode_8bppchunkybmm] from menu::@28 [125] *((const nomodify byte*) DTV_PLANEB_STEP) ← (byte) 8 [126] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 [127] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 - [128] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [128] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 to:mode_8bppchunkybmm::@1 mode_8bppchunkybmm::@1: scope:[mode_8bppchunkybmm] from mode_8bppchunkybmm mode_8bppchunkybmm::@1 [129] (byte) mode_8bppchunkybmm::i#2 ← phi( mode_8bppchunkybmm/(byte) 0 mode_8bppchunkybmm::@1/(byte) mode_8bppchunkybmm::i#1 ) @@ -399,7 +399,7 @@ mode_ctrl::@11: scope:[mode_ctrl] from mode_ctrl::@26 mode_ctrl::@27 mode_ctrl::@18: scope:[mode_ctrl] from mode_ctrl::@11 [208] (byte) dtv_control#17 ← (byte) mode_ctrl::ctrl#14 [209] *((const nomodify byte*) DTV_CONTROL) ← (byte) mode_ctrl::ctrl#14 - [210] *((const nomodify byte*) BORDERCOL) ← (byte) mode_ctrl::ctrl#14 + [210] *((const nomodify byte*) BORDER_COLOR) ← (byte) mode_ctrl::ctrl#14 to:mode_ctrl::@1 (byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) @@ -455,7 +455,7 @@ mode_8bpppixelcell: scope:[mode_8bpppixelcell] from menu::@27 [239] *((const nomodify byte*) DTV_PLANEB_STEP) ← (byte) 0 [240] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 [241] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 - [242] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [242] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 to:mode_8bpppixelcell::@1 mode_8bpppixelcell::@1: scope:[mode_8bpppixelcell] from mode_8bpppixelcell mode_8bpppixelcell::@1 [243] (byte) mode_8bpppixelcell::i#2 ← phi( mode_8bpppixelcell/(byte) 0 mode_8bpppixelcell::@1/(byte) mode_8bpppixelcell::i#1 ) @@ -563,7 +563,7 @@ mode_sixsfred::@1: scope:[mode_sixsfred] from mode_sixsfred mode_sixsfred::@1 [302] if((byte) mode_sixsfred::i#1!=(byte) $10) goto mode_sixsfred::@1 to:mode_sixsfred::@2 mode_sixsfred::@2: scope:[mode_sixsfred] from mode_sixsfred::@1 - [303] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [303] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 to:mode_sixsfred::@3 mode_sixsfred::@3: scope:[mode_sixsfred] from mode_sixsfred::@2 mode_sixsfred::@5 [304] (byte*) mode_sixsfred::col#3 ← phi( mode_sixsfred::@2/(const nomodify byte*) mode_sixsfred::COLORS mode_sixsfred::@5/(byte*) mode_sixsfred::col#1 ) @@ -652,9 +652,9 @@ mode_twoplanebitmap::@1: scope:[mode_twoplanebitmap] from mode_twoplanebitmap m [355] if((byte) mode_twoplanebitmap::i#1!=(byte) $10) goto mode_twoplanebitmap::@1 to:mode_twoplanebitmap::@2 mode_twoplanebitmap::@2: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@1 - [356] *((const nomodify byte*) BORDERCOL) ← (byte) 0 - [357] *((const nomodify byte*) BGCOL1) ← (byte) $70 - [358] *((const nomodify byte*) BGCOL2) ← (byte) $d4 + [356] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 + [357] *((const nomodify byte*) BG_COLOR) ← (byte) $70 + [358] *((const nomodify byte*) BG_COLOR1) ← (byte) $d4 to:mode_twoplanebitmap::@3 mode_twoplanebitmap::@3: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@2 mode_twoplanebitmap::@5 [359] (byte*) mode_twoplanebitmap::col#3 ← phi( mode_twoplanebitmap::@2/(const nomodify byte*) mode_twoplanebitmap::COLORS mode_twoplanebitmap::@5/(byte*) mode_twoplanebitmap::col#1 ) @@ -754,7 +754,7 @@ mode_sixsfred2::@1: scope:[mode_sixsfred2] from mode_sixsfred2 mode_sixsfred2:: [415] if((byte) mode_sixsfred2::i#1!=(byte) $10) goto mode_sixsfred2::@1 to:mode_sixsfred2::@2 mode_sixsfred2::@2: scope:[mode_sixsfred2] from mode_sixsfred2::@1 - [416] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [416] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 to:mode_sixsfred2::@3 mode_sixsfred2::@3: scope:[mode_sixsfred2] from mode_sixsfred2::@2 mode_sixsfred2::@5 [417] (byte*) mode_sixsfred2::col#3 ← phi( mode_sixsfred2::@2/(const nomodify byte*) mode_sixsfred2::COLORS mode_sixsfred2::@5/(byte*) mode_sixsfred2::col#1 ) @@ -837,10 +837,10 @@ mode_hicolmcchar::@1: scope:[mode_hicolmcchar] from mode_hicolmcchar mode_hicol [462] if((byte) mode_hicolmcchar::i#1!=(byte) $10) goto mode_hicolmcchar::@1 to:mode_hicolmcchar::@2 mode_hicolmcchar::@2: scope:[mode_hicolmcchar] from mode_hicolmcchar::@1 - [463] *((const nomodify byte*) BORDERCOL) ← (byte) 0 - [464] *((const nomodify byte*) BGCOL1) ← (byte) $50 - [465] *((const nomodify byte*) BGCOL2) ← (byte) $54 - [466] *((const nomodify byte*) BGCOL3) ← (byte) $58 + [463] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 + [464] *((const nomodify byte*) BG_COLOR) ← (byte) $50 + [465] *((const nomodify byte*) BG_COLOR1) ← (byte) $54 + [466] *((const nomodify byte*) BG_COLOR2) ← (byte) $58 to:mode_hicolmcchar::@3 mode_hicolmcchar::@3: scope:[mode_hicolmcchar] from mode_hicolmcchar::@2 mode_hicolmcchar::@5 [467] (byte*) mode_hicolmcchar::ch#3 ← phi( mode_hicolmcchar::@2/(const nomodify byte*) mode_hicolmcchar::SCREEN mode_hicolmcchar::@5/(byte*) mode_hicolmcchar::ch#1 ) @@ -893,11 +893,11 @@ mode_hicolecmchar::@1: scope:[mode_hicolecmchar] from mode_hicolecmchar mode_hi [496] if((byte) mode_hicolecmchar::i#1!=(byte) $10) goto mode_hicolecmchar::@1 to:mode_hicolecmchar::@2 mode_hicolecmchar::@2: scope:[mode_hicolecmchar] from mode_hicolecmchar::@1 - [497] *((const nomodify byte*) BORDERCOL) ← (byte) 0 - [498] *((const nomodify byte*) BGCOL1) ← (byte) $50 - [499] *((const nomodify byte*) BGCOL2) ← (byte) $54 - [500] *((const nomodify byte*) BGCOL3) ← (byte) $58 - [501] *((const nomodify byte*) BGCOL4) ← (byte) $5c + [497] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 + [498] *((const nomodify byte*) BG_COLOR) ← (byte) $50 + [499] *((const nomodify byte*) BG_COLOR1) ← (byte) $54 + [500] *((const nomodify byte*) BG_COLOR2) ← (byte) $58 + [501] *((const nomodify byte*) BG_COLOR3) ← (byte) $5c to:mode_hicolecmchar::@3 mode_hicolecmchar::@3: scope:[mode_hicolecmchar] from mode_hicolecmchar::@2 mode_hicolecmchar::@5 [502] (byte*) mode_hicolecmchar::ch#3 ← phi( mode_hicolecmchar::@2/(const nomodify byte*) mode_hicolecmchar::SCREEN mode_hicolecmchar::@5/(byte*) mode_hicolecmchar::ch#1 ) @@ -950,8 +950,8 @@ mode_hicolstdchar::@1: scope:[mode_hicolstdchar] from mode_hicolstdchar mode_hi [531] if((byte) mode_hicolstdchar::i#1!=(byte) $10) goto mode_hicolstdchar::@1 to:mode_hicolstdchar::@2 mode_hicolstdchar::@2: scope:[mode_hicolstdchar] from mode_hicolstdchar::@1 - [532] *((const nomodify byte*) BGCOL) ← (byte) 0 - [533] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [532] *((const nomodify byte*) BG_COLOR) ← (byte) 0 + [533] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 to:mode_hicolstdchar::@3 mode_hicolstdchar::@3: scope:[mode_hicolstdchar] from mode_hicolstdchar::@2 mode_hicolstdchar::@5 [534] (byte*) mode_hicolstdchar::ch#3 ← phi( mode_hicolstdchar::@2/(const nomodify byte*) mode_hicolstdchar::SCREEN mode_hicolstdchar::@5/(byte*) mode_hicolstdchar::ch#1 ) @@ -1002,8 +1002,8 @@ mode_stdbitmap::@1: scope:[mode_stdbitmap] from mode_stdbitmap mode_stdbitmap:: [561] if((byte) mode_stdbitmap::i#1!=(byte) $10) goto mode_stdbitmap::@1 to:mode_stdbitmap::@2 mode_stdbitmap::@2: scope:[mode_stdbitmap] from mode_stdbitmap::@1 - [562] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK - [563] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [562] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK + [563] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK to:mode_stdbitmap::@3 mode_stdbitmap::@3: scope:[mode_stdbitmap] from mode_stdbitmap::@2 mode_stdbitmap::@5 [564] (byte*) mode_stdbitmap::ch#3 ← phi( mode_stdbitmap::@2/(const nomodify byte*) mode_stdbitmap::SCREEN mode_stdbitmap::@5/(byte*) mode_stdbitmap::ch#1 ) @@ -1399,10 +1399,10 @@ mode_mcchar::@1: scope:[mode_mcchar] from mode_mcchar mode_mcchar::@1 [769] if((byte) mode_mcchar::i#1!=(byte) $10) goto mode_mcchar::@1 to:mode_mcchar::@2 mode_mcchar::@2: scope:[mode_mcchar] from mode_mcchar::@1 - [770] *((const nomodify byte*) BORDERCOL) ← (byte) 0 - [771] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK - [772] *((const nomodify byte*) BGCOL2) ← (const nomodify byte) GREEN - [773] *((const nomodify byte*) BGCOL3) ← (const nomodify byte) BLUE + [770] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 + [771] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK + [772] *((const nomodify byte*) BG_COLOR1) ← (const nomodify byte) GREEN + [773] *((const nomodify byte*) BG_COLOR2) ← (const nomodify byte) BLUE to:mode_mcchar::@3 mode_mcchar::@3: scope:[mode_mcchar] from mode_mcchar::@2 mode_mcchar::@5 [774] (byte*) mode_mcchar::ch#3 ← phi( mode_mcchar::@2/(const nomodify byte*) mode_mcchar::SCREEN mode_mcchar::@5/(byte*) mode_mcchar::ch#1 ) @@ -1457,11 +1457,11 @@ mode_ecmchar::@1: scope:[mode_ecmchar] from mode_ecmchar mode_ecmchar::@1 [805] if((byte) mode_ecmchar::i#1!=(byte) $10) goto mode_ecmchar::@1 to:mode_ecmchar::@2 mode_ecmchar::@2: scope:[mode_ecmchar] from mode_ecmchar::@1 - [806] *((const nomodify byte*) BORDERCOL) ← (byte) 0 - [807] *((const nomodify byte*) BGCOL1) ← (byte) 0 - [808] *((const nomodify byte*) BGCOL2) ← (byte) 2 - [809] *((const nomodify byte*) BGCOL3) ← (byte) 5 - [810] *((const nomodify byte*) BGCOL4) ← (byte) 6 + [806] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 + [807] *((const nomodify byte*) BG_COLOR) ← (byte) 0 + [808] *((const nomodify byte*) BG_COLOR1) ← (byte) 2 + [809] *((const nomodify byte*) BG_COLOR2) ← (byte) 5 + [810] *((const nomodify byte*) BG_COLOR3) ← (byte) 6 to:mode_ecmchar::@3 mode_ecmchar::@3: scope:[mode_ecmchar] from mode_ecmchar::@2 mode_ecmchar::@5 [811] (byte*) mode_ecmchar::ch#3 ← phi( mode_ecmchar::@2/(const nomodify byte*) mode_ecmchar::SCREEN mode_ecmchar::@5/(byte*) mode_ecmchar::ch#1 ) @@ -1516,8 +1516,8 @@ mode_stdchar::@1: scope:[mode_stdchar] from mode_stdchar mode_stdchar::@1 [842] if((byte) mode_stdchar::i#1!=(byte) $10) goto mode_stdchar::@1 to:mode_stdchar::@2 mode_stdchar::@2: scope:[mode_stdchar] from mode_stdchar::@1 - [843] *((const nomodify byte*) BGCOL) ← (byte) 0 - [844] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [843] *((const nomodify byte*) BG_COLOR) ← (byte) 0 + [844] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 to:mode_stdchar::@3 mode_stdchar::@3: scope:[mode_stdchar] from mode_stdchar::@2 mode_stdchar::@5 [845] (byte*) mode_stdchar::ch#3 ← phi( mode_stdchar::@2/(const nomodify byte*) mode_stdchar::SCREEN mode_stdchar::@5/(byte*) mode_stdchar::ch#1 ) diff --git a/src/test/ref/c64dtv-gfxmodes.log b/src/test/ref/c64dtv-gfxmodes.log index 81193f19d..10112ba92 100644 --- a/src/test/ref/c64dtv-gfxmodes.log +++ b/src/test/ref/c64dtv-gfxmodes.log @@ -909,8 +909,8 @@ menu::@5: scope:[menu] from menu::@3 (byte*) print_char_cursor#41 ← phi( menu::@3/(byte*) print_char_cursor#60 ) (byte*) print_line_cursor#35 ← phi( menu::@3/(byte*) print_line_cursor#53 ) (byte*) print_screen#18 ← phi( menu::@3/(byte*) print_screen#34 ) - *((const nomodify byte*) BGCOL) ← (number) 0 - *((const nomodify byte*) BORDERCOL) ← (number) 0 + *((const nomodify byte*) BG_COLOR) ← (number) 0 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 (byte*) print_set_screen::screen#0 ← (const nomodify byte*) menu::SCREEN call print_set_screen to:menu::@31 @@ -1570,7 +1570,7 @@ mode_ctrl::@19: scope:[mode_ctrl] from mode_ctrl::@11 (byte) mode_ctrl::ctrl#15 ← phi( mode_ctrl::@11/(byte) mode_ctrl::ctrl#14 ) (byte) dtv_control#17 ← (byte) mode_ctrl::ctrl#15 *((const nomodify byte*) DTV_CONTROL) ← (byte) mode_ctrl::ctrl#15 - *((const nomodify byte*) BORDERCOL) ← (byte) mode_ctrl::ctrl#15 + *((const nomodify byte*) BORDER_COLOR) ← (byte) mode_ctrl::ctrl#15 to:mode_ctrl::@1 (void()) mode_stdchar() @@ -1597,8 +1597,8 @@ mode_stdchar::@1: scope:[mode_stdchar] from mode_stdchar mode_stdchar::@1 to:mode_stdchar::@2 mode_stdchar::@2: scope:[mode_stdchar] from mode_stdchar::@1 (byte) dtv_control#206 ← phi( mode_stdchar::@1/(byte) dtv_control#222 ) - *((const nomodify byte*) BGCOL) ← (number) 0 - *((const nomodify byte*) BORDERCOL) ← (number) 0 + *((const nomodify byte*) BG_COLOR) ← (number) 0 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 (byte*) mode_stdchar::col#0 ← (const nomodify byte*) mode_stdchar::COLORS (byte*) mode_stdchar::ch#0 ← (const nomodify byte*) mode_stdchar::SCREEN (byte) mode_stdchar::cy#0 ← (byte) 0 @@ -1677,11 +1677,11 @@ mode_ecmchar::@1: scope:[mode_ecmchar] from mode_ecmchar mode_ecmchar::@1 to:mode_ecmchar::@2 mode_ecmchar::@2: scope:[mode_ecmchar] from mode_ecmchar::@1 (byte) dtv_control#207 ← phi( mode_ecmchar::@1/(byte) dtv_control#223 ) - *((const nomodify byte*) BORDERCOL) ← (number) 0 - *((const nomodify byte*) BGCOL1) ← (number) 0 - *((const nomodify byte*) BGCOL2) ← (number) 2 - *((const nomodify byte*) BGCOL3) ← (number) 5 - *((const nomodify byte*) BGCOL4) ← (number) 6 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 + *((const nomodify byte*) BG_COLOR) ← (number) 0 + *((const nomodify byte*) BG_COLOR1) ← (number) 2 + *((const nomodify byte*) BG_COLOR2) ← (number) 5 + *((const nomodify byte*) BG_COLOR3) ← (number) 6 (byte*) mode_ecmchar::col#0 ← (const nomodify byte*) mode_ecmchar::COLORS (byte*) mode_ecmchar::ch#0 ← (const nomodify byte*) mode_ecmchar::SCREEN (byte) mode_ecmchar::cy#0 ← (byte) 0 @@ -1760,10 +1760,10 @@ mode_mcchar::@1: scope:[mode_mcchar] from mode_mcchar mode_mcchar::@1 to:mode_mcchar::@2 mode_mcchar::@2: scope:[mode_mcchar] from mode_mcchar::@1 (byte) dtv_control#208 ← phi( mode_mcchar::@1/(byte) dtv_control#224 ) - *((const nomodify byte*) BORDERCOL) ← (number) 0 - *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK - *((const nomodify byte*) BGCOL2) ← (const nomodify byte) GREEN - *((const nomodify byte*) BGCOL3) ← (const nomodify byte) BLUE + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR1) ← (const nomodify byte) GREEN + *((const nomodify byte*) BG_COLOR2) ← (const nomodify byte) BLUE (byte*) mode_mcchar::col#0 ← (const nomodify byte*) mode_mcchar::COLORS (byte*) mode_mcchar::ch#0 ← (const nomodify byte*) mode_mcchar::SCREEN (byte) mode_mcchar::cy#0 ← (byte) 0 @@ -1840,8 +1840,8 @@ mode_stdbitmap::@1: scope:[mode_stdbitmap] from mode_stdbitmap mode_stdbitmap:: to:mode_stdbitmap::@2 mode_stdbitmap::@2: scope:[mode_stdbitmap] from mode_stdbitmap::@1 (byte) dtv_control#257 ← phi( mode_stdbitmap::@1/(byte) dtv_control#264 ) - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK (byte*) mode_stdbitmap::ch#0 ← (const nomodify byte*) mode_stdbitmap::SCREEN (byte) mode_stdbitmap::cy#0 ← (byte) 0 to:mode_stdbitmap::@3 @@ -1950,8 +1950,8 @@ mode_hicolstdchar::@1: scope:[mode_hicolstdchar] from mode_hicolstdchar mode_hi to:mode_hicolstdchar::@2 mode_hicolstdchar::@2: scope:[mode_hicolstdchar] from mode_hicolstdchar::@1 (byte) dtv_control#210 ← phi( mode_hicolstdchar::@1/(byte) dtv_control#226 ) - *((const nomodify byte*) BGCOL) ← (number) 0 - *((const nomodify byte*) BORDERCOL) ← (number) 0 + *((const nomodify byte*) BG_COLOR) ← (number) 0 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 (byte*) mode_hicolstdchar::col#0 ← (const nomodify byte*) mode_hicolstdchar::COLORS (byte*) mode_hicolstdchar::ch#0 ← (const nomodify byte*) mode_hicolstdchar::SCREEN (byte) mode_hicolstdchar::cy#0 ← (byte) 0 @@ -2029,11 +2029,11 @@ mode_hicolecmchar::@1: scope:[mode_hicolecmchar] from mode_hicolecmchar mode_hi to:mode_hicolecmchar::@2 mode_hicolecmchar::@2: scope:[mode_hicolecmchar] from mode_hicolecmchar::@1 (byte) dtv_control#211 ← phi( mode_hicolecmchar::@1/(byte) dtv_control#227 ) - *((const nomodify byte*) BORDERCOL) ← (number) 0 - *((const nomodify byte*) BGCOL1) ← (number) $50 - *((const nomodify byte*) BGCOL2) ← (number) $54 - *((const nomodify byte*) BGCOL3) ← (number) $58 - *((const nomodify byte*) BGCOL4) ← (number) $5c + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 + *((const nomodify byte*) BG_COLOR) ← (number) $50 + *((const nomodify byte*) BG_COLOR1) ← (number) $54 + *((const nomodify byte*) BG_COLOR2) ← (number) $58 + *((const nomodify byte*) BG_COLOR3) ← (number) $5c (byte*) mode_hicolecmchar::col#0 ← (const nomodify byte*) mode_hicolecmchar::COLORS (byte*) mode_hicolecmchar::ch#0 ← (const nomodify byte*) mode_hicolecmchar::SCREEN (byte) mode_hicolecmchar::cy#0 ← (byte) 0 @@ -2111,10 +2111,10 @@ mode_hicolmcchar::@1: scope:[mode_hicolmcchar] from mode_hicolmcchar mode_hicol to:mode_hicolmcchar::@2 mode_hicolmcchar::@2: scope:[mode_hicolmcchar] from mode_hicolmcchar::@1 (byte) dtv_control#212 ← phi( mode_hicolmcchar::@1/(byte) dtv_control#228 ) - *((const nomodify byte*) BORDERCOL) ← (number) 0 - *((const nomodify byte*) BGCOL1) ← (number) $50 - *((const nomodify byte*) BGCOL2) ← (number) $54 - *((const nomodify byte*) BGCOL3) ← (number) $58 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 + *((const nomodify byte*) BG_COLOR) ← (number) $50 + *((const nomodify byte*) BG_COLOR1) ← (number) $54 + *((const nomodify byte*) BG_COLOR2) ← (number) $58 (byte*) mode_hicolmcchar::col#0 ← (const nomodify byte*) mode_hicolmcchar::COLORS (byte*) mode_hicolmcchar::ch#0 ← (const nomodify byte*) mode_hicolmcchar::SCREEN (byte) mode_hicolmcchar::cy#0 ← (byte) 0 @@ -2200,9 +2200,9 @@ mode_twoplanebitmap::@1: scope:[mode_twoplanebitmap] from mode_twoplanebitmap m to:mode_twoplanebitmap::@2 mode_twoplanebitmap::@2: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@1 (byte) dtv_control#289 ← phi( mode_twoplanebitmap::@1/(byte) dtv_control#290 ) - *((const nomodify byte*) BORDERCOL) ← (number) 0 - *((const nomodify byte*) BGCOL1) ← (number) $70 - *((const nomodify byte*) BGCOL2) ← (number) $d4 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 + *((const nomodify byte*) BG_COLOR) ← (number) $70 + *((const nomodify byte*) BG_COLOR1) ← (number) $d4 (byte*) mode_twoplanebitmap::col#0 ← (const nomodify byte*) mode_twoplanebitmap::COLORS (byte) mode_twoplanebitmap::cy#0 ← (byte) 0 to:mode_twoplanebitmap::@3 @@ -2364,7 +2364,7 @@ mode_sixsfred::@1: scope:[mode_sixsfred] from mode_sixsfred mode_sixsfred::@1 to:mode_sixsfred::@2 mode_sixsfred::@2: scope:[mode_sixsfred] from mode_sixsfred::@1 (byte) dtv_control#283 ← phi( mode_sixsfred::@1/(byte) dtv_control#287 ) - *((const nomodify byte*) BORDERCOL) ← (number) 0 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 (byte*) mode_sixsfred::col#0 ← (const nomodify byte*) mode_sixsfred::COLORS (byte) mode_sixsfred::cy#0 ← (byte) 0 to:mode_sixsfred::@3 @@ -2504,7 +2504,7 @@ mode_sixsfred2::@1: scope:[mode_sixsfred2] from mode_sixsfred2 mode_sixsfred2:: to:mode_sixsfred2::@2 mode_sixsfred2::@2: scope:[mode_sixsfred2] from mode_sixsfred2::@1 (byte) dtv_control#284 ← phi( mode_sixsfred2::@1/(byte) dtv_control#288 ) - *((const nomodify byte*) BORDERCOL) ← (number) 0 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 (byte*) mode_sixsfred2::col#0 ← (const nomodify byte*) mode_sixsfred2::COLORS (byte) mode_sixsfred2::cy#0 ← (byte) 0 to:mode_sixsfred2::@3 @@ -2632,7 +2632,7 @@ mode_8bpppixelcell: scope:[mode_8bpppixelcell] from menu::@29 *((const nomodify byte*) DTV_PLANEB_STEP) ← (number) 0 *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (number) 0 *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (number) 0 - *((const nomodify byte*) BORDERCOL) ← (number) 0 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 (byte) mode_8bpppixelcell::i#0 ← (byte) 0 to:mode_8bpppixelcell::@1 mode_8bpppixelcell::@1: scope:[mode_8bpppixelcell] from mode_8bpppixelcell mode_8bpppixelcell::@1 @@ -2797,7 +2797,7 @@ mode_8bppchunkybmm: scope:[mode_8bppchunkybmm] from menu::@30 *((const nomodify byte*) DTV_PLANEB_STEP) ← (number) 8 *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (number) 0 *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (number) 0 - *((const nomodify byte*) BORDERCOL) ← (number) 0 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 (byte) mode_8bppchunkybmm::i#0 ← (byte) 0 to:mode_8bppchunkybmm::@1 mode_8bppchunkybmm::@1: scope:[mode_8bppchunkybmm] from mode_8bppchunkybmm mode_8bppchunkybmm::@1 @@ -2921,14 +2921,13 @@ SYMBOL TABLE SSA (label) @4 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 -(const nomodify byte*) BGCOL1 = (byte*)(number) $d021 -(const nomodify byte*) BGCOL2 = (byte*)(number) $d022 -(const nomodify byte*) BGCOL3 = (byte*)(number) $d023 -(const nomodify byte*) BGCOL4 = (byte*)(number) $d024 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR1 = (byte*)(number) $d022 +(const nomodify byte*) BG_COLOR2 = (byte*)(number) $d023 +(const nomodify byte*) BG_COLOR3 = (byte*)(number) $d024 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte) BLUE = (byte) 6 -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*)(number) $dc00 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*)(number) $dd00 (const nomodify byte*) COLS = (byte*)(number) $d800 @@ -5389,8 +5388,8 @@ Adding number conversion cast (unumber) 3 in *((const nomodify byte*) VIC_CONTRO Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) menu::SCREEN&(number) $3fff/(number) $40|(word)(const nomodify byte*) menu::CHARSET&(number) $3fff/(number) $400 Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) menu::SCREEN&(unumber)(number) $3fff/(number) $40|(word)(const nomodify byte*) menu::CHARSET&(number) $3fff/(number) $400 Adding number conversion cast (unumber) $3e8 in (bool~) menu::$4 ← (byte*) menu::c#2 != (const nomodify byte*) COLS+(number) $3e8 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BGCOL) ← (number) 0 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BG_COLOR) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 Adding number conversion cast (unumber) 0 in (bool~) menu::$6 ← (byte~) menu::$5 != (number) 0 Adding number conversion cast (unumber) 0 in (bool~) menu::$10 ← (byte~) menu::$9 != (number) 0 Adding number conversion cast (unumber) 0 in (bool~) menu::$14 ← (byte~) menu::$13 != (number) 0 @@ -5426,8 +5425,8 @@ Adding number conversion cast (unumber) VIC_DEN|VIC_RSEL|3 in *((const nomodify Adding number conversion cast (unumber) 3 in *((const nomodify byte*) VIC_CONTROL) ← ((unumber)) (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(number) 3 Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_stdchar::SCREEN&(number) $3fff/(number) $40|(word)(const nomodify byte*) mode_stdchar::CHARSET&(number) $3fff/(number) $400 Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_stdchar::SCREEN&(unumber)(number) $3fff/(number) $40|(word)(const nomodify byte*) mode_stdchar::CHARSET&(number) $3fff/(number) $400 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BGCOL) ← (number) 0 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BG_COLOR) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 Adding number conversion cast (unumber) $f in (number~) mode_stdchar::$3 ← (byte~) mode_stdchar::$2 & (number) $f Adding number conversion cast (unumber) mode_stdchar::$3 in (number~) mode_stdchar::$3 ← (byte~) mode_stdchar::$2 & (unumber)(number) $f Adding number conversion cast (unumber) $f in (number~) mode_stdchar::$4 ← (byte) mode_stdchar::cy#2 & (number) $f @@ -5450,11 +5449,11 @@ Adding number conversion cast (unumber) VIC_DEN|VIC_RSEL|VIC_ECM|3 in *((const n Adding number conversion cast (unumber) 3 in *((const nomodify byte*) VIC_CONTROL) ← ((unumber)) (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(const nomodify byte) VIC_ECM|(number) 3 Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_ecmchar::SCREEN&(number) $3fff/(number) $40|(word)(const nomodify byte*) mode_ecmchar::CHARSET&(number) $3fff/(number) $400 Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_ecmchar::SCREEN&(unumber)(number) $3fff/(number) $40|(word)(const nomodify byte*) mode_ecmchar::CHARSET&(number) $3fff/(number) $400 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BGCOL1) ← (number) 0 -Adding number conversion cast (unumber) 2 in *((const nomodify byte*) BGCOL2) ← (number) 2 -Adding number conversion cast (unumber) 5 in *((const nomodify byte*) BGCOL3) ← (number) 5 -Adding number conversion cast (unumber) 6 in *((const nomodify byte*) BGCOL4) ← (number) 6 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BG_COLOR) ← (number) 0 +Adding number conversion cast (unumber) 2 in *((const nomodify byte*) BG_COLOR1) ← (number) 2 +Adding number conversion cast (unumber) 5 in *((const nomodify byte*) BG_COLOR2) ← (number) 5 +Adding number conversion cast (unumber) 6 in *((const nomodify byte*) BG_COLOR3) ← (number) 6 Adding number conversion cast (unumber) $f in (number~) mode_ecmchar::$3 ← (byte~) mode_ecmchar::$2 & (number) $f Adding number conversion cast (unumber) mode_ecmchar::$3 in (number~) mode_ecmchar::$3 ← (byte~) mode_ecmchar::$2 & (unumber)(number) $f Adding number conversion cast (unumber) $f in (number~) mode_ecmchar::$4 ← (byte) mode_ecmchar::cy#2 & (number) $f @@ -5477,7 +5476,7 @@ Adding number conversion cast (unumber) VIC_DEN|VIC_RSEL|3 in *((const nomodify Adding number conversion cast (unumber) 3 in *((const nomodify byte*) VIC_CONTROL) ← ((unumber)) (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(number) 3 Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_mcchar::SCREEN&(number) $3fff/(number) $40|(word)(const nomodify byte*) mode_mcchar::CHARSET&(number) $3fff/(number) $400 Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_mcchar::SCREEN&(unumber)(number) $3fff/(number) $40|(word)(const nomodify byte*) mode_mcchar::CHARSET&(number) $3fff/(number) $400 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 Adding number conversion cast (unumber) $f in (number~) mode_mcchar::$3 ← (byte~) mode_mcchar::$2 & (number) $f Adding number conversion cast (unumber) mode_mcchar::$3 in (number~) mode_mcchar::$3 ← (byte~) mode_mcchar::$2 & (unumber)(number) $f Adding number conversion cast (unumber) $f in (number~) mode_mcchar::$4 ← (byte) mode_mcchar::cy#2 & (number) $f @@ -5520,8 +5519,8 @@ Adding number conversion cast (unumber) VIC_DEN|VIC_RSEL|3 in *((const nomodify Adding number conversion cast (unumber) 3 in *((const nomodify byte*) VIC_CONTROL) ← ((unumber)) (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(number) 3 Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_hicolstdchar::SCREEN&(number) $3fff/(number) $40|(word)(const nomodify byte*) mode_hicolstdchar::CHARSET&(number) $3fff/(number) $400 Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_hicolstdchar::SCREEN&(unumber)(number) $3fff/(number) $40|(word)(const nomodify byte*) mode_hicolstdchar::CHARSET&(number) $3fff/(number) $400 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BGCOL) ← (number) 0 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BG_COLOR) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 Adding number conversion cast (unumber) $f in (number~) mode_hicolstdchar::$2 ← (byte) mode_hicolstdchar::cy#2 & (number) $f Adding number conversion cast (unumber) mode_hicolstdchar::$2 in (number~) mode_hicolstdchar::$2 ← (byte) mode_hicolstdchar::cy#2 & (unumber)(number) $f Adding number conversion cast (unumber) $10 in (number~) mode_hicolstdchar::$3 ← (unumber~) mode_hicolstdchar::$2 * (number) $10 @@ -5540,11 +5539,11 @@ Adding number conversion cast (unumber) VIC_DEN|VIC_RSEL|VIC_ECM|3 in *((const n Adding number conversion cast (unumber) 3 in *((const nomodify byte*) VIC_CONTROL) ← ((unumber)) (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(const nomodify byte) VIC_ECM|(number) 3 Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_hicolecmchar::SCREEN&(number) $3fff/(number) $40|(word)(const nomodify byte*) mode_hicolecmchar::CHARSET&(number) $3fff/(number) $400 Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_hicolecmchar::SCREEN&(unumber)(number) $3fff/(number) $40|(word)(const nomodify byte*) mode_hicolecmchar::CHARSET&(number) $3fff/(number) $400 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 -Adding number conversion cast (unumber) $50 in *((const nomodify byte*) BGCOL1) ← (number) $50 -Adding number conversion cast (unumber) $54 in *((const nomodify byte*) BGCOL2) ← (number) $54 -Adding number conversion cast (unumber) $58 in *((const nomodify byte*) BGCOL3) ← (number) $58 -Adding number conversion cast (unumber) $5c in *((const nomodify byte*) BGCOL4) ← (number) $5c +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 +Adding number conversion cast (unumber) $50 in *((const nomodify byte*) BG_COLOR) ← (number) $50 +Adding number conversion cast (unumber) $54 in *((const nomodify byte*) BG_COLOR1) ← (number) $54 +Adding number conversion cast (unumber) $58 in *((const nomodify byte*) BG_COLOR2) ← (number) $58 +Adding number conversion cast (unumber) $5c in *((const nomodify byte*) BG_COLOR3) ← (number) $5c Adding number conversion cast (unumber) $f in (number~) mode_hicolecmchar::$2 ← (byte) mode_hicolecmchar::cy#2 & (number) $f Adding number conversion cast (unumber) mode_hicolecmchar::$2 in (number~) mode_hicolecmchar::$2 ← (byte) mode_hicolecmchar::cy#2 & (unumber)(number) $f Adding number conversion cast (unumber) $10 in (number~) mode_hicolecmchar::$3 ← (unumber~) mode_hicolecmchar::$2 * (number) $10 @@ -5563,10 +5562,10 @@ Adding number conversion cast (unumber) VIC_DEN|VIC_RSEL|3 in *((const nomodify Adding number conversion cast (unumber) 3 in *((const nomodify byte*) VIC_CONTROL) ← ((unumber)) (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(number) 3 Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_hicolmcchar::SCREEN&(number) $3fff/(number) $40|(word)(const nomodify byte*) mode_hicolmcchar::CHARSET&(number) $3fff/(number) $400 Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_hicolmcchar::SCREEN&(unumber)(number) $3fff/(number) $40|(word)(const nomodify byte*) mode_hicolmcchar::CHARSET&(number) $3fff/(number) $400 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 -Adding number conversion cast (unumber) $50 in *((const nomodify byte*) BGCOL1) ← (number) $50 -Adding number conversion cast (unumber) $54 in *((const nomodify byte*) BGCOL2) ← (number) $54 -Adding number conversion cast (unumber) $58 in *((const nomodify byte*) BGCOL3) ← (number) $58 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 +Adding number conversion cast (unumber) $50 in *((const nomodify byte*) BG_COLOR) ← (number) $50 +Adding number conversion cast (unumber) $54 in *((const nomodify byte*) BG_COLOR1) ← (number) $54 +Adding number conversion cast (unumber) $58 in *((const nomodify byte*) BG_COLOR2) ← (number) $58 Adding number conversion cast (unumber) $f in (number~) mode_hicolmcchar::$2 ← (byte) mode_hicolmcchar::cy#2 & (number) $f Adding number conversion cast (unumber) mode_hicolmcchar::$2 in (number~) mode_hicolmcchar::$2 ← (byte) mode_hicolmcchar::cy#2 & (unumber)(number) $f Adding number conversion cast (unumber) $10 in (number~) mode_hicolmcchar::$3 ← (unumber~) mode_hicolmcchar::$2 * (number) $10 @@ -5586,9 +5585,9 @@ Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEB Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (number) 0 Adding number conversion cast (unumber) $400 in *((const nomodify byte*) DTV_COLOR_BANK_LO) ← <(const nomodify byte*) mode_twoplanebitmap::COLORS/(number) $400 Adding number conversion cast (unumber) $400 in *((const nomodify byte*) DTV_COLOR_BANK_HI) ← >(const nomodify byte*) mode_twoplanebitmap::COLORS/(number) $400 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 -Adding number conversion cast (unumber) $70 in *((const nomodify byte*) BGCOL1) ← (number) $70 -Adding number conversion cast (unumber) $d4 in *((const nomodify byte*) BGCOL2) ← (number) $d4 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 +Adding number conversion cast (unumber) $70 in *((const nomodify byte*) BG_COLOR) ← (number) $70 +Adding number conversion cast (unumber) $d4 in *((const nomodify byte*) BG_COLOR1) ← (number) $d4 Adding number conversion cast (unumber) $f in (number~) mode_twoplanebitmap::$2 ← (byte) mode_twoplanebitmap::cy#2 & (number) $f Adding number conversion cast (unumber) mode_twoplanebitmap::$2 in (number~) mode_twoplanebitmap::$2 ← (byte) mode_twoplanebitmap::cy#2 & (unumber)(number) $f Adding number conversion cast (unumber) $10 in (number~) mode_twoplanebitmap::$3 ← (unumber~) mode_twoplanebitmap::$2 * (number) $10 @@ -5614,7 +5613,7 @@ Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEB Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (number) 0 Adding number conversion cast (unumber) $400 in *((const nomodify byte*) DTV_COLOR_BANK_LO) ← <(const nomodify byte*) mode_sixsfred::COLORS/(number) $400 Adding number conversion cast (unumber) $400 in *((const nomodify byte*) DTV_COLOR_BANK_HI) ← >(const nomodify byte*) mode_sixsfred::COLORS/(number) $400 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 Adding number conversion cast (unumber) $f in (number~) mode_sixsfred::$3 ← (byte~) mode_sixsfred::$2 & (number) $f Adding number conversion cast (unumber) mode_sixsfred::$3 in (number~) mode_sixsfred::$3 ← (byte~) mode_sixsfred::$2 & (unumber)(number) $f Adding number conversion cast (unumber) 2 in (number~) mode_sixsfred::$6 ← (byte) mode_sixsfred::ay#2 / (number) 2 @@ -5634,7 +5633,7 @@ Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEB Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (number) 0 Adding number conversion cast (unumber) $400 in *((const nomodify byte*) DTV_COLOR_BANK_LO) ← <(const nomodify byte*) mode_sixsfred2::COLORS/(number) $400 Adding number conversion cast (unumber) $400 in *((const nomodify byte*) DTV_COLOR_BANK_HI) ← >(const nomodify byte*) mode_sixsfred2::COLORS/(number) $400 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 Adding number conversion cast (unumber) 3 in (number~) mode_sixsfred2::$2 ← (byte) mode_sixsfred2::cx#2 & (number) 3 Adding number conversion cast (unumber) mode_sixsfred2::$2 in (number~) mode_sixsfred2::$2 ← (byte) mode_sixsfred2::cx#2 & (unumber)(number) 3 Adding number conversion cast (unumber) $10 in (number~) mode_sixsfred2::$3 ← (unumber~) mode_sixsfred2::$2 * (number) $10 @@ -5657,7 +5656,7 @@ Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEB Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEB_STEP) ← (number) 0 Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (number) 0 Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (number) 0 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 Adding number conversion cast (unumber) $f in (number~) mode_8bpppixelcell::$2 ← (byte) mode_8bpppixelcell::ay#2 & (number) $f Adding number conversion cast (unumber) mode_8bpppixelcell::$2 in (number~) mode_8bpppixelcell::$2 ← (byte) mode_8bpppixelcell::ay#2 & (unumber)(number) $f Adding number conversion cast (unumber) $10 in (number~) mode_8bpppixelcell::$3 ← (unumber~) mode_8bpppixelcell::$2 * (number) $10 @@ -5675,7 +5674,7 @@ Adding number conversion cast (unumber) 3 in *((const nomodify byte*) VIC_CONTRO Adding number conversion cast (unumber) 8 in *((const nomodify byte*) DTV_PLANEB_STEP) ← (number) 8 Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (number) 0 Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (number) 0 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 Adding number conversion cast (unumber) $4000 in (byte) mode_8bppchunkybmm::gfxbCpuBank#0 ← (byte)(const nomodify dword) mode_8bppchunkybmm::PLANEB/(number) $4000 Adding number conversion cast (unumber) $8000 in (bool~) mode_8bppchunkybmm::$4 ← (byte*) mode_8bppchunkybmm::gfxb#3 == (number) $8000 Successful SSA optimization PassNAddNumberTypeConversions @@ -5705,32 +5704,32 @@ Inlining cast *((const nomodify byte*) DTV_CONTROL) ← (unumber)(number) 0 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (unumber)(number) 3 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← (unumber)(unumber)(number) 3^(byte)(word)(const nomodify byte*) menu::CHARSET/(unumber)(number) $4000 Inlining cast *((const nomodify byte*) VIC_CONTROL) ← (unumber)(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(unumber)(number) 3 -Inlining cast *((const nomodify byte*) BGCOL) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BG_COLOR) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 Inlining cast (byte) mode_ctrl::ctrl#7 ← (unumber)(number) 0 Inlining cast (byte) dtv_control#18 ← (unumber)(number) 0 Inlining cast *((const nomodify byte*) DTV_CONTROL) ← (unumber)(number) 0 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (unumber)(number) 3 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← (unumber)(unumber)(number) 3^(byte)(word)(const nomodify byte*) mode_stdchar::CHARSET/(unumber)(number) $4000 Inlining cast *((const nomodify byte*) VIC_CONTROL) ← (unumber)(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(unumber)(number) 3 -Inlining cast *((const nomodify byte*) BGCOL) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BG_COLOR) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 Inlining cast (byte) dtv_control#21 ← (unumber)(number) 0 Inlining cast *((const nomodify byte*) DTV_CONTROL) ← (unumber)(number) 0 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (unumber)(number) 3 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← (unumber)(unumber)(number) 3^(byte)(word)(const nomodify byte*) mode_ecmchar::CHARSET/(unumber)(number) $4000 Inlining cast *((const nomodify byte*) VIC_CONTROL) ← (unumber)(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(const nomodify byte) VIC_ECM|(unumber)(number) 3 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BGCOL1) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BGCOL2) ← (unumber)(number) 2 -Inlining cast *((const nomodify byte*) BGCOL3) ← (unumber)(number) 5 -Inlining cast *((const nomodify byte*) BGCOL4) ← (unumber)(number) 6 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BG_COLOR) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BG_COLOR1) ← (unumber)(number) 2 +Inlining cast *((const nomodify byte*) BG_COLOR2) ← (unumber)(number) 5 +Inlining cast *((const nomodify byte*) BG_COLOR3) ← (unumber)(number) 6 Inlining cast (byte) dtv_control#24 ← (unumber)(number) 0 Inlining cast *((const nomodify byte*) DTV_CONTROL) ← (unumber)(number) 0 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (unumber)(number) 3 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← (unumber)(unumber)(number) 3^(byte)(word)(const nomodify byte*) mode_mcchar::CHARSET/(unumber)(number) $4000 Inlining cast *((const nomodify byte*) VIC_CONTROL) ← (unumber)(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(unumber)(number) 3 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 Inlining cast (byte) dtv_control#27 ← (unumber)(number) 0 Inlining cast *((const nomodify byte*) DTV_CONTROL) ← (unumber)(number) 0 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (unumber)(number) 3 @@ -5739,23 +5738,23 @@ Inlining cast *((const nomodify byte*) VIC_CONTROL) ← (unumber)(const nomodify Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (unumber)(number) 3 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← (unumber)(unumber)(number) 3^(byte)(word)(const nomodify byte*) mode_hicolstdchar::CHARSET/(unumber)(number) $4000 Inlining cast *((const nomodify byte*) VIC_CONTROL) ← (unumber)(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(unumber)(number) 3 -Inlining cast *((const nomodify byte*) BGCOL) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BG_COLOR) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (unumber)(number) 3 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← (unumber)(unumber)(number) 3^(byte)(word)(const nomodify byte*) mode_hicolecmchar::CHARSET/(unumber)(number) $4000 Inlining cast *((const nomodify byte*) VIC_CONTROL) ← (unumber)(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(const nomodify byte) VIC_ECM|(unumber)(number) 3 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BGCOL1) ← (unumber)(number) $50 -Inlining cast *((const nomodify byte*) BGCOL2) ← (unumber)(number) $54 -Inlining cast *((const nomodify byte*) BGCOL3) ← (unumber)(number) $58 -Inlining cast *((const nomodify byte*) BGCOL4) ← (unumber)(number) $5c +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BG_COLOR) ← (unumber)(number) $50 +Inlining cast *((const nomodify byte*) BG_COLOR1) ← (unumber)(number) $54 +Inlining cast *((const nomodify byte*) BG_COLOR2) ← (unumber)(number) $58 +Inlining cast *((const nomodify byte*) BG_COLOR3) ← (unumber)(number) $5c Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (unumber)(number) 3 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← (unumber)(unumber)(number) 3^(byte)(word)(const nomodify byte*) mode_hicolmcchar::CHARSET/(unumber)(number) $4000 Inlining cast *((const nomodify byte*) VIC_CONTROL) ← (unumber)(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(unumber)(number) 3 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BGCOL1) ← (unumber)(number) $50 -Inlining cast *((const nomodify byte*) BGCOL2) ← (unumber)(number) $54 -Inlining cast *((const nomodify byte*) BGCOL3) ← (unumber)(number) $58 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BG_COLOR) ← (unumber)(number) $50 +Inlining cast *((const nomodify byte*) BG_COLOR1) ← (unumber)(number) $54 +Inlining cast *((const nomodify byte*) BG_COLOR2) ← (unumber)(number) $58 Inlining cast *((const nomodify byte*) VIC_CONTROL) ← (unumber)(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(unumber)(number) 3 Inlining cast *((const nomodify byte*) DTV_PLANEA_START_HI) ← (unumber)(number) 0 Inlining cast *((const nomodify byte*) DTV_PLANEA_STEP) ← (unumber)(number) 1 @@ -5765,9 +5764,9 @@ Inlining cast *((const nomodify byte*) DTV_PLANEB_START_HI) ← (unumber)(number Inlining cast *((const nomodify byte*) DTV_PLANEB_STEP) ← (unumber)(number) 1 Inlining cast *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (unumber)(number) 0 Inlining cast *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BGCOL1) ← (unumber)(number) $70 -Inlining cast *((const nomodify byte*) BGCOL2) ← (unumber)(number) $d4 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BG_COLOR) ← (unumber)(number) $70 +Inlining cast *((const nomodify byte*) BG_COLOR1) ← (unumber)(number) $d4 Inlining cast *((byte*) mode_twoplanebitmap::gfxa#3) ← (unumber)(number) 0 Inlining cast *((byte*) mode_twoplanebitmap::gfxa#4) ← (unumber)(number) $ff Inlining cast *((byte*) mode_twoplanebitmap::gfxb#2) ← (unumber)(number) $f @@ -5780,7 +5779,7 @@ Inlining cast *((const nomodify byte*) DTV_PLANEB_START_HI) ← (unumber)(number Inlining cast *((const nomodify byte*) DTV_PLANEB_STEP) ← (unumber)(number) 1 Inlining cast *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (unumber)(number) 0 Inlining cast *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 Inlining cast *((byte*) mode_sixsfred::gfxb#2) ← (unumber)(number) $1b Inlining cast *((const nomodify byte*) VIC_CONTROL) ← (unumber)(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_BMM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(unumber)(number) 3 Inlining cast *((const nomodify byte*) DTV_PLANEA_START_HI) ← (unumber)(number) 0 @@ -5791,7 +5790,7 @@ Inlining cast *((const nomodify byte*) DTV_PLANEB_START_HI) ← (unumber)(number Inlining cast *((const nomodify byte*) DTV_PLANEB_STEP) ← (unumber)(number) 1 Inlining cast *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (unumber)(number) 0 Inlining cast *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 Inlining cast *((byte*) mode_sixsfred2::gfxb#2) ← (unumber)(number) $1b Inlining cast *((const nomodify byte*) VIC_CONTROL) ← (unumber)(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(unumber)(number) 3 Inlining cast *((const nomodify byte*) DTV_PLANEA_START_HI) ← (unumber)(number) 0 @@ -5802,18 +5801,17 @@ Inlining cast *((const nomodify byte*) DTV_PLANEB_START_HI) ← (unumber)(number Inlining cast *((const nomodify byte*) DTV_PLANEB_STEP) ← (unumber)(number) 0 Inlining cast *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (unumber)(number) 0 Inlining cast *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 Inlining cast *((const nomodify byte*) VIC_CONTROL) ← (unumber)(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(unumber)(number) 3 Inlining cast *((const nomodify byte*) DTV_PLANEB_STEP) ← (unumber)(number) 8 Inlining cast *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (unumber)(number) 0 Inlining cast *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 Inlining cast (byte*) mode_8bppchunkybmm::gfxb#2 ← (byte*)(number) $4000 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 53266 Simplifying constant pointer cast (byte*) 53280 Simplifying constant pointer cast (byte*) 53281 -Simplifying constant pointer cast (byte*) 53281 Simplifying constant pointer cast (byte*) 53282 Simplifying constant pointer cast (byte*) 53283 Simplifying constant pointer cast (byte*) 53284 @@ -8810,8 +8808,8 @@ menu::@2: scope:[menu] from menu::@1 menu::@3 [24] if((byte*) menu::c#2!=(const nomodify byte*) COLS+(word) $3e8) goto menu::@3 to:menu::@4 menu::@4: scope:[menu] from menu::@2 - [25] *((const nomodify byte*) BGCOL) ← (byte) 0 - [26] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [25] *((const nomodify byte*) BG_COLOR) ← (byte) 0 + [26] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [27] call print_set_screen to:menu::@29 menu::@29: scope:[menu] from menu::@4 @@ -8997,7 +8995,7 @@ mode_8bppchunkybmm: scope:[mode_8bppchunkybmm] from menu::@28 [125] *((const nomodify byte*) DTV_PLANEB_STEP) ← (byte) 8 [126] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 [127] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 - [128] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [128] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 to:mode_8bppchunkybmm::@1 mode_8bppchunkybmm::@1: scope:[mode_8bppchunkybmm] from mode_8bppchunkybmm mode_8bppchunkybmm::@1 [129] (byte) mode_8bppchunkybmm::i#2 ← phi( mode_8bppchunkybmm/(byte) 0 mode_8bppchunkybmm::@1/(byte) mode_8bppchunkybmm::i#1 ) @@ -9166,7 +9164,7 @@ mode_ctrl::@11: scope:[mode_ctrl] from mode_ctrl::@26 mode_ctrl::@27 mode_ctrl::@18: scope:[mode_ctrl] from mode_ctrl::@11 [208] (byte) dtv_control#17 ← (byte) mode_ctrl::ctrl#14 [209] *((const nomodify byte*) DTV_CONTROL) ← (byte) mode_ctrl::ctrl#14 - [210] *((const nomodify byte*) BORDERCOL) ← (byte) mode_ctrl::ctrl#14 + [210] *((const nomodify byte*) BORDER_COLOR) ← (byte) mode_ctrl::ctrl#14 to:mode_ctrl::@1 (byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) @@ -9222,7 +9220,7 @@ mode_8bpppixelcell: scope:[mode_8bpppixelcell] from menu::@27 [239] *((const nomodify byte*) DTV_PLANEB_STEP) ← (byte) 0 [240] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 [241] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 - [242] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [242] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 to:mode_8bpppixelcell::@1 mode_8bpppixelcell::@1: scope:[mode_8bpppixelcell] from mode_8bpppixelcell mode_8bpppixelcell::@1 [243] (byte) mode_8bpppixelcell::i#2 ← phi( mode_8bpppixelcell/(byte) 0 mode_8bpppixelcell::@1/(byte) mode_8bpppixelcell::i#1 ) @@ -9330,7 +9328,7 @@ mode_sixsfred::@1: scope:[mode_sixsfred] from mode_sixsfred mode_sixsfred::@1 [302] if((byte) mode_sixsfred::i#1!=(byte) $10) goto mode_sixsfred::@1 to:mode_sixsfred::@2 mode_sixsfred::@2: scope:[mode_sixsfred] from mode_sixsfred::@1 - [303] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [303] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 to:mode_sixsfred::@3 mode_sixsfred::@3: scope:[mode_sixsfred] from mode_sixsfred::@2 mode_sixsfred::@5 [304] (byte*) mode_sixsfred::col#3 ← phi( mode_sixsfred::@2/(const nomodify byte*) mode_sixsfred::COLORS mode_sixsfred::@5/(byte*) mode_sixsfred::col#1 ) @@ -9419,9 +9417,9 @@ mode_twoplanebitmap::@1: scope:[mode_twoplanebitmap] from mode_twoplanebitmap m [355] if((byte) mode_twoplanebitmap::i#1!=(byte) $10) goto mode_twoplanebitmap::@1 to:mode_twoplanebitmap::@2 mode_twoplanebitmap::@2: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@1 - [356] *((const nomodify byte*) BORDERCOL) ← (byte) 0 - [357] *((const nomodify byte*) BGCOL1) ← (byte) $70 - [358] *((const nomodify byte*) BGCOL2) ← (byte) $d4 + [356] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 + [357] *((const nomodify byte*) BG_COLOR) ← (byte) $70 + [358] *((const nomodify byte*) BG_COLOR1) ← (byte) $d4 to:mode_twoplanebitmap::@3 mode_twoplanebitmap::@3: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@2 mode_twoplanebitmap::@5 [359] (byte*) mode_twoplanebitmap::col#3 ← phi( mode_twoplanebitmap::@2/(const nomodify byte*) mode_twoplanebitmap::COLORS mode_twoplanebitmap::@5/(byte*) mode_twoplanebitmap::col#1 ) @@ -9521,7 +9519,7 @@ mode_sixsfred2::@1: scope:[mode_sixsfred2] from mode_sixsfred2 mode_sixsfred2:: [415] if((byte) mode_sixsfred2::i#1!=(byte) $10) goto mode_sixsfred2::@1 to:mode_sixsfred2::@2 mode_sixsfred2::@2: scope:[mode_sixsfred2] from mode_sixsfred2::@1 - [416] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [416] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 to:mode_sixsfred2::@3 mode_sixsfred2::@3: scope:[mode_sixsfred2] from mode_sixsfred2::@2 mode_sixsfred2::@5 [417] (byte*) mode_sixsfred2::col#3 ← phi( mode_sixsfred2::@2/(const nomodify byte*) mode_sixsfred2::COLORS mode_sixsfred2::@5/(byte*) mode_sixsfred2::col#1 ) @@ -9604,10 +9602,10 @@ mode_hicolmcchar::@1: scope:[mode_hicolmcchar] from mode_hicolmcchar mode_hicol [462] if((byte) mode_hicolmcchar::i#1!=(byte) $10) goto mode_hicolmcchar::@1 to:mode_hicolmcchar::@2 mode_hicolmcchar::@2: scope:[mode_hicolmcchar] from mode_hicolmcchar::@1 - [463] *((const nomodify byte*) BORDERCOL) ← (byte) 0 - [464] *((const nomodify byte*) BGCOL1) ← (byte) $50 - [465] *((const nomodify byte*) BGCOL2) ← (byte) $54 - [466] *((const nomodify byte*) BGCOL3) ← (byte) $58 + [463] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 + [464] *((const nomodify byte*) BG_COLOR) ← (byte) $50 + [465] *((const nomodify byte*) BG_COLOR1) ← (byte) $54 + [466] *((const nomodify byte*) BG_COLOR2) ← (byte) $58 to:mode_hicolmcchar::@3 mode_hicolmcchar::@3: scope:[mode_hicolmcchar] from mode_hicolmcchar::@2 mode_hicolmcchar::@5 [467] (byte*) mode_hicolmcchar::ch#3 ← phi( mode_hicolmcchar::@2/(const nomodify byte*) mode_hicolmcchar::SCREEN mode_hicolmcchar::@5/(byte*) mode_hicolmcchar::ch#1 ) @@ -9660,11 +9658,11 @@ mode_hicolecmchar::@1: scope:[mode_hicolecmchar] from mode_hicolecmchar mode_hi [496] if((byte) mode_hicolecmchar::i#1!=(byte) $10) goto mode_hicolecmchar::@1 to:mode_hicolecmchar::@2 mode_hicolecmchar::@2: scope:[mode_hicolecmchar] from mode_hicolecmchar::@1 - [497] *((const nomodify byte*) BORDERCOL) ← (byte) 0 - [498] *((const nomodify byte*) BGCOL1) ← (byte) $50 - [499] *((const nomodify byte*) BGCOL2) ← (byte) $54 - [500] *((const nomodify byte*) BGCOL3) ← (byte) $58 - [501] *((const nomodify byte*) BGCOL4) ← (byte) $5c + [497] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 + [498] *((const nomodify byte*) BG_COLOR) ← (byte) $50 + [499] *((const nomodify byte*) BG_COLOR1) ← (byte) $54 + [500] *((const nomodify byte*) BG_COLOR2) ← (byte) $58 + [501] *((const nomodify byte*) BG_COLOR3) ← (byte) $5c to:mode_hicolecmchar::@3 mode_hicolecmchar::@3: scope:[mode_hicolecmchar] from mode_hicolecmchar::@2 mode_hicolecmchar::@5 [502] (byte*) mode_hicolecmchar::ch#3 ← phi( mode_hicolecmchar::@2/(const nomodify byte*) mode_hicolecmchar::SCREEN mode_hicolecmchar::@5/(byte*) mode_hicolecmchar::ch#1 ) @@ -9717,8 +9715,8 @@ mode_hicolstdchar::@1: scope:[mode_hicolstdchar] from mode_hicolstdchar mode_hi [531] if((byte) mode_hicolstdchar::i#1!=(byte) $10) goto mode_hicolstdchar::@1 to:mode_hicolstdchar::@2 mode_hicolstdchar::@2: scope:[mode_hicolstdchar] from mode_hicolstdchar::@1 - [532] *((const nomodify byte*) BGCOL) ← (byte) 0 - [533] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [532] *((const nomodify byte*) BG_COLOR) ← (byte) 0 + [533] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 to:mode_hicolstdchar::@3 mode_hicolstdchar::@3: scope:[mode_hicolstdchar] from mode_hicolstdchar::@2 mode_hicolstdchar::@5 [534] (byte*) mode_hicolstdchar::ch#3 ← phi( mode_hicolstdchar::@2/(const nomodify byte*) mode_hicolstdchar::SCREEN mode_hicolstdchar::@5/(byte*) mode_hicolstdchar::ch#1 ) @@ -9769,8 +9767,8 @@ mode_stdbitmap::@1: scope:[mode_stdbitmap] from mode_stdbitmap mode_stdbitmap:: [561] if((byte) mode_stdbitmap::i#1!=(byte) $10) goto mode_stdbitmap::@1 to:mode_stdbitmap::@2 mode_stdbitmap::@2: scope:[mode_stdbitmap] from mode_stdbitmap::@1 - [562] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK - [563] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [562] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK + [563] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK to:mode_stdbitmap::@3 mode_stdbitmap::@3: scope:[mode_stdbitmap] from mode_stdbitmap::@2 mode_stdbitmap::@5 [564] (byte*) mode_stdbitmap::ch#3 ← phi( mode_stdbitmap::@2/(const nomodify byte*) mode_stdbitmap::SCREEN mode_stdbitmap::@5/(byte*) mode_stdbitmap::ch#1 ) @@ -10166,10 +10164,10 @@ mode_mcchar::@1: scope:[mode_mcchar] from mode_mcchar mode_mcchar::@1 [769] if((byte) mode_mcchar::i#1!=(byte) $10) goto mode_mcchar::@1 to:mode_mcchar::@2 mode_mcchar::@2: scope:[mode_mcchar] from mode_mcchar::@1 - [770] *((const nomodify byte*) BORDERCOL) ← (byte) 0 - [771] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK - [772] *((const nomodify byte*) BGCOL2) ← (const nomodify byte) GREEN - [773] *((const nomodify byte*) BGCOL3) ← (const nomodify byte) BLUE + [770] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 + [771] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK + [772] *((const nomodify byte*) BG_COLOR1) ← (const nomodify byte) GREEN + [773] *((const nomodify byte*) BG_COLOR2) ← (const nomodify byte) BLUE to:mode_mcchar::@3 mode_mcchar::@3: scope:[mode_mcchar] from mode_mcchar::@2 mode_mcchar::@5 [774] (byte*) mode_mcchar::ch#3 ← phi( mode_mcchar::@2/(const nomodify byte*) mode_mcchar::SCREEN mode_mcchar::@5/(byte*) mode_mcchar::ch#1 ) @@ -10224,11 +10222,11 @@ mode_ecmchar::@1: scope:[mode_ecmchar] from mode_ecmchar mode_ecmchar::@1 [805] if((byte) mode_ecmchar::i#1!=(byte) $10) goto mode_ecmchar::@1 to:mode_ecmchar::@2 mode_ecmchar::@2: scope:[mode_ecmchar] from mode_ecmchar::@1 - [806] *((const nomodify byte*) BORDERCOL) ← (byte) 0 - [807] *((const nomodify byte*) BGCOL1) ← (byte) 0 - [808] *((const nomodify byte*) BGCOL2) ← (byte) 2 - [809] *((const nomodify byte*) BGCOL3) ← (byte) 5 - [810] *((const nomodify byte*) BGCOL4) ← (byte) 6 + [806] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 + [807] *((const nomodify byte*) BG_COLOR) ← (byte) 0 + [808] *((const nomodify byte*) BG_COLOR1) ← (byte) 2 + [809] *((const nomodify byte*) BG_COLOR2) ← (byte) 5 + [810] *((const nomodify byte*) BG_COLOR3) ← (byte) 6 to:mode_ecmchar::@3 mode_ecmchar::@3: scope:[mode_ecmchar] from mode_ecmchar::@2 mode_ecmchar::@5 [811] (byte*) mode_ecmchar::ch#3 ← phi( mode_ecmchar::@2/(const nomodify byte*) mode_ecmchar::SCREEN mode_ecmchar::@5/(byte*) mode_ecmchar::ch#1 ) @@ -10283,8 +10281,8 @@ mode_stdchar::@1: scope:[mode_stdchar] from mode_stdchar mode_stdchar::@1 [842] if((byte) mode_stdchar::i#1!=(byte) $10) goto mode_stdchar::@1 to:mode_stdchar::@2 mode_stdchar::@2: scope:[mode_stdchar] from mode_stdchar::@1 - [843] *((const nomodify byte*) BGCOL) ← (byte) 0 - [844] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [843] *((const nomodify byte*) BG_COLOR) ← (byte) 0 + [844] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 to:mode_stdchar::@3 mode_stdchar::@3: scope:[mode_stdchar] from mode_stdchar::@2 mode_stdchar::@5 [845] (byte*) mode_stdchar::ch#3 ← phi( mode_stdchar::@2/(const nomodify byte*) mode_stdchar::SCREEN mode_stdchar::@5/(byte*) mode_stdchar::ch#1 ) @@ -12037,12 +12035,11 @@ Target platform is c64basic / MOS6502X .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 .label RASTER = $d012 - .label BORDERCOL = $d020 - .label BGCOL = $d021 - .label BGCOL1 = $d021 - .label BGCOL2 = $d022 - .label BGCOL3 = $d023 - .label BGCOL4 = $d024 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 + .label BG_COLOR1 = $d022 + .label BG_COLOR2 = $d023 + .label BG_COLOR3 = $d024 .label VIC_CONTROL = $d011 .label VIC_CONTROL2 = $d016 .label VIC_MEMORY = $d018 @@ -12237,13 +12234,13 @@ menu: { jmp __b4 // menu::@4 __b4: - // [25] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [25] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BGCOL - // [26] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [26] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // [27] call print_set_screen // Display menu Text // [896] phi from menu::@4 to print_set_screen [phi:menu::@4->print_set_screen] @@ -12731,10 +12728,10 @@ mode_8bppchunkybmm: { // [127] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta DTV_PLANEB_MODULO_HI - // [128] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [128] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Border color lda #0 - sta BORDERCOL + sta BORDER_COLOR // [129] phi from mode_8bppchunkybmm to mode_8bppchunkybmm::@1 [phi:mode_8bppchunkybmm->mode_8bppchunkybmm::@1] __b1_from_mode_8bppchunkybmm: // [129] phi (byte) mode_8bppchunkybmm::i#2 = (byte) 0 [phi:mode_8bppchunkybmm->mode_8bppchunkybmm::@1#0] -- vbuz1=vbuc1 @@ -13241,9 +13238,9 @@ mode_ctrl: { // [209] *((const nomodify byte*) DTV_CONTROL) ← (byte) mode_ctrl::ctrl#14 -- _deref_pbuc1=vbuz1 lda.z ctrl sta DTV_CONTROL - // [210] *((const nomodify byte*) BORDERCOL) ← (byte) mode_ctrl::ctrl#14 -- _deref_pbuc1=vbuz1 + // [210] *((const nomodify byte*) BORDER_COLOR) ← (byte) mode_ctrl::ctrl#14 -- _deref_pbuc1=vbuz1 lda.z ctrl - sta BORDERCOL + sta BORDER_COLOR jmp __b1_from___b18 } // keyboard_key_pressed @@ -13442,10 +13439,10 @@ mode_8bpppixelcell: { // [241] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta DTV_PLANEB_MODULO_HI - // [242] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [242] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Border color lda #0 - sta BORDERCOL + sta BORDER_COLOR // [243] phi from mode_8bpppixelcell to mode_8bpppixelcell::@1 [phi:mode_8bpppixelcell->mode_8bpppixelcell::@1] __b1_from_mode_8bpppixelcell: // [243] phi (byte) mode_8bpppixelcell::i#2 = (byte) 0 [phi:mode_8bpppixelcell->mode_8bpppixelcell::@1#0] -- vbuz1=vbuc1 @@ -13816,10 +13813,10 @@ mode_sixsfred: { jmp __b2 // mode_sixsfred::@2 __b2: - // [303] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [303] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BORDERCOL + sta BORDER_COLOR // [304] phi from mode_sixsfred::@2 to mode_sixsfred::@3 [phi:mode_sixsfred::@2->mode_sixsfred::@3] __b3_from___b2: // [304] phi (byte*) mode_sixsfred::col#3 = (const nomodify byte*) mode_sixsfred::COLORS [phi:mode_sixsfred::@2->mode_sixsfred::@3#0] -- pbuz1=pbuc1 @@ -14032,10 +14029,10 @@ mode_sixsfred: { // Resolution: 320x200 // Linear Adressing // GfxData/PlaneA Pixel Shifter (1), CharData/PlaneB Pixel Shifter (1): -// - Plane A = 0 Plane B = 0: 8bpp BgColor0[7:0] +// - Plane A = 0 Plane B = 0: 8bpp BG_COLORor0[7:0] // - Plane A = 0 Plane B = 1: 8bpp "0000" & ColorData[7:4] // - Plane A = 1 Plane B = 0: 8bpp "0000" & ColorData[3:0] -// - Plane A = 1 Plane B = 1: 8bpp BgColor1[7:0] +// - Plane A = 1 Plane B = 1: 8bpp BG_COLORor1[7:0] mode_twoplanebitmap: { .label PLANEA = $4000 .label PLANEB = $6000 @@ -14140,17 +14137,17 @@ mode_twoplanebitmap: { jmp __b2 // mode_twoplanebitmap::@2 __b2: - // [356] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [356] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BORDERCOL - // [357] *((const nomodify byte*) BGCOL1) ← (byte) $70 -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [357] *((const nomodify byte*) BG_COLOR) ← (byte) $70 -- _deref_pbuc1=vbuc2 lda #$70 - sta BGCOL1 - // [358] *((const nomodify byte*) BGCOL2) ← (byte) $d4 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [358] *((const nomodify byte*) BG_COLOR1) ← (byte) $d4 -- _deref_pbuc1=vbuc2 // Color for bits 00 lda #$d4 - sta BGCOL2 + sta BG_COLOR1 // [359] phi from mode_twoplanebitmap::@2 to mode_twoplanebitmap::@3 [phi:mode_twoplanebitmap::@2->mode_twoplanebitmap::@3] __b3_from___b2: // [359] phi (byte*) mode_twoplanebitmap::col#3 = (const nomodify byte*) mode_twoplanebitmap::COLORS [phi:mode_twoplanebitmap::@2->mode_twoplanebitmap::@3#0] -- pbuz1=pbuc1 @@ -14498,10 +14495,10 @@ mode_sixsfred2: { jmp __b2 // mode_sixsfred2::@2 __b2: - // [416] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [416] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BORDERCOL + sta BORDER_COLOR // [417] phi from mode_sixsfred2::@2 to mode_sixsfred2::@3 [phi:mode_sixsfred2::@2->mode_sixsfred2::@3] __b3_from___b2: // [417] phi (byte*) mode_sixsfred2::col#3 = (const nomodify byte*) mode_sixsfred2::COLORS [phi:mode_sixsfred2::@2->mode_sixsfred2::@3#0] -- pbuz1=pbuc1 @@ -14724,12 +14721,12 @@ mode_sixsfred2: { // Normal VIC Adressing: // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & CharData[7:0] & RowCounter[2:0] ) //GfxData Pixel Shifter (1) if ColorData[3:3] = 0: -// - 0: 8bpp BgColor0[7:0] +// - 0: 8bpp BG_COLORor0[7:0] // - 1: 8bpp ColorData[7:4] "0" & Color[2:0] //GfxData Pixel Shifter (2) if ColorData[3:3] = 1: -// - 00: 8bpp BgColor0[7:0] -// - 01: 8bpp BgColor1[7:0] -// - 10: 8bpp BgColor2[7:0] +// - 00: 8bpp BG_COLORor0[7:0] +// - 01: 8bpp BG_COLORor1[7:0] +// - 10: 8bpp BG_COLORor2[7:0] // - 11: 8bpp ColorData[7:4] "0" & Color[2:0] mode_hicolmcchar: { .label SCREEN = $8000 @@ -14806,19 +14803,19 @@ mode_hicolmcchar: { jmp __b2 // mode_hicolmcchar::@2 __b2: - // [463] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [463] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BORDERCOL - // [464] *((const nomodify byte*) BGCOL1) ← (byte) $50 -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [464] *((const nomodify byte*) BG_COLOR) ← (byte) $50 -- _deref_pbuc1=vbuc2 lda #$50 - sta BGCOL1 - // [465] *((const nomodify byte*) BGCOL2) ← (byte) $54 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [465] *((const nomodify byte*) BG_COLOR1) ← (byte) $54 -- _deref_pbuc1=vbuc2 lda #$54 - sta BGCOL2 - // [466] *((const nomodify byte*) BGCOL3) ← (byte) $58 -- _deref_pbuc1=vbuc2 + sta BG_COLOR1 + // [466] *((const nomodify byte*) BG_COLOR2) ← (byte) $58 -- _deref_pbuc1=vbuc2 lda #$58 - sta BGCOL3 + sta BG_COLOR2 // [467] phi from mode_hicolmcchar::@2 to mode_hicolmcchar::@3 [phi:mode_hicolmcchar::@2->mode_hicolmcchar::@3] __b3_from___b2: // [467] phi (byte*) mode_hicolmcchar::ch#3 = (const nomodify byte*) mode_hicolmcchar::SCREEN [phi:mode_hicolmcchar::@2->mode_hicolmcchar::@3#0] -- pbuz1=pbuc1 @@ -14937,10 +14934,10 @@ mode_hicolmcchar: { // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & "00" & CharData[5:0] & RowCounter[2:0] ) // GfxData Pixel Shifter (1) // - 0: 8bpp Background Color -// - CharData[7:6] 00: 8bpp BgColor0[7:0] -// - CharData[7:6] 01: 8bpp BgColor1[7:0] -// - CharData[7:6] 10: 8bpp BgColor2[7:0] -// - CharData[7:6] 11: 8bpp BgColor3[7:0] +// - CharData[7:6] 00: 8bpp BG_COLORor0[7:0] +// - CharData[7:6] 01: 8bpp BG_COLORor1[7:0] +// - CharData[7:6] 10: 8bpp BG_COLORor2[7:0] +// - CharData[7:6] 11: 8bpp BG_COLORor3[7:0] // - 1: 8bpp ColorData[7:0] mode_hicolecmchar: { .label SCREEN = $8000 @@ -15017,22 +15014,22 @@ mode_hicolecmchar: { jmp __b2 // mode_hicolecmchar::@2 __b2: - // [497] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [497] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BORDERCOL - // [498] *((const nomodify byte*) BGCOL1) ← (byte) $50 -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [498] *((const nomodify byte*) BG_COLOR) ← (byte) $50 -- _deref_pbuc1=vbuc2 lda #$50 - sta BGCOL1 - // [499] *((const nomodify byte*) BGCOL2) ← (byte) $54 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [499] *((const nomodify byte*) BG_COLOR1) ← (byte) $54 -- _deref_pbuc1=vbuc2 lda #$54 - sta BGCOL2 - // [500] *((const nomodify byte*) BGCOL3) ← (byte) $58 -- _deref_pbuc1=vbuc2 + sta BG_COLOR1 + // [500] *((const nomodify byte*) BG_COLOR2) ← (byte) $58 -- _deref_pbuc1=vbuc2 lda #$58 - sta BGCOL3 - // [501] *((const nomodify byte*) BGCOL4) ← (byte) $5c -- _deref_pbuc1=vbuc2 + sta BG_COLOR2 + // [501] *((const nomodify byte*) BG_COLOR3) ← (byte) $5c -- _deref_pbuc1=vbuc2 lda #$5c - sta BGCOL4 + sta BG_COLOR3 // [502] phi from mode_hicolecmchar::@2 to mode_hicolecmchar::@3 [phi:mode_hicolecmchar::@2->mode_hicolecmchar::@3] __b3_from___b2: // [502] phi (byte*) mode_hicolecmchar::ch#3 = (const nomodify byte*) mode_hicolecmchar::SCREEN [phi:mode_hicolecmchar::@2->mode_hicolecmchar::@3#0] -- pbuz1=pbuc1 @@ -15150,7 +15147,7 @@ mode_hicolecmchar: { // Normal VIC Adressing: // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & CharData[7:0] & RowCounter[2:0] ) // Pixel Shifter (1) -// - 0: 8bpp BgColor0[7:0] +// - 0: 8bpp BG_COLORor0[7:0] // - 1: 8bpp ColorData[7:0] mode_hicolstdchar: { .label SCREEN = $8000 @@ -15227,13 +15224,13 @@ mode_hicolstdchar: { jmp __b2 // mode_hicolstdchar::@2 __b2: - // [532] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [532] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BGCOL - // [533] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [533] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // [534] phi from mode_hicolstdchar::@2 to mode_hicolstdchar::@3 [phi:mode_hicolstdchar::@2->mode_hicolstdchar::@3] __b3_from___b2: // [534] phi (byte*) mode_hicolstdchar::ch#3 = (const nomodify byte*) mode_hicolstdchar::SCREEN [phi:mode_hicolstdchar::@2->mode_hicolstdchar::@3#0] -- pbuz1=pbuc1 @@ -15421,13 +15418,13 @@ mode_stdbitmap: { jmp __b2 // mode_stdbitmap::@2 __b2: - // [562] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [562] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 // Screen colors lda #BLACK - sta BGCOL - // [563] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [563] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL + sta BORDER_COLOR // [564] phi from mode_stdbitmap::@2 to mode_stdbitmap::@3 [phi:mode_stdbitmap::@2->mode_stdbitmap::@3] __b3_from___b2: // [564] phi (byte*) mode_stdbitmap::ch#3 = (const nomodify byte*) mode_stdbitmap::SCREEN [phi:mode_stdbitmap::@2->mode_stdbitmap::@3#0] -- pbuz1=pbuc1 @@ -16497,12 +16494,12 @@ bitmap_init: { // Normal VIC Adressing: // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & CharData[7:0] & RowCounter[2:0] ) // GfxData Pixel Shifter (1) if ColorData[3:3] = 0: -// - 0: 4bpp BgColor0[3:0] +// - 0: 4bpp BG_COLORor0[3:0] // - 1: 4bpp ColorData[2:0] // GfxData Pixel Shifter (2) if ColorData[3:3] = 1: -// - 00: 4bpp BgColor0[3:0] -// - 01: 4bpp BgColor1[3:0] -// - 10: 4bpp BgColor2[3:0] +// - 00: 4bpp BG_COLORor0[3:0] +// - 01: 4bpp BG_COLORor1[3:0] +// - 10: 4bpp BG_COLORor2[3:0] // - 11: 4bpp ColorData[2:0]// Standard Character Mode (LINEAR/HICOL/CHUNK/COLDIS/ECM/MCM/BMM = 0) mode_mcchar: { .label SCREEN = $8000 @@ -16581,19 +16578,19 @@ mode_mcchar: { jmp __b2 // mode_mcchar::@2 __b2: - // [770] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [770] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BORDERCOL - // [771] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [771] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL1 - // [772] *((const nomodify byte*) BGCOL2) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [772] *((const nomodify byte*) BG_COLOR1) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BGCOL2 - // [773] *((const nomodify byte*) BGCOL3) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 + sta BG_COLOR1 + // [773] *((const nomodify byte*) BG_COLOR2) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 lda #BLUE - sta BGCOL3 + sta BG_COLOR2 // [774] phi from mode_mcchar::@2 to mode_mcchar::@3 [phi:mode_mcchar::@2->mode_mcchar::@3] __b3_from___b2: // [774] phi (byte*) mode_mcchar::ch#3 = (const nomodify byte*) mode_mcchar::SCREEN [phi:mode_mcchar::@2->mode_mcchar::@3#0] -- pbuz1=pbuc1 @@ -16721,10 +16718,10 @@ mode_mcchar: { // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & "00" & CharData[5:0] & RowCounter[2:0] ) // GfxData Pixel Shifter (1) // - 0: 4bpp Background Color -// - CharData[7:6] 00: 4bpp BgColor0[3:0] -// - CharData[7:6] 01: 4bpp BgColor1[3:0] -// - CharData[7:6] 10: 4bpp BgColor2[3:0] -// - CharData[7:6] 11: 4bpp BgColor3[3:0] +// - CharData[7:6] 00: 4bpp BG_COLORor0[3:0] +// - CharData[7:6] 01: 4bpp BG_COLORor1[3:0] +// - CharData[7:6] 10: 4bpp BG_COLORor2[3:0] +// - CharData[7:6] 11: 4bpp BG_COLORor3[3:0] // - 1: 4bpp ColorData[3:0] mode_ecmchar: { .label SCREEN = $8000 @@ -16803,22 +16800,22 @@ mode_ecmchar: { jmp __b2 // mode_ecmchar::@2 __b2: - // [806] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [806] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BORDERCOL - // [807] *((const nomodify byte*) BGCOL1) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [807] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL1 - // [808] *((const nomodify byte*) BGCOL2) ← (byte) 2 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [808] *((const nomodify byte*) BG_COLOR1) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL2 - // [809] *((const nomodify byte*) BGCOL3) ← (byte) 5 -- _deref_pbuc1=vbuc2 + sta BG_COLOR1 + // [809] *((const nomodify byte*) BG_COLOR2) ← (byte) 5 -- _deref_pbuc1=vbuc2 lda #5 - sta BGCOL3 - // [810] *((const nomodify byte*) BGCOL4) ← (byte) 6 -- _deref_pbuc1=vbuc2 + sta BG_COLOR2 + // [810] *((const nomodify byte*) BG_COLOR3) ← (byte) 6 -- _deref_pbuc1=vbuc2 lda #6 - sta BGCOL4 + sta BG_COLOR3 // [811] phi from mode_ecmchar::@2 to mode_ecmchar::@3 [phi:mode_ecmchar::@2->mode_ecmchar::@3] __b3_from___b2: // [811] phi (byte*) mode_ecmchar::ch#3 = (const nomodify byte*) mode_ecmchar::SCREEN [phi:mode_ecmchar::@2->mode_ecmchar::@3#0] -- pbuz1=pbuc1 @@ -16945,7 +16942,7 @@ mode_ecmchar: { // Normal VIC Adressing: // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & CharData[7:0] & RowCounter[2:0] ) // Pixel Shifter (1) -// - 0: 4bpp BgColor0[3:0] +// - 0: 4bpp BG_COLORor0[3:0] // - 1: 4bpp ColorData[3:0] mode_stdchar: { .label SCREEN = $8000 @@ -17024,13 +17021,13 @@ mode_stdchar: { jmp __b2 // mode_stdchar::@2 __b2: - // [843] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [843] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BGCOL - // [844] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [844] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // [845] phi from mode_stdchar::@2 to mode_stdchar::@3 [phi:mode_stdchar::@2->mode_stdchar::@3] __b3_from___b2: // [845] phi (byte*) mode_stdchar::ch#3 = (const nomodify byte*) mode_stdchar::SCREEN [phi:mode_stdchar::@2->mode_stdchar::@3#0] -- pbuz1=pbuc1 @@ -17406,8 +17403,8 @@ Statement [18] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomod Statement [20] *((const nomodify byte*) DTV_PALETTE + (byte) menu::i#2) ← *((const byte*) DTV_PALETTE_DEFAULT + (byte) menu::i#2) [ menu::i#2 ] ( main:2::menu:9 [ menu::i#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:2 [ menu::i#2 menu::i#1 ] Statement [24] if((byte*) menu::c#2!=(const nomodify byte*) COLS+(word) $3e8) goto menu::@3 [ menu::c#2 ] ( main:2::menu:9 [ menu::c#2 ] { } ) always clobbers reg byte a -Statement [25] *((const nomodify byte*) BGCOL) ← (byte) 0 [ ] ( main:2::menu:9 [ ] { } ) always clobbers reg byte a -Statement [26] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9 [ ] { } ) always clobbers reg byte a +Statement [25] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2::menu:9 [ ] { } ) always clobbers reg byte a +Statement [26] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9 [ ] { } ) always clobbers reg byte a Statement [117] *((byte*) menu::c#2) ← (const nomodify byte) LIGHT_GREEN [ menu::c#2 ] ( main:2::menu:9 [ menu::c#2 ] { } ) always clobbers reg byte a reg byte y Statement [119] *((const nomodify byte*) DTV_CONTROL) ← (const nomodify byte) DTV_HIGHCOLOR|(const nomodify byte) DTV_LINEAR|(const nomodify byte) DTV_CHUNKY|(const nomodify byte) DTV_COLORRAM_OFF [ ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ ] { } ) always clobbers reg byte a Statement [120] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_ECM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ ] { } ) always clobbers reg byte a @@ -17418,7 +17415,7 @@ Statement [124] *((const nomodify byte*) DTV_PLANEB_START_HI) ← <>(const nomod Statement [125] *((const nomodify byte*) DTV_PLANEB_STEP) ← (byte) 8 [ ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ ] { } ) always clobbers reg byte a Statement [126] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ ] { } ) always clobbers reg byte a Statement [127] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ ] { } ) always clobbers reg byte a -Statement [128] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ ] { } ) always clobbers reg byte a +Statement [128] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ ] { } ) always clobbers reg byte a Statement [137] if((byte*) mode_8bppchunkybmm::gfxb#3!=(word) $8000) goto mode_8bppchunkybmm::@5 [ mode_8bppchunkybmm::y#6 mode_8bppchunkybmm::gfxb#3 mode_8bppchunkybmm::x#2 mode_8bppchunkybmm::gfxbCpuBank#4 ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ mode_8bppchunkybmm::y#6 mode_8bppchunkybmm::gfxb#3 mode_8bppchunkybmm::x#2 mode_8bppchunkybmm::gfxbCpuBank#4 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:6 [ mode_8bppchunkybmm::y#6 mode_8bppchunkybmm::y#1 ] Removing always clobbered register reg byte a as potential for zp[1]:9 [ mode_8bppchunkybmm::gfxbCpuBank#4 mode_8bppchunkybmm::gfxbCpuBank#7 mode_8bppchunkybmm::gfxbCpuBank#8 mode_8bppchunkybmm::gfxbCpuBank#2 ] @@ -17457,7 +17454,7 @@ Statement [238] *((const nomodify byte*) DTV_PLANEB_START_HI) ← (byte) 0 [ ] ( Statement [239] *((const nomodify byte*) DTV_PLANEB_STEP) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bpppixelcell:109 [ ] { } ) always clobbers reg byte a Statement [240] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bpppixelcell:109 [ ] { } ) always clobbers reg byte a Statement [241] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bpppixelcell:109 [ ] { } ) always clobbers reg byte a -Statement [242] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bpppixelcell:109 [ ] { } ) always clobbers reg byte a +Statement [242] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bpppixelcell:109 [ ] { } ) always clobbers reg byte a Statement [250] (byte~) mode_8bpppixelcell::$3 ← (byte~) mode_8bpppixelcell::$2 << (byte) 4 [ mode_8bpppixelcell::ay#4 mode_8bpppixelcell::ax#2 mode_8bpppixelcell::gfxa#2 mode_8bpppixelcell::$3 ] ( main:2::menu:9::mode_8bpppixelcell:109 [ mode_8bpppixelcell::ay#4 mode_8bpppixelcell::ax#2 mode_8bpppixelcell::gfxa#2 mode_8bpppixelcell::$3 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:17 [ mode_8bpppixelcell::ay#4 mode_8bpppixelcell::ay#1 ] Removing always clobbered register reg byte a as potential for zp[1]:18 [ mode_8bpppixelcell::ax#2 mode_8bpppixelcell::ax#1 ] @@ -17495,7 +17492,7 @@ Statement [295] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 [ ] Statement [296] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 [ ] ( main:2::menu:9::mode_sixsfred:102 [ ] { } ) always clobbers reg byte a Statement [297] *((const nomodify byte*) DTV_COLOR_BANK_LO) ← <(const nomodify byte*) mode_sixsfred::COLORS/(word) $400 [ ] ( main:2::menu:9::mode_sixsfred:102 [ ] { } ) always clobbers reg byte a Statement [298] *((const nomodify byte*) DTV_COLOR_BANK_HI) ← (byte) 0 [ ] ( main:2::menu:9::mode_sixsfred:102 [ ] { } ) always clobbers reg byte a -Statement [303] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_sixsfred:102 [ ] { } ) always clobbers reg byte a +Statement [303] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_sixsfred:102 [ ] { } ) always clobbers reg byte a Statement [306] (byte~) mode_sixsfred::$2 ← (byte) mode_sixsfred::cx#2 + (byte) mode_sixsfred::cy#4 [ mode_sixsfred::cy#4 mode_sixsfred::cx#2 mode_sixsfred::col#2 mode_sixsfred::$2 ] ( main:2::menu:9::mode_sixsfred:102 [ mode_sixsfred::cy#4 mode_sixsfred::cx#2 mode_sixsfred::col#2 mode_sixsfred::$2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:32 [ mode_sixsfred::cy#4 mode_sixsfred::cy#1 ] Removing always clobbered register reg byte a as potential for zp[1]:33 [ mode_sixsfred::cx#2 mode_sixsfred::cx#1 ] @@ -17530,9 +17527,9 @@ Statement [348] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 [ ] Statement [349] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a Statement [350] *((const nomodify byte*) DTV_COLOR_BANK_LO) ← <(const nomodify byte*) mode_twoplanebitmap::COLORS/(word) $400 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a Statement [351] *((const nomodify byte*) DTV_COLOR_BANK_HI) ← (byte) 0 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a -Statement [356] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a -Statement [357] *((const nomodify byte*) BGCOL1) ← (byte) $70 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a -Statement [358] *((const nomodify byte*) BGCOL2) ← (byte) $d4 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a +Statement [356] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a +Statement [357] *((const nomodify byte*) BG_COLOR) ← (byte) $70 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a +Statement [358] *((const nomodify byte*) BG_COLOR1) ← (byte) $d4 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a Statement [362] (byte~) mode_twoplanebitmap::$3 ← (byte~) mode_twoplanebitmap::$2 << (byte) 4 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 mode_twoplanebitmap::$3 ] ( main:2::menu:9::mode_twoplanebitmap:95 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 mode_twoplanebitmap::$3 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:45 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cy#1 ] Removing always clobbered register reg byte a as potential for zp[1]:46 [ mode_twoplanebitmap::cx#2 mode_twoplanebitmap::cx#1 ] @@ -17569,7 +17566,7 @@ Statement [408] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 [ ] Statement [409] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 [ ] ( main:2::menu:9::mode_sixsfred2:88 [ ] { } ) always clobbers reg byte a Statement [410] *((const nomodify byte*) DTV_COLOR_BANK_LO) ← <(const nomodify byte*) mode_sixsfred2::COLORS/(word) $400 [ ] ( main:2::menu:9::mode_sixsfred2:88 [ ] { } ) always clobbers reg byte a Statement [411] *((const nomodify byte*) DTV_COLOR_BANK_HI) ← (byte) 0 [ ] ( main:2::menu:9::mode_sixsfred2:88 [ ] { } ) always clobbers reg byte a -Statement [416] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_sixsfred2:88 [ ] { } ) always clobbers reg byte a +Statement [416] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_sixsfred2:88 [ ] { } ) always clobbers reg byte a Statement [420] (byte~) mode_sixsfred2::$3 ← (byte~) mode_sixsfred2::$2 << (byte) 4 [ mode_sixsfred2::cy#4 mode_sixsfred2::cx#2 mode_sixsfred2::col#2 mode_sixsfred2::$3 ] ( main:2::menu:9::mode_sixsfred2:88 [ mode_sixsfred2::cy#4 mode_sixsfred2::cx#2 mode_sixsfred2::col#2 mode_sixsfred2::$3 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:58 [ mode_sixsfred2::cy#4 mode_sixsfred2::cy#1 ] Removing always clobbered register reg byte a as potential for zp[1]:59 [ mode_sixsfred2::cx#2 mode_sixsfred2::cx#1 ] @@ -17598,10 +17595,10 @@ Statement [455] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (byte) 3 Statement [456] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a Statement [457] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_CSEL|(const nomodify byte) VIC_MCM [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a Statement [458] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_hicolmcchar::CHARSET&(word) $3fff/(word) $400 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a -Statement [463] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a -Statement [464] *((const nomodify byte*) BGCOL1) ← (byte) $50 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a -Statement [465] *((const nomodify byte*) BGCOL2) ← (byte) $54 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a -Statement [466] *((const nomodify byte*) BGCOL3) ← (byte) $58 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a +Statement [463] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a +Statement [464] *((const nomodify byte*) BG_COLOR) ← (byte) $50 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a +Statement [465] *((const nomodify byte*) BG_COLOR1) ← (byte) $54 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a +Statement [466] *((const nomodify byte*) BG_COLOR2) ← (byte) $58 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a Statement [470] (byte~) mode_hicolmcchar::$3 ← (byte~) mode_hicolmcchar::$2 << (byte) 4 [ mode_hicolmcchar::cy#4 mode_hicolmcchar::cx#2 mode_hicolmcchar::col#2 mode_hicolmcchar::ch#2 mode_hicolmcchar::$3 ] ( main:2::menu:9::mode_hicolmcchar:81 [ mode_hicolmcchar::cy#4 mode_hicolmcchar::cx#2 mode_hicolmcchar::col#2 mode_hicolmcchar::ch#2 mode_hicolmcchar::$3 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:71 [ mode_hicolmcchar::cy#4 mode_hicolmcchar::cy#1 ] Removing always clobbered register reg byte a as potential for zp[1]:72 [ mode_hicolmcchar::cx#2 mode_hicolmcchar::cx#1 ] @@ -17621,11 +17618,11 @@ Statement [489] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (byte) 3 Statement [490] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(const nomodify byte) VIC_ECM|(byte) 3 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a Statement [491] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_CSEL [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a Statement [492] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_hicolecmchar::CHARSET&(word) $3fff/(word) $400 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a -Statement [497] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a -Statement [498] *((const nomodify byte*) BGCOL1) ← (byte) $50 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a -Statement [499] *((const nomodify byte*) BGCOL2) ← (byte) $54 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a -Statement [500] *((const nomodify byte*) BGCOL3) ← (byte) $58 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a -Statement [501] *((const nomodify byte*) BGCOL4) ← (byte) $5c [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a +Statement [497] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a +Statement [498] *((const nomodify byte*) BG_COLOR) ← (byte) $50 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a +Statement [499] *((const nomodify byte*) BG_COLOR1) ← (byte) $54 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a +Statement [500] *((const nomodify byte*) BG_COLOR2) ← (byte) $58 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a +Statement [501] *((const nomodify byte*) BG_COLOR3) ← (byte) $5c [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a Statement [505] (byte~) mode_hicolecmchar::$3 ← (byte~) mode_hicolecmchar::$2 << (byte) 4 [ mode_hicolecmchar::cy#4 mode_hicolecmchar::cx#2 mode_hicolecmchar::col#2 mode_hicolecmchar::ch#2 mode_hicolecmchar::$3 ] ( main:2::menu:9::mode_hicolecmchar:74 [ mode_hicolecmchar::cy#4 mode_hicolecmchar::cx#2 mode_hicolecmchar::col#2 mode_hicolecmchar::ch#2 mode_hicolecmchar::$3 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:78 [ mode_hicolecmchar::cy#4 mode_hicolecmchar::cy#1 ] Removing always clobbered register reg byte a as potential for zp[1]:79 [ mode_hicolecmchar::cx#2 mode_hicolecmchar::cx#1 ] @@ -17645,8 +17642,8 @@ Statement [524] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (byte) 3 Statement [525] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2::menu:9::mode_hicolstdchar:67 [ ] { } ) always clobbers reg byte a Statement [526] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_CSEL [ ] ( main:2::menu:9::mode_hicolstdchar:67 [ ] { } ) always clobbers reg byte a Statement [527] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_hicolstdchar::CHARSET&(word) $3fff/(word) $400 [ ] ( main:2::menu:9::mode_hicolstdchar:67 [ ] { } ) always clobbers reg byte a -Statement [532] *((const nomodify byte*) BGCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_hicolstdchar:67 [ ] { } ) always clobbers reg byte a -Statement [533] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_hicolstdchar:67 [ ] { } ) always clobbers reg byte a +Statement [532] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_hicolstdchar:67 [ ] { } ) always clobbers reg byte a +Statement [533] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_hicolstdchar:67 [ ] { } ) always clobbers reg byte a Statement [537] (byte~) mode_hicolstdchar::$3 ← (byte~) mode_hicolstdchar::$2 << (byte) 4 [ mode_hicolstdchar::cy#4 mode_hicolstdchar::cx#2 mode_hicolstdchar::col#2 mode_hicolstdchar::ch#2 mode_hicolstdchar::$3 ] ( main:2::menu:9::mode_hicolstdchar:67 [ mode_hicolstdchar::cy#4 mode_hicolstdchar::cx#2 mode_hicolstdchar::col#2 mode_hicolstdchar::ch#2 mode_hicolstdchar::$3 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:85 [ mode_hicolstdchar::cy#4 mode_hicolstdchar::cy#1 ] Removing always clobbered register reg byte a as potential for zp[1]:86 [ mode_hicolstdchar::cx#2 mode_hicolstdchar::cx#1 ] @@ -17666,8 +17663,8 @@ Statement [556] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) Statement [557] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_stdbitmap::BITMAP&(word) $3fff/(word) $400 [ ] ( main:2::menu:9::mode_stdbitmap:60 [ ] { } ) always clobbers reg byte a Statement [559] *((const nomodify byte*) DTV_PALETTE + (byte) mode_stdbitmap::i#2) ← *((const byte*) DTV_PALETTE_DEFAULT + (byte) mode_stdbitmap::i#2) [ mode_stdbitmap::i#2 ] ( main:2::menu:9::mode_stdbitmap:60 [ mode_stdbitmap::i#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:91 [ mode_stdbitmap::i#2 mode_stdbitmap::i#1 ] -Statement [562] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( main:2::menu:9::mode_stdbitmap:60 [ ] { } ) always clobbers reg byte a -Statement [563] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ ] ( main:2::menu:9::mode_stdbitmap:60 [ ] { } ) always clobbers reg byte a +Statement [562] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( main:2::menu:9::mode_stdbitmap:60 [ ] { } ) always clobbers reg byte a +Statement [563] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [ ] ( main:2::menu:9::mode_stdbitmap:60 [ ] { } ) always clobbers reg byte a Statement [566] (byte~) mode_stdbitmap::$4 ← (byte) mode_stdbitmap::cx#2 + (byte) mode_stdbitmap::cy#4 [ mode_stdbitmap::cy#4 mode_stdbitmap::cx#2 mode_stdbitmap::ch#2 mode_stdbitmap::$4 ] ( main:2::menu:9::mode_stdbitmap:60 [ mode_stdbitmap::cy#4 mode_stdbitmap::cx#2 mode_stdbitmap::ch#2 mode_stdbitmap::$4 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:92 [ mode_stdbitmap::cy#4 mode_stdbitmap::cy#1 ] Removing always clobbered register reg byte a as potential for zp[1]:93 [ mode_stdbitmap::cx#2 mode_stdbitmap::cx#1 ] @@ -17783,10 +17780,10 @@ Statement [764] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) Statement [765] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_mcchar::CHARSET&(word) $3fff/(word) $400 [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a Statement [767] *((const nomodify byte*) DTV_PALETTE + (byte) mode_mcchar::i#2) ← *((const byte*) DTV_PALETTE_DEFAULT + (byte) mode_mcchar::i#2) [ mode_mcchar::i#2 ] ( main:2::menu:9::mode_mcchar:53 [ mode_mcchar::i#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:132 [ mode_mcchar::i#2 mode_mcchar::i#1 ] -Statement [770] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a -Statement [771] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a -Statement [772] *((const nomodify byte*) BGCOL2) ← (const nomodify byte) GREEN [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a -Statement [773] *((const nomodify byte*) BGCOL3) ← (const nomodify byte) BLUE [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a +Statement [770] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a +Statement [771] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a +Statement [772] *((const nomodify byte*) BG_COLOR1) ← (const nomodify byte) GREEN [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a +Statement [773] *((const nomodify byte*) BG_COLOR2) ← (const nomodify byte) BLUE [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a Statement [776] (byte~) mode_mcchar::$2 ← (byte) mode_mcchar::cx#2 + (byte) mode_mcchar::cy#4 [ mode_mcchar::cy#4 mode_mcchar::cx#2 mode_mcchar::col#2 mode_mcchar::ch#2 mode_mcchar::$2 ] ( main:2::menu:9::mode_mcchar:53 [ mode_mcchar::cy#4 mode_mcchar::cx#2 mode_mcchar::col#2 mode_mcchar::ch#2 mode_mcchar::$2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:133 [ mode_mcchar::cy#4 mode_mcchar::cy#1 ] Removing always clobbered register reg byte a as potential for zp[1]:134 [ mode_mcchar::cx#2 mode_mcchar::cx#1 ] @@ -17809,11 +17806,11 @@ Statement [800] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) Statement [801] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_ecmchar::CHARSET&(word) $3fff/(word) $400 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a Statement [803] *((const nomodify byte*) DTV_PALETTE + (byte) mode_ecmchar::i#2) ← *((const byte*) DTV_PALETTE_DEFAULT + (byte) mode_ecmchar::i#2) [ mode_ecmchar::i#2 ] ( main:2::menu:9::mode_ecmchar:46 [ mode_ecmchar::i#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:139 [ mode_ecmchar::i#2 mode_ecmchar::i#1 ] -Statement [806] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a -Statement [807] *((const nomodify byte*) BGCOL1) ← (byte) 0 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a -Statement [808] *((const nomodify byte*) BGCOL2) ← (byte) 2 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a -Statement [809] *((const nomodify byte*) BGCOL3) ← (byte) 5 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a -Statement [810] *((const nomodify byte*) BGCOL4) ← (byte) 6 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a +Statement [806] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a +Statement [807] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a +Statement [808] *((const nomodify byte*) BG_COLOR1) ← (byte) 2 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a +Statement [809] *((const nomodify byte*) BG_COLOR2) ← (byte) 5 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a +Statement [810] *((const nomodify byte*) BG_COLOR3) ← (byte) 6 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a Statement [813] (byte~) mode_ecmchar::$2 ← (byte) mode_ecmchar::cx#2 + (byte) mode_ecmchar::cy#4 [ mode_ecmchar::cy#4 mode_ecmchar::cx#2 mode_ecmchar::col#2 mode_ecmchar::ch#2 mode_ecmchar::$2 ] ( main:2::menu:9::mode_ecmchar:46 [ mode_ecmchar::cy#4 mode_ecmchar::cx#2 mode_ecmchar::col#2 mode_ecmchar::ch#2 mode_ecmchar::$2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:140 [ mode_ecmchar::cy#4 mode_ecmchar::cy#1 ] Removing always clobbered register reg byte a as potential for zp[1]:141 [ mode_ecmchar::cx#2 mode_ecmchar::cx#1 ] @@ -17836,8 +17833,8 @@ Statement [837] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) Statement [838] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_stdchar::CHARSET&(word) $3fff/(word) $400 [ ] ( main:2::menu:9::mode_stdchar:38 [ ] { } ) always clobbers reg byte a Statement [840] *((const nomodify byte*) DTV_PALETTE + (byte) mode_stdchar::i#2) ← *((const byte*) DTV_PALETTE_DEFAULT + (byte) mode_stdchar::i#2) [ mode_stdchar::i#2 ] ( main:2::menu:9::mode_stdchar:38 [ mode_stdchar::i#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:146 [ mode_stdchar::i#2 mode_stdchar::i#1 ] -Statement [843] *((const nomodify byte*) BGCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_stdchar:38 [ ] { } ) always clobbers reg byte a -Statement [844] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_stdchar:38 [ ] { } ) always clobbers reg byte a +Statement [843] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_stdchar:38 [ ] { } ) always clobbers reg byte a +Statement [844] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_stdchar:38 [ ] { } ) always clobbers reg byte a Statement [847] (byte~) mode_stdchar::$2 ← (byte) mode_stdchar::cx#2 + (byte) mode_stdchar::cy#4 [ mode_stdchar::cy#4 mode_stdchar::cx#2 mode_stdchar::col#2 mode_stdchar::ch#2 mode_stdchar::$2 ] ( main:2::menu:9::mode_stdchar:38 [ mode_stdchar::cy#4 mode_stdchar::cx#2 mode_stdchar::col#2 mode_stdchar::ch#2 mode_stdchar::$2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:147 [ mode_stdchar::cy#4 mode_stdchar::cy#1 ] Removing always clobbered register reg byte a as potential for zp[1]:148 [ mode_stdchar::cx#2 mode_stdchar::cx#1 ] @@ -17872,8 +17869,8 @@ Statement [17] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) Statement [18] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) menu::CHARSET&(word) $3fff/(word) $400 [ ] ( main:2::menu:9 [ ] { } ) always clobbers reg byte a Statement [20] *((const nomodify byte*) DTV_PALETTE + (byte) menu::i#2) ← *((const byte*) DTV_PALETTE_DEFAULT + (byte) menu::i#2) [ menu::i#2 ] ( main:2::menu:9 [ menu::i#2 ] { } ) always clobbers reg byte a Statement [24] if((byte*) menu::c#2!=(const nomodify byte*) COLS+(word) $3e8) goto menu::@3 [ menu::c#2 ] ( main:2::menu:9 [ menu::c#2 ] { } ) always clobbers reg byte a -Statement [25] *((const nomodify byte*) BGCOL) ← (byte) 0 [ ] ( main:2::menu:9 [ ] { } ) always clobbers reg byte a -Statement [26] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9 [ ] { } ) always clobbers reg byte a +Statement [25] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2::menu:9 [ ] { } ) always clobbers reg byte a +Statement [26] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9 [ ] { } ) always clobbers reg byte a Statement [117] *((byte*) menu::c#2) ← (const nomodify byte) LIGHT_GREEN [ menu::c#2 ] ( main:2::menu:9 [ menu::c#2 ] { } ) always clobbers reg byte a reg byte y Statement [119] *((const nomodify byte*) DTV_CONTROL) ← (const nomodify byte) DTV_HIGHCOLOR|(const nomodify byte) DTV_LINEAR|(const nomodify byte) DTV_CHUNKY|(const nomodify byte) DTV_COLORRAM_OFF [ ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ ] { } ) always clobbers reg byte a Statement [120] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_ECM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ ] { } ) always clobbers reg byte a @@ -17884,7 +17881,7 @@ Statement [124] *((const nomodify byte*) DTV_PLANEB_START_HI) ← <>(const nomod Statement [125] *((const nomodify byte*) DTV_PLANEB_STEP) ← (byte) 8 [ ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ ] { } ) always clobbers reg byte a Statement [126] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ ] { } ) always clobbers reg byte a Statement [127] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ ] { } ) always clobbers reg byte a -Statement [128] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ ] { } ) always clobbers reg byte a +Statement [128] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ ] { } ) always clobbers reg byte a Statement [137] if((byte*) mode_8bppchunkybmm::gfxb#3!=(word) $8000) goto mode_8bppchunkybmm::@5 [ mode_8bppchunkybmm::y#6 mode_8bppchunkybmm::gfxb#3 mode_8bppchunkybmm::x#2 mode_8bppchunkybmm::gfxbCpuBank#4 ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ mode_8bppchunkybmm::y#6 mode_8bppchunkybmm::gfxb#3 mode_8bppchunkybmm::x#2 mode_8bppchunkybmm::gfxbCpuBank#4 ] { } ) always clobbers reg byte a Statement [142] (word~) mode_8bppchunkybmm::$7 ← (word) mode_8bppchunkybmm::x#2 + (byte) mode_8bppchunkybmm::y#6 [ mode_8bppchunkybmm::y#6 mode_8bppchunkybmm::gfxbCpuBank#8 mode_8bppchunkybmm::x#2 mode_8bppchunkybmm::gfxb#4 mode_8bppchunkybmm::$7 ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ mode_8bppchunkybmm::y#6 mode_8bppchunkybmm::gfxbCpuBank#8 mode_8bppchunkybmm::x#2 mode_8bppchunkybmm::gfxb#4 mode_8bppchunkybmm::$7 ] { } ) always clobbers reg byte a Statement [143] (byte) mode_8bppchunkybmm::c#0 ← (byte)(word~) mode_8bppchunkybmm::$7 [ mode_8bppchunkybmm::y#6 mode_8bppchunkybmm::gfxbCpuBank#8 mode_8bppchunkybmm::x#2 mode_8bppchunkybmm::gfxb#4 mode_8bppchunkybmm::c#0 ] ( main:2::menu:9::mode_8bppchunkybmm:116 [ mode_8bppchunkybmm::y#6 mode_8bppchunkybmm::gfxbCpuBank#8 mode_8bppchunkybmm::x#2 mode_8bppchunkybmm::gfxb#4 mode_8bppchunkybmm::c#0 ] { } ) always clobbers reg byte a @@ -17916,7 +17913,7 @@ Statement [238] *((const nomodify byte*) DTV_PLANEB_START_HI) ← (byte) 0 [ ] ( Statement [239] *((const nomodify byte*) DTV_PLANEB_STEP) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bpppixelcell:109 [ ] { } ) always clobbers reg byte a Statement [240] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bpppixelcell:109 [ ] { } ) always clobbers reg byte a Statement [241] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bpppixelcell:109 [ ] { } ) always clobbers reg byte a -Statement [242] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bpppixelcell:109 [ ] { } ) always clobbers reg byte a +Statement [242] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_8bpppixelcell:109 [ ] { } ) always clobbers reg byte a Statement [249] (byte~) mode_8bpppixelcell::$2 ← (byte) mode_8bpppixelcell::ay#4 & (byte) $f [ mode_8bpppixelcell::ay#4 mode_8bpppixelcell::ax#2 mode_8bpppixelcell::gfxa#2 mode_8bpppixelcell::$2 ] ( main:2::menu:9::mode_8bpppixelcell:109 [ mode_8bpppixelcell::ay#4 mode_8bpppixelcell::ax#2 mode_8bpppixelcell::gfxa#2 mode_8bpppixelcell::$2 ] { } ) always clobbers reg byte a Statement [250] (byte~) mode_8bpppixelcell::$3 ← (byte~) mode_8bpppixelcell::$2 << (byte) 4 [ mode_8bpppixelcell::ay#4 mode_8bpppixelcell::ax#2 mode_8bpppixelcell::gfxa#2 mode_8bpppixelcell::$3 ] ( main:2::menu:9::mode_8bpppixelcell:109 [ mode_8bpppixelcell::ay#4 mode_8bpppixelcell::ax#2 mode_8bpppixelcell::gfxa#2 mode_8bpppixelcell::$3 ] { } ) always clobbers reg byte a Statement [251] (byte~) mode_8bpppixelcell::$4 ← (byte) mode_8bpppixelcell::ax#2 & (byte) $f [ mode_8bpppixelcell::ay#4 mode_8bpppixelcell::ax#2 mode_8bpppixelcell::gfxa#2 mode_8bpppixelcell::$3 mode_8bpppixelcell::$4 ] ( main:2::menu:9::mode_8bpppixelcell:109 [ mode_8bpppixelcell::ay#4 mode_8bpppixelcell::ax#2 mode_8bpppixelcell::gfxa#2 mode_8bpppixelcell::$3 mode_8bpppixelcell::$4 ] { } ) always clobbers reg byte a @@ -17942,7 +17939,7 @@ Statement [295] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 [ ] Statement [296] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 [ ] ( main:2::menu:9::mode_sixsfred:102 [ ] { } ) always clobbers reg byte a Statement [297] *((const nomodify byte*) DTV_COLOR_BANK_LO) ← <(const nomodify byte*) mode_sixsfred::COLORS/(word) $400 [ ] ( main:2::menu:9::mode_sixsfred:102 [ ] { } ) always clobbers reg byte a Statement [298] *((const nomodify byte*) DTV_COLOR_BANK_HI) ← (byte) 0 [ ] ( main:2::menu:9::mode_sixsfred:102 [ ] { } ) always clobbers reg byte a -Statement [303] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_sixsfred:102 [ ] { } ) always clobbers reg byte a +Statement [303] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_sixsfred:102 [ ] { } ) always clobbers reg byte a Statement [306] (byte~) mode_sixsfred::$2 ← (byte) mode_sixsfred::cx#2 + (byte) mode_sixsfred::cy#4 [ mode_sixsfred::cy#4 mode_sixsfred::cx#2 mode_sixsfred::col#2 mode_sixsfred::$2 ] ( main:2::menu:9::mode_sixsfred:102 [ mode_sixsfred::cy#4 mode_sixsfred::cx#2 mode_sixsfred::col#2 mode_sixsfred::$2 ] { } ) always clobbers reg byte a Statement [308] *((byte*) mode_sixsfred::col#2) ← (byte~) mode_sixsfred::$3 [ mode_sixsfred::cy#4 mode_sixsfred::cx#2 mode_sixsfred::col#2 ] ( main:2::menu:9::mode_sixsfred:102 [ mode_sixsfred::cy#4 mode_sixsfred::cx#2 mode_sixsfred::col#2 ] { } ) always clobbers reg byte y Statement [316] (byte~) mode_sixsfred::$6 ← (byte) mode_sixsfred::ay#4 >> (byte) 1 [ mode_sixsfred::ay#4 mode_sixsfred::gfxa#2 mode_sixsfred::ax#2 mode_sixsfred::$6 ] ( main:2::menu:9::mode_sixsfred:102 [ mode_sixsfred::ay#4 mode_sixsfred::gfxa#2 mode_sixsfred::ax#2 mode_sixsfred::$6 ] { } ) always clobbers reg byte a @@ -17965,9 +17962,9 @@ Statement [348] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 [ ] Statement [349] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a Statement [350] *((const nomodify byte*) DTV_COLOR_BANK_LO) ← <(const nomodify byte*) mode_twoplanebitmap::COLORS/(word) $400 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a Statement [351] *((const nomodify byte*) DTV_COLOR_BANK_HI) ← (byte) 0 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a -Statement [356] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a -Statement [357] *((const nomodify byte*) BGCOL1) ← (byte) $70 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a -Statement [358] *((const nomodify byte*) BGCOL2) ← (byte) $d4 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a +Statement [356] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a +Statement [357] *((const nomodify byte*) BG_COLOR) ← (byte) $70 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a +Statement [358] *((const nomodify byte*) BG_COLOR1) ← (byte) $d4 [ ] ( main:2::menu:9::mode_twoplanebitmap:95 [ ] { } ) always clobbers reg byte a Statement [361] (byte~) mode_twoplanebitmap::$2 ← (byte) mode_twoplanebitmap::cy#4 & (byte) $f [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 mode_twoplanebitmap::$2 ] ( main:2::menu:9::mode_twoplanebitmap:95 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 mode_twoplanebitmap::$2 ] { } ) always clobbers reg byte a Statement [362] (byte~) mode_twoplanebitmap::$3 ← (byte~) mode_twoplanebitmap::$2 << (byte) 4 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 mode_twoplanebitmap::$3 ] ( main:2::menu:9::mode_twoplanebitmap:95 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 mode_twoplanebitmap::$3 ] { } ) always clobbers reg byte a Statement [363] (byte~) mode_twoplanebitmap::$4 ← (byte) mode_twoplanebitmap::cx#2 & (byte) $f [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 mode_twoplanebitmap::$3 mode_twoplanebitmap::$4 ] ( main:2::menu:9::mode_twoplanebitmap:95 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 mode_twoplanebitmap::$3 mode_twoplanebitmap::$4 ] { } ) always clobbers reg byte a @@ -17993,7 +17990,7 @@ Statement [408] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 [ ] Statement [409] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 [ ] ( main:2::menu:9::mode_sixsfred2:88 [ ] { } ) always clobbers reg byte a Statement [410] *((const nomodify byte*) DTV_COLOR_BANK_LO) ← <(const nomodify byte*) mode_sixsfred2::COLORS/(word) $400 [ ] ( main:2::menu:9::mode_sixsfred2:88 [ ] { } ) always clobbers reg byte a Statement [411] *((const nomodify byte*) DTV_COLOR_BANK_HI) ← (byte) 0 [ ] ( main:2::menu:9::mode_sixsfred2:88 [ ] { } ) always clobbers reg byte a -Statement [416] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_sixsfred2:88 [ ] { } ) always clobbers reg byte a +Statement [416] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_sixsfred2:88 [ ] { } ) always clobbers reg byte a Statement [419] (byte~) mode_sixsfred2::$2 ← (byte) mode_sixsfred2::cx#2 & (byte) 3 [ mode_sixsfred2::cy#4 mode_sixsfred2::cx#2 mode_sixsfred2::col#2 mode_sixsfred2::$2 ] ( main:2::menu:9::mode_sixsfred2:88 [ mode_sixsfred2::cy#4 mode_sixsfred2::cx#2 mode_sixsfred2::col#2 mode_sixsfred2::$2 ] { } ) always clobbers reg byte a Statement [420] (byte~) mode_sixsfred2::$3 ← (byte~) mode_sixsfred2::$2 << (byte) 4 [ mode_sixsfred2::cy#4 mode_sixsfred2::cx#2 mode_sixsfred2::col#2 mode_sixsfred2::$3 ] ( main:2::menu:9::mode_sixsfred2:88 [ mode_sixsfred2::cy#4 mode_sixsfred2::cx#2 mode_sixsfred2::col#2 mode_sixsfred2::$3 ] { } ) always clobbers reg byte a Statement [421] (byte~) mode_sixsfred2::$4 ← (byte) mode_sixsfred2::cy#4 & (byte) 3 [ mode_sixsfred2::cy#4 mode_sixsfred2::cx#2 mode_sixsfred2::col#2 mode_sixsfred2::$3 mode_sixsfred2::$4 ] ( main:2::menu:9::mode_sixsfred2:88 [ mode_sixsfred2::cy#4 mode_sixsfred2::cx#2 mode_sixsfred2::col#2 mode_sixsfred2::$3 mode_sixsfred2::$4 ] { } ) always clobbers reg byte a @@ -18010,10 +18007,10 @@ Statement [455] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (byte) 3 Statement [456] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a Statement [457] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_CSEL|(const nomodify byte) VIC_MCM [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a Statement [458] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_hicolmcchar::CHARSET&(word) $3fff/(word) $400 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a -Statement [463] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a -Statement [464] *((const nomodify byte*) BGCOL1) ← (byte) $50 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a -Statement [465] *((const nomodify byte*) BGCOL2) ← (byte) $54 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a -Statement [466] *((const nomodify byte*) BGCOL3) ← (byte) $58 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a +Statement [463] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a +Statement [464] *((const nomodify byte*) BG_COLOR) ← (byte) $50 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a +Statement [465] *((const nomodify byte*) BG_COLOR1) ← (byte) $54 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a +Statement [466] *((const nomodify byte*) BG_COLOR2) ← (byte) $58 [ ] ( main:2::menu:9::mode_hicolmcchar:81 [ ] { } ) always clobbers reg byte a Statement [469] (byte~) mode_hicolmcchar::$2 ← (byte) mode_hicolmcchar::cy#4 & (byte) $f [ mode_hicolmcchar::cy#4 mode_hicolmcchar::cx#2 mode_hicolmcchar::col#2 mode_hicolmcchar::ch#2 mode_hicolmcchar::$2 ] ( main:2::menu:9::mode_hicolmcchar:81 [ mode_hicolmcchar::cy#4 mode_hicolmcchar::cx#2 mode_hicolmcchar::col#2 mode_hicolmcchar::ch#2 mode_hicolmcchar::$2 ] { } ) always clobbers reg byte a Statement [470] (byte~) mode_hicolmcchar::$3 ← (byte~) mode_hicolmcchar::$2 << (byte) 4 [ mode_hicolmcchar::cy#4 mode_hicolmcchar::cx#2 mode_hicolmcchar::col#2 mode_hicolmcchar::ch#2 mode_hicolmcchar::$3 ] ( main:2::menu:9::mode_hicolmcchar:81 [ mode_hicolmcchar::cy#4 mode_hicolmcchar::cx#2 mode_hicolmcchar::col#2 mode_hicolmcchar::ch#2 mode_hicolmcchar::$3 ] { } ) always clobbers reg byte a Statement [471] (byte~) mode_hicolmcchar::$4 ← (byte) mode_hicolmcchar::cx#2 & (byte) $f [ mode_hicolmcchar::cy#4 mode_hicolmcchar::cx#2 mode_hicolmcchar::col#2 mode_hicolmcchar::ch#2 mode_hicolmcchar::$3 mode_hicolmcchar::$4 ] ( main:2::menu:9::mode_hicolmcchar:81 [ mode_hicolmcchar::cy#4 mode_hicolmcchar::cx#2 mode_hicolmcchar::col#2 mode_hicolmcchar::ch#2 mode_hicolmcchar::$3 mode_hicolmcchar::$4 ] { } ) always clobbers reg byte a @@ -18028,11 +18025,11 @@ Statement [489] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (byte) 3 Statement [490] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(const nomodify byte) VIC_ECM|(byte) 3 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a Statement [491] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_CSEL [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a Statement [492] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_hicolecmchar::CHARSET&(word) $3fff/(word) $400 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a -Statement [497] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a -Statement [498] *((const nomodify byte*) BGCOL1) ← (byte) $50 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a -Statement [499] *((const nomodify byte*) BGCOL2) ← (byte) $54 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a -Statement [500] *((const nomodify byte*) BGCOL3) ← (byte) $58 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a -Statement [501] *((const nomodify byte*) BGCOL4) ← (byte) $5c [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a +Statement [497] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a +Statement [498] *((const nomodify byte*) BG_COLOR) ← (byte) $50 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a +Statement [499] *((const nomodify byte*) BG_COLOR1) ← (byte) $54 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a +Statement [500] *((const nomodify byte*) BG_COLOR2) ← (byte) $58 [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a +Statement [501] *((const nomodify byte*) BG_COLOR3) ← (byte) $5c [ ] ( main:2::menu:9::mode_hicolecmchar:74 [ ] { } ) always clobbers reg byte a Statement [504] (byte~) mode_hicolecmchar::$2 ← (byte) mode_hicolecmchar::cy#4 & (byte) $f [ mode_hicolecmchar::cy#4 mode_hicolecmchar::cx#2 mode_hicolecmchar::col#2 mode_hicolecmchar::ch#2 mode_hicolecmchar::$2 ] ( main:2::menu:9::mode_hicolecmchar:74 [ mode_hicolecmchar::cy#4 mode_hicolecmchar::cx#2 mode_hicolecmchar::col#2 mode_hicolecmchar::ch#2 mode_hicolecmchar::$2 ] { } ) always clobbers reg byte a Statement [505] (byte~) mode_hicolecmchar::$3 ← (byte~) mode_hicolecmchar::$2 << (byte) 4 [ mode_hicolecmchar::cy#4 mode_hicolecmchar::cx#2 mode_hicolecmchar::col#2 mode_hicolecmchar::ch#2 mode_hicolecmchar::$3 ] ( main:2::menu:9::mode_hicolecmchar:74 [ mode_hicolecmchar::cy#4 mode_hicolecmchar::cx#2 mode_hicolecmchar::col#2 mode_hicolecmchar::ch#2 mode_hicolecmchar::$3 ] { } ) always clobbers reg byte a Statement [506] (byte~) mode_hicolecmchar::$4 ← (byte) mode_hicolecmchar::cx#2 & (byte) $f [ mode_hicolecmchar::cy#4 mode_hicolecmchar::cx#2 mode_hicolecmchar::col#2 mode_hicolecmchar::ch#2 mode_hicolecmchar::$3 mode_hicolecmchar::$4 ] ( main:2::menu:9::mode_hicolecmchar:74 [ mode_hicolecmchar::cy#4 mode_hicolecmchar::cx#2 mode_hicolecmchar::col#2 mode_hicolecmchar::ch#2 mode_hicolecmchar::$3 mode_hicolecmchar::$4 ] { } ) always clobbers reg byte a @@ -18047,8 +18044,8 @@ Statement [524] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (byte) 3 Statement [525] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2::menu:9::mode_hicolstdchar:67 [ ] { } ) always clobbers reg byte a Statement [526] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_CSEL [ ] ( main:2::menu:9::mode_hicolstdchar:67 [ ] { } ) always clobbers reg byte a Statement [527] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_hicolstdchar::CHARSET&(word) $3fff/(word) $400 [ ] ( main:2::menu:9::mode_hicolstdchar:67 [ ] { } ) always clobbers reg byte a -Statement [532] *((const nomodify byte*) BGCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_hicolstdchar:67 [ ] { } ) always clobbers reg byte a -Statement [533] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_hicolstdchar:67 [ ] { } ) always clobbers reg byte a +Statement [532] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_hicolstdchar:67 [ ] { } ) always clobbers reg byte a +Statement [533] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_hicolstdchar:67 [ ] { } ) always clobbers reg byte a Statement [536] (byte~) mode_hicolstdchar::$2 ← (byte) mode_hicolstdchar::cy#4 & (byte) $f [ mode_hicolstdchar::cy#4 mode_hicolstdchar::cx#2 mode_hicolstdchar::col#2 mode_hicolstdchar::ch#2 mode_hicolstdchar::$2 ] ( main:2::menu:9::mode_hicolstdchar:67 [ mode_hicolstdchar::cy#4 mode_hicolstdchar::cx#2 mode_hicolstdchar::col#2 mode_hicolstdchar::ch#2 mode_hicolstdchar::$2 ] { } ) always clobbers reg byte a Statement [537] (byte~) mode_hicolstdchar::$3 ← (byte~) mode_hicolstdchar::$2 << (byte) 4 [ mode_hicolstdchar::cy#4 mode_hicolstdchar::cx#2 mode_hicolstdchar::col#2 mode_hicolstdchar::ch#2 mode_hicolstdchar::$3 ] ( main:2::menu:9::mode_hicolstdchar:67 [ mode_hicolstdchar::cy#4 mode_hicolstdchar::cx#2 mode_hicolstdchar::col#2 mode_hicolstdchar::ch#2 mode_hicolstdchar::$3 ] { } ) always clobbers reg byte a Statement [538] (byte~) mode_hicolstdchar::$4 ← (byte) mode_hicolstdchar::cx#2 & (byte) $f [ mode_hicolstdchar::cy#4 mode_hicolstdchar::cx#2 mode_hicolstdchar::col#2 mode_hicolstdchar::ch#2 mode_hicolstdchar::$3 mode_hicolstdchar::$4 ] ( main:2::menu:9::mode_hicolstdchar:67 [ mode_hicolstdchar::cy#4 mode_hicolstdchar::cx#2 mode_hicolstdchar::col#2 mode_hicolstdchar::ch#2 mode_hicolstdchar::$3 mode_hicolstdchar::$4 ] { } ) always clobbers reg byte a @@ -18062,8 +18059,8 @@ Statement [555] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) Statement [556] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_CSEL [ ] ( main:2::menu:9::mode_stdbitmap:60 [ ] { } ) always clobbers reg byte a Statement [557] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_stdbitmap::BITMAP&(word) $3fff/(word) $400 [ ] ( main:2::menu:9::mode_stdbitmap:60 [ ] { } ) always clobbers reg byte a Statement [559] *((const nomodify byte*) DTV_PALETTE + (byte) mode_stdbitmap::i#2) ← *((const byte*) DTV_PALETTE_DEFAULT + (byte) mode_stdbitmap::i#2) [ mode_stdbitmap::i#2 ] ( main:2::menu:9::mode_stdbitmap:60 [ mode_stdbitmap::i#2 ] { } ) always clobbers reg byte a -Statement [562] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( main:2::menu:9::mode_stdbitmap:60 [ ] { } ) always clobbers reg byte a -Statement [563] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ ] ( main:2::menu:9::mode_stdbitmap:60 [ ] { } ) always clobbers reg byte a +Statement [562] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( main:2::menu:9::mode_stdbitmap:60 [ ] { } ) always clobbers reg byte a +Statement [563] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [ ] ( main:2::menu:9::mode_stdbitmap:60 [ ] { } ) always clobbers reg byte a Statement [566] (byte~) mode_stdbitmap::$4 ← (byte) mode_stdbitmap::cx#2 + (byte) mode_stdbitmap::cy#4 [ mode_stdbitmap::cy#4 mode_stdbitmap::cx#2 mode_stdbitmap::ch#2 mode_stdbitmap::$4 ] ( main:2::menu:9::mode_stdbitmap:60 [ mode_stdbitmap::cy#4 mode_stdbitmap::cx#2 mode_stdbitmap::ch#2 mode_stdbitmap::$4 ] { } ) always clobbers reg byte a Statement [568] (byte) mode_stdbitmap::col2#0 ← (byte) $f - (byte) mode_stdbitmap::col#0 [ mode_stdbitmap::cy#4 mode_stdbitmap::cx#2 mode_stdbitmap::ch#2 mode_stdbitmap::col#0 mode_stdbitmap::col2#0 ] ( main:2::menu:9::mode_stdbitmap:60 [ mode_stdbitmap::cy#4 mode_stdbitmap::cx#2 mode_stdbitmap::ch#2 mode_stdbitmap::col#0 mode_stdbitmap::col2#0 ] { } ) always clobbers reg byte a Statement [569] (byte~) mode_stdbitmap::$7 ← (byte) mode_stdbitmap::col#0 << (byte) 4 [ mode_stdbitmap::cy#4 mode_stdbitmap::cx#2 mode_stdbitmap::ch#2 mode_stdbitmap::col2#0 mode_stdbitmap::$7 ] ( main:2::menu:9::mode_stdbitmap:60 [ mode_stdbitmap::cy#4 mode_stdbitmap::cx#2 mode_stdbitmap::ch#2 mode_stdbitmap::col2#0 mode_stdbitmap::$7 ] { } ) always clobbers reg byte a @@ -18109,10 +18106,10 @@ Statement [763] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) Statement [764] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_CSEL|(const nomodify byte) VIC_MCM [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a Statement [765] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_mcchar::CHARSET&(word) $3fff/(word) $400 [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a Statement [767] *((const nomodify byte*) DTV_PALETTE + (byte) mode_mcchar::i#2) ← *((const byte*) DTV_PALETTE_DEFAULT + (byte) mode_mcchar::i#2) [ mode_mcchar::i#2 ] ( main:2::menu:9::mode_mcchar:53 [ mode_mcchar::i#2 ] { } ) always clobbers reg byte a -Statement [770] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a -Statement [771] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a -Statement [772] *((const nomodify byte*) BGCOL2) ← (const nomodify byte) GREEN [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a -Statement [773] *((const nomodify byte*) BGCOL3) ← (const nomodify byte) BLUE [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a +Statement [770] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a +Statement [771] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a +Statement [772] *((const nomodify byte*) BG_COLOR1) ← (const nomodify byte) GREEN [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a +Statement [773] *((const nomodify byte*) BG_COLOR2) ← (const nomodify byte) BLUE [ ] ( main:2::menu:9::mode_mcchar:53 [ ] { } ) always clobbers reg byte a Statement [776] (byte~) mode_mcchar::$2 ← (byte) mode_mcchar::cx#2 + (byte) mode_mcchar::cy#4 [ mode_mcchar::cy#4 mode_mcchar::cx#2 mode_mcchar::col#2 mode_mcchar::ch#2 mode_mcchar::$2 ] ( main:2::menu:9::mode_mcchar:53 [ mode_mcchar::cy#4 mode_mcchar::cx#2 mode_mcchar::col#2 mode_mcchar::ch#2 mode_mcchar::$2 ] { } ) always clobbers reg byte a Statement [778] *((byte*) mode_mcchar::col#2) ← (byte~) mode_mcchar::$3 [ mode_mcchar::cy#4 mode_mcchar::cx#2 mode_mcchar::col#2 mode_mcchar::ch#2 ] ( main:2::menu:9::mode_mcchar:53 [ mode_mcchar::cy#4 mode_mcchar::cx#2 mode_mcchar::col#2 mode_mcchar::ch#2 ] { } ) always clobbers reg byte y Statement [780] (byte~) mode_mcchar::$4 ← (byte) mode_mcchar::cy#4 & (byte) $f [ mode_mcchar::cy#4 mode_mcchar::col#1 mode_mcchar::cx#2 mode_mcchar::ch#2 mode_mcchar::$4 ] ( main:2::menu:9::mode_mcchar:53 [ mode_mcchar::cy#4 mode_mcchar::col#1 mode_mcchar::cx#2 mode_mcchar::ch#2 mode_mcchar::$4 ] { } ) always clobbers reg byte a @@ -18129,11 +18126,11 @@ Statement [799] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) Statement [800] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_CSEL [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a Statement [801] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_ecmchar::CHARSET&(word) $3fff/(word) $400 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a Statement [803] *((const nomodify byte*) DTV_PALETTE + (byte) mode_ecmchar::i#2) ← *((const byte*) DTV_PALETTE_DEFAULT + (byte) mode_ecmchar::i#2) [ mode_ecmchar::i#2 ] ( main:2::menu:9::mode_ecmchar:46 [ mode_ecmchar::i#2 ] { } ) always clobbers reg byte a -Statement [806] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a -Statement [807] *((const nomodify byte*) BGCOL1) ← (byte) 0 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a -Statement [808] *((const nomodify byte*) BGCOL2) ← (byte) 2 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a -Statement [809] *((const nomodify byte*) BGCOL3) ← (byte) 5 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a -Statement [810] *((const nomodify byte*) BGCOL4) ← (byte) 6 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a +Statement [806] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a +Statement [807] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a +Statement [808] *((const nomodify byte*) BG_COLOR1) ← (byte) 2 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a +Statement [809] *((const nomodify byte*) BG_COLOR2) ← (byte) 5 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a +Statement [810] *((const nomodify byte*) BG_COLOR3) ← (byte) 6 [ ] ( main:2::menu:9::mode_ecmchar:46 [ ] { } ) always clobbers reg byte a Statement [813] (byte~) mode_ecmchar::$2 ← (byte) mode_ecmchar::cx#2 + (byte) mode_ecmchar::cy#4 [ mode_ecmchar::cy#4 mode_ecmchar::cx#2 mode_ecmchar::col#2 mode_ecmchar::ch#2 mode_ecmchar::$2 ] ( main:2::menu:9::mode_ecmchar:46 [ mode_ecmchar::cy#4 mode_ecmchar::cx#2 mode_ecmchar::col#2 mode_ecmchar::ch#2 mode_ecmchar::$2 ] { } ) always clobbers reg byte a Statement [815] *((byte*) mode_ecmchar::col#2) ← (byte~) mode_ecmchar::$3 [ mode_ecmchar::cy#4 mode_ecmchar::cx#2 mode_ecmchar::col#2 mode_ecmchar::ch#2 ] ( main:2::menu:9::mode_ecmchar:46 [ mode_ecmchar::cy#4 mode_ecmchar::cx#2 mode_ecmchar::col#2 mode_ecmchar::ch#2 ] { } ) always clobbers reg byte y Statement [817] (byte~) mode_ecmchar::$4 ← (byte) mode_ecmchar::cy#4 & (byte) $f [ mode_ecmchar::cy#4 mode_ecmchar::col#1 mode_ecmchar::cx#2 mode_ecmchar::ch#2 mode_ecmchar::$4 ] ( main:2::menu:9::mode_ecmchar:46 [ mode_ecmchar::cy#4 mode_ecmchar::col#1 mode_ecmchar::cx#2 mode_ecmchar::ch#2 mode_ecmchar::$4 ] { } ) always clobbers reg byte a @@ -18150,8 +18147,8 @@ Statement [836] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) Statement [837] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_CSEL [ ] ( main:2::menu:9::mode_stdchar:38 [ ] { } ) always clobbers reg byte a Statement [838] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) mode_stdchar::CHARSET&(word) $3fff/(word) $400 [ ] ( main:2::menu:9::mode_stdchar:38 [ ] { } ) always clobbers reg byte a Statement [840] *((const nomodify byte*) DTV_PALETTE + (byte) mode_stdchar::i#2) ← *((const byte*) DTV_PALETTE_DEFAULT + (byte) mode_stdchar::i#2) [ mode_stdchar::i#2 ] ( main:2::menu:9::mode_stdchar:38 [ mode_stdchar::i#2 ] { } ) always clobbers reg byte a -Statement [843] *((const nomodify byte*) BGCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_stdchar:38 [ ] { } ) always clobbers reg byte a -Statement [844] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2::menu:9::mode_stdchar:38 [ ] { } ) always clobbers reg byte a +Statement [843] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_stdchar:38 [ ] { } ) always clobbers reg byte a +Statement [844] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2::menu:9::mode_stdchar:38 [ ] { } ) always clobbers reg byte a Statement [847] (byte~) mode_stdchar::$2 ← (byte) mode_stdchar::cx#2 + (byte) mode_stdchar::cy#4 [ mode_stdchar::cy#4 mode_stdchar::cx#2 mode_stdchar::col#2 mode_stdchar::ch#2 mode_stdchar::$2 ] ( main:2::menu:9::mode_stdchar:38 [ mode_stdchar::cy#4 mode_stdchar::cx#2 mode_stdchar::col#2 mode_stdchar::ch#2 mode_stdchar::$2 ] { } ) always clobbers reg byte a Statement [849] *((byte*) mode_stdchar::col#2) ← (byte~) mode_stdchar::$3 [ mode_stdchar::cy#4 mode_stdchar::cx#2 mode_stdchar::col#2 mode_stdchar::ch#2 ] ( main:2::menu:9::mode_stdchar:38 [ mode_stdchar::cy#4 mode_stdchar::cx#2 mode_stdchar::col#2 mode_stdchar::ch#2 ] { } ) always clobbers reg byte y Statement [851] (byte~) mode_stdchar::$4 ← (byte) mode_stdchar::cy#4 & (byte) $f [ mode_stdchar::cy#4 mode_stdchar::col#1 mode_stdchar::cx#2 mode_stdchar::ch#2 mode_stdchar::$4 ] ( main:2::menu:9::mode_stdchar:38 [ mode_stdchar::cy#4 mode_stdchar::col#1 mode_stdchar::cx#2 mode_stdchar::ch#2 mode_stdchar::$4 ] { } ) always clobbers reg byte a @@ -19017,12 +19014,11 @@ ASSEMBLER BEFORE OPTIMIZATION .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 .label RASTER = $d012 - .label BORDERCOL = $d020 - .label BGCOL = $d021 - .label BGCOL1 = $d021 - .label BGCOL2 = $d022 - .label BGCOL3 = $d023 - .label BGCOL4 = $d024 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 + .label BG_COLOR1 = $d022 + .label BG_COLOR2 = $d023 + .label BG_COLOR3 = $d024 .label VIC_CONTROL = $d011 .label VIC_CONTROL2 = $d016 .label VIC_MEMORY = $d018 @@ -19187,13 +19183,13 @@ menu: { jmp __b4 // menu::@4 __b4: - // [25] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [25] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BGCOL - // [26] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [26] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // [27] call print_set_screen // Display menu Text // [896] phi from menu::@4 to print_set_screen [phi:menu::@4->print_set_screen] @@ -19605,10 +19601,10 @@ mode_8bppchunkybmm: { // [127] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta DTV_PLANEB_MODULO_HI - // [128] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [128] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Border color lda #0 - sta BORDERCOL + sta BORDER_COLOR // [129] phi from mode_8bppchunkybmm to mode_8bppchunkybmm::@1 [phi:mode_8bppchunkybmm->mode_8bppchunkybmm::@1] __b1_from_mode_8bppchunkybmm: // [129] phi (byte) mode_8bppchunkybmm::i#2 = (byte) 0 [phi:mode_8bppchunkybmm->mode_8bppchunkybmm::@1#0] -- vbuxx=vbuc1 @@ -20046,9 +20042,9 @@ mode_ctrl: { // [209] *((const nomodify byte*) DTV_CONTROL) ← (byte) mode_ctrl::ctrl#14 -- _deref_pbuc1=vbuz1 lda.z ctrl sta DTV_CONTROL - // [210] *((const nomodify byte*) BORDERCOL) ← (byte) mode_ctrl::ctrl#14 -- _deref_pbuc1=vbuz1 + // [210] *((const nomodify byte*) BORDER_COLOR) ← (byte) mode_ctrl::ctrl#14 -- _deref_pbuc1=vbuz1 lda.z ctrl - sta BORDERCOL + sta BORDER_COLOR jmp __b1_from___b18 } // keyboard_key_pressed @@ -20200,10 +20196,10 @@ mode_8bpppixelcell: { // [241] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta DTV_PLANEB_MODULO_HI - // [242] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [242] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Border color lda #0 - sta BORDERCOL + sta BORDER_COLOR // [243] phi from mode_8bpppixelcell to mode_8bpppixelcell::@1 [phi:mode_8bpppixelcell->mode_8bpppixelcell::@1] __b1_from_mode_8bpppixelcell: // [243] phi (byte) mode_8bpppixelcell::i#2 = (byte) 0 [phi:mode_8bpppixelcell->mode_8bpppixelcell::@1#0] -- vbuxx=vbuc1 @@ -20544,10 +20540,10 @@ mode_sixsfred: { jmp __b2 // mode_sixsfred::@2 __b2: - // [303] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [303] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BORDERCOL + sta BORDER_COLOR // [304] phi from mode_sixsfred::@2 to mode_sixsfred::@3 [phi:mode_sixsfred::@2->mode_sixsfred::@3] __b3_from___b2: // [304] phi (byte*) mode_sixsfred::col#3 = (const nomodify byte*) mode_sixsfred::COLORS [phi:mode_sixsfred::@2->mode_sixsfred::@3#0] -- pbuz1=pbuc1 @@ -20746,10 +20742,10 @@ mode_sixsfred: { // Resolution: 320x200 // Linear Adressing // GfxData/PlaneA Pixel Shifter (1), CharData/PlaneB Pixel Shifter (1): -// - Plane A = 0 Plane B = 0: 8bpp BgColor0[7:0] +// - Plane A = 0 Plane B = 0: 8bpp BG_COLORor0[7:0] // - Plane A = 0 Plane B = 1: 8bpp "0000" & ColorData[7:4] // - Plane A = 1 Plane B = 0: 8bpp "0000" & ColorData[3:0] -// - Plane A = 1 Plane B = 1: 8bpp BgColor1[7:0] +// - Plane A = 1 Plane B = 1: 8bpp BG_COLORor1[7:0] mode_twoplanebitmap: { .label PLANEA = $4000 .label PLANEB = $6000 @@ -20843,17 +20839,17 @@ mode_twoplanebitmap: { jmp __b2 // mode_twoplanebitmap::@2 __b2: - // [356] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [356] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BORDERCOL - // [357] *((const nomodify byte*) BGCOL1) ← (byte) $70 -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [357] *((const nomodify byte*) BG_COLOR) ← (byte) $70 -- _deref_pbuc1=vbuc2 lda #$70 - sta BGCOL1 - // [358] *((const nomodify byte*) BGCOL2) ← (byte) $d4 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [358] *((const nomodify byte*) BG_COLOR1) ← (byte) $d4 -- _deref_pbuc1=vbuc2 // Color for bits 00 lda #$d4 - sta BGCOL2 + sta BG_COLOR1 // [359] phi from mode_twoplanebitmap::@2 to mode_twoplanebitmap::@3 [phi:mode_twoplanebitmap::@2->mode_twoplanebitmap::@3] __b3_from___b2: // [359] phi (byte*) mode_twoplanebitmap::col#3 = (const nomodify byte*) mode_twoplanebitmap::COLORS [phi:mode_twoplanebitmap::@2->mode_twoplanebitmap::@3#0] -- pbuz1=pbuc1 @@ -21174,10 +21170,10 @@ mode_sixsfred2: { jmp __b2 // mode_sixsfred2::@2 __b2: - // [416] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [416] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BORDERCOL + sta BORDER_COLOR // [417] phi from mode_sixsfred2::@2 to mode_sixsfred2::@3 [phi:mode_sixsfred2::@2->mode_sixsfred2::@3] __b3_from___b2: // [417] phi (byte*) mode_sixsfred2::col#3 = (const nomodify byte*) mode_sixsfred2::COLORS [phi:mode_sixsfred2::@2->mode_sixsfred2::@3#0] -- pbuz1=pbuc1 @@ -21384,12 +21380,12 @@ mode_sixsfred2: { // Normal VIC Adressing: // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & CharData[7:0] & RowCounter[2:0] ) //GfxData Pixel Shifter (1) if ColorData[3:3] = 0: -// - 0: 8bpp BgColor0[7:0] +// - 0: 8bpp BG_COLORor0[7:0] // - 1: 8bpp ColorData[7:4] "0" & Color[2:0] //GfxData Pixel Shifter (2) if ColorData[3:3] = 1: -// - 00: 8bpp BgColor0[7:0] -// - 01: 8bpp BgColor1[7:0] -// - 10: 8bpp BgColor2[7:0] +// - 00: 8bpp BG_COLORor0[7:0] +// - 01: 8bpp BG_COLORor1[7:0] +// - 10: 8bpp BG_COLORor2[7:0] // - 11: 8bpp ColorData[7:4] "0" & Color[2:0] mode_hicolmcchar: { .label SCREEN = $8000 @@ -21458,19 +21454,19 @@ mode_hicolmcchar: { jmp __b2 // mode_hicolmcchar::@2 __b2: - // [463] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [463] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BORDERCOL - // [464] *((const nomodify byte*) BGCOL1) ← (byte) $50 -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [464] *((const nomodify byte*) BG_COLOR) ← (byte) $50 -- _deref_pbuc1=vbuc2 lda #$50 - sta BGCOL1 - // [465] *((const nomodify byte*) BGCOL2) ← (byte) $54 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [465] *((const nomodify byte*) BG_COLOR1) ← (byte) $54 -- _deref_pbuc1=vbuc2 lda #$54 - sta BGCOL2 - // [466] *((const nomodify byte*) BGCOL3) ← (byte) $58 -- _deref_pbuc1=vbuc2 + sta BG_COLOR1 + // [466] *((const nomodify byte*) BG_COLOR2) ← (byte) $58 -- _deref_pbuc1=vbuc2 lda #$58 - sta BGCOL3 + sta BG_COLOR2 // [467] phi from mode_hicolmcchar::@2 to mode_hicolmcchar::@3 [phi:mode_hicolmcchar::@2->mode_hicolmcchar::@3] __b3_from___b2: // [467] phi (byte*) mode_hicolmcchar::ch#3 = (const nomodify byte*) mode_hicolmcchar::SCREEN [phi:mode_hicolmcchar::@2->mode_hicolmcchar::@3#0] -- pbuz1=pbuc1 @@ -21579,10 +21575,10 @@ mode_hicolmcchar: { // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & "00" & CharData[5:0] & RowCounter[2:0] ) // GfxData Pixel Shifter (1) // - 0: 8bpp Background Color -// - CharData[7:6] 00: 8bpp BgColor0[7:0] -// - CharData[7:6] 01: 8bpp BgColor1[7:0] -// - CharData[7:6] 10: 8bpp BgColor2[7:0] -// - CharData[7:6] 11: 8bpp BgColor3[7:0] +// - CharData[7:6] 00: 8bpp BG_COLORor0[7:0] +// - CharData[7:6] 01: 8bpp BG_COLORor1[7:0] +// - CharData[7:6] 10: 8bpp BG_COLORor2[7:0] +// - CharData[7:6] 11: 8bpp BG_COLORor3[7:0] // - 1: 8bpp ColorData[7:0] mode_hicolecmchar: { .label SCREEN = $8000 @@ -21651,22 +21647,22 @@ mode_hicolecmchar: { jmp __b2 // mode_hicolecmchar::@2 __b2: - // [497] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [497] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BORDERCOL - // [498] *((const nomodify byte*) BGCOL1) ← (byte) $50 -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [498] *((const nomodify byte*) BG_COLOR) ← (byte) $50 -- _deref_pbuc1=vbuc2 lda #$50 - sta BGCOL1 - // [499] *((const nomodify byte*) BGCOL2) ← (byte) $54 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [499] *((const nomodify byte*) BG_COLOR1) ← (byte) $54 -- _deref_pbuc1=vbuc2 lda #$54 - sta BGCOL2 - // [500] *((const nomodify byte*) BGCOL3) ← (byte) $58 -- _deref_pbuc1=vbuc2 + sta BG_COLOR1 + // [500] *((const nomodify byte*) BG_COLOR2) ← (byte) $58 -- _deref_pbuc1=vbuc2 lda #$58 - sta BGCOL3 - // [501] *((const nomodify byte*) BGCOL4) ← (byte) $5c -- _deref_pbuc1=vbuc2 + sta BG_COLOR2 + // [501] *((const nomodify byte*) BG_COLOR3) ← (byte) $5c -- _deref_pbuc1=vbuc2 lda #$5c - sta BGCOL4 + sta BG_COLOR3 // [502] phi from mode_hicolecmchar::@2 to mode_hicolecmchar::@3 [phi:mode_hicolecmchar::@2->mode_hicolecmchar::@3] __b3_from___b2: // [502] phi (byte*) mode_hicolecmchar::ch#3 = (const nomodify byte*) mode_hicolecmchar::SCREEN [phi:mode_hicolecmchar::@2->mode_hicolecmchar::@3#0] -- pbuz1=pbuc1 @@ -21774,7 +21770,7 @@ mode_hicolecmchar: { // Normal VIC Adressing: // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & CharData[7:0] & RowCounter[2:0] ) // Pixel Shifter (1) -// - 0: 8bpp BgColor0[7:0] +// - 0: 8bpp BG_COLORor0[7:0] // - 1: 8bpp ColorData[7:0] mode_hicolstdchar: { .label SCREEN = $8000 @@ -21843,13 +21839,13 @@ mode_hicolstdchar: { jmp __b2 // mode_hicolstdchar::@2 __b2: - // [532] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [532] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BGCOL - // [533] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [533] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // [534] phi from mode_hicolstdchar::@2 to mode_hicolstdchar::@3 [phi:mode_hicolstdchar::@2->mode_hicolstdchar::@3] __b3_from___b2: // [534] phi (byte*) mode_hicolstdchar::ch#3 = (const nomodify byte*) mode_hicolstdchar::SCREEN [phi:mode_hicolstdchar::@2->mode_hicolstdchar::@3#0] -- pbuz1=pbuc1 @@ -22018,13 +22014,13 @@ mode_stdbitmap: { jmp __b2 // mode_stdbitmap::@2 __b2: - // [562] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [562] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 // Screen colors lda #BLACK - sta BGCOL - // [563] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [563] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL + sta BORDER_COLOR // [564] phi from mode_stdbitmap::@2 to mode_stdbitmap::@3 [phi:mode_stdbitmap::@2->mode_stdbitmap::@3] __b3_from___b2: // [564] phi (byte*) mode_stdbitmap::ch#3 = (const nomodify byte*) mode_stdbitmap::SCREEN [phi:mode_stdbitmap::@2->mode_stdbitmap::@3#0] -- pbuz1=pbuc1 @@ -22965,12 +22961,12 @@ bitmap_init: { // Normal VIC Adressing: // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & CharData[7:0] & RowCounter[2:0] ) // GfxData Pixel Shifter (1) if ColorData[3:3] = 0: -// - 0: 4bpp BgColor0[3:0] +// - 0: 4bpp BG_COLORor0[3:0] // - 1: 4bpp ColorData[2:0] // GfxData Pixel Shifter (2) if ColorData[3:3] = 1: -// - 00: 4bpp BgColor0[3:0] -// - 01: 4bpp BgColor1[3:0] -// - 10: 4bpp BgColor2[3:0] +// - 00: 4bpp BG_COLORor0[3:0] +// - 01: 4bpp BG_COLORor1[3:0] +// - 10: 4bpp BG_COLORor2[3:0] // - 11: 4bpp ColorData[2:0]// Standard Character Mode (LINEAR/HICOL/CHUNK/COLDIS/ECM/MCM/BMM = 0) mode_mcchar: { .label SCREEN = $8000 @@ -23039,19 +23035,19 @@ mode_mcchar: { jmp __b2 // mode_mcchar::@2 __b2: - // [770] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [770] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BORDERCOL - // [771] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [771] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL1 - // [772] *((const nomodify byte*) BGCOL2) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [772] *((const nomodify byte*) BG_COLOR1) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BGCOL2 - // [773] *((const nomodify byte*) BGCOL3) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 + sta BG_COLOR1 + // [773] *((const nomodify byte*) BG_COLOR2) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 lda #BLUE - sta BGCOL3 + sta BG_COLOR2 // [774] phi from mode_mcchar::@2 to mode_mcchar::@3 [phi:mode_mcchar::@2->mode_mcchar::@3] __b3_from___b2: // [774] phi (byte*) mode_mcchar::ch#3 = (const nomodify byte*) mode_mcchar::SCREEN [phi:mode_mcchar::@2->mode_mcchar::@3#0] -- pbuz1=pbuc1 @@ -23166,10 +23162,10 @@ mode_mcchar: { // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & "00" & CharData[5:0] & RowCounter[2:0] ) // GfxData Pixel Shifter (1) // - 0: 4bpp Background Color -// - CharData[7:6] 00: 4bpp BgColor0[3:0] -// - CharData[7:6] 01: 4bpp BgColor1[3:0] -// - CharData[7:6] 10: 4bpp BgColor2[3:0] -// - CharData[7:6] 11: 4bpp BgColor3[3:0] +// - CharData[7:6] 00: 4bpp BG_COLORor0[3:0] +// - CharData[7:6] 01: 4bpp BG_COLORor1[3:0] +// - CharData[7:6] 10: 4bpp BG_COLORor2[3:0] +// - CharData[7:6] 11: 4bpp BG_COLORor3[3:0] // - 1: 4bpp ColorData[3:0] mode_ecmchar: { .label SCREEN = $8000 @@ -23238,22 +23234,22 @@ mode_ecmchar: { jmp __b2 // mode_ecmchar::@2 __b2: - // [806] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [806] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BORDERCOL - // [807] *((const nomodify byte*) BGCOL1) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [807] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL1 - // [808] *((const nomodify byte*) BGCOL2) ← (byte) 2 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [808] *((const nomodify byte*) BG_COLOR1) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL2 - // [809] *((const nomodify byte*) BGCOL3) ← (byte) 5 -- _deref_pbuc1=vbuc2 + sta BG_COLOR1 + // [809] *((const nomodify byte*) BG_COLOR2) ← (byte) 5 -- _deref_pbuc1=vbuc2 lda #5 - sta BGCOL3 - // [810] *((const nomodify byte*) BGCOL4) ← (byte) 6 -- _deref_pbuc1=vbuc2 + sta BG_COLOR2 + // [810] *((const nomodify byte*) BG_COLOR3) ← (byte) 6 -- _deref_pbuc1=vbuc2 lda #6 - sta BGCOL4 + sta BG_COLOR3 // [811] phi from mode_ecmchar::@2 to mode_ecmchar::@3 [phi:mode_ecmchar::@2->mode_ecmchar::@3] __b3_from___b2: // [811] phi (byte*) mode_ecmchar::ch#3 = (const nomodify byte*) mode_ecmchar::SCREEN [phi:mode_ecmchar::@2->mode_ecmchar::@3#0] -- pbuz1=pbuc1 @@ -23367,7 +23363,7 @@ mode_ecmchar: { // Normal VIC Adressing: // VicGfxData[16]: ( VicBank[1:0] & CharBase[2:0] & CharData[7:0] & RowCounter[2:0] ) // Pixel Shifter (1) -// - 0: 4bpp BgColor0[3:0] +// - 0: 4bpp BG_COLORor0[3:0] // - 1: 4bpp ColorData[3:0] mode_stdchar: { .label SCREEN = $8000 @@ -23436,13 +23432,13 @@ mode_stdchar: { jmp __b2 // mode_stdchar::@2 __b2: - // [843] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [843] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BGCOL - // [844] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [844] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // [845] phi from mode_stdchar::@2 to mode_stdchar::@3 [phi:mode_stdchar::@2->mode_stdchar::@3] __b3_from___b2: // [845] phi (byte*) mode_stdchar::ch#3 = (const nomodify byte*) mode_stdchar::SCREEN [phi:mode_stdchar::@2->mode_stdchar::@3#0] -- pbuz1=pbuc1 @@ -24686,22 +24682,21 @@ Removing instruction __bbegin: Removing instruction __breturn: Removing instruction __breturn: Succesful ASM optimization Pass5UnusedLabelElimination -Fixing long branch [252] beq __b5 to bne -Fixing long branch [159] bne __b3 to beq -Fixing long branch [164] bne __b3 to beq +Fixing long branch [251] beq __b5 to bne +Fixing long branch [158] bne __b3 to beq +Fixing long branch [163] bne __b3 to beq FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 -(const nomodify byte*) BGCOL1 = (byte*) 53281 -(const nomodify byte*) BGCOL2 = (byte*) 53282 -(const nomodify byte*) BGCOL3 = (byte*) 53283 -(const nomodify byte*) BGCOL4 = (byte*) 53284 +(const nomodify byte*) BG_COLOR = (byte*) 53281 +(const nomodify byte*) BG_COLOR1 = (byte*) 53282 +(const nomodify byte*) BG_COLOR2 = (byte*) 53283 +(const nomodify byte*) BG_COLOR3 = (byte*) 53284 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte) BLUE = (byte) 6 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*) 56576 (const nomodify byte*) COLS = (byte*) 55296 @@ -26077,12 +26072,11 @@ Score: 2307926 .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 .label RASTER = $d012 - .label BORDERCOL = $d020 - .label BGCOL = $d021 - .label BGCOL1 = $d021 - .label BGCOL2 = $d022 - .label BGCOL3 = $d023 - .label BGCOL4 = $d024 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 + .label BG_COLOR1 = $d022 + .label BG_COLOR2 = $d023 + .label BG_COLOR3 = $d024 .label VIC_CONTROL = $d011 .label VIC_CONTROL2 = $d016 .label VIC_MEMORY = $d018 @@ -26248,14 +26242,14 @@ menu: { jmp __b3 !__b3: // menu::@4 - // *BGCOL = 0 - // [25] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 0 + // [25] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BGCOL - // *BORDERCOL = 0 - // [26] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 - sta BORDERCOL + sta BG_COLOR + // *BORDER_COLOR = 0 + // [26] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR // print_set_screen(SCREEN) // [27] call print_set_screen // Display menu Text @@ -26621,10 +26615,10 @@ mode_8bppchunkybmm: { // *DTV_PLANEB_MODULO_HI = 0 // [127] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 sta DTV_PLANEB_MODULO_HI - // *BORDERCOL = $00 - // [128] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = $00 + // [128] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Border color - sta BORDERCOL + sta BORDER_COLOR // [129] phi from mode_8bppchunkybmm to mode_8bppchunkybmm::@1 [phi:mode_8bppchunkybmm->mode_8bppchunkybmm::@1] // [129] phi (byte) mode_8bppchunkybmm::i#2 = (byte) 0 [phi:mode_8bppchunkybmm->mode_8bppchunkybmm::@1#0] -- vbuxx=vbuc1 tax @@ -27002,10 +26996,10 @@ mode_ctrl: { // [209] *((const nomodify byte*) DTV_CONTROL) ← (byte) mode_ctrl::ctrl#14 -- _deref_pbuc1=vbuz1 txa sta DTV_CONTROL - // *BORDERCOL = ctrl - // [210] *((const nomodify byte*) BORDERCOL) ← (byte) mode_ctrl::ctrl#14 -- _deref_pbuc1=vbuz1 + // *BORDER_COLOR = ctrl + // [210] *((const nomodify byte*) BORDER_COLOR) ← (byte) mode_ctrl::ctrl#14 -- _deref_pbuc1=vbuz1 txa - sta BORDERCOL + sta BORDER_COLOR jmp __b1 } // keyboard_key_pressed @@ -27170,10 +27164,10 @@ mode_8bpppixelcell: { // *DTV_PLANEB_MODULO_HI = 0 // [241] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2 sta DTV_PLANEB_MODULO_HI - // *BORDERCOL = $00 - // [242] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = $00 + // [242] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Border color - sta BORDERCOL + sta BORDER_COLOR // [243] phi from mode_8bpppixelcell to mode_8bpppixelcell::@1 [phi:mode_8bpppixelcell->mode_8bpppixelcell::@1] // [243] phi (byte) mode_8bpppixelcell::i#2 = (byte) 0 [phi:mode_8bpppixelcell->mode_8bpppixelcell::@1#0] -- vbuxx=vbuc1 tax @@ -27506,11 +27500,11 @@ mode_sixsfred: { cpx #$10 bne __b1 // mode_sixsfred::@2 - // *BORDERCOL = $00 - // [303] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = $00 + // [303] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Screen colors lda #0 - sta BORDERCOL + sta BORDER_COLOR // [304] phi from mode_sixsfred::@2 to mode_sixsfred::@3 [phi:mode_sixsfred::@2->mode_sixsfred::@3] // [304] phi (byte*) mode_sixsfred::col#3 = (const nomodify byte*) mode_sixsfred::COLORS [phi:mode_sixsfred::@2->mode_sixsfred::@3#0] -- pbuz1=pbuc1 lda #mode_twoplanebitmap::@3] // [359] phi (byte*) mode_twoplanebitmap::col#3 = (const nomodify byte*) mode_twoplanebitmap::COLORS [phi:mode_twoplanebitmap::@2->mode_twoplanebitmap::@3#0] -- pbuz1=pbuc1 lda #mode_sixsfred2::@3] // [417] phi (byte*) mode_sixsfred2::col#3 = (const nomodify byte*) mode_sixsfred2::COLORS [phi:mode_sixsfred2::@2->mode_sixsfred2::@3#0] -- pbuz1=pbuc1 lda #mode_hicolmcchar::@3] // [467] phi (byte*) mode_hicolmcchar::ch#3 = (const nomodify byte*) mode_hicolmcchar::SCREEN [phi:mode_hicolmcchar::@2->mode_hicolmcchar::@3#0] -- pbuz1=pbuc1 lda #mode_hicolecmchar::@3] // [502] phi (byte*) mode_hicolecmchar::ch#3 = (const nomodify byte*) mode_hicolecmchar::SCREEN [phi:mode_hicolecmchar::@2->mode_hicolecmchar::@3#0] -- pbuz1=pbuc1 lda #mode_hicolstdchar::@3] // [534] phi (byte*) mode_hicolstdchar::ch#3 = (const nomodify byte*) mode_hicolstdchar::SCREEN [phi:mode_hicolstdchar::@2->mode_hicolstdchar::@3#0] -- pbuz1=pbuc1 lda #mode_stdbitmap::@3] // [564] phi (byte*) mode_stdbitmap::ch#3 = (const nomodify byte*) mode_stdbitmap::SCREEN [phi:mode_stdbitmap::@2->mode_stdbitmap::@3#0] -- pbuz1=pbuc1 lda #mode_mcchar::@3] // [774] phi (byte*) mode_mcchar::ch#3 = (const nomodify byte*) mode_mcchar::SCREEN [phi:mode_mcchar::@2->mode_mcchar::@3#0] -- pbuz1=pbuc1 lda #mode_ecmchar::@3] // [811] phi (byte*) mode_ecmchar::ch#3 = (const nomodify byte*) mode_ecmchar::SCREEN [phi:mode_ecmchar::@2->mode_ecmchar::@3#0] -- pbuz1=pbuc1 lda #mode_stdchar::@3] // [845] phi (byte*) mode_stdchar::ch#3 = (const nomodify byte*) mode_stdchar::SCREEN [phi:mode_stdchar::@2->mode_stdchar::@3#0] -- pbuz1=pbuc1 lda #>1)+1 .const midb = (sumb>>1)+1 .label SCREEN = $400 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // SCREEN[0] = midw lda #midw sta SCREEN @@ -21,14 +21,14 @@ main: { lda SCREEN cmp SCREEN+1 beq __b1 - // *BGCOL = 2 + // *BG_COLOR = 2 lda #2 - sta BGCOL + sta BG_COLOR // } rts __b1: - // *BGCOL = 5 + // *BG_COLOR = 5 lda #5 - sta BGCOL + sta BG_COLOR rts } diff --git a/src/test/ref/cast-precedence-problem.cfg b/src/test/ref/cast-precedence-problem.cfg index 1744dd524..c57744a5d 100644 --- a/src/test/ref/cast-precedence-problem.cfg +++ b/src/test/ref/cast-precedence-problem.cfg @@ -15,11 +15,11 @@ main: scope:[main] from @1 [6] if(*((const byte*) main::SCREEN)==*((const byte*) main::SCREEN+(byte) 1)) goto main::@1 to:main::@2 main::@2: scope:[main] from main - [7] *((const byte*) main::BGCOL) ← (byte) 2 + [7] *((const byte*) main::BG_COLOR) ← (byte) 2 to:main::@return main::@return: scope:[main] from main::@1 main::@2 [8] return to:@return main::@1: scope:[main] from main - [9] *((const byte*) main::BGCOL) ← (byte) 5 + [9] *((const byte*) main::BG_COLOR) ← (byte) 5 to:main::@return diff --git a/src/test/ref/cast-precedence-problem.log b/src/test/ref/cast-precedence-problem.log index 4189a2d9e..f749934a3 100644 --- a/src/test/ref/cast-precedence-problem.log +++ b/src/test/ref/cast-precedence-problem.log @@ -22,10 +22,10 @@ main: scope:[main] from @1 if((bool~) main::$6) goto main::@1 to:main::@2 main::@1: scope:[main] from main - *((const byte*) main::BGCOL) ← (number) 5 + *((const byte*) main::BG_COLOR) ← (number) 5 to:main::@return main::@2: scope:[main] from main - *((const byte*) main::BGCOL) ← (number) 2 + *((const byte*) main::BG_COLOR) ← (number) 2 to:main::@return main::@return: scope:[main] from main::@1 main::@2 return @@ -54,7 +54,7 @@ SYMBOL TABLE SSA (label) main::@1 (label) main::@2 (label) main::@return -(const byte*) main::BGCOL = (byte*)(number) $d021 +(const byte*) main::BG_COLOR = (byte*)(number) $d021 (const byte*) main::SCREEN = (byte*)(number) $400 (const byte) main::max = (byte) $c8 (byte) main::midb @@ -77,11 +77,11 @@ Adding number conversion cast (unumber) main::$5 in (number~) main::$5 ← (byte Adding number conversion cast (unumber) 1 in *((const byte*) main::SCREEN + (number) 1) ← (byte) main::midb#0 Adding number conversion cast (unumber) 0 in (bool~) main::$6 ← *((const byte*) main::SCREEN + (number) 0) == *((const byte*) main::SCREEN + (number) 1) Adding number conversion cast (unumber) 1 in (bool~) main::$6 ← *((const byte*) main::SCREEN + (unumber)(number) 0) == *((const byte*) main::SCREEN + (number) 1) -Adding number conversion cast (unumber) 5 in *((const byte*) main::BGCOL) ← (number) 5 -Adding number conversion cast (unumber) 2 in *((const byte*) main::BGCOL) ← (number) 2 +Adding number conversion cast (unumber) 5 in *((const byte*) main::BG_COLOR) ← (number) 5 +Adding number conversion cast (unumber) 2 in *((const byte*) main::BG_COLOR) ← (number) 2 Successful SSA optimization PassNAddNumberTypeConversions -Inlining cast *((const byte*) main::BGCOL) ← (unumber)(number) 5 -Inlining cast *((const byte*) main::BGCOL) ← (unumber)(number) 2 +Inlining cast *((const byte*) main::BG_COLOR) ← (unumber)(number) 5 +Inlining cast *((const byte*) main::BG_COLOR) ← (unumber)(number) 2 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 1024 Simplifying constant pointer cast (byte*) 53281 @@ -178,13 +178,13 @@ main: scope:[main] from @1 [6] if(*((const byte*) main::SCREEN)==*((const byte*) main::SCREEN+(byte) 1)) goto main::@1 to:main::@2 main::@2: scope:[main] from main - [7] *((const byte*) main::BGCOL) ← (byte) 2 + [7] *((const byte*) main::BG_COLOR) ← (byte) 2 to:main::@return main::@return: scope:[main] from main::@1 main::@2 [8] return to:@return main::@1: scope:[main] from main - [9] *((const byte*) main::BGCOL) ← (byte) 5 + [9] *((const byte*) main::BG_COLOR) ← (byte) 5 to:main::@return @@ -230,7 +230,7 @@ main: { .const midw = (sumw>>1)+1 .const midb = (sumb>>1)+1 .label SCREEN = $400 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // [4] *((const byte*) main::SCREEN) ← (const byte) main::midw#0 -- _deref_pbuc1=vbuc2 lda #midw sta SCREEN @@ -244,9 +244,9 @@ main: { jmp __b2 // main::@2 __b2: - // [7] *((const byte*) main::BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [7] *((const byte*) main::BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -254,9 +254,9 @@ main: { rts // main::@1 __b1: - // [9] *((const byte*) main::BGCOL) ← (byte) 5 -- _deref_pbuc1=vbuc2 + // [9] *((const byte*) main::BG_COLOR) ← (byte) 5 -- _deref_pbuc1=vbuc2 lda #5 - sta BGCOL + sta BG_COLOR jmp __breturn } // File Data @@ -265,8 +265,8 @@ REGISTER UPLIFT POTENTIAL REGISTERS Statement [4] *((const byte*) main::SCREEN) ← (const byte) main::midw#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [5] *((const byte*) main::SCREEN+(byte) 1) ← (const byte) main::midb#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [6] if(*((const byte*) main::SCREEN)==*((const byte*) main::SCREEN+(byte) 1)) goto main::@1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [7] *((const byte*) main::BGCOL) ← (byte) 2 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [9] *((const byte*) main::BGCOL) ← (byte) 5 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [7] *((const byte*) main::BG_COLOR) ← (byte) 2 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [9] *((const byte*) main::BG_COLOR) ← (byte) 5 [ ] ( main:2 [ ] { } ) always clobbers reg byte a REGISTER UPLIFT SCOPES Uplift Scope [main] @@ -306,7 +306,7 @@ main: { .const midw = (sumw>>1)+1 .const midb = (sumb>>1)+1 .label SCREEN = $400 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // [4] *((const byte*) main::SCREEN) ← (const byte) main::midw#0 -- _deref_pbuc1=vbuc2 lda #midw sta SCREEN @@ -320,9 +320,9 @@ main: { jmp __b2 // main::@2 __b2: - // [7] *((const byte*) main::BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [7] *((const byte*) main::BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -330,9 +330,9 @@ main: { rts // main::@1 __b1: - // [9] *((const byte*) main::BGCOL) ← (byte) 5 -- _deref_pbuc1=vbuc2 + // [9] *((const byte*) main::BG_COLOR) ← (byte) 5 -- _deref_pbuc1=vbuc2 lda #5 - sta BGCOL + sta BG_COLOR jmp __breturn } // File Data @@ -367,7 +367,7 @@ FINAL SYMBOL TABLE (label) main::@1 (label) main::@2 (label) main::@return -(const byte*) main::BGCOL = (byte*) 53281 +(const byte*) main::BG_COLOR = (byte*) 53281 (const byte*) main::SCREEN = (byte*) 1024 (const byte) main::max = (byte) $c8 (byte) main::midb @@ -407,7 +407,7 @@ main: { .const midw = (sumw>>1)+1 .const midb = (sumb>>1)+1 .label SCREEN = $400 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // SCREEN[0] = midw // [4] *((const byte*) main::SCREEN) ← (const byte) main::midw#0 -- _deref_pbuc1=vbuc2 lda #midw @@ -422,20 +422,20 @@ main: { cmp SCREEN+1 beq __b1 // main::@2 - // *BGCOL = 2 - // [7] *((const byte*) main::BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 2 + // [7] *((const byte*) main::BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR // main::@return // } // [8] return rts // main::@1 __b1: - // *BGCOL = 5 - // [9] *((const byte*) main::BGCOL) ← (byte) 5 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 5 + // [9] *((const byte*) main::BG_COLOR) ← (byte) 5 -- _deref_pbuc1=vbuc2 lda #5 - sta BGCOL + sta BG_COLOR rts } // File Data diff --git a/src/test/ref/cast-precedence-problem.sym b/src/test/ref/cast-precedence-problem.sym index ab59bd2fe..44ba2c77d 100644 --- a/src/test/ref/cast-precedence-problem.sym +++ b/src/test/ref/cast-precedence-problem.sym @@ -5,7 +5,7 @@ (label) main::@1 (label) main::@2 (label) main::@return -(const byte*) main::BGCOL = (byte*) 53281 +(const byte*) main::BG_COLOR = (byte*) 53281 (const byte*) main::SCREEN = (byte*) 1024 (const byte) main::max = (byte) $c8 (byte) main::midb diff --git a/src/test/ref/clobber-a-problem.asm b/src/test/ref/clobber-a-problem.asm index 95293739d..0714b052a 100644 --- a/src/test/ref/clobber-a-problem.asm +++ b/src/test/ref/clobber-a-problem.asm @@ -4,7 +4,7 @@ .const DARK_GREY = $b .const BLACK = 0 .label KERNEL_IRQ = $314 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label RASTER = $d012 .label irq_raster_next = 2 __bbegin: @@ -25,9 +25,9 @@ main: { irq: { sta rega+1 stx regx+1 - // *BORDERCOL = DARK_GREY + // *BORDER_COLOR = DARK_GREY lda #DARK_GREY - sta BORDERCOL + sta BORDER_COLOR // irq_raster_next += 21 lax.z irq_raster_next axs #-[$15] @@ -45,9 +45,9 @@ irq: { __b1: // *RASTER = raster_next stx RASTER - // *BORDERCOL = BLACK + // *BORDER_COLOR = BLACK lda #BLACK - sta BORDERCOL + sta BORDER_COLOR // } rega: lda #00 diff --git a/src/test/ref/clobber-a-problem.cfg b/src/test/ref/clobber-a-problem.cfg index 00e810bbe..32d3e6f67 100644 --- a/src/test/ref/clobber-a-problem.cfg +++ b/src/test/ref/clobber-a-problem.cfg @@ -21,7 +21,7 @@ main::@return: scope:[main] from main interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from - [7] *((const byte*) BORDERCOL) ← (const byte) DARK_GREY + [7] *((const byte*) BORDER_COLOR) ← (const byte) DARK_GREY [8] (volatile byte) irq_raster_next ← (volatile byte) irq_raster_next + (byte) $15 [9] (byte) irq::raster_next#0 ← (volatile byte) irq_raster_next [10] (byte~) irq::$0 ← (byte) irq::raster_next#0 & (byte) 7 @@ -33,7 +33,7 @@ irq::@2: scope:[irq] from irq irq::@1: scope:[irq] from irq irq::@2 [13] (byte) irq::raster_next#2 ← phi( irq/(byte) irq::raster_next#0 irq::@2/(byte) irq::raster_next#1 ) [14] *((const byte*) RASTER) ← (byte) irq::raster_next#2 - [15] *((const byte*) BORDERCOL) ← (const byte) BLACK + [15] *((const byte*) BORDER_COLOR) ← (const byte) BLACK to:irq::@return irq::@return: scope:[irq] from irq::@1 [16] return diff --git a/src/test/ref/clobber-a-problem.log b/src/test/ref/clobber-a-problem.log index 6edfbc08a..dad19b459 100644 --- a/src/test/ref/clobber-a-problem.log +++ b/src/test/ref/clobber-a-problem.log @@ -17,7 +17,7 @@ main::@return: scope:[main] from main interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from - *((const byte*) BORDERCOL) ← (const byte) DARK_GREY + *((const byte*) BORDER_COLOR) ← (const byte) DARK_GREY (volatile byte) irq_raster_next ← (volatile byte) irq_raster_next + (number) $15 (byte) irq::raster_next#0 ← (volatile byte) irq_raster_next (number~) irq::$0 ← (byte) irq::raster_next#0 & (number) 7 @@ -28,7 +28,7 @@ irq: scope:[irq] from irq::@1: scope:[irq] from irq irq::@2 (byte) irq::raster_next#2 ← phi( irq/(byte) irq::raster_next#0 irq::@2/(byte) irq::raster_next#1 ) *((const byte*) RASTER) ← (byte) irq::raster_next#2 - *((const byte*) BORDERCOL) ← (const byte) BLACK + *((const byte*) BORDER_COLOR) ← (const byte) BLACK to:irq::@return irq::@2: scope:[irq] from irq (byte) irq::raster_next#3 ← phi( irq/(byte) irq::raster_next#0 ) @@ -51,7 +51,7 @@ SYMBOL TABLE SSA (label) @begin (label) @end (const byte) BLACK = (byte) 0 -(const byte*) BORDERCOL = (byte*)(number) $d020 +(const byte*) BORDER_COLOR = (byte*)(number) $d020 (const byte) DARK_GREY = (byte) $b (const nomodify void()**) KERNEL_IRQ = (void()**)(number) $314 (const byte*) RASTER = (byte*)(number) $d012 @@ -139,7 +139,7 @@ main::@return: scope:[main] from main interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from - [7] *((const byte*) BORDERCOL) ← (const byte) DARK_GREY + [7] *((const byte*) BORDER_COLOR) ← (const byte) DARK_GREY [8] (volatile byte) irq_raster_next ← (volatile byte) irq_raster_next + (byte) $15 [9] (byte) irq::raster_next#0 ← (volatile byte) irq_raster_next [10] (byte~) irq::$0 ← (byte) irq::raster_next#0 & (byte) 7 @@ -151,7 +151,7 @@ irq::@2: scope:[irq] from irq irq::@1: scope:[irq] from irq irq::@2 [13] (byte) irq::raster_next#2 ← phi( irq/(byte) irq::raster_next#0 irq::@2/(byte) irq::raster_next#1 ) [14] *((const byte*) RASTER) ← (byte) irq::raster_next#2 - [15] *((const byte*) BORDERCOL) ← (const byte) BLACK + [15] *((const byte*) BORDER_COLOR) ← (const byte) BLACK to:irq::@return irq::@return: scope:[irq] from irq::@1 [16] return @@ -191,7 +191,7 @@ Target platform is c64basic / MOS6502X .const DARK_GREY = $b .const BLACK = 0 .label KERNEL_IRQ = $314 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label RASTER = $d012 .label irq_raster_next = 3 // @begin @@ -235,9 +235,9 @@ irq: { sta rega+1 stx regx+1 sty regy+1 - // [7] *((const byte*) BORDERCOL) ← (const byte) DARK_GREY -- _deref_pbuc1=vbuc2 + // [7] *((const byte*) BORDER_COLOR) ← (const byte) DARK_GREY -- _deref_pbuc1=vbuc2 lda #DARK_GREY - sta BORDERCOL + sta BORDER_COLOR // [8] (volatile byte) irq_raster_next ← (volatile byte) irq_raster_next + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax.z irq_raster_next axs #-[$15] @@ -269,9 +269,9 @@ irq: { // [14] *((const byte*) RASTER) ← (byte) irq::raster_next#2 -- _deref_pbuc1=vbuz1 lda.z raster_next sta RASTER - // [15] *((const byte*) BORDERCOL) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 + // [15] *((const byte*) BORDER_COLOR) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL + sta BORDER_COLOR jmp __breturn // irq::@return __breturn: @@ -289,9 +289,9 @@ irq: { REGISTER UPLIFT POTENTIAL REGISTERS Statement [1] (volatile byte) irq_raster_next ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [5] *((const nomodify void()**) KERNEL_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:3 [ ] { } ) always clobbers reg byte a -Statement [7] *((const byte*) BORDERCOL) ← (const byte) DARK_GREY [ irq_raster_next ] ( [ irq_raster_next ] { } ) always clobbers reg byte a +Statement [7] *((const byte*) BORDER_COLOR) ← (const byte) DARK_GREY [ irq_raster_next ] ( [ irq_raster_next ] { } ) always clobbers reg byte a Statement [8] (volatile byte) irq_raster_next ← (volatile byte) irq_raster_next + (byte) $15 [ irq_raster_next ] ( [ irq_raster_next ] { } ) always clobbers reg byte a reg byte x -Statement [15] *((const byte*) BORDERCOL) ← (const byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a +Statement [15] *((const byte*) BORDER_COLOR) ← (const byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a Statement [16] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y Potential registers zp[1]:2 [ irq::raster_next#2 irq::raster_next#0 irq::raster_next#1 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:3 [ irq_raster_next ] : zp[1]:3 , @@ -323,7 +323,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const DARK_GREY = $b .const BLACK = 0 .label KERNEL_IRQ = $314 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label RASTER = $d012 .label irq_raster_next = 2 // @begin @@ -364,9 +364,9 @@ irq: { // entry interrupt(HARDWARE_CLOBBER) sta rega+1 stx regx+1 - // [7] *((const byte*) BORDERCOL) ← (const byte) DARK_GREY -- _deref_pbuc1=vbuc2 + // [7] *((const byte*) BORDER_COLOR) ← (const byte) DARK_GREY -- _deref_pbuc1=vbuc2 lda #DARK_GREY - sta BORDERCOL + sta BORDER_COLOR // [8] (volatile byte) irq_raster_next ← (volatile byte) irq_raster_next + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax.z irq_raster_next axs #-[$15] @@ -394,9 +394,9 @@ irq: { __b1: // [14] *((const byte*) RASTER) ← (byte) irq::raster_next#2 -- _deref_pbuc1=vbuxx stx RASTER - // [15] *((const byte*) BORDERCOL) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 + // [15] *((const byte*) BORDER_COLOR) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL + sta BORDER_COLOR jmp __breturn // irq::@return __breturn: @@ -442,7 +442,7 @@ FINAL SYMBOL TABLE (label) @begin (label) @end (const byte) BLACK = (byte) 0 -(const byte*) BORDERCOL = (byte*) 53280 +(const byte*) BORDER_COLOR = (byte*) 53280 (const byte) DARK_GREY = (byte) $b (const nomodify void()**) KERNEL_IRQ = (void()**) 788 (const byte*) RASTER = (byte*) 53266 @@ -476,7 +476,7 @@ Score: 159 .const DARK_GREY = $b .const BLACK = 0 .label KERNEL_IRQ = $314 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label RASTER = $d012 .label irq_raster_next = 2 // @begin @@ -511,10 +511,10 @@ irq: { // entry interrupt(HARDWARE_CLOBBER) sta rega+1 stx regx+1 - // *BORDERCOL = DARK_GREY - // [7] *((const byte*) BORDERCOL) ← (const byte) DARK_GREY -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = DARK_GREY + // [7] *((const byte*) BORDER_COLOR) ← (const byte) DARK_GREY -- _deref_pbuc1=vbuc2 lda #DARK_GREY - sta BORDERCOL + sta BORDER_COLOR // irq_raster_next += 21 // [8] (volatile byte) irq_raster_next ← (volatile byte) irq_raster_next + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax.z irq_raster_next @@ -542,10 +542,10 @@ irq: { // *RASTER = raster_next // [14] *((const byte*) RASTER) ← (byte) irq::raster_next#2 -- _deref_pbuc1=vbuxx stx RASTER - // *BORDERCOL = BLACK - // [15] *((const byte*) BORDERCOL) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = BLACK + // [15] *((const byte*) BORDER_COLOR) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL + sta BORDER_COLOR // irq::@return // } // [16] return - exit interrupt(HARDWARE_CLOBBER) diff --git a/src/test/ref/clobber-a-problem.sym b/src/test/ref/clobber-a-problem.sym index 4824e941c..7b1bde9ac 100644 --- a/src/test/ref/clobber-a-problem.sym +++ b/src/test/ref/clobber-a-problem.sym @@ -3,7 +3,7 @@ (label) @begin (label) @end (const byte) BLACK = (byte) 0 -(const byte*) BORDERCOL = (byte*) 53280 +(const byte*) BORDER_COLOR = (byte*) 53280 (const byte) DARK_GREY = (byte) $b (const nomodify void()**) KERNEL_IRQ = (void()**) 788 (const byte*) RASTER = (byte*) 53266 diff --git a/src/test/ref/complex/ataritempest/ataritempest.asm b/src/test/ref/complex/ataritempest/ataritempest.asm index 45a2d3eb2..a4e2000aa 100644 --- a/src/test/ref/complex/ataritempest/ataritempest.asm +++ b/src/test/ref/complex/ataritempest/ataritempest.asm @@ -9,12 +9,12 @@ .segmentdef Vectors [start=$FFFA, min=$FFFA, max=$FFFF, fill] .segment Code init: - .label BGCOL = $c01a + .label BG_COLOR = $c01a __bbegin: .segment Code main: { - // (*BGCOL)++; - inc BGCOL + // (*BG_COLOR)++; + inc BG_COLOR // } rts } @@ -22,8 +22,8 @@ nmiHandler: { sta rega+1 stx regx+1 sty regy+1 - // (*BGCOL)++; - inc BGCOL + // (*BG_COLOR)++; + inc BG_COLOR // } rega: lda #00 diff --git a/src/test/ref/complex/ataritempest/ataritempest.cfg b/src/test/ref/complex/ataritempest/ataritempest.cfg index 357afc5bb..2067a7287 100644 --- a/src/test/ref/complex/ataritempest/ataritempest.cfg +++ b/src/test/ref/complex/ataritempest/ataritempest.cfg @@ -10,7 +10,7 @@ (void()) main() main: scope:[main] from @1 - [4] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + [4] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) to:main::@return main::@return: scope:[main] from main [5] return @@ -18,7 +18,7 @@ main::@return: scope:[main] from main interrupt(HARDWARE_ALL)(void()) nmiHandler() nmiHandler: scope:[nmiHandler] from - [6] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + [6] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) to:nmiHandler::@return nmiHandler::@return: scope:[nmiHandler] from nmiHandler [7] return diff --git a/src/test/ref/complex/ataritempest/ataritempest.log b/src/test/ref/complex/ataritempest/ataritempest.log index 39e890991..d05ff3424 100644 --- a/src/test/ref/complex/ataritempest/ataritempest.log +++ b/src/test/ref/complex/ataritempest/ataritempest.log @@ -21,7 +21,7 @@ entryPoint::@return: scope:[entryPoint] from entryPoint::@1 interrupt(HARDWARE_ALL)(void()) nmiHandler() nmiHandler: scope:[nmiHandler] from - *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) to:nmiHandler::@return nmiHandler::@return: scope:[nmiHandler] from nmiHandler return @@ -29,7 +29,7 @@ nmiHandler::@return: scope:[nmiHandler] from nmiHandler (void()) main() main: scope:[main] from @1 - *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) to:main::@return main::@return: scope:[main] from main return @@ -46,7 +46,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $c01a +(const nomodify byte*) BG_COLOR = (byte*)(number) $c01a (const byte*) MESSAGE[] = (byte*) "hello world" (const byte*) SCREEN[(number) $32] = { fill( $32, 0) } (const to_nomodify void()**) VECTORS[] = { &interrupt(HARDWARE_ALL)(void()) nmiHandler(), &(void()) entryPoint() } @@ -112,7 +112,7 @@ FINAL CONTROL FLOW GRAPH (void()) main() main: scope:[main] from @1 - [4] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + [4] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) to:main::@return main::@return: scope:[main] from main [5] return @@ -120,7 +120,7 @@ main::@return: scope:[main] from main interrupt(HARDWARE_ALL)(void()) nmiHandler() nmiHandler: scope:[nmiHandler] from - [6] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + [6] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) to:nmiHandler::@return nmiHandler::@return: scope:[nmiHandler] from nmiHandler [7] return @@ -171,7 +171,7 @@ Target platform is custom / MOS6502X .segment Code init: // Global Constants & labels - .label BGCOL = $c01a + .label BG_COLOR = $c01a // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -189,8 +189,8 @@ __bend: .segment Code // main main: { - // [4] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [4] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // main::@return __breturn: @@ -203,8 +203,8 @@ nmiHandler: { sta rega+1 stx regx+1 sty regy+1 - // [6] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [6] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // nmiHandler::@return __breturn: @@ -291,7 +291,7 @@ ASSEMBLER BEFORE OPTIMIZATION .segment Code init: // Global Constants & labels - .label BGCOL = $c01a + .label BG_COLOR = $c01a // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -309,8 +309,8 @@ __bend: .segment Code // main main: { - // [4] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [4] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // main::@return __breturn: @@ -323,8 +323,8 @@ nmiHandler: { sta rega+1 stx regx+1 sty regy+1 - // [6] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [6] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // nmiHandler::@return __breturn: @@ -402,7 +402,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 49178 +(const nomodify byte*) BG_COLOR = (byte*) 49178 (const byte*) MESSAGE[] = (byte*) "hello world" (const byte*) SCREEN[(number) $32] = { fill( $32, 0) } (const to_nomodify void()**) VECTORS[] = { &interrupt(HARDWARE_ALL)(void()) nmiHandler(), &(void()) entryPoint() } @@ -437,7 +437,7 @@ Score: 336 .segment Code init: // Global Constants & labels - .label BGCOL = $c01a + .label BG_COLOR = $c01a // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -448,9 +448,9 @@ __bbegin: .segment Code // main main: { - // (*BGCOL)++; - // [4] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // (*BG_COLOR)++; + // [4] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // main::@return // } // [5] return @@ -462,9 +462,9 @@ nmiHandler: { sta rega+1 stx regx+1 sty regy+1 - // (*BGCOL)++; - // [6] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // (*BG_COLOR)++; + // [6] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // nmiHandler::@return // } // [7] return - exit interrupt(HARDWARE_ALL) diff --git a/src/test/ref/complex/ataritempest/ataritempest.sym b/src/test/ref/complex/ataritempest/ataritempest.sym index 8c19fb73e..85cc7ee8b 100644 --- a/src/test/ref/complex/ataritempest/ataritempest.sym +++ b/src/test/ref/complex/ataritempest/ataritempest.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 49178 +(const nomodify byte*) BG_COLOR = (byte*) 49178 (const byte*) MESSAGE[] = (byte*) "hello world" (const byte*) SCREEN[(number) $32] = { fill( $32, 0) } (const to_nomodify void()**) VECTORS[] = { &interrupt(HARDWARE_ALL)(void()) nmiHandler(), &(void()) entryPoint() } diff --git a/src/test/ref/complex/clearscreen/clearscreen.asm b/src/test/ref/complex/clearscreen/clearscreen.asm index 7e8912c76..eeed3879d 100644 --- a/src/test/ref/complex/clearscreen/clearscreen.asm +++ b/src/test/ref/complex/clearscreen/clearscreen.asm @@ -48,7 +48,7 @@ .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_MC = $d01c @@ -704,9 +704,9 @@ initSprites: { ldx #0 // Initialize sprite registers __b3: - // SPRITES_COLS[i] = LIGHT_BLUE + // SPRITES_COLOR[i] = LIGHT_BLUE lda #LIGHT_BLUE - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // for( char i: 0..7) inx cpx #8 @@ -1191,7 +1191,7 @@ processChars: { lda SPRITES_ENABLE ora.z bitmask sta SPRITES_ENABLE - // SPRITES_COLS[processing->id] = processing->col + // SPRITES_COLOR[processing->id] = processing->col // Set the sprite color ldy #OFFSET_STRUCT_PROCESSINGSPRITE_COL lda (processing),y @@ -1200,7 +1200,7 @@ processChars: { lda (processing),y tay pla - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // *(SCREEN+SPRITE_PTRS+processing->id) = processing->ptr // Set sprite pointer ldy #OFFSET_STRUCT_PROCESSINGSPRITE_PTR diff --git a/src/test/ref/complex/clearscreen/clearscreen.cfg b/src/test/ref/complex/clearscreen/clearscreen.cfg index 0b54b1b72..1b58c885b 100644 --- a/src/test/ref/complex/clearscreen/clearscreen.cfg +++ b/src/test/ref/complex/clearscreen/clearscreen.cfg @@ -270,7 +270,7 @@ initSprites::@1: scope:[initSprites] from initSprites initSprites::@2 to:initSprites::@3 initSprites::@3: scope:[initSprites] from initSprites::@1 initSprites::@3 [150] (byte) initSprites::i#2 ← phi( initSprites::@1/(byte) 0 initSprites::@3/(byte) initSprites::i#1 ) - [151] *((const nomodify byte*) SPRITES_COLS + (byte) initSprites::i#2) ← (const nomodify byte) LIGHT_BLUE + [151] *((const nomodify byte*) SPRITES_COLOR + (byte) initSprites::i#2) ← (const nomodify byte) LIGHT_BLUE [152] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2 [153] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@3 to:initSprites::@4 @@ -485,7 +485,7 @@ processChars::@10: scope:[processChars] from processChars::@1 processChars::@11: scope:[processChars] from processChars::@10 [256] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' [257] *((const nomodify byte*) SPRITES_ENABLE) ← *((const nomodify byte*) SPRITES_ENABLE) | (byte) processChars::bitmask#0 - [258] *((const nomodify byte*) SPRITES_COLS + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) + [258] *((const nomodify byte*) SPRITES_COLOR + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) [259] *((const nomodify byte*) SCREEN+(const nomodify word) SPRITE_PTRS + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) [260] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING to:processChars::@3 diff --git a/src/test/ref/complex/clearscreen/clearscreen.log b/src/test/ref/complex/clearscreen/clearscreen.log index 0d121521f..9931195a6 100644 --- a/src/test/ref/complex/clearscreen/clearscreen.log +++ b/src/test/ref/complex/clearscreen/clearscreen.log @@ -695,7 +695,7 @@ processChars::@11: scope:[processChars] from processChars::@10 (byte*~) processChars::$36 ← (byte*~) processChars::$62 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL (byte*~) processChars::$63 ← (byte*)(struct ProcessingSprite*) processChars::processing#3 (byte*~) processChars::$37 ← (byte*~) processChars::$63 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID - *((const nomodify byte*) SPRITES_COLS + *((byte*~) processChars::$37)) ← *((byte*~) processChars::$36) + *((const nomodify byte*) SPRITES_COLOR + *((byte*~) processChars::$37)) ← *((byte*~) processChars::$36) (byte*~) processChars::$64 ← (byte*)(struct ProcessingSprite*) processChars::processing#3 (byte*~) processChars::$38 ← (byte*~) processChars::$64 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID (byte*~) processChars::$7 ← (const nomodify byte*) SCREEN+(const nomodify word) SPRITE_PTRS + *((byte*~) processChars::$38) @@ -921,7 +921,7 @@ initSprites::@3: scope:[initSprites] from initSprites::@1 to:initSprites::@4 initSprites::@4: scope:[initSprites] from initSprites::@3 initSprites::@4 (byte) initSprites::i#2 ← phi( initSprites::@3/(byte) initSprites::i#0 initSprites::@4/(byte) initSprites::i#1 ) - *((const nomodify byte*) SPRITES_COLS + (byte) initSprites::i#2) ← (const nomodify byte) LIGHT_BLUE + *((const nomodify byte*) SPRITES_COLOR + (byte) initSprites::i#2) ← (const nomodify byte) LIGHT_BLUE (byte) initSprites::i#1 ← (byte) initSprites::i#2 + rangenext(0,7) (bool~) initSprites::$1 ← (byte) initSprites::i#1 != rangelast(0,7) if((bool~) initSprites::$1) goto initSprites::@4 @@ -989,8 +989,8 @@ irqTop::@3: scope:[irqTop] from irqTop::@2 irqTop::@3 if((bool~) irqTop::$1) goto irqTop::@3 to:irqTop::@4 irqTop::@4: scope:[irqTop] from irqTop::@3 - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) WHITE - *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) WHITE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE (byte) irqTop::i1#0 ← (byte) 0 to:irqTop::@5 irqTop::@5: scope:[irqTop] from irqTop::@4 irqTop::@5 @@ -1000,8 +1000,8 @@ irqTop::@5: scope:[irqTop] from irqTop::@4 irqTop::@5 if((bool~) irqTop::$2) goto irqTop::@5 to:irqTop::@6 irqTop::@6: scope:[irqTop] from irqTop::@5 - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) LIGHT_BLUE - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLUE + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) LIGHT_BLUE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLUE to:irqTop::@1 irqTop::@return: scope:[irqTop] from irqTop::@1 return @@ -1029,8 +1029,8 @@ irqBottom::@5: scope:[irqBottom] from irqBottom::@3 irqBottom::@5 if((bool~) irqBottom::$3) goto irqBottom::@5 to:irqBottom::@6 irqBottom::@6: scope:[irqBottom] from irqBottom::@5 - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) WHITE - *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) WHITE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE to:irqBottom::@1 irqBottom::@2: scope:[irqBottom] from irqBottom::@4 irqBottom::@7 *((const nomodify byte*) RASTER) ← (const nomodify byte) RASTER_IRQ_TOP @@ -1038,8 +1038,8 @@ irqBottom::@2: scope:[irqBottom] from irqBottom::@4 irqBottom::@7 *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irqBottom::@return irqBottom::@4: scope:[irqBottom] from irqBottom::@7 - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) LIGHT_BLUE - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLUE + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) LIGHT_BLUE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLUE to:irqBottom::@2 irqBottom::@return: scope:[irqBottom] from irqBottom::@2 return @@ -1065,9 +1065,9 @@ SYMBOL TABLE SSA (label) @6 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const nomodify byte) BLUE = (byte) 6 -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify byte) BORDER_XPOS_LEFT = (byte) $18 (const nomodify word) BORDER_XPOS_RIGHT = (word) $158 (const nomodify byte) BORDER_YPOS_BOTTOM = (byte) $fa @@ -1257,7 +1257,7 @@ SYMBOL TABLE SSA (byte*) SCREEN_DIST#9 (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE = (byte) $e (const byte) SIZEOF_WORD = (byte) 2 -(const nomodify byte*) SPRITES_COLS = (byte*)(number) $d027 +(const nomodify byte*) SPRITES_COLOR = (byte*)(number) $d027 (const nomodify byte*) SPRITES_ENABLE = (byte*)(number) $d015 (const nomodify byte*) SPRITES_EXPAND_X = (byte*)(number) $d01d (const nomodify byte*) SPRITES_EXPAND_Y = (byte*)(number) $d017 @@ -2753,8 +2753,8 @@ Converting *(pointer+n) to pointer[n] [214] if(*((byte*~) processChars::$32)==(c Converting *(pointer+n) to pointer[n] [222] if(*((byte*~) processChars::$33)!=(const byte) STATUS_NEW) goto processChars::@3 -- *(processChars::$59 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) Converting *(pointer+n) to pointer[n] [225] (word) processChars::xpos#0 ← *((word*~) processChars::$34) >> (byte) 4 -- *(processChars::$60 + OFFSET_STRUCT_PROCESSINGSPRITE_X) Converting *(pointer+n) to pointer[n] [231] *(*((byte**~) processChars::$35)) ← (byte) ' ' -- *(processChars::$61 + OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR) -Converting *(pointer+n) to pointer[n] [237] *((const nomodify byte*) SPRITES_COLS + *((byte*~) processChars::$37)) ← *((byte*~) processChars::$36) -- *(processChars::$62 + OFFSET_STRUCT_PROCESSINGSPRITE_COL) -Converting *(pointer+n) to pointer[n] [237] *((const nomodify byte*) SPRITES_COLS + *((byte*~) processChars::$37)) ← *((byte*~) processChars::$62 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- *(processChars::$63 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) +Converting *(pointer+n) to pointer[n] [237] *((const nomodify byte*) SPRITES_COLOR + *((byte*~) processChars::$37)) ← *((byte*~) processChars::$36) -- *(processChars::$62 + OFFSET_STRUCT_PROCESSINGSPRITE_COL) +Converting *(pointer+n) to pointer[n] [237] *((const nomodify byte*) SPRITES_COLOR + *((byte*~) processChars::$37)) ← *((byte*~) processChars::$62 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- *(processChars::$63 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) Converting *(pointer+n) to pointer[n] [240] (byte*~) processChars::$7 ← (const nomodify byte*) SCREEN+(const nomodify word) SPRITE_PTRS + *((byte*~) processChars::$38) -- *(processChars::$64 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) Converting *(pointer+n) to pointer[n] [243] *((byte*~) processChars::$7) ← *((byte*~) processChars::$39) -- *(processChars::$65 + OFFSET_STRUCT_PROCESSINGSPRITE_PTR) Converting *(pointer+n) to pointer[n] [243] *((byte*~) processChars::$7) ← *((byte*~) processChars::$65 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- *(SCREEN+SPRITE_PTRS + *(processChars::$64 + OFFSET_STRUCT_PROCESSINGSPRITE_ID)) @@ -2903,8 +2903,8 @@ Constant right-side identified [273] (byte~) setupRasterIrq::$1 ← < (const wor Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) setupRasterIrq::$1 = > (byte) 4 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:240 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] { } ) always clobbers reg byte a reg byte y @@ -7102,7 +7102,7 @@ Statement [142] *((const nomodify byte*) RASTER) ← <(const nomodify byte) RAST Statement [143] *((const nomodify byte*) IRQ_ENABLE) ← (const nomodify byte) IRQ_RASTER [ ] ( main:7::setupRasterIrq:26 [ SCREEN_COPY#0 SCREEN_DIST#0 ] { } ) always clobbers reg byte a Statement [144] *((const nomodify void()**) HARDWARE_IRQ) ← (const void()*) setupRasterIrq::irqRoutine#0 [ ] ( main:7::setupRasterIrq:26 [ SCREEN_COPY#0 SCREEN_DIST#0 ] { } ) always clobbers reg byte a Statement [149] if((byte*) initSprites::sp#2<(const nomodify byte*) SPRITE_DATA+(const nomodify byte) NUM_PROCESSING*(byte) $40) goto initSprites::@2 [ initSprites::sp#2 ] ( main:7::initSprites:24 [ SCREEN_COPY#0 SCREEN_DIST#0 initSprites::sp#2 ] { } ) always clobbers reg byte a -Statement [151] *((const nomodify byte*) SPRITES_COLS + (byte) initSprites::i#2) ← (const nomodify byte) LIGHT_BLUE [ initSprites::i#2 ] ( main:7::initSprites:24 [ SCREEN_COPY#0 SCREEN_DIST#0 initSprites::i#2 ] { } ) always clobbers reg byte a +Statement [151] *((const nomodify byte*) SPRITES_COLOR + (byte) initSprites::i#2) ← (const nomodify byte) LIGHT_BLUE [ initSprites::i#2 ] ( main:7::initSprites:24 [ SCREEN_COPY#0 SCREEN_DIST#0 initSprites::i#2 ] { } ) always clobbers reg byte a Statement [154] *((const nomodify byte*) SPRITES_MC) ← (byte) 0 [ ] ( main:7::initSprites:24 [ SCREEN_COPY#0 SCREEN_DIST#0 ] { } ) always clobbers reg byte a Statement [155] *((const nomodify byte*) SPRITES_EXPAND_X) ← (byte) 0 [ ] ( main:7::initSprites:24 [ SCREEN_COPY#0 SCREEN_DIST#0 ] { } ) always clobbers reg byte a Statement [156] *((const nomodify byte*) SPRITES_EXPAND_Y) ← (byte) 0 [ ] ( main:7::initSprites:24 [ SCREEN_COPY#0 SCREEN_DIST#0 ] { } ) always clobbers reg byte a @@ -7172,7 +7172,7 @@ Statement [254] if(*((byte*)(struct ProcessingSprite*) processChars::processing# Statement [255] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:240 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] { } ) always clobbers reg byte a reg byte y Statement [256] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:240 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] { } ) always clobbers reg byte a reg byte x reg byte y Statement [257] *((const nomodify byte*) SPRITES_ENABLE) ← *((const nomodify byte*) SPRITES_ENABLE) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:240 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] { } ) always clobbers reg byte a -Statement [258] *((const nomodify byte*) SPRITES_COLS + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:240 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] { } ) always clobbers reg byte a reg byte y +Statement [258] *((const nomodify byte*) SPRITES_COLOR + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:240 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] { } ) always clobbers reg byte a reg byte y Statement [259] *((const nomodify byte*) SCREEN+(const nomodify word) SPRITE_PTRS + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:240 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] { } ) always clobbers reg byte a reg byte y Statement [260] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:240 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 ] { } ) always clobbers reg byte a reg byte y Statement [261] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] ( processChars:240 [ processChars::i#10 processChars::numActive#10 processChars::processing#0 processChars::bitmask#0 processChars::xpos#0 ] { } ) always clobbers reg byte a reg byte y @@ -7613,7 +7613,7 @@ ASSEMBLER BEFORE OPTIMIZATION .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_MC = $d01c @@ -8540,9 +8540,9 @@ initSprites: { jmp __b3 // initSprites::@3 __b3: - // [151] *((const nomodify byte*) SPRITES_COLS + (byte) initSprites::i#2) ← (const nomodify byte) LIGHT_BLUE -- pbuc1_derefidx_vbuxx=vbuc2 + // [151] *((const nomodify byte*) SPRITES_COLOR + (byte) initSprites::i#2) ← (const nomodify byte) LIGHT_BLUE -- pbuc1_derefidx_vbuxx=vbuc2 lda #LIGHT_BLUE - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // [152] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2 -- vbuxx=_inc_vbuxx inx // [153] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@3 -- vbuxx_neq_vbuc1_then_la1 @@ -9225,7 +9225,7 @@ processChars: { lda SPRITES_ENABLE ora.z bitmask sta SPRITES_ENABLE - // [258] *((const nomodify byte*) SPRITES_COLS + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- pbuc1_derefidx_(pbuz1_derefidx_vbuc2)=pbuz1_derefidx_vbuc3 + // [258] *((const nomodify byte*) SPRITES_COLOR + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- pbuc1_derefidx_(pbuz1_derefidx_vbuc2)=pbuz1_derefidx_vbuc3 // Set the sprite color ldy #OFFSET_STRUCT_PROCESSINGSPRITE_COL lda (processing),y @@ -9234,7 +9234,7 @@ processChars: { lda (processing),y tay pla - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // [259] *((const nomodify byte*) SCREEN+(const nomodify word) SPRITE_PTRS + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- pbuc1_derefidx_(pbuz1_derefidx_vbuc2)=pbuz1_derefidx_vbuc3 // Set sprite pointer ldy #OFFSET_STRUCT_PROCESSINGSPRITE_PTR @@ -9965,7 +9965,7 @@ FINAL SYMBOL TABLE (byte*) SCREEN_DIST (void*) SCREEN_DIST#0 SCREEN_DIST zp[2]:14 0.031746031746031744 (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE = (byte) $e -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_ENABLE = (byte*) 53269 (const nomodify byte*) SPRITES_EXPAND_X = (byte*) 53277 (const nomodify byte*) SPRITES_EXPAND_Y = (byte*) 53271 @@ -10505,7 +10505,7 @@ Score: 1113354 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_MC = $d01c @@ -11416,10 +11416,10 @@ initSprites: { // [150] phi (byte) initSprites::i#2 = (byte) initSprites::i#1 [phi:initSprites::@3->initSprites::@3#0] -- register_copy // initSprites::@3 __b3: - // SPRITES_COLS[i] = LIGHT_BLUE - // [151] *((const nomodify byte*) SPRITES_COLS + (byte) initSprites::i#2) ← (const nomodify byte) LIGHT_BLUE -- pbuc1_derefidx_vbuxx=vbuc2 + // SPRITES_COLOR[i] = LIGHT_BLUE + // [151] *((const nomodify byte*) SPRITES_COLOR + (byte) initSprites::i#2) ← (const nomodify byte) LIGHT_BLUE -- pbuc1_derefidx_vbuxx=vbuc2 lda #LIGHT_BLUE - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // for( char i: 0..7) // [152] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2 -- vbuxx=_inc_vbuxx inx @@ -12093,8 +12093,8 @@ processChars: { lda SPRITES_ENABLE ora.z bitmask sta SPRITES_ENABLE - // SPRITES_COLS[processing->id] = processing->col - // [258] *((const nomodify byte*) SPRITES_COLS + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- pbuc1_derefidx_(pbuz1_derefidx_vbuc2)=pbuz1_derefidx_vbuc3 + // SPRITES_COLOR[processing->id] = processing->col + // [258] *((const nomodify byte*) SPRITES_COLOR + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- pbuc1_derefidx_(pbuz1_derefidx_vbuc2)=pbuz1_derefidx_vbuc3 // Set the sprite color ldy #OFFSET_STRUCT_PROCESSINGSPRITE_COL lda (processing),y @@ -12103,7 +12103,7 @@ processChars: { lda (processing),y tay pla - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // *(SCREEN+SPRITE_PTRS+processing->id) = processing->ptr // [259] *((const nomodify byte*) SCREEN+(const nomodify word) SPRITE_PTRS + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- pbuc1_derefidx_(pbuz1_derefidx_vbuc2)=pbuz1_derefidx_vbuc3 // Set sprite pointer diff --git a/src/test/ref/complex/clearscreen/clearscreen.sym b/src/test/ref/complex/clearscreen/clearscreen.sym index 945fd189d..707a8d651 100644 --- a/src/test/ref/complex/clearscreen/clearscreen.sym +++ b/src/test/ref/complex/clearscreen/clearscreen.sym @@ -149,7 +149,7 @@ (byte*) SCREEN_DIST (void*) SCREEN_DIST#0 SCREEN_DIST zp[2]:14 0.031746031746031744 (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE = (byte) $e -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_ENABLE = (byte*) 53269 (const nomodify byte*) SPRITES_EXPAND_X = (byte*) 53277 (const nomodify byte*) SPRITES_EXPAND_Y = (byte*) 53271 diff --git a/src/test/ref/complex/medusa/medusa.asm b/src/test/ref/complex/medusa/medusa.asm index 932e20aa5..11ec5f1e8 100644 --- a/src/test/ref/complex/medusa/medusa.asm +++ b/src/test/ref/complex/medusa/medusa.asm @@ -5,14 +5,14 @@ .pc = $80d "Program" // The colors of the C64 .const BLACK = 0 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // Color Ram .label COLS = $d800 .label SCREEN = $400 main: { - // *BGCOL = BLACK + // *BG_COLOR = BLACK lda #BLACK - sta BGCOL + sta BG_COLOR // memcpy(SCREEN, MEDUSA_SCREEN, 1000) lda #memcpy] memcpy_from_main: @@ -650,7 +650,7 @@ MEDUSA_COLORS: REGISTER UPLIFT POTENTIAL REGISTERS -Statement [4] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [4] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [8] *((const byte*) SCREEN+(word) $3e7) ← *((const byte*) SCREEN+(word) $3e7) ^ (byte) $e [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [10] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word) $3e8 [ memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] ( main:2::memcpy:5 [ memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { } main:2::memcpy:7 [ memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] { } ) always clobbers reg byte a Statement [11] (byte*) memcpy::src#4 ← (byte*)(void*) memcpy::source#2 [ memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] ( main:2::memcpy:5 [ memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { } main:2::memcpy:7 [ memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] { } ) always clobbers reg byte a @@ -692,7 +692,7 @@ ASSEMBLER BEFORE OPTIMIZATION // Global Constants & labels // The colors of the C64 .const BLACK = 0 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // Color Ram .label COLS = $d800 .label SCREEN = $400 @@ -712,9 +712,9 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [4] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [5] call memcpy // [9] phi from main to memcpy [phi:main->memcpy] memcpy_from_main: @@ -860,7 +860,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) COLS = (byte*) 55296 (const byte*) MEDUSA_COLORS[] = kickasm {{ .var fileCols = LoadBinary("medusac.prg", BF_C64FILE) @@ -996,7 +996,7 @@ Score: 797 // Global Constants & labels // The colors of the C64 .const BLACK = 0 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // Color Ram .label COLS = $d800 .label SCREEN = $400 @@ -1008,10 +1008,10 @@ Score: 797 // @end // main main: { - // *BGCOL = BLACK - // [4] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // *BG_COLOR = BLACK + // [4] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // memcpy(SCREEN, MEDUSA_SCREEN, 1000) // [5] call memcpy // [9] phi from main to memcpy [phi:main->memcpy] diff --git a/src/test/ref/complex/medusa/medusa.sym b/src/test/ref/complex/medusa/medusa.sym index 6eebe1773..b3f454490 100644 --- a/src/test/ref/complex/medusa/medusa.sym +++ b/src/test/ref/complex/medusa/medusa.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) COLS = (byte*) 55296 (const byte*) MEDUSA_COLORS[] = kickasm {{ .var fileCols = LoadBinary("medusac.prg", BF_C64FILE) diff --git a/src/test/ref/complex/prebob/grid-bobs.asm b/src/test/ref/complex/prebob/grid-bobs.asm index 5326f528c..491da4f6a 100644 --- a/src/test/ref/complex/prebob/grid-bobs.asm +++ b/src/test/ref/complex/prebob/grid-bobs.asm @@ -15,7 +15,7 @@ .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D018 = $d018 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 @@ -90,9 +90,9 @@ main: { lda RASTER cmp #$f8 bcc __b2 - // *BORDERCOL = 0xf + // *BORDER_COLOR = 0xf lda #$f - sta BORDERCOL + sta BORDER_COLOR // renderBobCleanup() jsr renderBobCleanup lda.z origX @@ -120,10 +120,10 @@ main: { sta.z y_1+1 ldx #0 __b5: - // *BORDERCOL = 1 + // *BORDER_COLOR = 1 //kickasm {{ .break }} lda #1 - sta BORDERCOL + sta BORDER_COLOR // renderBob(>x, >y) lda.z x_1+1 sta.z renderBob.xpos @@ -146,9 +146,9 @@ main: { lda.z y_1+1 adc.z rowOffsetY+1 sta.z y_1+1 - // *BORDERCOL = 2 + // *BORDER_COLOR = 2 lda #2 - sta BORDERCOL + sta BORDER_COLOR // for(char row: 0..4) inx cpx #5 @@ -190,9 +190,9 @@ main: { lda.z rowOffsetY+1 adc #>$80 sta.z rowOffsetY+1 - // *BORDERCOL = 0 + // *BORDER_COLOR = 0 lda #0 - sta BORDERCOL + sta BORDER_COLOR // keyboard_key_pressed(KEY_SPACE) jsr keyboard_key_pressed // keyboard_key_pressed(KEY_SPACE) diff --git a/src/test/ref/complex/prebob/grid-bobs.cfg b/src/test/ref/complex/prebob/grid-bobs.cfg index 9f31d538e..f4d5e7727 100644 --- a/src/test/ref/complex/prebob/grid-bobs.cfg +++ b/src/test/ref/complex/prebob/grid-bobs.cfg @@ -45,7 +45,7 @@ main::@2: scope:[main] from main::@1 main::@2 [17] if(*((const nomodify byte*) RASTER)<(byte) $f8) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@2 - [18] *((const nomodify byte*) BORDERCOL) ← (byte) $f + [18] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f [19] call renderBobCleanup to:main::@13 main::@13: scope:[main] from main::@3 @@ -64,7 +64,7 @@ main::@5: scope:[main] from main::@14 main::@4 [24] (byte**) renderBobCleanupNext#17 ← phi( main::@14/(byte**) renderBobCleanupNext#13 main::@4/(byte**) renderBobCleanupNext#21 ) [24] (signed word) main::y#2 ← phi( main::@14/(signed word) main::y#1 main::@4/(signed word) main::y#6 ) [24] (signed word) main::x#2 ← phi( main::@14/(signed word) main::x#1 main::@4/(signed word) main::x#7 ) - [25] *((const nomodify byte*) BORDERCOL) ← (byte) 1 + [25] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 [26] (byte) renderBob::xpos#0 ← > (signed word) main::x#2 [27] (byte) renderBob::ypos#0 ← > (signed word) main::y#2 [28] call renderBob @@ -72,7 +72,7 @@ main::@5: scope:[main] from main::@14 main::@4 main::@14: scope:[main] from main::@5 [29] (signed word) main::x#1 ← (signed word) main::x#2 + (const signed word) main::rowOffsetX [30] (signed word) main::y#1 ← (signed word) main::y#2 + (signed word) main::rowOffsetY#10 - [31] *((const nomodify byte*) BORDERCOL) ← (byte) 2 + [31] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 [32] (byte) main::row#1 ← ++ (byte) main::row#2 [33] if((byte) main::row#1!=(byte) 5) goto main::@5 to:main::@6 @@ -85,7 +85,7 @@ main::@6: scope:[main] from main::@14 main::@7: scope:[main] from main::@6 [38] (signed word) main::origX#1 ← (signed word) main::origX#8 + (signed word) $100 [39] (signed word) main::rowOffsetY#1 ← (signed word) main::rowOffsetY#10 + (signed word) $80 - [40] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [40] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [41] call keyboard_key_pressed [42] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 to:main::@15 diff --git a/src/test/ref/complex/prebob/grid-bobs.log b/src/test/ref/complex/prebob/grid-bobs.log index 5a37c65f9..06ebc2468 100644 --- a/src/test/ref/complex/prebob/grid-bobs.log +++ b/src/test/ref/complex/prebob/grid-bobs.log @@ -344,7 +344,7 @@ main::@3: scope:[main] from main::@2 (signed word) main::rowOffsetY#8 ← phi( main::@2/(signed word) main::rowOffsetY#9 ) (signed word) main::origX#4 ← phi( main::@2/(signed word) main::origX#6 ) (byte**) renderBobCleanupNext#16 ← phi( main::@2/(byte**) renderBobCleanupNext#20 ) - *((const nomodify byte*) BORDERCOL) ← (number) $f + *((const nomodify byte*) BORDER_COLOR) ← (number) $f call renderBobCleanup to:main::@18 main::@18: scope:[main] from main::@3 @@ -386,7 +386,7 @@ main::@5: scope:[main] from main::@19 main::@4 (byte**) renderBobCleanupNext#17 ← phi( main::@19/(byte**) renderBobCleanupNext#1 main::@4/(byte**) renderBobCleanupNext#21 ) (signed word) main::y#2 ← phi( main::@19/(signed word) main::y#1 main::@4/(signed word) main::y#0 ) (signed word) main::x#2 ← phi( main::@19/(signed word) main::x#1 main::@4/(signed word) main::x#0 ) - *((const nomodify byte*) BORDERCOL) ← (number) 1 + *((const nomodify byte*) BORDER_COLOR) ← (number) 1 (byte~) main::$10 ← > (signed word) main::x#2 (byte~) main::$11 ← > (signed word) main::y#2 (byte) renderBob::xpos#0 ← (byte~) main::$10 @@ -409,7 +409,7 @@ main::@19: scope:[main] from main::@5 (byte**) renderBobCleanupNext#1 ← (byte**) renderBobCleanupNext#10 (signed word) main::x#1 ← (signed word) main::x#3 + (const signed word) main::rowOffsetX (signed word) main::y#1 ← (signed word) main::y#3 + (signed word) main::rowOffsetY#2 - *((const nomodify byte*) BORDERCOL) ← (number) 2 + *((const nomodify byte*) BORDER_COLOR) ← (number) 2 (byte) main::row#1 ← (byte) main::row#2 + rangenext(0,4) (bool~) main::$13 ← (byte) main::row#1 != rangelast(0,4) if((bool~) main::$13) goto main::@5 @@ -439,7 +439,7 @@ main::@7: scope:[main] from main::@6 (signed word) main::origX#3 ← phi( main::@6/(signed word) main::origX#5 ) (signed word) main::origX#1 ← (signed word) main::origX#3 + (number) $100 (signed word) main::rowOffsetY#1 ← (signed word) main::rowOffsetY#3 + (number) $80 - *((const nomodify byte*) BORDERCOL) ← (number) 0 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 (byte) keyboard_key_pressed::key#0 ← (const nomodify byte) KEY_SPACE call keyboard_key_pressed (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#1 @@ -1154,7 +1154,7 @@ SYMBOL TABLE SSA (const nomodify byte) BOB_SHIFTS_Y = (byte) 8 (const nomodify byte) BOB_SUBTABLE_SIZE = (const nomodify byte) BOB_SHIFTS_X*(const nomodify byte) BOB_SHIFTS_Y (const byte*) BOB_TABLES[(number) 9*(number) 8*(number) 4] = { fill( 9*8*4, 0) } -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*)(number) $dc00 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*)(number) $dd00 (const nomodify byte*) D018 = (byte*)(number) $d018 @@ -2243,12 +2243,12 @@ Adding number conversion cast (unumber) main::toD0181_$6 in (number~) main::toD0 Adding number conversion cast (unumber) 0 in (byte) memset::c#0 ← (number) 0 Adding number conversion cast (unumber) $3e8 in (word) memset::num#0 ← (number) $3e8 Adding number conversion cast (unumber) $f8 in (bool~) main::$8 ← *((const nomodify byte*) RASTER) < (number) $f8 -Adding number conversion cast (unumber) $f in *((const nomodify byte*) BORDERCOL) ← (number) $f -Adding number conversion cast (unumber) 1 in *((const nomodify byte*) BORDERCOL) ← (number) 1 -Adding number conversion cast (unumber) 2 in *((const nomodify byte*) BORDERCOL) ← (number) 2 +Adding number conversion cast (unumber) $f in *((const nomodify byte*) BORDER_COLOR) ← (number) $f +Adding number conversion cast (unumber) 1 in *((const nomodify byte*) BORDER_COLOR) ← (number) 1 +Adding number conversion cast (unumber) 2 in *((const nomodify byte*) BORDER_COLOR) ← (number) 2 Adding number conversion cast (snumber) $100 in (signed word) main::origX#1 ← (signed word) main::origX#3 + (number) $100 Adding number conversion cast (snumber) $80 in (signed word) main::rowOffsetY#1 ← (signed word) main::rowOffsetY#3 + (number) $80 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 Adding number conversion cast (unumber) 0 in (bool~) main::$19 ← (number) 0 != (byte~) main::$15 Adding number conversion cast (unumber) 0 in (bool~) main::$18 ← (number) 0 != (byte~) main::$17 Adding number conversion cast (unumber) 3 in *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (number) 3 @@ -2360,10 +2360,10 @@ Inlining cast (byte) mulf_init::dir#1 ← (unumber)(number) 1 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (unumber)(number) 3 Inlining cast (byte) memset::c#0 ← (unumber)(number) 0 Inlining cast (word) memset::num#0 ← (unumber)(number) $3e8 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) $f -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 1 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 2 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) $f +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 1 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 2 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (unumber)(number) 3 Inlining cast *((byte*) renderBobCleanup::screen#0 + (unumber)(number) 0) ← (unumber)(number) 0 Inlining cast *((byte*) renderBobCleanup::screen#0 + (unumber)(number) $28) ← (unumber)(number) 0 @@ -3557,7 +3557,7 @@ main::@2: scope:[main] from main::@1 main::@2 [17] if(*((const nomodify byte*) RASTER)<(byte) $f8) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@2 - [18] *((const nomodify byte*) BORDERCOL) ← (byte) $f + [18] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f [19] call renderBobCleanup to:main::@13 main::@13: scope:[main] from main::@3 @@ -3576,7 +3576,7 @@ main::@5: scope:[main] from main::@14 main::@4 [24] (byte**) renderBobCleanupNext#17 ← phi( main::@14/(byte**) renderBobCleanupNext#13 main::@4/(byte**) renderBobCleanupNext#21 ) [24] (signed word) main::y#2 ← phi( main::@14/(signed word) main::y#1 main::@4/(signed word) main::y#6 ) [24] (signed word) main::x#2 ← phi( main::@14/(signed word) main::x#1 main::@4/(signed word) main::x#7 ) - [25] *((const nomodify byte*) BORDERCOL) ← (byte) 1 + [25] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 [26] (byte) renderBob::xpos#0 ← > (signed word) main::x#2 [27] (byte) renderBob::ypos#0 ← > (signed word) main::y#2 [28] call renderBob @@ -3584,7 +3584,7 @@ main::@5: scope:[main] from main::@14 main::@4 main::@14: scope:[main] from main::@5 [29] (signed word) main::x#1 ← (signed word) main::x#2 + (const signed word) main::rowOffsetX [30] (signed word) main::y#1 ← (signed word) main::y#2 + (signed word) main::rowOffsetY#10 - [31] *((const nomodify byte*) BORDERCOL) ← (byte) 2 + [31] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 [32] (byte) main::row#1 ← ++ (byte) main::row#2 [33] if((byte) main::row#1!=(byte) 5) goto main::@5 to:main::@6 @@ -3597,7 +3597,7 @@ main::@6: scope:[main] from main::@14 main::@7: scope:[main] from main::@6 [38] (signed word) main::origX#1 ← (signed word) main::origX#8 + (signed word) $100 [39] (signed word) main::rowOffsetY#1 ← (signed word) main::rowOffsetY#10 + (signed word) $80 - [40] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [40] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [41] call keyboard_key_pressed [42] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 to:main::@15 @@ -4593,7 +4593,7 @@ Target platform is c64basic / MOS6502X .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D018 = $d018 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 @@ -4737,9 +4737,9 @@ main: { jmp __b3 // main::@3 __b3: - // [18] *((const nomodify byte*) BORDERCOL) ← (byte) $f -- _deref_pbuc1=vbuc2 + // [18] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f -- _deref_pbuc1=vbuc2 lda #$f - sta BORDERCOL + sta BORDER_COLOR // [19] call renderBobCleanup // [87] phi from main::@3 to renderBobCleanup [phi:main::@3->renderBobCleanup] renderBobCleanup_from___b3: @@ -4806,10 +4806,10 @@ main: { jmp __b5 // main::@5 __b5: - // [25] *((const nomodify byte*) BORDERCOL) ← (byte) 1 -- _deref_pbuc1=vbuc2 + // [25] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 -- _deref_pbuc1=vbuc2 //kickasm {{ .break }} lda #1 - sta BORDERCOL + sta BORDER_COLOR // [26] (byte) renderBob::xpos#0 ← > (signed word) main::x#2 -- vbuz1=_hi_vwsz2 lda.z x_1+1 sta.z renderBob.xpos @@ -4837,9 +4837,9 @@ main: { lda.z y_1+1 adc.z rowOffsetY+1 sta.z y_1+1 - // [31] *((const nomodify byte*) BORDERCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [31] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BORDERCOL + sta BORDER_COLOR // [32] (byte) main::row#1 ← ++ (byte) main::row#2 -- vbuz1=_inc_vbuz1 inc.z row // [33] if((byte) main::row#1!=(byte) 5) goto main::@5 -- vbuz1_neq_vbuc1_then_la1 @@ -4890,9 +4890,9 @@ main: { lda.z rowOffsetY+1 adc #>$80 sta.z rowOffsetY+1 - // [40] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [40] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // [41] call keyboard_key_pressed // [56] phi from main::@7 to keyboard_key_pressed [phi:main::@7->keyboard_key_pressed] keyboard_key_pressed_from___b7: @@ -6248,21 +6248,21 @@ Statement [10] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) O Statement [12] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [14] *((const nomodify byte*) D018) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [17] if(*((const nomodify byte*) RASTER)<(byte) $f8) goto main::@2 [ main::origX#8 main::rowOffsetY#10 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 ] { } ) always clobbers reg byte a -Statement [18] *((const nomodify byte*) BORDERCOL) ← (byte) $f [ main::origX#8 main::rowOffsetY#10 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 ] { } ) always clobbers reg byte a +Statement [18] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f [ main::origX#8 main::rowOffsetY#10 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 ] { } ) always clobbers reg byte a Statement [20] (signed word) main::x#4 ← (signed word) main::origX#8 [ main::origX#8 main::rowOffsetY#10 main::x#4 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#4 ] { } ) always clobbers reg byte a Statement [22] (signed word) main::x#7 ← (signed word) main::x#0 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 renderBobCleanupNext#21 main::col#5 main::x#7 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 renderBobCleanupNext#21 main::col#5 main::x#7 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:10 [ main::col#5 main::col#1 ] Statement [23] (signed word) main::y#6 ← (signed word) main::y#0 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 renderBobCleanupNext#21 main::col#5 main::x#7 main::y#6 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 renderBobCleanupNext#21 main::col#5 main::x#7 main::y#6 ] { } ) always clobbers reg byte a -Statement [25] *((const nomodify byte*) BORDERCOL) ← (byte) 1 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 main::x#2 main::y#2 renderBobCleanupNext#17 main::row#2 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 main::x#2 main::y#2 renderBobCleanupNext#17 main::row#2 ] { } ) always clobbers reg byte a +Statement [25] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 main::x#2 main::y#2 renderBobCleanupNext#17 main::row#2 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 main::x#2 main::y#2 renderBobCleanupNext#17 main::row#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:17 [ main::row#2 main::row#1 ] Statement [29] (signed word) main::x#1 ← (signed word) main::x#2 + (const signed word) main::rowOffsetX [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 renderBobCleanupNext#13 main::y#2 main::row#2 main::x#1 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 renderBobCleanupNext#13 main::y#2 main::row#2 main::x#1 ] { } ) always clobbers reg byte a Statement [30] (signed word) main::y#1 ← (signed word) main::y#2 + (signed word) main::rowOffsetY#10 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 renderBobCleanupNext#13 main::row#2 main::x#1 main::y#1 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 renderBobCleanupNext#13 main::row#2 main::x#1 main::y#1 ] { } ) always clobbers reg byte a -Statement [31] *((const nomodify byte*) BORDERCOL) ← (byte) 2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 renderBobCleanupNext#13 main::row#2 main::x#1 main::y#1 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 renderBobCleanupNext#13 main::row#2 main::x#1 main::y#1 ] { } ) always clobbers reg byte a +Statement [31] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 renderBobCleanupNext#13 main::row#2 main::x#1 main::y#1 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 renderBobCleanupNext#13 main::row#2 main::x#1 main::y#1 ] { } ) always clobbers reg byte a Statement [34] (signed word) main::rowX#1 ← (signed word) main::x#0 + (const signed word) main::colOffsetX [ main::origX#8 main::rowOffsetY#10 main::y#0 main::col#5 main::rowX#1 renderBobCleanupNext#13 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::y#0 main::col#5 main::rowX#1 renderBobCleanupNext#13 ] { } ) always clobbers reg byte a Statement [35] (signed word) main::rowY#1 ← (signed word) main::y#0 + (const signed word) main::colOffsetY [ main::origX#8 main::rowOffsetY#10 main::col#5 main::rowX#1 main::rowY#1 renderBobCleanupNext#13 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::col#5 main::rowX#1 main::rowY#1 renderBobCleanupNext#13 ] { } ) always clobbers reg byte a Statement [38] (signed word) main::origX#1 ← (signed word) main::origX#8 + (signed word) $100 [ main::rowOffsetY#10 main::origX#1 ] ( main:2 [ main::rowOffsetY#10 main::origX#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a Statement [39] (signed word) main::rowOffsetY#1 ← (signed word) main::rowOffsetY#10 + (signed word) $80 [ main::origX#1 main::rowOffsetY#1 ] ( main:2 [ main::origX#1 main::rowOffsetY#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a -Statement [40] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ main::origX#1 main::rowOffsetY#1 ] ( main:2 [ main::origX#1 main::rowOffsetY#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a +Statement [40] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ main::origX#1 main::rowOffsetY#1 ] ( main:2 [ main::origX#1 main::rowOffsetY#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a Statement [50] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [52] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (const byte) main::vicSelectGfxBank2_toDd001_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [54] *((const nomodify byte*) D018) ← (const byte) main::toD0182_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a @@ -6385,19 +6385,19 @@ Statement [10] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) O Statement [12] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [14] *((const nomodify byte*) D018) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [17] if(*((const nomodify byte*) RASTER)<(byte) $f8) goto main::@2 [ main::origX#8 main::rowOffsetY#10 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 ] { } ) always clobbers reg byte a -Statement [18] *((const nomodify byte*) BORDERCOL) ← (byte) $f [ main::origX#8 main::rowOffsetY#10 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 ] { } ) always clobbers reg byte a +Statement [18] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f [ main::origX#8 main::rowOffsetY#10 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 ] { } ) always clobbers reg byte a Statement [20] (signed word) main::x#4 ← (signed word) main::origX#8 [ main::origX#8 main::rowOffsetY#10 main::x#4 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#4 ] { } ) always clobbers reg byte a Statement [22] (signed word) main::x#7 ← (signed word) main::x#0 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 renderBobCleanupNext#21 main::col#5 main::x#7 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 renderBobCleanupNext#21 main::col#5 main::x#7 ] { } ) always clobbers reg byte a Statement [23] (signed word) main::y#6 ← (signed word) main::y#0 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 renderBobCleanupNext#21 main::col#5 main::x#7 main::y#6 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 renderBobCleanupNext#21 main::col#5 main::x#7 main::y#6 ] { } ) always clobbers reg byte a -Statement [25] *((const nomodify byte*) BORDERCOL) ← (byte) 1 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 main::x#2 main::y#2 renderBobCleanupNext#17 main::row#2 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 main::x#2 main::y#2 renderBobCleanupNext#17 main::row#2 ] { } ) always clobbers reg byte a +Statement [25] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 main::x#2 main::y#2 renderBobCleanupNext#17 main::row#2 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 main::x#2 main::y#2 renderBobCleanupNext#17 main::row#2 ] { } ) always clobbers reg byte a Statement [29] (signed word) main::x#1 ← (signed word) main::x#2 + (const signed word) main::rowOffsetX [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 renderBobCleanupNext#13 main::y#2 main::row#2 main::x#1 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 renderBobCleanupNext#13 main::y#2 main::row#2 main::x#1 ] { } ) always clobbers reg byte a Statement [30] (signed word) main::y#1 ← (signed word) main::y#2 + (signed word) main::rowOffsetY#10 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 renderBobCleanupNext#13 main::row#2 main::x#1 main::y#1 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 renderBobCleanupNext#13 main::row#2 main::x#1 main::y#1 ] { } ) always clobbers reg byte a -Statement [31] *((const nomodify byte*) BORDERCOL) ← (byte) 2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 renderBobCleanupNext#13 main::row#2 main::x#1 main::y#1 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 renderBobCleanupNext#13 main::row#2 main::x#1 main::y#1 ] { } ) always clobbers reg byte a +Statement [31] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 renderBobCleanupNext#13 main::row#2 main::x#1 main::y#1 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::x#0 main::y#0 main::col#5 renderBobCleanupNext#13 main::row#2 main::x#1 main::y#1 ] { } ) always clobbers reg byte a Statement [34] (signed word) main::rowX#1 ← (signed word) main::x#0 + (const signed word) main::colOffsetX [ main::origX#8 main::rowOffsetY#10 main::y#0 main::col#5 main::rowX#1 renderBobCleanupNext#13 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::y#0 main::col#5 main::rowX#1 renderBobCleanupNext#13 ] { } ) always clobbers reg byte a Statement [35] (signed word) main::rowY#1 ← (signed word) main::y#0 + (const signed word) main::colOffsetY [ main::origX#8 main::rowOffsetY#10 main::col#5 main::rowX#1 main::rowY#1 renderBobCleanupNext#13 ] ( main:2 [ main::origX#8 main::rowOffsetY#10 main::col#5 main::rowX#1 main::rowY#1 renderBobCleanupNext#13 ] { } ) always clobbers reg byte a Statement [38] (signed word) main::origX#1 ← (signed word) main::origX#8 + (signed word) $100 [ main::rowOffsetY#10 main::origX#1 ] ( main:2 [ main::rowOffsetY#10 main::origX#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a Statement [39] (signed word) main::rowOffsetY#1 ← (signed word) main::rowOffsetY#10 + (signed word) $80 [ main::origX#1 main::rowOffsetY#1 ] ( main:2 [ main::origX#1 main::rowOffsetY#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a -Statement [40] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ main::origX#1 main::rowOffsetY#1 ] ( main:2 [ main::origX#1 main::rowOffsetY#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a +Statement [40] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ main::origX#1 main::rowOffsetY#1 ] ( main:2 [ main::origX#1 main::rowOffsetY#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a Statement [50] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [52] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (const byte) main::vicSelectGfxBank2_toDd001_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [54] *((const nomodify byte*) D018) ← (const byte) main::toD0182_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a @@ -6703,7 +6703,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D018 = $d018 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 @@ -6844,9 +6844,9 @@ main: { jmp __b3 // main::@3 __b3: - // [18] *((const nomodify byte*) BORDERCOL) ← (byte) $f -- _deref_pbuc1=vbuc2 + // [18] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f -- _deref_pbuc1=vbuc2 lda #$f - sta BORDERCOL + sta BORDER_COLOR // [19] call renderBobCleanup // [87] phi from main::@3 to renderBobCleanup [phi:main::@3->renderBobCleanup] renderBobCleanup_from___b3: @@ -6912,10 +6912,10 @@ main: { jmp __b5 // main::@5 __b5: - // [25] *((const nomodify byte*) BORDERCOL) ← (byte) 1 -- _deref_pbuc1=vbuc2 + // [25] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 -- _deref_pbuc1=vbuc2 //kickasm {{ .break }} lda #1 - sta BORDERCOL + sta BORDER_COLOR // [26] (byte) renderBob::xpos#0 ← > (signed word) main::x#2 -- vbuz1=_hi_vwsz2 lda.z x_1+1 sta.z renderBob.xpos @@ -6943,9 +6943,9 @@ main: { lda.z y_1+1 adc.z rowOffsetY+1 sta.z y_1+1 - // [31] *((const nomodify byte*) BORDERCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [31] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BORDERCOL + sta BORDER_COLOR // [32] (byte) main::row#1 ← ++ (byte) main::row#2 -- vbuxx=_inc_vbuxx inx // [33] if((byte) main::row#1!=(byte) 5) goto main::@5 -- vbuxx_neq_vbuc1_then_la1 @@ -6995,9 +6995,9 @@ main: { lda.z rowOffsetY+1 adc #>$80 sta.z rowOffsetY+1 - // [40] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [40] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // [41] call keyboard_key_pressed // [56] phi from main::@7 to keyboard_key_pressed [phi:main::@7->keyboard_key_pressed] keyboard_key_pressed_from___b7: @@ -8499,7 +8499,7 @@ FINAL SYMBOL TABLE (const nomodify byte) BOB_SHIFTS_Y = (byte) 8 (const nomodify byte) BOB_SUBTABLE_SIZE = (const nomodify byte) BOB_SHIFTS_X*(const nomodify byte) BOB_SHIFTS_Y (const byte*) BOB_TABLES[(number) 9*(number) 8*(number) 4] = { fill( 9*8*4, 0) } -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*) 56576 (const nomodify byte*) D018 = (byte*) 53272 @@ -9024,7 +9024,7 @@ Score: 3582851 .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D018 = $d018 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 @@ -9136,10 +9136,10 @@ main: { cmp #$f8 bcc __b2 // main::@3 - // *BORDERCOL = 0xf - // [18] *((const nomodify byte*) BORDERCOL) ← (byte) $f -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 0xf + // [18] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f -- _deref_pbuc1=vbuc2 lda #$f - sta BORDERCOL + sta BORDER_COLOR // renderBobCleanup() // [19] call renderBobCleanup // [87] phi from main::@3 to renderBobCleanup [phi:main::@3->renderBobCleanup] @@ -9195,11 +9195,11 @@ main: { // [24] phi (signed word) main::x#2 = (signed word) main::x#1 [phi:main::@14->main::@5#3] -- register_copy // main::@5 __b5: - // *BORDERCOL = 1 - // [25] *((const nomodify byte*) BORDERCOL) ← (byte) 1 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 1 + // [25] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 -- _deref_pbuc1=vbuc2 //kickasm {{ .break }} lda #1 - sta BORDERCOL + sta BORDER_COLOR // renderBob(>x, >y) // [26] (byte) renderBob::xpos#0 ← > (signed word) main::x#2 -- vbuz1=_hi_vwsz2 lda.z x_1+1 @@ -9228,10 +9228,10 @@ main: { lda.z y_1+1 adc.z rowOffsetY+1 sta.z y_1+1 - // *BORDERCOL = 2 - // [31] *((const nomodify byte*) BORDERCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 2 + // [31] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BORDERCOL + sta BORDER_COLOR // for(char row: 0..4) // [32] (byte) main::row#1 ← ++ (byte) main::row#2 -- vbuxx=_inc_vbuxx inx @@ -9283,10 +9283,10 @@ main: { lda.z rowOffsetY+1 adc #>$80 sta.z rowOffsetY+1 - // *BORDERCOL = 0 - // [40] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 0 + // [40] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // keyboard_key_pressed(KEY_SPACE) // [41] call keyboard_key_pressed // [56] phi from main::@7 to keyboard_key_pressed [phi:main::@7->keyboard_key_pressed] diff --git a/src/test/ref/complex/prebob/grid-bobs.sym b/src/test/ref/complex/prebob/grid-bobs.sym index b4a91f1aa..fbbd690ee 100644 --- a/src/test/ref/complex/prebob/grid-bobs.sym +++ b/src/test/ref/complex/prebob/grid-bobs.sym @@ -9,7 +9,7 @@ (const nomodify byte) BOB_SHIFTS_Y = (byte) 8 (const nomodify byte) BOB_SUBTABLE_SIZE = (const nomodify byte) BOB_SHIFTS_X*(const nomodify byte) BOB_SHIFTS_Y (const byte*) BOB_TABLES[(number) 9*(number) 8*(number) 4] = { fill( 9*8*4, 0) } -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*) 56576 (const nomodify byte*) D018 = (byte*) 53272 diff --git a/src/test/ref/complex/prebob/vogel-bobs.asm b/src/test/ref/complex/prebob/vogel-bobs.asm index 300eab9e8..df2fec6fb 100644 --- a/src/test/ref/complex/prebob/vogel-bobs.asm +++ b/src/test/ref/complex/prebob/vogel-bobs.asm @@ -15,7 +15,7 @@ .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D018 = $d018 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 @@ -90,9 +90,9 @@ main: { lda RASTER cmp #$f8 bcc __b2 - // *BORDERCOL = 0xf + // *BORDER_COLOR = 0xf lda #$f - sta BORDERCOL + sta BORDER_COLOR // renderBobCleanup() jsr renderBobCleanup lda.z angle @@ -106,10 +106,10 @@ main: { lda #$1e sta.z r __b4: - // *BORDERCOL = 1 + // *BORDER_COLOR = 1 //kickasm {{ .break }} lda #1 - sta BORDERCOL + sta BORDER_COLOR // mulf8s(r, COS[a]) lda.z r ldy.z a @@ -141,9 +141,9 @@ main: { lda.z y+1 adc #>$5a*$100 sta.z y+1 - // *BORDERCOL = 2 + // *BORDER_COLOR = 2 lda #2 - sta BORDERCOL + sta BORDER_COLOR // a += 98 lax.z a axs #-[$62] @@ -167,9 +167,9 @@ main: { lax.z angle axs #-[3] stx.z angle - // *BORDERCOL = 0 + // *BORDER_COLOR = 0 lda #0 - sta BORDERCOL + sta BORDER_COLOR // keyboard_key_pressed(KEY_SPACE) jsr keyboard_key_pressed // keyboard_key_pressed(KEY_SPACE) diff --git a/src/test/ref/complex/prebob/vogel-bobs.cfg b/src/test/ref/complex/prebob/vogel-bobs.cfg index 45a80ffd3..8f75d2ff3 100644 --- a/src/test/ref/complex/prebob/vogel-bobs.cfg +++ b/src/test/ref/complex/prebob/vogel-bobs.cfg @@ -44,7 +44,7 @@ main::@2: scope:[main] from main::@1 main::@2 [17] if(*((const nomodify byte*) RASTER)<(byte) $f8) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@2 - [18] *((const nomodify byte*) BORDERCOL) ← (byte) $f + [18] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f [19] call renderBobCleanup to:main::@11 main::@11: scope:[main] from main::@3 @@ -55,7 +55,7 @@ main::@4: scope:[main] from main::@11 main::@14 [21] (byte**) renderBobCleanupNext#17 ← phi( main::@11/(const byte**) RENDERBOB_CLEANUP main::@14/(byte**) renderBobCleanupNext#13 ) [21] (byte) main::a#2 ← phi( main::@11/(byte) main::a#6 main::@14/(byte) main::a#1 ) [21] (signed byte) main::r#2 ← phi( main::@11/(signed byte) $1e main::@14/(signed byte) main::r#1 ) - [22] *((const nomodify byte*) BORDERCOL) ← (byte) 1 + [22] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 [23] (signed byte) mulf8s::a#0 ← (signed byte) main::r#2 [24] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) main::a#2) [25] call mulf8s @@ -73,7 +73,7 @@ main::@13: scope:[main] from main::@12 [33] (signed word~) main::$12 ← (signed word) mulf8s::return#3 [34] (signed word~) main::$13 ← (signed word~) main::$12 << (byte) 1 [35] (signed word) main::y#0 ← (signed word~) main::$13 + (signed word)(number) $5a*(number) $100 - [36] *((const nomodify byte*) BORDERCOL) ← (byte) 2 + [36] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 [37] (byte) main::a#1 ← (byte) main::a#2 + (byte) $62 [38] (signed byte) main::r#1 ← (signed byte) main::r#2 + (signed byte) 3 [39] (byte) renderBob::xpos#0 ← > (signed word) main::x#0 @@ -86,7 +86,7 @@ main::@14: scope:[main] from main::@13 to:main::@5 main::@5: scope:[main] from main::@14 [44] (byte) main::angle#1 ← (byte) main::angle#8 + (byte) 3 - [45] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [45] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [46] call keyboard_key_pressed [47] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 to:main::@15 diff --git a/src/test/ref/complex/prebob/vogel-bobs.log b/src/test/ref/complex/prebob/vogel-bobs.log index 40f61410d..abe453e00 100644 --- a/src/test/ref/complex/prebob/vogel-bobs.log +++ b/src/test/ref/complex/prebob/vogel-bobs.log @@ -445,7 +445,7 @@ main::@3: scope:[main] from main::@2 (byte*) progress_cursor#65 ← phi( main::@2/(byte*) progress_cursor#67 ) (byte) main::angle#4 ← phi( main::@2/(byte) main::angle#6 ) (byte**) renderBobCleanupNext#16 ← phi( main::@2/(byte**) renderBobCleanupNext#20 ) - *((const nomodify byte*) BORDERCOL) ← (number) $f + *((const nomodify byte*) BORDER_COLOR) ← (number) $f call renderBobCleanup to:main::@16 main::@16: scope:[main] from main::@3 @@ -468,7 +468,7 @@ main::@4: scope:[main] from main::@16 main::@19 (byte**) renderBobCleanupNext#25 ← phi( main::@16/(byte**) renderBobCleanupNext#0 main::@19/(byte**) renderBobCleanupNext#1 ) (byte) main::a#2 ← phi( main::@16/(byte) main::a#0 main::@19/(byte) main::a#5 ) (signed byte) main::r#2 ← phi( main::@16/(signed byte) main::r#0 main::@19/(signed byte) main::r#5 ) - *((const nomodify byte*) BORDERCOL) ← (number) 1 + *((const nomodify byte*) BORDER_COLOR) ← (number) 1 (signed byte) mulf8s::a#0 ← (signed byte) main::r#2 (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) main::a#2) call mulf8s @@ -507,7 +507,7 @@ main::@18: scope:[main] from main::@17 (number~) main::$13 ← (signed word~) main::$12 * (number) 2 (number~) main::$14 ← (number~) main::$13 + (number) $5a*(number) $100 (signed word) main::y#0 ← (number~) main::$14 - *((const nomodify byte*) BORDERCOL) ← (number) 2 + *((const nomodify byte*) BORDER_COLOR) ← (number) 2 (byte) main::a#1 ← (byte) main::a#4 + (number) $62 (signed byte) main::r#1 ← (signed byte) main::r#4 + (number) 3 (byte~) main::$15 ← > (signed word) main::x#1 @@ -537,7 +537,7 @@ main::@5: scope:[main] from main::@19 (byte**) renderBobCleanupNext#32 ← phi( main::@19/(byte**) renderBobCleanupNext#1 ) (byte) main::angle#3 ← phi( main::@19/(byte) main::angle#5 ) (byte) main::angle#1 ← (byte) main::angle#3 + (number) 3 - *((const nomodify byte*) BORDERCOL) ← (number) 0 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 (byte) keyboard_key_pressed::key#0 ← (const nomodify byte) KEY_SPACE call keyboard_key_pressed (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#1 @@ -1246,7 +1246,7 @@ SYMBOL TABLE SSA (const nomodify byte) BOB_SHIFTS_Y = (byte) 8 (const nomodify byte) BOB_SUBTABLE_SIZE = (const nomodify byte) BOB_SHIFTS_X*(const nomodify byte) BOB_SHIFTS_Y (const byte*) BOB_TABLES[(number) 9*(number) 8*(number) 4] = { fill( 9*8*4, 0) } -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify byte*) CHARSET_BASIC = (byte*)(number) $1000 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*)(number) $dc00 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*)(number) $dd00 @@ -2408,20 +2408,20 @@ Adding number conversion cast (unumber) main::toD0181_$6 in (number~) main::toD0 Adding number conversion cast (unumber) 0 in (byte) memset::c#0 ← (number) 0 Adding number conversion cast (unumber) $3e8 in (word) memset::num#0 ← (number) $3e8 Adding number conversion cast (unumber) $f8 in (bool~) main::$8 ← *((const nomodify byte*) RASTER) < (number) $f8 -Adding number conversion cast (unumber) $f in *((const nomodify byte*) BORDERCOL) ← (number) $f -Adding number conversion cast (unumber) 1 in *((const nomodify byte*) BORDERCOL) ← (number) 1 +Adding number conversion cast (unumber) $f in *((const nomodify byte*) BORDER_COLOR) ← (number) $f +Adding number conversion cast (unumber) 1 in *((const nomodify byte*) BORDER_COLOR) ← (number) 1 Adding number conversion cast (snumber) $4b*$100 in (number~) main::$11 ← (signed word~) main::$10 + (number) $4b*(number) $100 Adding number conversion cast (snumber) main::$11 in (number~) main::$11 ← (signed word~) main::$10 + (snumber)(number) $4b*(number) $100 Adding number conversion cast (snumber) 2 in (number~) main::$13 ← (signed word~) main::$12 * (number) 2 Adding number conversion cast (snumber) main::$13 in (number~) main::$13 ← (signed word~) main::$12 * (snumber)(number) 2 Adding number conversion cast (snumber) $5a*$100 in (number~) main::$14 ← (snumber~) main::$13 + (number) $5a*(number) $100 Adding number conversion cast (snumber) main::$14 in (number~) main::$14 ← (snumber~) main::$13 + (snumber)(number) $5a*(number) $100 -Adding number conversion cast (unumber) 2 in *((const nomodify byte*) BORDERCOL) ← (number) 2 +Adding number conversion cast (unumber) 2 in *((const nomodify byte*) BORDER_COLOR) ← (number) 2 Adding number conversion cast (unumber) $62 in (byte) main::a#1 ← (byte) main::a#4 + (number) $62 Adding number conversion cast (snumber) 3 in (signed byte) main::r#1 ← (signed byte) main::r#4 + (number) 3 Adding number conversion cast (unumber) 1 in (byte) main::i#1 ← (byte) main::i#2 + rangenext(0,NUM_BOBS-1) Adding number conversion cast (unumber) 3 in (byte) main::angle#1 ← (byte) main::angle#3 + (number) 3 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 Adding number conversion cast (unumber) 0 in (bool~) main::$23 ← (number) 0 != (byte~) main::$19 Adding number conversion cast (unumber) 0 in (bool~) main::$22 ← (number) 0 != (byte~) main::$21 Adding number conversion cast (unumber) 3 in *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (number) 3 @@ -2533,10 +2533,10 @@ Inlining cast (byte) mulf_init::dir#1 ← (unumber)(number) 1 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (unumber)(number) 3 Inlining cast (byte) memset::c#0 ← (unumber)(number) 0 Inlining cast (word) memset::num#0 ← (unumber)(number) $3e8 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) $f -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 1 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 2 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) $f +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 1 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 2 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (unumber)(number) 3 Inlining cast *((byte*) renderBobCleanup::screen#0 + (unumber)(number) 0) ← (unumber)(number) 0 Inlining cast *((byte*) renderBobCleanup::screen#0 + (unumber)(number) $28) ← (unumber)(number) 0 @@ -3761,7 +3761,7 @@ main::@2: scope:[main] from main::@1 main::@2 [17] if(*((const nomodify byte*) RASTER)<(byte) $f8) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@2 - [18] *((const nomodify byte*) BORDERCOL) ← (byte) $f + [18] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f [19] call renderBobCleanup to:main::@11 main::@11: scope:[main] from main::@3 @@ -3772,7 +3772,7 @@ main::@4: scope:[main] from main::@11 main::@14 [21] (byte**) renderBobCleanupNext#17 ← phi( main::@11/(const byte**) RENDERBOB_CLEANUP main::@14/(byte**) renderBobCleanupNext#13 ) [21] (byte) main::a#2 ← phi( main::@11/(byte) main::a#6 main::@14/(byte) main::a#1 ) [21] (signed byte) main::r#2 ← phi( main::@11/(signed byte) $1e main::@14/(signed byte) main::r#1 ) - [22] *((const nomodify byte*) BORDERCOL) ← (byte) 1 + [22] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 [23] (signed byte) mulf8s::a#0 ← (signed byte) main::r#2 [24] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) main::a#2) [25] call mulf8s @@ -3790,7 +3790,7 @@ main::@13: scope:[main] from main::@12 [33] (signed word~) main::$12 ← (signed word) mulf8s::return#3 [34] (signed word~) main::$13 ← (signed word~) main::$12 << (byte) 1 [35] (signed word) main::y#0 ← (signed word~) main::$13 + (signed word)(number) $5a*(number) $100 - [36] *((const nomodify byte*) BORDERCOL) ← (byte) 2 + [36] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 [37] (byte) main::a#1 ← (byte) main::a#2 + (byte) $62 [38] (signed byte) main::r#1 ← (signed byte) main::r#2 + (signed byte) 3 [39] (byte) renderBob::xpos#0 ← > (signed word) main::x#0 @@ -3803,7 +3803,7 @@ main::@14: scope:[main] from main::@13 to:main::@5 main::@5: scope:[main] from main::@14 [44] (byte) main::angle#1 ← (byte) main::angle#8 + (byte) 3 - [45] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [45] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [46] call keyboard_key_pressed [47] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 to:main::@15 @@ -4945,7 +4945,7 @@ Target platform is c64basic / MOS6502X .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D018 = $d018 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 @@ -5087,9 +5087,9 @@ main: { jmp __b3 // main::@3 __b3: - // [18] *((const nomodify byte*) BORDERCOL) ← (byte) $f -- _deref_pbuc1=vbuc2 + // [18] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f -- _deref_pbuc1=vbuc2 lda #$f - sta BORDERCOL + sta BORDER_COLOR // [19] call renderBobCleanup // [121] phi from main::@3 to renderBobCleanup [phi:main::@3->renderBobCleanup] renderBobCleanup_from___b3: @@ -5124,10 +5124,10 @@ main: { jmp __b4 // main::@4 __b4: - // [22] *((const nomodify byte*) BORDERCOL) ← (byte) 1 -- _deref_pbuc1=vbuc2 + // [22] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 -- _deref_pbuc1=vbuc2 //kickasm {{ .break }} lda #1 - sta BORDERCOL + sta BORDER_COLOR // [23] (signed byte) mulf8s::a#0 ← (signed byte) main::r#2 -- vbsz1=vbsz2 lda.z r sta.z mulf8s.a @@ -5203,9 +5203,9 @@ main: { lda.z __13+1 adc #>$5a*$100 sta.z y+1 - // [36] *((const nomodify byte*) BORDERCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [36] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BORDERCOL + sta BORDER_COLOR // [37] (byte) main::a#1 ← (byte) main::a#2 + (byte) $62 -- vbuz1=vbuz1_plus_vbuc1 lax.z a axs #-[$62] @@ -5238,9 +5238,9 @@ main: { lax.z angle axs #-[3] stx.z angle - // [45] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [45] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // [46] call keyboard_key_pressed // [61] phi from main::@5 to keyboard_key_pressed [phi:main::@5->keyboard_key_pressed] keyboard_key_pressed_from___b5: @@ -6790,8 +6790,8 @@ Statement [12] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (const by Statement [14] *((const nomodify byte*) D018) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [17] if(*((const nomodify byte*) RASTER)<(byte) $f8) goto main::@2 [ main::angle#8 ] ( main:2 [ main::angle#8 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::angle#8 main::angle#1 ] -Statement [18] *((const nomodify byte*) BORDERCOL) ← (byte) $f [ main::angle#8 ] ( main:2 [ main::angle#8 ] { } ) always clobbers reg byte a -Statement [22] *((const nomodify byte*) BORDERCOL) ← (byte) 1 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 main::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a +Statement [18] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f [ main::angle#8 ] ( main:2 [ main::angle#8 ] { } ) always clobbers reg byte a +Statement [22] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 main::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::r#2 main::r#1 ] Removing always clobbered register reg byte a as potential for zp[1]:4 [ main::a#2 main::a#6 main::a#1 ] Removing always clobbered register reg byte a as potential for zp[1]:7 [ main::i#2 main::i#1 ] @@ -6802,11 +6802,11 @@ Statement [32] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 Statement [33] (signed word~) main::$12 ← (signed word) mulf8s::return#3 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::$12 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::$12 ] { } ) always clobbers reg byte a Statement [34] (signed word~) main::$13 ← (signed word~) main::$12 << (byte) 1 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::$13 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::$13 ] { } ) always clobbers reg byte a Statement [35] (signed word) main::y#0 ← (signed word~) main::$13 + (signed word)(number) $5a*(number) $100 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] { } ) always clobbers reg byte a -Statement [36] *((const nomodify byte*) BORDERCOL) ← (byte) 2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] { } ) always clobbers reg byte a +Statement [36] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] { } ) always clobbers reg byte a Statement [37] (byte) main::a#1 ← (byte) main::a#2 + (byte) $62 [ main::angle#8 main::r#2 renderBobCleanupNext#17 main::i#2 main::a#1 main::x#0 main::y#0 ] ( main:2 [ main::angle#8 main::r#2 renderBobCleanupNext#17 main::i#2 main::a#1 main::x#0 main::y#0 ] { } ) always clobbers reg byte a Statement [38] (signed byte) main::r#1 ← (signed byte) main::r#2 + (signed byte) 3 [ main::angle#8 renderBobCleanupNext#17 main::i#2 main::r#1 main::a#1 main::x#0 main::y#0 ] ( main:2 [ main::angle#8 renderBobCleanupNext#17 main::i#2 main::r#1 main::a#1 main::x#0 main::y#0 ] { } ) always clobbers reg byte a Statement [44] (byte) main::angle#1 ← (byte) main::angle#8 + (byte) 3 [ main::angle#1 ] ( main:2 [ main::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a -Statement [45] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ main::angle#1 ] ( main:2 [ main::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a +Statement [45] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ main::angle#1 ] ( main:2 [ main::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a Statement [55] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [57] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (const byte) main::vicSelectGfxBank2_toDd001_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [59] *((const nomodify byte*) D018) ← (const byte) main::toD0182_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a @@ -6947,9 +6947,9 @@ Statement [10] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) O Statement [12] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [14] *((const nomodify byte*) D018) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [17] if(*((const nomodify byte*) RASTER)<(byte) $f8) goto main::@2 [ main::angle#8 ] ( main:2 [ main::angle#8 ] { } ) always clobbers reg byte a -Statement [18] *((const nomodify byte*) BORDERCOL) ← (byte) $f [ main::angle#8 ] ( main:2 [ main::angle#8 ] { } ) always clobbers reg byte a +Statement [18] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f [ main::angle#8 ] ( main:2 [ main::angle#8 ] { } ) always clobbers reg byte a Statement [20] (byte) main::a#6 ← (byte) main::angle#8 [ main::angle#8 main::a#6 ] ( main:2 [ main::angle#8 main::a#6 ] { } ) always clobbers reg byte a -Statement [22] *((const nomodify byte*) BORDERCOL) ← (byte) 1 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 main::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a +Statement [22] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 main::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a Statement [24] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) main::a#2) [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 mulf8s::a#0 mulf8s::b#0 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 mulf8s::a#0 mulf8s::b#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 main::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte y Removing always clobbered register reg byte y as potential for zp[1]:8 [ mulf8s::mulf8s_prepare1_a#0 mulf8s::a#1 mulf8s::a#0 ] Statement [26] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 mulf8s::return#2 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 mulf8s::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 main::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a @@ -6960,12 +6960,12 @@ Statement [32] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 Statement [33] (signed word~) main::$12 ← (signed word) mulf8s::return#3 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::$12 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::$12 ] { } ) always clobbers reg byte a Statement [34] (signed word~) main::$13 ← (signed word~) main::$12 << (byte) 1 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::$13 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::$13 ] { } ) always clobbers reg byte a Statement [35] (signed word) main::y#0 ← (signed word~) main::$13 + (signed word)(number) $5a*(number) $100 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] { } ) always clobbers reg byte a -Statement [36] *((const nomodify byte*) BORDERCOL) ← (byte) 2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] { } ) always clobbers reg byte a +Statement [36] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] { } ) always clobbers reg byte a Statement [37] (byte) main::a#1 ← (byte) main::a#2 + (byte) $62 [ main::angle#8 main::r#2 renderBobCleanupNext#17 main::i#2 main::a#1 main::x#0 main::y#0 ] ( main:2 [ main::angle#8 main::r#2 renderBobCleanupNext#17 main::i#2 main::a#1 main::x#0 main::y#0 ] { } ) always clobbers reg byte a reg byte x Statement [38] (signed byte) main::r#1 ← (signed byte) main::r#2 + (signed byte) 3 [ main::angle#8 renderBobCleanupNext#17 main::i#2 main::r#1 main::a#1 main::x#0 main::y#0 ] ( main:2 [ main::angle#8 renderBobCleanupNext#17 main::i#2 main::r#1 main::a#1 main::x#0 main::y#0 ] { } ) always clobbers reg byte a reg byte x Statement [43] if((byte) main::i#1!=(const nomodify byte) NUM_BOBS-(byte) 1+(byte) 1) goto main::@4 [ main::angle#8 main::r#1 main::a#1 renderBobCleanupNext#13 main::i#1 ] ( main:2 [ main::angle#8 main::r#1 main::a#1 renderBobCleanupNext#13 main::i#1 ] { } ) always clobbers reg byte a Statement [44] (byte) main::angle#1 ← (byte) main::angle#8 + (byte) 3 [ main::angle#1 ] ( main:2 [ main::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a reg byte x -Statement [45] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ main::angle#1 ] ( main:2 [ main::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a +Statement [45] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ main::angle#1 ] ( main:2 [ main::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a Statement [55] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [57] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (const byte) main::vicSelectGfxBank2_toDd001_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [59] *((const nomodify byte*) D018) ← (const byte) main::toD0182_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a @@ -7057,9 +7057,9 @@ Statement [10] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) O Statement [12] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [14] *((const nomodify byte*) D018) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [17] if(*((const nomodify byte*) RASTER)<(byte) $f8) goto main::@2 [ main::angle#8 ] ( main:2 [ main::angle#8 ] { } ) always clobbers reg byte a -Statement [18] *((const nomodify byte*) BORDERCOL) ← (byte) $f [ main::angle#8 ] ( main:2 [ main::angle#8 ] { } ) always clobbers reg byte a +Statement [18] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f [ main::angle#8 ] ( main:2 [ main::angle#8 ] { } ) always clobbers reg byte a Statement [20] (byte) main::a#6 ← (byte) main::angle#8 [ main::angle#8 main::a#6 ] ( main:2 [ main::angle#8 main::a#6 ] { } ) always clobbers reg byte a -Statement [22] *((const nomodify byte*) BORDERCOL) ← (byte) 1 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 main::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a +Statement [22] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 main::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a Statement [24] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) main::a#2) [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 mulf8s::a#0 mulf8s::b#0 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 mulf8s::a#0 mulf8s::b#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 main::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte y Statement [26] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 mulf8s::return#2 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 mulf8s::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 main::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a Statement [27] (signed word~) main::$10 ← (signed word) mulf8s::return#2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::$10 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::$10 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 main::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a @@ -7069,12 +7069,12 @@ Statement [32] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 Statement [33] (signed word~) main::$12 ← (signed word) mulf8s::return#3 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::$12 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::$12 ] { } ) always clobbers reg byte a Statement [34] (signed word~) main::$13 ← (signed word~) main::$12 << (byte) 1 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::$13 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::$13 ] { } ) always clobbers reg byte a Statement [35] (signed word) main::y#0 ← (signed word~) main::$13 + (signed word)(number) $5a*(number) $100 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] { } ) always clobbers reg byte a -Statement [36] *((const nomodify byte*) BORDERCOL) ← (byte) 2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] { } ) always clobbers reg byte a +Statement [36] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] ( main:2 [ main::angle#8 main::r#2 main::a#2 renderBobCleanupNext#17 main::i#2 main::x#0 main::y#0 ] { } ) always clobbers reg byte a Statement [37] (byte) main::a#1 ← (byte) main::a#2 + (byte) $62 [ main::angle#8 main::r#2 renderBobCleanupNext#17 main::i#2 main::a#1 main::x#0 main::y#0 ] ( main:2 [ main::angle#8 main::r#2 renderBobCleanupNext#17 main::i#2 main::a#1 main::x#0 main::y#0 ] { } ) always clobbers reg byte a reg byte x Statement [38] (signed byte) main::r#1 ← (signed byte) main::r#2 + (signed byte) 3 [ main::angle#8 renderBobCleanupNext#17 main::i#2 main::r#1 main::a#1 main::x#0 main::y#0 ] ( main:2 [ main::angle#8 renderBobCleanupNext#17 main::i#2 main::r#1 main::a#1 main::x#0 main::y#0 ] { } ) always clobbers reg byte a reg byte x Statement [43] if((byte) main::i#1!=(const nomodify byte) NUM_BOBS-(byte) 1+(byte) 1) goto main::@4 [ main::angle#8 main::r#1 main::a#1 renderBobCleanupNext#13 main::i#1 ] ( main:2 [ main::angle#8 main::r#1 main::a#1 renderBobCleanupNext#13 main::i#1 ] { } ) always clobbers reg byte a Statement [44] (byte) main::angle#1 ← (byte) main::angle#8 + (byte) 3 [ main::angle#1 ] ( main:2 [ main::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a reg byte x -Statement [45] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ main::angle#1 ] ( main:2 [ main::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a +Statement [45] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ main::angle#1 ] ( main:2 [ main::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } } ) always clobbers reg byte a Statement [55] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [57] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (const byte) main::vicSelectGfxBank2_toDd001_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [59] *((const nomodify byte*) D018) ← (const byte) main::toD0182_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a @@ -7429,7 +7429,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D018 = $d018 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 @@ -7569,9 +7569,9 @@ main: { jmp __b3 // main::@3 __b3: - // [18] *((const nomodify byte*) BORDERCOL) ← (byte) $f -- _deref_pbuc1=vbuc2 + // [18] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f -- _deref_pbuc1=vbuc2 lda #$f - sta BORDERCOL + sta BORDER_COLOR // [19] call renderBobCleanup // [121] phi from main::@3 to renderBobCleanup [phi:main::@3->renderBobCleanup] renderBobCleanup_from___b3: @@ -7606,10 +7606,10 @@ main: { jmp __b4 // main::@4 __b4: - // [22] *((const nomodify byte*) BORDERCOL) ← (byte) 1 -- _deref_pbuc1=vbuc2 + // [22] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 -- _deref_pbuc1=vbuc2 //kickasm {{ .break }} lda #1 - sta BORDERCOL + sta BORDER_COLOR // [23] (signed byte) mulf8s::a#0 ← (signed byte) main::r#2 -- vbsaa=vbsz1 lda.z r // [24] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) main::a#2) -- vbsxx=pbsc1_derefidx_vbuz1 @@ -7661,9 +7661,9 @@ main: { lda.z y+1 adc #>$5a*$100 sta.z y+1 - // [36] *((const nomodify byte*) BORDERCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [36] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BORDERCOL + sta BORDER_COLOR // [37] (byte) main::a#1 ← (byte) main::a#2 + (byte) $62 -- vbuz1=vbuz1_plus_vbuc1 lax.z a axs #-[$62] @@ -7696,9 +7696,9 @@ main: { lax.z angle axs #-[3] stx.z angle - // [45] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [45] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // [46] call keyboard_key_pressed // [61] phi from main::@5 to keyboard_key_pressed [phi:main::@5->keyboard_key_pressed] keyboard_key_pressed_from___b5: @@ -9371,7 +9371,7 @@ FINAL SYMBOL TABLE (const nomodify byte) BOB_SHIFTS_Y = (byte) 8 (const nomodify byte) BOB_SUBTABLE_SIZE = (const nomodify byte) BOB_SHIFTS_X*(const nomodify byte) BOB_SHIFTS_Y (const byte*) BOB_TABLES[(number) 9*(number) 8*(number) 4] = { fill( 9*8*4, 0) } -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) CHARSET_BASIC = (byte*) 4096 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*) 56576 @@ -9948,7 +9948,7 @@ Score: 3510799 .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D018 = $d018 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 @@ -10059,10 +10059,10 @@ main: { cmp #$f8 bcc __b2 // main::@3 - // *BORDERCOL = 0xf - // [18] *((const nomodify byte*) BORDERCOL) ← (byte) $f -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 0xf + // [18] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f -- _deref_pbuc1=vbuc2 lda #$f - sta BORDERCOL + sta BORDER_COLOR // renderBobCleanup() // [19] call renderBobCleanup // [121] phi from main::@3 to renderBobCleanup [phi:main::@3->renderBobCleanup] @@ -10091,11 +10091,11 @@ main: { // [21] phi (signed byte) main::r#2 = (signed byte) main::r#1 [phi:main::@14->main::@4#3] -- register_copy // main::@4 __b4: - // *BORDERCOL = 1 - // [22] *((const nomodify byte*) BORDERCOL) ← (byte) 1 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 1 + // [22] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 -- _deref_pbuc1=vbuc2 //kickasm {{ .break }} lda #1 - sta BORDERCOL + sta BORDER_COLOR // mulf8s(r, COS[a]) // [23] (signed byte) mulf8s::a#0 ← (signed byte) main::r#2 -- vbsaa=vbsz1 lda.z r @@ -10148,10 +10148,10 @@ main: { lda.z y+1 adc #>$5a*$100 sta.z y+1 - // *BORDERCOL = 2 - // [36] *((const nomodify byte*) BORDERCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 2 + // [36] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BORDERCOL + sta BORDER_COLOR // a += 98 // [37] (byte) main::a#1 ← (byte) main::a#2 + (byte) $62 -- vbuz1=vbuz1_plus_vbuc1 lax.z a @@ -10185,10 +10185,10 @@ main: { lax.z angle axs #-[3] stx.z angle - // *BORDERCOL = 0 - // [45] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 0 + // [45] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // keyboard_key_pressed(KEY_SPACE) // [46] call keyboard_key_pressed // [61] phi from main::@5 to keyboard_key_pressed [phi:main::@5->keyboard_key_pressed] diff --git a/src/test/ref/complex/prebob/vogel-bobs.sym b/src/test/ref/complex/prebob/vogel-bobs.sym index ac6770675..84db5b329 100644 --- a/src/test/ref/complex/prebob/vogel-bobs.sym +++ b/src/test/ref/complex/prebob/vogel-bobs.sym @@ -7,7 +7,7 @@ (const nomodify byte) BOB_SHIFTS_Y = (byte) 8 (const nomodify byte) BOB_SUBTABLE_SIZE = (const nomodify byte) BOB_SHIFTS_X*(const nomodify byte) BOB_SHIFTS_Y (const byte*) BOB_TABLES[(number) 9*(number) 8*(number) 4] = { fill( 9*8*4, 0) } -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) CHARSET_BASIC = (byte*) 4096 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*) 56576 diff --git a/src/test/ref/complex/prebob/vogel-sprites.asm b/src/test/ref/complex/prebob/vogel-sprites.asm index 68681d2f3..335ed7cf4 100644 --- a/src/test/ref/complex/prebob/vogel-sprites.asm +++ b/src/test/ref/complex/prebob/vogel-sprites.asm @@ -17,10 +17,10 @@ .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D011 = $d011 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 @@ -129,9 +129,9 @@ loop: { lda RASTER cmp #$d8 bcc __b2 - // *BORDERCOL = 0xf + // *BORDER_COLOR = 0xf lda #$f - sta BORDERCOL + sta BORDER_COLOR lda.z angle sta.z a lda #0 @@ -139,10 +139,10 @@ loop: { lda #$1e sta.z r __b4: - // *BORDERCOL = 6 + // *BORDER_COLOR = 6 //kickasm {{ .break }} lda #6 - sta BORDERCOL + sta BORDER_COLOR // mulf8s(r, COS[a]) lda.z r ldy.z a @@ -202,18 +202,18 @@ loop: { lda #NUM_BOBS-1+1 cmp.z i bne __b4 - // *BORDERCOL = 3 + // *BORDER_COLOR = 3 lda #3 - sta BORDERCOL + sta BORDER_COLOR // plexSort() jsr plexSort // angle += 3 lax.z angle axs #-[3] stx.z angle - // *BORDERCOL = BLACK + // *BORDER_COLOR = BLACK lda #BLACK - sta BORDERCOL + sta BORDER_COLOR // Sort the sprites by y-position __b6: // *D011&VIC_RST8 @@ -226,9 +226,9 @@ loop: { sta.z i1 // Show the sprites __b7: - // *BORDERCOL = BLACK + // *BORDER_COLOR = BLACK lda #BLACK - sta BORDERCOL + sta BORDER_COLOR // return PLEX_FREE_YPOS[plex_free_next]; ldy.z plex_free_next lda PLEX_FREE_YPOS,y @@ -238,8 +238,8 @@ loop: { lda RASTER cmp.z plexFreeNextYpos1_return bcc __b8 - // (*BORDERCOL)++; - inc BORDERCOL + // (*BORDER_COLOR)++; + inc BORDER_COLOR // plexShowSprite() jsr plexShowSprite // for( char i: 0..PLEX_COUNT-1) @@ -247,9 +247,9 @@ loop: { lda #PLEX_COUNT-1+1 cmp.z i1 bne __b7 - // *BORDERCOL = BLACK + // *BORDER_COLOR = BLACK lda #BLACK - sta BORDERCOL + sta BORDER_COLOR // keyboard_key_pressed(KEY_SPACE) jsr keyboard_key_pressed // keyboard_key_pressed(KEY_SPACE) @@ -570,9 +570,9 @@ init: { sta SPRITES_ENABLE ldx #0 __b3: - // SPRITES_COLS[i] = GREEN + // SPRITES_COLOR[i] = GREEN lda #GREEN - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // for(char i: 0..7) inx cpx #8 diff --git a/src/test/ref/complex/prebob/vogel-sprites.cfg b/src/test/ref/complex/prebob/vogel-sprites.cfg index be3cb05b2..c0f5cb174 100644 --- a/src/test/ref/complex/prebob/vogel-sprites.cfg +++ b/src/test/ref/complex/prebob/vogel-sprites.cfg @@ -87,14 +87,14 @@ loop::@2: scope:[loop] from loop::@1 loop::@2 [34] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 to:loop::@3 loop::@3: scope:[loop] from loop::@2 - [35] *((const nomodify byte*) BORDERCOL) ← (byte) $f + [35] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f [36] (byte) loop::a#6 ← (byte) loop::angle#6 to:loop::@4 loop::@4: scope:[loop] from loop::@12 loop::@3 [37] (byte) loop::i#2 ← phi( loop::@12/(byte) loop::i#1 loop::@3/(byte) 0 ) [37] (byte) loop::a#2 ← phi( loop::@12/(byte) loop::a#1 loop::@3/(byte) loop::a#6 ) [37] (signed byte) loop::r#2 ← phi( loop::@12/(signed byte) loop::r#1 loop::@3/(signed byte) $1e ) - [38] *((const nomodify byte*) BORDERCOL) ← (byte) 6 + [38] *((const nomodify byte*) BORDER_COLOR) ← (byte) 6 [39] (signed byte) mulf8s::a#0 ← (signed byte) loop::r#2 [40] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) loop::a#2) [41] call mulf8s @@ -124,12 +124,12 @@ loop::@12: scope:[loop] from loop::@11 [61] if((byte) loop::i#1!=(const nomodify byte) NUM_BOBS-(byte) 1+(byte) 1) goto loop::@4 to:loop::@5 loop::@5: scope:[loop] from loop::@12 - [62] *((const nomodify byte*) BORDERCOL) ← (byte) 3 + [62] *((const nomodify byte*) BORDER_COLOR) ← (byte) 3 [63] call plexSort to:loop::@13 loop::@13: scope:[loop] from loop::@5 [64] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 - [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [65] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK to:loop::@6 loop::@6: scope:[loop] from loop::@13 loop::@6 [66] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 @@ -137,7 +137,7 @@ loop::@6: scope:[loop] from loop::@13 loop::@6 to:loop::@7 loop::@7: scope:[loop] from loop::@14 loop::@6 [68] (byte) loop::i1#5 ← phi( loop::@14/(byte) loop::i1#1 loop::@6/(byte) 0 ) - [69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [69] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK to:loop::plexFreeNextYpos1 loop::plexFreeNextYpos1: scope:[loop] from loop::@7 [70] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) @@ -146,7 +146,7 @@ loop::@8: scope:[loop] from loop::@8 loop::plexFreeNextYpos1 [71] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8 to:loop::@9 loop::@9: scope:[loop] from loop::@8 - [72] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [72] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) [73] call plexShowSprite to:loop::@14 loop::@14: scope:[loop] from loop::@9 @@ -154,7 +154,7 @@ loop::@14: scope:[loop] from loop::@9 [75] if((byte) loop::i1#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 to:loop::@10 loop::@10: scope:[loop] from loop::@14 - [76] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [76] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [77] call keyboard_key_pressed [78] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0 to:loop::@15 @@ -355,7 +355,7 @@ init::@2: scope:[init] from init::@1 to:init::@3 init::@3: scope:[init] from init::@2 init::@3 [177] (byte) init::i1#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::i1#1 ) - [178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN + [178] *((const nomodify byte*) SPRITES_COLOR + (byte) init::i1#2) ← (const nomodify byte) GREEN [179] (byte) init::i1#1 ← ++ (byte) init::i1#2 [180] if((byte) init::i1#1!=(byte) 8) goto init::@3 to:init::@4 diff --git a/src/test/ref/complex/prebob/vogel-sprites.log b/src/test/ref/complex/prebob/vogel-sprites.log index 4f4057e6a..3d7c9185a 100644 --- a/src/test/ref/complex/prebob/vogel-sprites.log +++ b/src/test/ref/complex/prebob/vogel-sprites.log @@ -519,7 +519,7 @@ init::@2: scope:[init] from init::@1 init::@3: scope:[init] from init::@2 init::@3 (byte*) PLEX_SCREEN_PTR#29 ← phi( init::@2/(byte*) PLEX_SCREEN_PTR#31 init::@3/(byte*) PLEX_SCREEN_PTR#29 ) (byte) init::i1#2 ← phi( init::@2/(byte) init::i1#0 init::@3/(byte) init::i1#1 ) - *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN + *((const nomodify byte*) SPRITES_COLOR + (byte) init::i1#2) ← (const nomodify byte) GREEN (byte) init::i1#1 ← (byte) init::i1#2 + rangenext(0,7) (bool~) init::$8 ← (byte) init::i1#1 != rangelast(0,7) if((bool~) init::$8) goto init::@3 @@ -582,7 +582,7 @@ loop::@2: scope:[loop] from loop::@1 loop::@2 loop::@3: scope:[loop] from loop::@2 (byte*) PLEX_SCREEN_PTR#45 ← phi( loop::@2/(byte*) PLEX_SCREEN_PTR#46 ) (byte) loop::angle#2 ← phi( loop::@2/(byte) loop::angle#4 ) - *((const nomodify byte*) BORDERCOL) ← (number) $f + *((const nomodify byte*) BORDER_COLOR) ← (number) $f (signed byte) loop::r#0 ← (signed byte) $1e (byte) loop::a#0 ← (byte) loop::angle#2 (byte) loop::i#0 ← (byte) 0 @@ -593,7 +593,7 @@ loop::@4: scope:[loop] from loop::@14 loop::@3 (byte) loop::i#4 ← phi( loop::@14/(byte) loop::i#1 loop::@3/(byte) loop::i#0 ) (byte) loop::a#2 ← phi( loop::@14/(byte) loop::a#1 loop::@3/(byte) loop::a#0 ) (signed byte) loop::r#2 ← phi( loop::@14/(signed byte) loop::r#1 loop::@3/(signed byte) loop::r#0 ) - *((const nomodify byte*) BORDERCOL) ← (number) 6 + *((const nomodify byte*) BORDER_COLOR) ← (number) 6 (signed byte) mulf8s::a#0 ← (signed byte) loop::r#2 (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) loop::a#2) call mulf8s @@ -640,14 +640,14 @@ loop::@14: scope:[loop] from loop::@13 loop::@5: scope:[loop] from loop::@14 (byte*) PLEX_SCREEN_PTR#41 ← phi( loop::@14/(byte*) PLEX_SCREEN_PTR#42 ) (byte) loop::angle#5 ← phi( loop::@14/(byte) loop::angle#7 ) - *((const nomodify byte*) BORDERCOL) ← (number) 3 + *((const nomodify byte*) BORDER_COLOR) ← (number) 3 call plexSort to:loop::@15 loop::@15: scope:[loop] from loop::@5 (byte*) PLEX_SCREEN_PTR#40 ← phi( loop::@5/(byte*) PLEX_SCREEN_PTR#41 ) (byte) loop::angle#3 ← phi( loop::@5/(byte) loop::angle#5 ) (byte) loop::angle#1 ← (byte) loop::angle#3 + (number) 3 - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK to:loop::@6 loop::@6: scope:[loop] from loop::@15 loop::@6 (byte) loop::angle#20 ← phi( loop::@15/(byte) loop::angle#1 loop::@6/(byte) loop::angle#20 ) @@ -665,7 +665,7 @@ loop::@8: scope:[loop] from loop::@16 loop::@7 (byte) loop::angle#18 ← phi( loop::@16/(byte) loop::angle#12 loop::@7/(byte) loop::angle#19 ) (byte*) PLEX_SCREEN_PTR#36 ← phi( loop::@16/(byte*) PLEX_SCREEN_PTR#37 loop::@7/(byte*) PLEX_SCREEN_PTR#38 ) (byte) loop::i1#8 ← phi( loop::@16/(byte) loop::i1#1 loop::@7/(byte) loop::i1#0 ) - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK to:loop::plexFreeNextYpos1 loop::plexFreeNextYpos1: scope:[loop] from loop::@8 (byte) loop::angle#17 ← phi( loop::@8/(byte) loop::angle#18 ) @@ -700,7 +700,7 @@ loop::@10: scope:[loop] from loop::@9 (byte) loop::angle#13 ← phi( loop::@9/(byte) loop::angle#14 ) (byte*) PLEX_SCREEN_PTR#27 ← phi( loop::@9/(byte*) PLEX_SCREEN_PTR#30 ) (byte) loop::i1#3 ← phi( loop::@9/(byte) loop::i1#4 ) - *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) call plexShowSprite to:loop::@16 loop::@16: scope:[loop] from loop::@10 @@ -714,7 +714,7 @@ loop::@16: scope:[loop] from loop::@10 loop::@11: scope:[loop] from loop::@16 (byte*) PLEX_SCREEN_PTR#50 ← phi( loop::@16/(byte*) PLEX_SCREEN_PTR#37 ) (byte) loop::angle#11 ← phi( loop::@16/(byte) loop::angle#12 ) - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK (byte) keyboard_key_pressed::key#1 ← (const nomodify byte) KEY_SPACE call keyboard_key_pressed (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#1 @@ -749,7 +749,7 @@ SYMBOL TABLE SSA (label) @begin (label) @end (const nomodify byte) BLACK = (byte) 0 -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*)(number) $dc00 (const signed byte*) COS = (const signed byte*) SIN+(number) $40 (const nomodify byte*) D011 = (byte*)(number) $d011 @@ -911,7 +911,7 @@ SYMBOL TABLE SSA .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }} -(const nomodify byte*) SPRITES_COLS = (byte*)(number) $d027 +(const nomodify byte*) SPRITES_COLOR = (byte*)(number) $d027 (const nomodify byte*) SPRITES_ENABLE = (byte*)(number) $d015 (const nomodify byte*) SPRITES_XMSB = (byte*)(number) $d010 (const nomodify byte*) SPRITES_XPOS = (byte*)(number) $d000 @@ -1488,8 +1488,8 @@ Adding number conversion cast (unumber) $ff in *((const nomodify byte*) SPRITES_ Adding number conversion cast (unumber) $3e8 in (word) memset::num#0 ← (number) $3e8 Adding number conversion cast (unumber) 0 in (bool~) exit::$1 ← (number) 0 != (byte~) exit::$0 Adding number conversion cast (unumber) $d8 in (bool~) loop::$0 ← *((const nomodify byte*) RASTER) < (number) $d8 -Adding number conversion cast (unumber) $f in *((const nomodify byte*) BORDERCOL) ← (number) $f -Adding number conversion cast (unumber) 6 in *((const nomodify byte*) BORDERCOL) ← (number) 6 +Adding number conversion cast (unumber) $f in *((const nomodify byte*) BORDER_COLOR) ← (number) $f +Adding number conversion cast (unumber) 6 in *((const nomodify byte*) BORDER_COLOR) ← (number) 6 Adding number conversion cast (snumber) 2 in (number~) loop::$2 ← (signed word~) loop::$1 * (number) 2 Adding number conversion cast (snumber) loop::$2 in (number~) loop::$2 ← (signed word~) loop::$1 * (snumber)(number) 2 Adding number conversion cast (snumber) $7d*$100 in (number~) loop::$3 ← (snumber~) loop::$2 + (number) $7d*(number) $100 @@ -1501,7 +1501,7 @@ Adding number conversion cast (snumber) loop::$7 in (number~) loop::$7 ← (snum Adding number conversion cast (unumber) $62 in (byte) loop::a#1 ← (byte) loop::a#4 + (number) $62 Adding number conversion cast (snumber) 3 in (signed byte) loop::r#1 ← (signed byte) loop::r#4 + (number) 3 Adding number conversion cast (unumber) 1 in (byte) loop::i#1 ← (byte) loop::i#3 + rangenext(0,NUM_BOBS-1) -Adding number conversion cast (unumber) 3 in *((const nomodify byte*) BORDERCOL) ← (number) 3 +Adding number conversion cast (unumber) 3 in *((const nomodify byte*) BORDER_COLOR) ← (number) 3 Adding number conversion cast (unumber) 3 in (byte) loop::angle#1 ← (byte) loop::angle#3 + (number) 3 Adding number conversion cast (unumber) 0 in (bool~) loop::$12 ← (byte~) loop::$11 != (number) 0 Adding number conversion cast (unumber) 1 in (byte) loop::i1#1 ← (byte) loop::i1#2 + rangenext(0,PLEX_COUNT-1) @@ -1518,9 +1518,9 @@ Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 Inlining cast *((const nomodify byte*) D011) ← (unumber)(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(unumber)(number) 3 Inlining cast *((const nomodify byte*) SPRITES_ENABLE) ← (unumber)(number) $ff Inlining cast (word) memset::num#0 ← (unumber)(number) $3e8 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) $f -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 6 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 3 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) $f +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 6 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 3 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 53248 Simplifying constant pointer cast (byte*) 53249 @@ -2305,14 +2305,14 @@ loop::@2: scope:[loop] from loop::@1 loop::@2 [34] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 to:loop::@3 loop::@3: scope:[loop] from loop::@2 - [35] *((const nomodify byte*) BORDERCOL) ← (byte) $f + [35] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f [36] (byte) loop::a#6 ← (byte) loop::angle#6 to:loop::@4 loop::@4: scope:[loop] from loop::@12 loop::@3 [37] (byte) loop::i#2 ← phi( loop::@12/(byte) loop::i#1 loop::@3/(byte) 0 ) [37] (byte) loop::a#2 ← phi( loop::@12/(byte) loop::a#1 loop::@3/(byte) loop::a#6 ) [37] (signed byte) loop::r#2 ← phi( loop::@12/(signed byte) loop::r#1 loop::@3/(signed byte) $1e ) - [38] *((const nomodify byte*) BORDERCOL) ← (byte) 6 + [38] *((const nomodify byte*) BORDER_COLOR) ← (byte) 6 [39] (signed byte) mulf8s::a#0 ← (signed byte) loop::r#2 [40] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) loop::a#2) [41] call mulf8s @@ -2342,12 +2342,12 @@ loop::@12: scope:[loop] from loop::@11 [61] if((byte) loop::i#1!=(const nomodify byte) NUM_BOBS-(byte) 1+(byte) 1) goto loop::@4 to:loop::@5 loop::@5: scope:[loop] from loop::@12 - [62] *((const nomodify byte*) BORDERCOL) ← (byte) 3 + [62] *((const nomodify byte*) BORDER_COLOR) ← (byte) 3 [63] call plexSort to:loop::@13 loop::@13: scope:[loop] from loop::@5 [64] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 - [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [65] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK to:loop::@6 loop::@6: scope:[loop] from loop::@13 loop::@6 [66] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 @@ -2355,7 +2355,7 @@ loop::@6: scope:[loop] from loop::@13 loop::@6 to:loop::@7 loop::@7: scope:[loop] from loop::@14 loop::@6 [68] (byte) loop::i1#5 ← phi( loop::@14/(byte) loop::i1#1 loop::@6/(byte) 0 ) - [69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [69] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK to:loop::plexFreeNextYpos1 loop::plexFreeNextYpos1: scope:[loop] from loop::@7 [70] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) @@ -2364,7 +2364,7 @@ loop::@8: scope:[loop] from loop::@8 loop::plexFreeNextYpos1 [71] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8 to:loop::@9 loop::@9: scope:[loop] from loop::@8 - [72] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [72] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) [73] call plexShowSprite to:loop::@14 loop::@14: scope:[loop] from loop::@9 @@ -2372,7 +2372,7 @@ loop::@14: scope:[loop] from loop::@9 [75] if((byte) loop::i1#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 to:loop::@10 loop::@10: scope:[loop] from loop::@14 - [76] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [76] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [77] call keyboard_key_pressed [78] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0 to:loop::@15 @@ -2573,7 +2573,7 @@ init::@2: scope:[init] from init::@1 to:init::@3 init::@3: scope:[init] from init::@2 init::@3 [177] (byte) init::i1#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::i1#1 ) - [178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN + [178] *((const nomodify byte*) SPRITES_COLOR + (byte) init::i1#2) ← (const nomodify byte) GREEN [179] (byte) init::i1#1 ← ++ (byte) init::i1#2 [180] if((byte) init::i1#1!=(byte) 8) goto init::@3 to:init::@4 @@ -3234,10 +3234,10 @@ Target platform is c64basic / MOS6502X .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D011 = $d011 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 @@ -3449,9 +3449,9 @@ loop: { jmp __b3 // loop::@3 __b3: - // [35] *((const nomodify byte*) BORDERCOL) ← (byte) $f -- _deref_pbuc1=vbuc2 + // [35] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f -- _deref_pbuc1=vbuc2 lda #$f - sta BORDERCOL + sta BORDER_COLOR // [36] (byte) loop::a#6 ← (byte) loop::angle#6 -- vbuz1=vbuz2 lda.z angle sta.z a @@ -3473,10 +3473,10 @@ loop: { jmp __b4 // loop::@4 __b4: - // [38] *((const nomodify byte*) BORDERCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 + // [38] *((const nomodify byte*) BORDER_COLOR) ← (byte) 6 -- _deref_pbuc1=vbuc2 //kickasm {{ .break }} lda #6 - sta BORDERCOL + sta BORDER_COLOR // [39] (signed byte) mulf8s::a#0 ← (signed byte) loop::r#2 -- vbsz1=vbsz2 lda.z r sta.z mulf8s.a @@ -3596,9 +3596,9 @@ loop: { jmp __b5 // loop::@5 __b5: - // [62] *((const nomodify byte*) BORDERCOL) ← (byte) 3 -- _deref_pbuc1=vbuc2 + // [62] *((const nomodify byte*) BORDER_COLOR) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 - sta BORDERCOL + sta BORDER_COLOR // [63] call plexSort // [108] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] plexSort_from___b5: @@ -3610,9 +3610,9 @@ loop: { lax.z angle axs #-[3] stx.z angle - // [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [65] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL + sta BORDER_COLOR jmp __b6 // Sort the sprites by y-position // loop::@6 @@ -3638,9 +3638,9 @@ loop: { jmp __b7 // loop::@7 __b7: - // [69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [69] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL + sta BORDER_COLOR jmp plexFreeNextYpos1 // loop::plexFreeNextYpos1 plexFreeNextYpos1: @@ -3658,8 +3658,8 @@ loop: { jmp __b9 // loop::@9 __b9: - // [72] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // [72] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // [73] call plexShowSprite jsr plexShowSprite jmp __b14 @@ -3674,9 +3674,9 @@ loop: { jmp __b10 // loop::@10 __b10: - // [76] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [76] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL + sta BORDER_COLOR // [77] call keyboard_key_pressed // [23] phi from loop::@10 to keyboard_key_pressed [phi:loop::@10->keyboard_key_pressed] keyboard_key_pressed_from___b10: @@ -4270,10 +4270,10 @@ init: { jmp __b3 // init::@3 __b3: - // [178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuz1=vbuc2 + // [178] *((const nomodify byte*) SPRITES_COLOR + (byte) init::i1#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuz1=vbuc2 lda #GREEN ldy.z i1 - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // [179] (byte) init::i1#1 ← ++ (byte) init::i1#2 -- vbuz1=_inc_vbuz1 inc.z i1 // [180] if((byte) init::i1#1!=(byte) 8) goto init::@3 -- vbuz1_neq_vbuc1_then_la1 @@ -4667,8 +4667,8 @@ Statement [29] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const Removing always clobbered register reg byte a as potential for zp[1]:2 [ loop::angle#6 loop::angle#1 ] Statement [30] (byte) keyboard_matrix_read::return#0 ← ~ *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:6::exit:13::keyboard_key_pressed:18::keyboard_matrix_read:24 [ keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:6::loop:11::keyboard_key_pressed:77::keyboard_matrix_read:24 [ loop::angle#1 keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Statement [34] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a -Statement [35] *((const nomodify byte*) BORDERCOL) ← (byte) $f [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a -Statement [38] *((const nomodify byte*) BORDERCOL) ← (byte) 6 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a +Statement [35] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a +Statement [38] *((const nomodify byte*) BORDER_COLOR) ← (byte) 6 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:3 [ loop::r#2 loop::r#1 ] Removing always clobbered register reg byte a as potential for zp[1]:4 [ loop::a#2 loop::a#1 loop::a#6 ] Removing always clobbered register reg byte a as potential for zp[1]:5 [ loop::i#2 loop::i#1 ] @@ -4685,16 +4685,16 @@ Statement [54] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 [ Statement [55] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::y#0 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::y#0 ] { } ) always clobbers reg byte a Statement [58] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 [ loop::angle#6 loop::r#2 loop::i#2 loop::a#1 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::i#2 loop::a#1 ] { } ) always clobbers reg byte a Statement [59] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 [ loop::angle#6 loop::i#2 loop::r#1 loop::a#1 ] ( main:6::loop:11 [ loop::angle#6 loop::i#2 loop::r#1 loop::a#1 ] { } ) always clobbers reg byte a -Statement [62] *((const nomodify byte*) BORDERCOL) ← (byte) 3 [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a +Statement [62] *((const nomodify byte*) BORDER_COLOR) ← (byte) 3 [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a Statement [64] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] { } ) always clobbers reg byte a -Statement [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] { } ) always clobbers reg byte a +Statement [65] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] { } ) always clobbers reg byte a Statement [66] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::$11 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::$11 ] { } ) always clobbers reg byte a -Statement [69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] { } ) always clobbers reg byte a +Statement [69] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:6 [ loop::i1#5 loop::i1#1 ] Statement [70] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 loop::plexFreeNextYpos1_return#0 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 loop::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte y Removing always clobbered register reg byte y as potential for zp[1]:2 [ loop::angle#6 loop::angle#1 ] Removing always clobbered register reg byte y as potential for zp[1]:6 [ loop::i1#5 loop::i1#1 ] -Statement [76] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::angle#1 ] ( main:6::loop:11 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } } ) always clobbers reg byte a +Statement [76] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [ loop::angle#1 ] ( main:6::loop:11 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } } ) always clobbers reg byte a Statement [82] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a Statement [83] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte x reg byte y Removing always clobbered register reg byte x as potential for zp[1]:2 [ loop::angle#6 loop::angle#1 ] @@ -4754,7 +4754,7 @@ Removing always clobbered register reg byte a as potential for zp[1]:96 [ init:: Statement [170] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 [ init::i#2 ] ( main:6::init:9 [ init::i#2 ] { } ) always clobbers reg byte a Statement [171] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 [ init::i#2 init::$5 ] ( main:6::init:9 [ init::i#2 init::$5 ] { } ) always clobbers reg byte a Statement [176] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ ] ( main:6::init:9 [ ] { } ) always clobbers reg byte a -Statement [178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN [ init::i1#2 ] ( main:6::init:9 [ init::i1#2 ] { } ) always clobbers reg byte a +Statement [178] *((const nomodify byte*) SPRITES_COLOR + (byte) init::i1#2) ← (const nomodify byte) GREEN [ init::i1#2 ] ( main:6::init:9 [ init::i1#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:15 [ init::i1#2 init::i1#1 ] Statement [188] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:6::init:9::memset:184 [ memset::dst#2 ] { } ) always clobbers reg byte a Statement [190] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:6::init:9::memset:184 [ memset::dst#2 ] { } ) always clobbers reg byte a reg byte y @@ -4784,8 +4784,8 @@ Statement [4] (volatile byte) plex_free_next ← (byte) 0 [ ] ( [ ] { } ) alwa Statement [29] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) [ ] ( main:6::exit:13::keyboard_key_pressed:18::keyboard_matrix_read:24 [ ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:6::loop:11::keyboard_key_pressed:77::keyboard_matrix_read:24 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Statement [30] (byte) keyboard_matrix_read::return#0 ← ~ *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:6::exit:13::keyboard_key_pressed:18::keyboard_matrix_read:24 [ keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:6::loop:11::keyboard_key_pressed:77::keyboard_matrix_read:24 [ loop::angle#1 keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Statement [34] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a -Statement [35] *((const nomodify byte*) BORDERCOL) ← (byte) $f [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a -Statement [38] *((const nomodify byte*) BORDERCOL) ← (byte) 6 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a +Statement [35] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a +Statement [38] *((const nomodify byte*) BORDER_COLOR) ← (byte) 6 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a Statement [42] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a Statement [43] (signed word~) loop::$1 ← (signed word) mulf8s::return#2 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$1 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$1 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a Statement [44] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a @@ -4798,14 +4798,14 @@ Statement [54] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 [ Statement [55] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::y#0 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::y#0 ] { } ) always clobbers reg byte a Statement [58] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 [ loop::angle#6 loop::r#2 loop::i#2 loop::a#1 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::i#2 loop::a#1 ] { } ) always clobbers reg byte a Statement [59] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 [ loop::angle#6 loop::i#2 loop::r#1 loop::a#1 ] ( main:6::loop:11 [ loop::angle#6 loop::i#2 loop::r#1 loop::a#1 ] { } ) always clobbers reg byte a -Statement [62] *((const nomodify byte*) BORDERCOL) ← (byte) 3 [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a +Statement [62] *((const nomodify byte*) BORDER_COLOR) ← (byte) 3 [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a Statement [64] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] { } ) always clobbers reg byte a reg byte x -Statement [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] { } ) always clobbers reg byte a +Statement [65] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] { } ) always clobbers reg byte a Statement [66] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::$11 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::$11 ] { } ) always clobbers reg byte a -Statement [69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] { } ) always clobbers reg byte a +Statement [69] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] { } ) always clobbers reg byte a Statement [70] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 loop::plexFreeNextYpos1_return#0 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 loop::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte y Statement [75] if((byte) loop::i1#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#1 ] { } ) always clobbers reg byte a -Statement [76] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::angle#1 ] ( main:6::loop:11 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } } ) always clobbers reg byte a +Statement [76] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [ loop::angle#1 ] ( main:6::loop:11 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } } ) always clobbers reg byte a Statement [82] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a Statement [83] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte x reg byte y Statement [84] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte y @@ -4848,7 +4848,7 @@ Statement [169] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 [ init::i#2 in Statement [170] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 [ init::i#2 ] ( main:6::init:9 [ init::i#2 ] { } ) always clobbers reg byte a Statement [171] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 [ init::i#2 init::$5 ] ( main:6::init:9 [ init::i#2 init::$5 ] { } ) always clobbers reg byte a Statement [176] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ ] ( main:6::init:9 [ ] { } ) always clobbers reg byte a -Statement [178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN [ init::i1#2 ] ( main:6::init:9 [ init::i1#2 ] { } ) always clobbers reg byte a +Statement [178] *((const nomodify byte*) SPRITES_COLOR + (byte) init::i1#2) ← (const nomodify byte) GREEN [ init::i1#2 ] ( main:6::init:9 [ init::i1#2 ] { } ) always clobbers reg byte a Statement [188] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:6::init:9::memset:184 [ memset::dst#2 ] { } ) always clobbers reg byte a Statement [190] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:6::init:9::memset:184 [ memset::dst#2 ] { } ) always clobbers reg byte a reg byte y Statement [194] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] { } ) always clobbers reg byte a @@ -4869,8 +4869,8 @@ Statement [4] (volatile byte) plex_free_next ← (byte) 0 [ ] ( [ ] { } ) alwa Statement [29] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) [ ] ( main:6::exit:13::keyboard_key_pressed:18::keyboard_matrix_read:24 [ ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:6::loop:11::keyboard_key_pressed:77::keyboard_matrix_read:24 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Statement [30] (byte) keyboard_matrix_read::return#0 ← ~ *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:6::exit:13::keyboard_key_pressed:18::keyboard_matrix_read:24 [ keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:6::loop:11::keyboard_key_pressed:77::keyboard_matrix_read:24 [ loop::angle#1 keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Statement [34] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a -Statement [35] *((const nomodify byte*) BORDERCOL) ← (byte) $f [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a -Statement [38] *((const nomodify byte*) BORDERCOL) ← (byte) 6 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a +Statement [35] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a +Statement [38] *((const nomodify byte*) BORDER_COLOR) ← (byte) 6 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a Statement [42] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a Statement [43] (signed word~) loop::$1 ← (signed word) mulf8s::return#2 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$1 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$1 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a Statement [44] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a @@ -4883,14 +4883,14 @@ Statement [54] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 [ Statement [55] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::y#0 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::y#0 ] { } ) always clobbers reg byte a Statement [58] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 [ loop::angle#6 loop::r#2 loop::i#2 loop::a#1 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::i#2 loop::a#1 ] { } ) always clobbers reg byte a Statement [59] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 [ loop::angle#6 loop::i#2 loop::r#1 loop::a#1 ] ( main:6::loop:11 [ loop::angle#6 loop::i#2 loop::r#1 loop::a#1 ] { } ) always clobbers reg byte a -Statement [62] *((const nomodify byte*) BORDERCOL) ← (byte) 3 [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a +Statement [62] *((const nomodify byte*) BORDER_COLOR) ← (byte) 3 [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a Statement [64] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] { } ) always clobbers reg byte a reg byte x -Statement [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] { } ) always clobbers reg byte a +Statement [65] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] { } ) always clobbers reg byte a Statement [66] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::$11 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::$11 ] { } ) always clobbers reg byte a -Statement [69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] { } ) always clobbers reg byte a +Statement [69] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] { } ) always clobbers reg byte a Statement [70] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 loop::plexFreeNextYpos1_return#0 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 loop::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte y Statement [75] if((byte) loop::i1#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#1 ] { } ) always clobbers reg byte a -Statement [76] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::angle#1 ] ( main:6::loop:11 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } } ) always clobbers reg byte a +Statement [76] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [ loop::angle#1 ] ( main:6::loop:11 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } } ) always clobbers reg byte a Statement [82] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a Statement [83] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte x reg byte y Statement [84] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte y @@ -4932,7 +4932,7 @@ Statement [169] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 [ init::i#2 in Statement [170] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 [ init::i#2 ] ( main:6::init:9 [ init::i#2 ] { } ) always clobbers reg byte a Statement [171] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 [ init::i#2 init::$5 ] ( main:6::init:9 [ init::i#2 init::$5 ] { } ) always clobbers reg byte a Statement [176] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ ] ( main:6::init:9 [ ] { } ) always clobbers reg byte a -Statement [178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN [ init::i1#2 ] ( main:6::init:9 [ init::i1#2 ] { } ) always clobbers reg byte a +Statement [178] *((const nomodify byte*) SPRITES_COLOR + (byte) init::i1#2) ← (const nomodify byte) GREEN [ init::i1#2 ] ( main:6::init:9 [ init::i1#2 ] { } ) always clobbers reg byte a Statement [188] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:6::init:9::memset:184 [ memset::dst#2 ] { } ) always clobbers reg byte a Statement [190] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:6::init:9::memset:184 [ memset::dst#2 ] { } ) always clobbers reg byte a reg byte y Statement [194] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] { } ) always clobbers reg byte a @@ -5201,10 +5201,10 @@ ASSEMBLER BEFORE OPTIMIZATION .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D011 = $d011 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 @@ -5392,9 +5392,9 @@ loop: { jmp __b3 // loop::@3 __b3: - // [35] *((const nomodify byte*) BORDERCOL) ← (byte) $f -- _deref_pbuc1=vbuc2 + // [35] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f -- _deref_pbuc1=vbuc2 lda #$f - sta BORDERCOL + sta BORDER_COLOR // [36] (byte) loop::a#6 ← (byte) loop::angle#6 -- vbuz1=vbuz2 lda.z angle sta.z a @@ -5416,10 +5416,10 @@ loop: { jmp __b4 // loop::@4 __b4: - // [38] *((const nomodify byte*) BORDERCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 + // [38] *((const nomodify byte*) BORDER_COLOR) ← (byte) 6 -- _deref_pbuc1=vbuc2 //kickasm {{ .break }} lda #6 - sta BORDERCOL + sta BORDER_COLOR // [39] (signed byte) mulf8s::a#0 ← (signed byte) loop::r#2 -- vbsaa=vbsz1 lda.z r // [40] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) loop::a#2) -- vbsxx=pbsc1_derefidx_vbuz1 @@ -5505,9 +5505,9 @@ loop: { jmp __b5 // loop::@5 __b5: - // [62] *((const nomodify byte*) BORDERCOL) ← (byte) 3 -- _deref_pbuc1=vbuc2 + // [62] *((const nomodify byte*) BORDER_COLOR) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 - sta BORDERCOL + sta BORDER_COLOR // [63] call plexSort // [108] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] plexSort_from___b5: @@ -5519,9 +5519,9 @@ loop: { lax.z angle axs #-[3] stx.z angle - // [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [65] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL + sta BORDER_COLOR jmp __b6 // Sort the sprites by y-position // loop::@6 @@ -5545,9 +5545,9 @@ loop: { jmp __b7 // loop::@7 __b7: - // [69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [69] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL + sta BORDER_COLOR jmp plexFreeNextYpos1 // loop::plexFreeNextYpos1 plexFreeNextYpos1: @@ -5565,8 +5565,8 @@ loop: { jmp __b9 // loop::@9 __b9: - // [72] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // [72] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // [73] call plexShowSprite jsr plexShowSprite jmp __b14 @@ -5581,9 +5581,9 @@ loop: { jmp __b10 // loop::@10 __b10: - // [76] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [76] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL + sta BORDER_COLOR // [77] call keyboard_key_pressed // [23] phi from loop::@10 to keyboard_key_pressed [phi:loop::@10->keyboard_key_pressed] keyboard_key_pressed_from___b10: @@ -6072,9 +6072,9 @@ init: { jmp __b3 // init::@3 __b3: - // [178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 + // [178] *((const nomodify byte*) SPRITES_COLOR + (byte) init::i1#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 lda #GREEN - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // [179] (byte) init::i1#1 ← ++ (byte) init::i1#2 -- vbuxx=_inc_vbuxx inx // [180] if((byte) init::i1#1!=(byte) 8) goto init::@3 -- vbuxx_neq_vbuc1_then_la1 @@ -6680,7 +6680,7 @@ FINAL SYMBOL TABLE (label) @begin (label) @end (const nomodify byte) BLACK = (byte) 0 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const signed byte*) COS = (const signed byte*) SIN+(byte) $40 (const nomodify byte*) D011 = (byte*) 53265 @@ -6790,7 +6790,7 @@ FINAL SYMBOL TABLE .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }} -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_ENABLE = (byte*) 53269 (const nomodify byte*) SPRITES_XMSB = (byte*) 53264 (const nomodify byte*) SPRITES_XPOS = (byte*) 53248 @@ -7172,10 +7172,10 @@ Score: 74020 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D011 = $d011 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 @@ -7342,10 +7342,10 @@ loop: { cmp #$d8 bcc __b2 // loop::@3 - // *BORDERCOL = 0xf - // [35] *((const nomodify byte*) BORDERCOL) ← (byte) $f -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 0xf + // [35] *((const nomodify byte*) BORDER_COLOR) ← (byte) $f -- _deref_pbuc1=vbuc2 lda #$f - sta BORDERCOL + sta BORDER_COLOR // [36] (byte) loop::a#6 ← (byte) loop::angle#6 -- vbuz1=vbuz2 lda.z angle sta.z a @@ -7363,11 +7363,11 @@ loop: { // [37] phi (signed byte) loop::r#2 = (signed byte) loop::r#1 [phi:loop::@12->loop::@4#2] -- register_copy // loop::@4 __b4: - // *BORDERCOL = 6 - // [38] *((const nomodify byte*) BORDERCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 6 + // [38] *((const nomodify byte*) BORDER_COLOR) ← (byte) 6 -- _deref_pbuc1=vbuc2 //kickasm {{ .break }} lda #6 - sta BORDERCOL + sta BORDER_COLOR // mulf8s(r, COS[a]) // [39] (signed byte) mulf8s::a#0 ← (signed byte) loop::r#2 -- vbsaa=vbsz1 lda.z r @@ -7459,10 +7459,10 @@ loop: { cmp.z i bne __b4 // loop::@5 - // *BORDERCOL = 3 - // [62] *((const nomodify byte*) BORDERCOL) ← (byte) 3 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 3 + // [62] *((const nomodify byte*) BORDER_COLOR) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 - sta BORDERCOL + sta BORDER_COLOR // plexSort() // [63] call plexSort // [108] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] @@ -7473,10 +7473,10 @@ loop: { lax.z angle axs #-[3] stx.z angle - // *BORDERCOL = BLACK - // [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = BLACK + // [65] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL + sta BORDER_COLOR // Sort the sprites by y-position // loop::@6 __b6: @@ -7497,10 +7497,10 @@ loop: { // [68] phi (byte) loop::i1#5 = (byte) loop::i1#1 [phi:loop::@14->loop::@7#0] -- register_copy // loop::@7 __b7: - // *BORDERCOL = BLACK - // [69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = BLACK + // [69] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL + sta BORDER_COLOR // loop::plexFreeNextYpos1 // return PLEX_FREE_YPOS[plex_free_next]; // [70] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) -- vbuz1=pbuc1_derefidx_vbuz2 @@ -7515,9 +7515,9 @@ loop: { cmp.z plexFreeNextYpos1_return bcc __b8 // loop::@9 - // (*BORDERCOL)++; - // [72] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // (*BORDER_COLOR)++; + // [72] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // plexShowSprite() // [73] call plexShowSprite jsr plexShowSprite @@ -7530,10 +7530,10 @@ loop: { cmp.z i1 bne __b7 // loop::@10 - // *BORDERCOL = BLACK - // [76] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = BLACK + // [76] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL + sta BORDER_COLOR // keyboard_key_pressed(KEY_SPACE) // [77] call keyboard_key_pressed // [23] phi from loop::@10 to keyboard_key_pressed [phi:loop::@10->keyboard_key_pressed] @@ -8014,10 +8014,10 @@ init: { // [177] phi (byte) init::i1#2 = (byte) init::i1#1 [phi:init::@3->init::@3#0] -- register_copy // init::@3 __b3: - // SPRITES_COLS[i] = GREEN - // [178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 + // SPRITES_COLOR[i] = GREEN + // [178] *((const nomodify byte*) SPRITES_COLOR + (byte) init::i1#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 lda #GREEN - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // for(char i: 0..7) // [179] (byte) init::i1#1 ← ++ (byte) init::i1#2 -- vbuxx=_inc_vbuxx inx diff --git a/src/test/ref/complex/prebob/vogel-sprites.sym b/src/test/ref/complex/prebob/vogel-sprites.sym index 0c4557383..e73c5306c 100644 --- a/src/test/ref/complex/prebob/vogel-sprites.sym +++ b/src/test/ref/complex/prebob/vogel-sprites.sym @@ -4,7 +4,7 @@ (label) @begin (label) @end (const nomodify byte) BLACK = (byte) 0 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const signed byte*) COS = (const signed byte*) SIN+(byte) $40 (const nomodify byte*) D011 = (byte*) 53265 @@ -114,7 +114,7 @@ .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }} -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_ENABLE = (byte*) 53269 (const nomodify byte*) SPRITES_XMSB = (byte*) 53264 (const nomodify byte*) SPRITES_XPOS = (byte*) 53248 diff --git a/src/test/ref/complex/spritescroller/spritescroller.asm b/src/test/ref/complex/spritescroller/spritescroller.asm index a4d07b5c0..b730d4fa8 100644 --- a/src/test/ref/complex/spritescroller/spritescroller.asm +++ b/src/test/ref/complex/spritescroller/spritescroller.asm @@ -18,7 +18,7 @@ .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label RASTER = $d012 .label VIC_CONTROL = $d011 @@ -116,9 +116,9 @@ main: { sta SPRITES_ENABLE ldx #0 __b4: - // SPRITES_COLS[s] = WHITE + // SPRITES_COLOR[s] = WHITE lda #WHITE - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // for(char s: 0..7) inx cpx #8 @@ -177,7 +177,7 @@ main: { lda #0 sta.z frame_done // plex_move() - //*BORDERCOL = RED; + //*BORDER_COLOR = RED; // Move the sprites jsr plex_move // plexSort() @@ -715,7 +715,7 @@ plex_irq: { lda #IRQ_RASTER sta IRQ_STATUS // asm - //*BORDERCOL = 0; + //*BORDER_COLOR = 0; cli // } jmp $ea81 diff --git a/src/test/ref/complex/spritescroller/spritescroller.cfg b/src/test/ref/complex/spritescroller/spritescroller.cfg index 3af21b095..e6c18618c 100644 --- a/src/test/ref/complex/spritescroller/spritescroller.cfg +++ b/src/test/ref/complex/spritescroller/spritescroller.cfg @@ -53,7 +53,7 @@ main::@3: scope:[main] from main::@1 to:main::@4 main::@4: scope:[main] from main::@3 main::@4 [23] (byte) main::s1#2 ← phi( main::@3/(byte) 0 main::@4/(byte) main::s1#1 ) - [24] *((const nomodify byte*) SPRITES_COLS + (byte) main::s1#2) ← (const nomodify byte) WHITE + [24] *((const nomodify byte*) SPRITES_COLOR + (byte) main::s1#2) ← (const nomodify byte) WHITE [25] (byte) main::s1#1 ← ++ (byte) main::s1#2 [26] if((byte) main::s1#1!=(byte) 8) goto main::@4 to:main::@5 diff --git a/src/test/ref/complex/spritescroller/spritescroller.log b/src/test/ref/complex/spritescroller/spritescroller.log index 25fd84e76..8929ad914 100644 --- a/src/test/ref/complex/spritescroller/spritescroller.log +++ b/src/test/ref/complex/spritescroller/spritescroller.log @@ -322,7 +322,7 @@ main::@4: scope:[main] from main::@3 main::@4 (byte) y_sin_idx#19 ← phi( main::@3/(byte) y_sin_idx#26 main::@4/(byte) y_sin_idx#19 ) (byte*) scroll_text_next#21 ← phi( main::@3/(byte*) scroll_text_next#28 main::@4/(byte*) scroll_text_next#21 ) (byte) main::s1#2 ← phi( main::@3/(byte) main::s1#0 main::@4/(byte) main::s1#1 ) - *((const nomodify byte*) SPRITES_COLS + (byte) main::s1#2) ← (const nomodify byte) WHITE + *((const nomodify byte*) SPRITES_COLOR + (byte) main::s1#2) ← (const nomodify byte) WHITE (byte) main::s1#1 ← (byte) main::s1#2 + rangenext(0,7) (bool~) main::$8 ← (byte) main::s1#1 != rangelast(0,7) if((bool~) main::$8) goto main::@4 @@ -1038,7 +1038,7 @@ SYMBOL TABLE SSA (const byte*) SCROLL_TEXT[] = (byte*) "camelot presents a spanking new contribution to the always hungry c64 scene. in this time of the corona virus we have chosen to direct our efforts towards the safe haven of coding, pixeling and composing for our beloved old breadbin. " (const byte) SIZEOF_WORD = (byte) 2 (const nomodify byte*) SPRITES = (byte*)(number) $3000 -(const nomodify byte*) SPRITES_COLS = (byte*)(number) $d027 +(const nomodify byte*) SPRITES_COLOR = (byte*)(number) $d027 (const nomodify byte*) SPRITES_ENABLE = (byte*)(number) $d015 (const nomodify byte*) SPRITES_XMSB = (byte*)(number) $d010 (const nomodify byte*) SPRITES_XPOS = (byte*)(number) $d000 @@ -2728,7 +2728,7 @@ main::@3: scope:[main] from main::@1 to:main::@4 main::@4: scope:[main] from main::@3 main::@4 [23] (byte) main::s1#2 ← phi( main::@3/(byte) 0 main::@4/(byte) main::s1#1 ) - [24] *((const nomodify byte*) SPRITES_COLS + (byte) main::s1#2) ← (const nomodify byte) WHITE + [24] *((const nomodify byte*) SPRITES_COLOR + (byte) main::s1#2) ← (const nomodify byte) WHITE [25] (byte) main::s1#1 ← ++ (byte) main::s1#2 [26] if((byte) main::s1#1!=(byte) 8) goto main::@4 to:main::@5 @@ -3586,7 +3586,7 @@ Target platform is c64basic / MOS6502X .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label RASTER = $d012 .label VIC_CONTROL = $d011 @@ -3757,10 +3757,10 @@ main: { jmp __b4 // main::@4 __b4: - // [24] *((const nomodify byte*) SPRITES_COLS + (byte) main::s1#2) ← (const nomodify byte) WHITE -- pbuc1_derefidx_vbuz1=vbuc2 + // [24] *((const nomodify byte*) SPRITES_COLOR + (byte) main::s1#2) ← (const nomodify byte) WHITE -- pbuc1_derefidx_vbuz1=vbuc2 lda #WHITE ldy.z s1 - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // [25] (byte) main::s1#1 ← ++ (byte) main::s1#2 -- vbuz1=_inc_vbuz1 inc.z s1 // [26] if((byte) main::s1#1!=(byte) 8) goto main::@4 -- vbuz1_neq_vbuc1_then_la1 @@ -3846,7 +3846,7 @@ main: { lda #0 sta.z frame_done // [41] call plex_move - //*BORDERCOL = RED; + //*BORDER_COLOR = RED; // Move the sprites // [75] phi from main::@7 to plex_move [phi:main::@7->plex_move] plex_move_from___b7: @@ -4774,7 +4774,7 @@ plex_irq: { lda #IRQ_RASTER sta IRQ_STATUS // asm { cli } - //*BORDERCOL = 0; + //*BORDER_COLOR = 0; cli jmp __breturn // plex_irq::@return @@ -4965,7 +4965,7 @@ Statement [11] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROC Statement [13] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_BASIC_KERNEL_IO [ frame_done ] ( main:8 [ frame_done ] { } ) always clobbers reg byte a Statement [19] *((const nomodify byte*) D018) ← (const byte) main::toD0181_return#0 [ frame_done ] ( main:8 [ frame_done ] { } ) always clobbers reg byte a Statement [22] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ frame_done ] ( main:8 [ frame_done ] { } ) always clobbers reg byte a -Statement [24] *((const nomodify byte*) SPRITES_COLS + (byte) main::s1#2) ← (const nomodify byte) WHITE [ frame_done main::s1#2 ] ( main:8 [ frame_done main::s1#2 ] { } ) always clobbers reg byte a +Statement [24] *((const nomodify byte*) SPRITES_COLOR + (byte) main::s1#2) ← (const nomodify byte) WHITE [ frame_done main::s1#2 ] ( main:8 [ frame_done main::s1#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:4 [ main::s1#2 main::s1#1 ] Statement [32] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_INTERRUPT) ← (const nomodify byte) CIA_INTERRUPT_CLEAR [ frame_done y_sin_idx#12 x_movement_idx#12 scroll_text_next#13 ] ( main:8 [ frame_done y_sin_idx#12 x_movement_idx#12 scroll_text_next#13 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:8 [ y_sin_idx#10 y_sin_idx#12 ] @@ -5090,7 +5090,7 @@ Statement [11] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROC Statement [13] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_BASIC_KERNEL_IO [ frame_done ] ( main:8 [ frame_done ] { } ) always clobbers reg byte a Statement [19] *((const nomodify byte*) D018) ← (const byte) main::toD0181_return#0 [ frame_done ] ( main:8 [ frame_done ] { } ) always clobbers reg byte a Statement [22] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ frame_done ] ( main:8 [ frame_done ] { } ) always clobbers reg byte a -Statement [24] *((const nomodify byte*) SPRITES_COLS + (byte) main::s1#2) ← (const nomodify byte) WHITE [ frame_done main::s1#2 ] ( main:8 [ frame_done main::s1#2 ] { } ) always clobbers reg byte a +Statement [24] *((const nomodify byte*) SPRITES_COLOR + (byte) main::s1#2) ← (const nomodify byte) WHITE [ frame_done main::s1#2 ] ( main:8 [ frame_done main::s1#2 ] { } ) always clobbers reg byte a Statement [32] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_INTERRUPT) ← (const nomodify byte) CIA_INTERRUPT_CLEAR [ frame_done y_sin_idx#12 x_movement_idx#12 scroll_text_next#13 ] ( main:8 [ frame_done y_sin_idx#12 x_movement_idx#12 scroll_text_next#13 ] { } ) always clobbers reg byte a Statement [33] *((const nomodify byte*) VIC_CONTROL) ← *((const nomodify byte*) VIC_CONTROL) & (byte) $7f [ frame_done y_sin_idx#12 x_movement_idx#12 scroll_text_next#13 ] ( main:8 [ frame_done y_sin_idx#12 x_movement_idx#12 scroll_text_next#13 ] { } ) always clobbers reg byte a Statement [34] *((const nomodify byte*) RASTER) ← (byte) $28 [ frame_done y_sin_idx#12 x_movement_idx#12 scroll_text_next#13 ] ( main:8 [ frame_done y_sin_idx#12 x_movement_idx#12 scroll_text_next#13 ] { } ) always clobbers reg byte a @@ -5182,7 +5182,7 @@ Statement [11] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROC Statement [13] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_BASIC_KERNEL_IO [ frame_done ] ( main:8 [ frame_done ] { } ) always clobbers reg byte a Statement [19] *((const nomodify byte*) D018) ← (const byte) main::toD0181_return#0 [ frame_done ] ( main:8 [ frame_done ] { } ) always clobbers reg byte a Statement [22] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ frame_done ] ( main:8 [ frame_done ] { } ) always clobbers reg byte a -Statement [24] *((const nomodify byte*) SPRITES_COLS + (byte) main::s1#2) ← (const nomodify byte) WHITE [ frame_done main::s1#2 ] ( main:8 [ frame_done main::s1#2 ] { } ) always clobbers reg byte a +Statement [24] *((const nomodify byte*) SPRITES_COLOR + (byte) main::s1#2) ← (const nomodify byte) WHITE [ frame_done main::s1#2 ] ( main:8 [ frame_done main::s1#2 ] { } ) always clobbers reg byte a Statement [32] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_INTERRUPT) ← (const nomodify byte) CIA_INTERRUPT_CLEAR [ frame_done y_sin_idx#12 x_movement_idx#12 scroll_text_next#13 ] ( main:8 [ frame_done y_sin_idx#12 x_movement_idx#12 scroll_text_next#13 ] { } ) always clobbers reg byte a Statement [33] *((const nomodify byte*) VIC_CONTROL) ← *((const nomodify byte*) VIC_CONTROL) & (byte) $7f [ frame_done y_sin_idx#12 x_movement_idx#12 scroll_text_next#13 ] ( main:8 [ frame_done y_sin_idx#12 x_movement_idx#12 scroll_text_next#13 ] { } ) always clobbers reg byte a Statement [34] *((const nomodify byte*) RASTER) ← (byte) $28 [ frame_done y_sin_idx#12 x_movement_idx#12 scroll_text_next#13 ] ( main:8 [ frame_done y_sin_idx#12 x_movement_idx#12 scroll_text_next#13 ] { } ) always clobbers reg byte a @@ -5497,7 +5497,7 @@ ASSEMBLER BEFORE OPTIMIZATION .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label RASTER = $d012 .label VIC_CONTROL = $d011 @@ -5663,9 +5663,9 @@ main: { jmp __b4 // main::@4 __b4: - // [24] *((const nomodify byte*) SPRITES_COLS + (byte) main::s1#2) ← (const nomodify byte) WHITE -- pbuc1_derefidx_vbuxx=vbuc2 + // [24] *((const nomodify byte*) SPRITES_COLOR + (byte) main::s1#2) ← (const nomodify byte) WHITE -- pbuc1_derefidx_vbuxx=vbuc2 lda #WHITE - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // [25] (byte) main::s1#1 ← ++ (byte) main::s1#2 -- vbuxx=_inc_vbuxx inx // [26] if((byte) main::s1#1!=(byte) 8) goto main::@4 -- vbuxx_neq_vbuc1_then_la1 @@ -5750,7 +5750,7 @@ main: { lda #0 sta.z frame_done // [41] call plex_move - //*BORDERCOL = RED; + //*BORDER_COLOR = RED; // Move the sprites // [75] phi from main::@7 to plex_move [phi:main::@7->plex_move] plex_move_from___b7: @@ -6601,7 +6601,7 @@ plex_irq: { lda #IRQ_RASTER sta IRQ_STATUS // asm { cli } - //*BORDERCOL = 0; + //*BORDER_COLOR = 0; cli jmp __breturn // plex_irq::@return @@ -7103,7 +7103,7 @@ FINAL SYMBOL TABLE (const nomodify byte*) SCREEN = (byte*) 1024 (const byte*) SCROLL_TEXT[] = (byte*) "camelot presents a spanking new contribution to the always hungry c64 scene. in this time of the corona virus we have chosen to direct our efforts towards the safe haven of coding, pixeling and composing for our beloved old breadbin. " (const nomodify byte*) SPRITES = (byte*) 12288 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_ENABLE = (byte*) 53269 (const nomodify byte*) SPRITES_XMSB = (byte*) 53264 (const nomodify byte*) SPRITES_XPOS = (byte*) 53248 @@ -7445,7 +7445,7 @@ Score: 159127 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label RASTER = $d012 .label VIC_CONTROL = $d011 @@ -7589,10 +7589,10 @@ main: { // [23] phi (byte) main::s1#2 = (byte) main::s1#1 [phi:main::@4->main::@4#0] -- register_copy // main::@4 __b4: - // SPRITES_COLS[s] = WHITE - // [24] *((const nomodify byte*) SPRITES_COLS + (byte) main::s1#2) ← (const nomodify byte) WHITE -- pbuc1_derefidx_vbuxx=vbuc2 + // SPRITES_COLOR[s] = WHITE + // [24] *((const nomodify byte*) SPRITES_COLOR + (byte) main::s1#2) ← (const nomodify byte) WHITE -- pbuc1_derefidx_vbuxx=vbuc2 lda #WHITE - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // for(char s: 0..7) // [25] (byte) main::s1#1 ← ++ (byte) main::s1#2 -- vbuxx=_inc_vbuxx inx @@ -7678,7 +7678,7 @@ main: { sta.z frame_done // plex_move() // [41] call plex_move - //*BORDERCOL = RED; + //*BORDER_COLOR = RED; // Move the sprites // [75] phi from main::@7 to plex_move [phi:main::@7->plex_move] // [75] phi (byte*) scroll_text_next#25 = (byte*) scroll_text_next#13 [phi:main::@7->plex_move#0] -- register_copy @@ -8490,7 +8490,7 @@ plex_irq: { sta IRQ_STATUS // asm // asm { cli } - //*BORDERCOL = 0; + //*BORDER_COLOR = 0; cli // plex_irq::@return // } diff --git a/src/test/ref/complex/spritescroller/spritescroller.sym b/src/test/ref/complex/spritescroller/spritescroller.sym index 7f84f3f0d..4dac3267f 100644 --- a/src/test/ref/complex/spritescroller/spritescroller.sym +++ b/src/test/ref/complex/spritescroller/spritescroller.sym @@ -114,7 +114,7 @@ (const nomodify byte*) SCREEN = (byte*) 1024 (const byte*) SCROLL_TEXT[] = (byte*) "camelot presents a spanking new contribution to the always hungry c64 scene. in this time of the corona virus we have chosen to direct our efforts towards the safe haven of coding, pixeling and composing for our beloved old breadbin. " (const nomodify byte*) SPRITES = (byte*) 12288 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_ENABLE = (byte*) 53269 (const nomodify byte*) SPRITES_XMSB = (byte*) 53264 (const nomodify byte*) SPRITES_XPOS = (byte*) 53248 diff --git a/src/test/ref/complex/tetris/test-sprites.asm b/src/test/ref/complex/tetris/test-sprites.asm index 48b5d3073..fe207716d 100644 --- a/src/test/ref/complex/tetris/test-sprites.asm +++ b/src/test/ref/complex/tetris/test-sprites.asm @@ -22,7 +22,7 @@ .const toSpritePtr1_return = PLAYFIELD_SPRITES/$40 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_MC = $d01c @@ -130,8 +130,8 @@ main: { tya sec sbc #3 - // SPRITES_COLS[s] = s-3 - sta SPRITES_COLS,y + // SPRITES_COLOR[s] = s-3 + sta SPRITES_COLOR,y // PLAYFIELD_SPRITE_PTRS_1[s] = toSpritePtr(SIN_SPRITE) lda #toSpritePtr1_return sta PLAYFIELD_SPRITE_PTRS_1,y @@ -255,9 +255,9 @@ sprites_init: { // SPRITES_XPOS[s2] = xpos lda.z xpos sta SPRITES_XPOS,x - // SPRITES_COLS[s] = BLACK + // SPRITES_COLOR[s] = BLACK lda #BLACK - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // xpos = xpos+24 lax.z xpos axs #-[$18] @@ -278,7 +278,7 @@ sprites_irq: { sta rega+1 stx regx+1 // asm - //(*BGCOL)++; + //(*BG_COLOR)++; // Clear decimal flag (because it is used by the score algorithm) cld // ypos = irq_sprite_ypos diff --git a/src/test/ref/complex/tetris/test-sprites.cfg b/src/test/ref/complex/tetris/test-sprites.cfg index deb3c58a3..6e1b36c9c 100644 --- a/src/test/ref/complex/tetris/test-sprites.cfg +++ b/src/test/ref/complex/tetris/test-sprites.cfg @@ -72,7 +72,7 @@ main::@1: scope:[main] from main::@4 main::@5 [22] *((const nomodify byte*) SPRITES_XPOS + (byte) main::s2#0) ← (byte) main::xpos#2 [23] *((const nomodify byte*) SPRITES_YPOS + (byte) main::s2#0) ← (byte) main::ypos#2 [24] (byte~) main::$6 ← (byte) main::s#2 - (byte) 3 - [25] *((const nomodify byte*) SPRITES_COLS + (byte) main::s#2) ← (byte~) main::$6 + [25] *((const nomodify byte*) SPRITES_COLOR + (byte) main::s#2) ← (byte~) main::$6 to:main::toSpritePtr1 main::toSpritePtr1: scope:[main] from main::@1 [26] phi() @@ -152,7 +152,7 @@ sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1 [64] (byte) sprites_init::s#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::s#1 ) [65] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [66] *((const nomodify byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 - [67] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK + [67] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK [68] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [69] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 [70] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 diff --git a/src/test/ref/complex/tetris/test-sprites.log b/src/test/ref/complex/tetris/test-sprites.log index aefec702f..4204fdfa5 100644 --- a/src/test/ref/complex/tetris/test-sprites.log +++ b/src/test/ref/complex/tetris/test-sprites.log @@ -43,7 +43,7 @@ sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1 (number~) sprites_init::$0 ← (byte) sprites_init::s#2 * (number) 2 (byte) sprites_init::s2#0 ← (number~) sprites_init::$0 *((const nomodify byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 - *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK + *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK (number~) sprites_init::$1 ← (byte) sprites_init::xpos#2 + (number) $18 (byte) sprites_init::xpos#1 ← (number~) sprites_init::$1 (byte) sprites_init::s#1 ← (byte) sprites_init::s#2 + rangenext(0,3) @@ -263,7 +263,7 @@ main::@1: scope:[main] from main::@5 main::@6 *((const nomodify byte*) SPRITES_XPOS + (byte) main::s2#0) ← (byte) main::xpos#2 *((const nomodify byte*) SPRITES_YPOS + (byte) main::s2#0) ← (byte) main::ypos#2 (number~) main::$6 ← (byte) main::s#2 - (number) 3 - *((const nomodify byte*) SPRITES_COLS + (byte) main::s#2) ← (number~) main::$6 + *((const nomodify byte*) SPRITES_COLOR + (byte) main::s#2) ← (number~) main::$6 (byte*) main::toSpritePtr1_sprite#0 ← (const byte*) SIN_SPRITE to:main::toSpritePtr1 main::toSpritePtr1: scope:[main] from main::@1 @@ -490,7 +490,7 @@ SYMBOL TABLE SSA } }} (const byte*) SIN_SPRITE = (byte*)(number) $2800 -(const nomodify byte*) SPRITES_COLS = (byte*)(number) $d027 +(const nomodify byte*) SPRITES_COLOR = (byte*)(number) $d027 (const nomodify byte*) SPRITES_ENABLE = (byte*)(number) $d015 (const nomodify byte*) SPRITES_EXPAND_X = (byte*)(number) $d01d (const nomodify byte*) SPRITES_EXPAND_Y = (byte*)(number) $d017 @@ -1290,7 +1290,7 @@ main::@1: scope:[main] from main::@4 main::@5 [22] *((const nomodify byte*) SPRITES_XPOS + (byte) main::s2#0) ← (byte) main::xpos#2 [23] *((const nomodify byte*) SPRITES_YPOS + (byte) main::s2#0) ← (byte) main::ypos#2 [24] (byte~) main::$6 ← (byte) main::s#2 - (byte) 3 - [25] *((const nomodify byte*) SPRITES_COLS + (byte) main::s#2) ← (byte~) main::$6 + [25] *((const nomodify byte*) SPRITES_COLOR + (byte) main::s#2) ← (byte~) main::$6 to:main::toSpritePtr1 main::toSpritePtr1: scope:[main] from main::@1 [26] phi() @@ -1370,7 +1370,7 @@ sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1 [64] (byte) sprites_init::s#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::s#1 ) [65] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [66] *((const nomodify byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 - [67] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK + [67] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK [68] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [69] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 [70] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 @@ -1706,7 +1706,7 @@ Target platform is c64basic / MOS6502X .const toSpritePtr1_return = PLAYFIELD_SPRITES/$40 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_MC = $d01c @@ -1886,10 +1886,10 @@ main: { lax.z s axs #3 stx.z __6 - // [25] *((const nomodify byte*) SPRITES_COLS + (byte) main::s#2) ← (byte~) main::$6 -- pbuc1_derefidx_vbuz1=vbuz2 + // [25] *((const nomodify byte*) SPRITES_COLOR + (byte) main::s#2) ← (byte~) main::$6 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z __6 ldy.z s - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // [26] phi from main::@1 to main::toSpritePtr1 [phi:main::@1->main::toSpritePtr1] toSpritePtr1_from___b1: jmp toSpritePtr1 @@ -2097,10 +2097,10 @@ sprites_init: { lda.z xpos ldy.z s2 sta SPRITES_XPOS,y - // [67] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK -- pbuc1_derefidx_vbuz1=vbuc2 + // [67] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK -- pbuc1_derefidx_vbuz1=vbuc2 lda #BLACK ldy.z s - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // [68] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 lax.z xpos axs #-[$18] @@ -2136,7 +2136,7 @@ sprites_irq: { stx regx+1 sty regy+1 // asm { cld } - //(*BGCOL)++; + //(*BG_COLOR)++; // Clear decimal flag (because it is used by the score algorithm) cld // [73] (byte) sprites_irq::ypos#0 ← (volatile byte) irq_sprite_ypos -- vbuz1=vbuz2 @@ -2390,7 +2390,7 @@ Statement [65] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) Removing always clobbered register reg byte a as potential for zp[1]:8 [ sprites_init::s#2 sprites_init::s#1 ] Removing always clobbered register reg byte a as potential for zp[1]:9 [ sprites_init::xpos#2 sprites_init::xpos#1 ] Statement [66] *((const nomodify byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:10::sprites_init:18 [ sprites_init::s#2 sprites_init::xpos#2 ] { } ) always clobbers reg byte a -Statement [67] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:10::sprites_init:18 [ sprites_init::s#2 sprites_init::xpos#2 ] { } ) always clobbers reg byte a +Statement [67] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:10::sprites_init:18 [ sprites_init::s#2 sprites_init::xpos#2 ] { } ) always clobbers reg byte a Statement [68] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:10::sprites_init:18 [ sprites_init::s#2 sprites_init::xpos#1 ] { } ) always clobbers reg byte a Statement [80] if(*((const nomodify byte*) RASTER)<(volatile byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@8 [ render_screen_showing irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::raster_sprite_gfx_modify ] ( [ render_screen_showing irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::raster_sprite_gfx_modify ] { } ) always clobbers reg byte a Statement [82] if((volatile byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::ptr#0 ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::ptr#0 ] { } ) always clobbers reg byte a @@ -2445,7 +2445,7 @@ Statement [62] *((const nomodify byte*) SPRITES_EXPAND_Y) ← *((const nomodify Statement [63] *((const nomodify byte*) SPRITES_EXPAND_X) ← *((const nomodify byte*) SPRITES_EXPAND_Y) [ ] ( main:10::sprites_init:18 [ ] { } ) always clobbers reg byte a Statement [65] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:10::sprites_init:18 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] { } ) always clobbers reg byte a Statement [66] *((const nomodify byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:10::sprites_init:18 [ sprites_init::s#2 sprites_init::xpos#2 ] { } ) always clobbers reg byte a -Statement [67] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:10::sprites_init:18 [ sprites_init::s#2 sprites_init::xpos#2 ] { } ) always clobbers reg byte a +Statement [67] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:10::sprites_init:18 [ sprites_init::s#2 sprites_init::xpos#2 ] { } ) always clobbers reg byte a Statement [68] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:10::sprites_init:18 [ sprites_init::s#2 sprites_init::xpos#1 ] { } ) always clobbers reg byte a Statement [80] if(*((const nomodify byte*) RASTER)<(volatile byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@8 [ render_screen_showing irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::raster_sprite_gfx_modify ] ( [ render_screen_showing irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::raster_sprite_gfx_modify ] { } ) always clobbers reg byte a Statement [82] if((volatile byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::ptr#0 ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::ptr#0 ] { } ) always clobbers reg byte a @@ -2584,7 +2584,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const toSpritePtr1_return = PLAYFIELD_SPRITES/$40 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_MC = $d01c @@ -2758,8 +2758,8 @@ main: { tya sec sbc #3 - // [25] *((const nomodify byte*) SPRITES_COLS + (byte) main::s#2) ← (byte~) main::$6 -- pbuc1_derefidx_vbuyy=vbuaa - sta SPRITES_COLS,y + // [25] *((const nomodify byte*) SPRITES_COLOR + (byte) main::s#2) ← (byte~) main::$6 -- pbuc1_derefidx_vbuyy=vbuaa + sta SPRITES_COLOR,y // [26] phi from main::@1 to main::toSpritePtr1 [phi:main::@1->main::toSpritePtr1] toSpritePtr1_from___b1: jmp toSpritePtr1 @@ -2955,9 +2955,9 @@ sprites_init: { // [66] *((const nomodify byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 lda.z xpos sta SPRITES_XPOS,x - // [67] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK -- pbuc1_derefidx_vbuyy=vbuc2 + // [67] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK -- pbuc1_derefidx_vbuyy=vbuc2 lda #BLACK - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // [68] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 lax.z xpos axs #-[$18] @@ -2984,7 +2984,7 @@ sprites_irq: { sta rega+1 stx regx+1 // asm { cld } - //(*BGCOL)++; + //(*BG_COLOR)++; // Clear decimal flag (because it is used by the score algorithm) cld // [73] (byte) sprites_irq::ypos#0 ← (volatile byte) irq_sprite_ypos -- vbuaa=vbuz1 @@ -3396,7 +3396,7 @@ FINAL SYMBOL TABLE } }} (const byte*) SIN_SPRITE = (byte*) 10240 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_ENABLE = (byte*) 53269 (const nomodify byte*) SPRITES_EXPAND_X = (byte*) 53277 (const nomodify byte*) SPRITES_EXPAND_Y = (byte*) 53271 @@ -3564,7 +3564,7 @@ Score: 11662 .const toSpritePtr1_return = PLAYFIELD_SPRITES/$40 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_MC = $d01c @@ -3719,9 +3719,9 @@ main: { tya sec sbc #3 - // SPRITES_COLS[s] = s-3 - // [25] *((const nomodify byte*) SPRITES_COLS + (byte) main::s#2) ← (byte~) main::$6 -- pbuc1_derefidx_vbuyy=vbuaa - sta SPRITES_COLS,y + // SPRITES_COLOR[s] = s-3 + // [25] *((const nomodify byte*) SPRITES_COLOR + (byte) main::s#2) ← (byte~) main::$6 -- pbuc1_derefidx_vbuyy=vbuaa + sta SPRITES_COLOR,y // [26] phi from main::@1 to main::toSpritePtr1 [phi:main::@1->main::toSpritePtr1] // main::toSpritePtr1 // main::@4 @@ -3914,10 +3914,10 @@ sprites_init: { // [66] *((const nomodify byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 lda.z xpos sta SPRITES_XPOS,x - // SPRITES_COLS[s] = BLACK - // [67] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK -- pbuc1_derefidx_vbuyy=vbuc2 + // SPRITES_COLOR[s] = BLACK + // [67] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK -- pbuc1_derefidx_vbuyy=vbuc2 lda #BLACK - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // xpos = xpos+24 // [68] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 lax.z xpos @@ -3946,7 +3946,7 @@ sprites_irq: { stx regx+1 // asm // asm { cld } - //(*BGCOL)++; + //(*BG_COLOR)++; // Clear decimal flag (because it is used by the score algorithm) cld // ypos = irq_sprite_ypos diff --git a/src/test/ref/complex/tetris/test-sprites.sym b/src/test/ref/complex/tetris/test-sprites.sym index 60ce4e626..a6de39037 100644 --- a/src/test/ref/complex/tetris/test-sprites.sym +++ b/src/test/ref/complex/tetris/test-sprites.sym @@ -119,7 +119,7 @@ } }} (const byte*) SIN_SPRITE = (byte*) 10240 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_ENABLE = (byte*) 53269 (const nomodify byte*) SPRITES_EXPAND_X = (byte*) 53277 (const nomodify byte*) SPRITES_EXPAND_Y = (byte*) 53271 diff --git a/src/test/ref/complex/tetris/tetris.asm b/src/test/ref/complex/tetris/tetris.asm index ee8efa275..7ce732854 100644 --- a/src/test/ref/complex/tetris/tetris.asm +++ b/src/test/ref/complex/tetris/tetris.asm @@ -69,17 +69,17 @@ .const toSpritePtr1_return = PLAYFIELD_SPRITES/$40 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_MC = $d01c .label SPRITES_EXPAND_X = $d01d .label RASTER = $d012 - .label BORDERCOL = $d020 - .label BGCOL1 = $d021 - .label BGCOL2 = $d022 - .label BGCOL3 = $d023 - .label BGCOL4 = $d024 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 + .label BG_COLOR1 = $d022 + .label BG_COLOR2 = $d023 + .label BG_COLOR3 = $d024 .label VIC_CONTROL = $d011 .label D011 = $d011 .label D018 = $d018 @@ -273,7 +273,7 @@ main: { cmp RASTER bne __b2 // render_show() - //*BORDERCOL = render_screen_show/0x10; + //*BORDER_COLOR = render_screen_show/0x10; // Update D018 to show the selected screen jsr render_show // keyboard_event_scan() @@ -288,8 +288,8 @@ main: { cmp #0 beq __b4 __b5: - // (*BORDERCOL)++; - inc BORDERCOL + // (*BORDER_COLOR)++; + inc BORDER_COLOR jmp __b5 __b4: // play_movement(key_event) @@ -1529,13 +1529,13 @@ render_show: { __b1: // *D018 = d018val sta D018 - // *BGCOL2 = PIECES_COLORS_1[level] + // *BG_COLOR1 = PIECES_COLORS_1[level] ldy.z level lda PIECES_COLORS_1,y - sta BGCOL2 - // *BGCOL3 = PIECES_COLORS_2[level] + sta BG_COLOR1 + // *BG_COLOR2 = PIECES_COLORS_2[level] lda PIECES_COLORS_2,y - sta BGCOL3 + sta BG_COLOR2 // render_screen_showing = render_screen_show lda.z render_screen_show sta.z render_screen_showing @@ -1683,9 +1683,9 @@ sprites_init: { // SPRITES_XPOS[s2] = xpos lda.z xpos sta SPRITES_XPOS,x - // SPRITES_COLS[s] = BLACK + // SPRITES_COLOR[s] = BLACK lda #BLACK - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // xpos = xpos+24 lax.z xpos axs #-[$18] @@ -1713,20 +1713,20 @@ render_init: { // Enable Extended Background Color Mode lda #VIC_ECM|VIC_DEN|VIC_RSEL|3 sta D011 - // *BORDERCOL = BLACK + // *BORDER_COLOR = BLACK lda #BLACK - sta BORDERCOL - // *BGCOL1 = BLACK - sta BGCOL1 - // *BGCOL2 = PIECES_COLORS_1[0] + sta BORDER_COLOR + // *BG_COLOR = BLACK + sta BG_COLOR + // *BG_COLOR1 = PIECES_COLORS_1[0] lda PIECES_COLORS_1 - sta BGCOL2 - // *BGCOL3 = PIECES_COLORS_2[0] + sta BG_COLOR1 + // *BG_COLOR2 = PIECES_COLORS_2[0] lda PIECES_COLORS_2 - sta BGCOL3 - // *BGCOL4 = GREY + sta BG_COLOR2 + // *BG_COLOR3 = GREY lda #GREY - sta BGCOL4 + sta BG_COLOR3 // render_screen_original(PLAYFIELD_SCREEN_1) // Setup chars on the screens lda #(byte) $1d) goto play_ Simplifying expression containing zero (byte*)CIA1 in [1] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) Simplifying expression containing zero KEY_MODIFIER_LSHIFT in [57] (byte) keyboard_modifiers#2 ← (const byte) keyboard_modifiers#1 | (const nomodify byte) KEY_MODIFIER_LSHIFT Simplifying expression containing zero (byte*)CIA2 in [109] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← (byte) render_init::vicSelectGfxBank1_toDd001_return#0 -Simplifying expression containing zero PIECES_COLORS_1 in [113] *((const nomodify byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) 0) -Simplifying expression containing zero PIECES_COLORS_2 in [114] *((const nomodify byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) 0) +Simplifying expression containing zero PIECES_COLORS_1 in [113] *((const nomodify byte*) BG_COLOR1) ← *((const byte*) PIECES_COLORS_1 + (byte) 0) +Simplifying expression containing zero PIECES_COLORS_2 in [114] *((const nomodify byte*) BG_COLOR2) ← *((const byte*) PIECES_COLORS_2 + (byte) 0) Simplifying expression containing zero render_score::score_bytes in [189] (byte) render_bcd::bcd#2 ← *((const byte*) render_score::score_bytes + (byte) 0) Simplifying expression containing zero SPRITES_YPOS in [375] *((const nomodify byte*) SPRITES_YPOS + (byte) 0) ← (byte) sprites_irq::ypos#0 Simplifying expression containing zero PLAYFIELD_SPRITE_PTRS_1 in [386] *((const nomodify byte*) PLAYFIELD_SPRITE_PTRS_1 + (byte) 0) ← (byte) sprites_irq::ptr#0 @@ -9250,7 +9250,7 @@ main::@20: scope:[main] from main::@19 [49] if((byte) game_over#10==(byte) 0) goto main::@4 to:main::@5 main::@5: scope:[main] from main::@20 main::@5 - [50] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [50] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) to:main::@5 main::@4: scope:[main] from main::@20 [51] (byte) play_movement::key_event#0 ← (byte) main::key_event#0 @@ -10122,8 +10122,8 @@ render_show::toD0182: scope:[render_show] from render_show render_show::@1: scope:[render_show] from render_show::toD0181 render_show::toD0182 [449] (byte) render_show::d018val#3 ← phi( render_show::toD0181/(const byte) render_show::toD0181_return#0 render_show::toD0182/(const byte) render_show::toD0182_return#0 ) [450] *((const nomodify byte*) D018) ← (byte) render_show::d018val#3 - [451] *((const nomodify byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) - [452] *((const nomodify byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) + [451] *((const nomodify byte*) BG_COLOR1) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) + [452] *((const nomodify byte*) BG_COLOR2) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) [453] (volatile byte) render_screen_showing ← (byte) render_screen_show#16 to:render_show::@return render_show::@return: scope:[render_show] from render_show::@1 @@ -10194,7 +10194,7 @@ sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1 [489] (byte) sprites_init::s#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::s#1 ) [490] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [491] *((const nomodify byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 - [492] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK + [492] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK [493] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [494] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 [495] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 @@ -10218,11 +10218,11 @@ render_init::vicSelectGfxBank1_@1: scope:[render_init] from render_init::vicSel to:render_init::@2 render_init::@2: scope:[render_init] from render_init::vicSelectGfxBank1_@1 [501] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_ECM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 - [502] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK - [503] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK - [504] *((const nomodify byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) - [505] *((const nomodify byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) - [506] *((const nomodify byte*) BGCOL4) ← (const nomodify byte) GREY + [502] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK + [503] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK + [504] *((const nomodify byte*) BG_COLOR1) ← *((const byte*) PIECES_COLORS_1) + [505] *((const nomodify byte*) BG_COLOR2) ← *((const byte*) PIECES_COLORS_2) + [506] *((const nomodify byte*) BG_COLOR3) ← (const nomodify byte) GREY [507] call render_screen_original to:render_init::@3 render_init::@3: scope:[render_init] from render_init::@2 @@ -11689,17 +11689,17 @@ Target platform is c64basic / MOS6502X .const toSpritePtr1_return = PLAYFIELD_SPRITES/$40 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_MC = $d01c .label SPRITES_EXPAND_X = $d01d .label RASTER = $d012 - .label BORDERCOL = $d020 - .label BGCOL1 = $d021 - .label BGCOL2 = $d022 - .label BGCOL3 = $d023 - .label BGCOL4 = $d024 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 + .label BG_COLOR1 = $d022 + .label BG_COLOR2 = $d023 + .label BG_COLOR3 = $d024 .label VIC_CONTROL = $d011 .label D011 = $d011 .label D018 = $d018 @@ -12073,7 +12073,7 @@ main: { // main::@3 __b3: // [42] call render_show - //*BORDERCOL = render_screen_show/0x10; + //*BORDER_COLOR = render_screen_show/0x10; // Update D018 to show the selected screen jsr render_show // [43] phi from main::@3 to main::@18 [phi:main::@3->main::@18] @@ -12109,8 +12109,8 @@ main: { jmp __b5 // main::@5 __b5: - // [50] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // [50] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __b5 // main::@4 __b4: @@ -14713,14 +14713,14 @@ render_show: { // [450] *((const nomodify byte*) D018) ← (byte) render_show::d018val#3 -- _deref_pbuc1=vbuz1 lda.z d018val sta D018 - // [451] *((const nomodify byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [451] *((const nomodify byte*) BG_COLOR1) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy.z level lda PIECES_COLORS_1,y - sta BGCOL2 - // [452] *((const nomodify byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + sta BG_COLOR1 + // [452] *((const nomodify byte*) BG_COLOR2) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy.z level lda PIECES_COLORS_2,y - sta BGCOL3 + sta BG_COLOR2 // [453] (volatile byte) render_screen_showing ← (byte) render_screen_show#16 -- vbuz1=vbuz2 lda.z render_screen_show sta.z render_screen_showing @@ -14945,10 +14945,10 @@ sprites_init: { lda.z xpos ldy.z s2 sta SPRITES_XPOS,y - // [492] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK -- pbuc1_derefidx_vbuz1=vbuc2 + // [492] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK -- pbuc1_derefidx_vbuz1=vbuc2 lda #BLACK ldy.z s - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // [493] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 lax.z xpos axs #-[$18] @@ -14998,21 +14998,21 @@ render_init: { // Enable Extended Background Color Mode lda #VIC_ECM|VIC_DEN|VIC_RSEL|3 sta D011 - // [502] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [502] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL - // [503] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [503] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL1 - // [504] *((const nomodify byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) -- _deref_pbuc1=_deref_pbuc2 + sta BG_COLOR + // [504] *((const nomodify byte*) BG_COLOR1) ← *((const byte*) PIECES_COLORS_1) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_1 - sta BGCOL2 - // [505] *((const nomodify byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) -- _deref_pbuc1=_deref_pbuc2 + sta BG_COLOR1 + // [505] *((const nomodify byte*) BG_COLOR2) ← *((const byte*) PIECES_COLORS_2) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_2 - sta BGCOL3 - // [506] *((const nomodify byte*) BGCOL4) ← (const nomodify byte) GREY -- _deref_pbuc1=vbuc2 + sta BG_COLOR2 + // [506] *((const nomodify byte*) BG_COLOR3) ← (const nomodify byte) GREY -- _deref_pbuc1=vbuc2 lda #GREY - sta BGCOL4 + sta BG_COLOR3 // [507] call render_screen_original // Setup chars on the screens // [519] phi from render_init::@2 to render_screen_original [phi:render_init::@2->render_screen_original] @@ -15303,7 +15303,7 @@ sprites_irq: { stx regx+1 sty regy+1 // asm { cld } - //(*BGCOL)++; + //(*BG_COLOR)++; // Clear decimal flag (because it is used by the score algorithm) cld // [548] (byte) sprites_irq::ypos#0 ← (volatile byte) irq_sprite_ypos -- vbuz1=vbuz2 @@ -15777,8 +15777,8 @@ Statement [442] *((const byte*) keyboard_events + (byte) keyboard_events_size#10 Statement [444] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:11::keyboard_event_scan:44::keyboard_matrix_read:394 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 ] { { keyboard_matrix_read::rowid#0 = keyboard_event_scan::row#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Statement [445] (byte) keyboard_matrix_read::return#0 ← ~ *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:11::keyboard_event_scan:44::keyboard_matrix_read:394 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_matrix_read::return#0 ] { { keyboard_matrix_read::rowid#0 = keyboard_event_scan::row#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Statement [447] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a -Statement [451] *((const nomodify byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a reg byte y -Statement [452] *((const nomodify byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a reg byte y +Statement [451] *((const nomodify byte*) BG_COLOR1) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a reg byte y +Statement [452] *((const nomodify byte*) BG_COLOR2) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a reg byte y Statement [453] (volatile byte) render_screen_showing ← (byte) render_screen_show#16 [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a Statement [458] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 [ play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] ( main:11::play_init:23 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:90 [ play_init::j#2 play_init::j#1 ] @@ -15809,16 +15809,16 @@ Statement [490] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) Removing always clobbered register reg byte a as potential for zp[1]:95 [ sprites_init::s#2 sprites_init::s#1 ] Removing always clobbered register reg byte a as potential for zp[1]:96 [ sprites_init::xpos#2 sprites_init::xpos#1 ] Statement [491] *((const nomodify byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:19 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] { } ) always clobbers reg byte a -Statement [492] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:19 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] { } ) always clobbers reg byte a +Statement [492] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:19 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] { } ) always clobbers reg byte a Statement [493] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:11::sprites_init:19 [ score_bcd sprites_init::s#2 sprites_init::xpos#1 ] { } ) always clobbers reg byte a Statement [498] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (byte) 3 [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a Statement [500] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a Statement [501] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_ECM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a -Statement [502] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a -Statement [503] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a -Statement [504] *((const nomodify byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a -Statement [505] *((const nomodify byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a -Statement [506] *((const nomodify byte*) BGCOL4) ← (const nomodify byte) GREY [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a +Statement [502] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a +Statement [503] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a +Statement [504] *((const nomodify byte*) BG_COLOR1) ← *((const byte*) PIECES_COLORS_1) [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a +Statement [505] *((const nomodify byte*) BG_COLOR2) ← *((const byte*) PIECES_COLORS_2) [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a +Statement [506] *((const nomodify byte*) BG_COLOR3) ← (const nomodify byte) GREY [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a Statement [511] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:11::render_init:17 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:97 [ render_init::i#2 render_init::i#1 ] Statement [512] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:11::render_init:17 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] { } ) always clobbers reg byte a @@ -15964,8 +15964,8 @@ Statement [442] *((const byte*) keyboard_events + (byte) keyboard_events_size#10 Statement [444] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:11::keyboard_event_scan:44::keyboard_matrix_read:394 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 ] { { keyboard_matrix_read::rowid#0 = keyboard_event_scan::row#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Statement [445] (byte) keyboard_matrix_read::return#0 ← ~ *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:11::keyboard_event_scan:44::keyboard_matrix_read:394 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_matrix_read::return#0 ] { { keyboard_matrix_read::rowid#0 = keyboard_event_scan::row#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Statement [447] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a -Statement [451] *((const nomodify byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a reg byte y -Statement [452] *((const nomodify byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a reg byte y +Statement [451] *((const nomodify byte*) BG_COLOR1) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a reg byte y +Statement [452] *((const nomodify byte*) BG_COLOR2) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a reg byte y Statement [453] (volatile byte) render_screen_showing ← (byte) render_screen_show#16 [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a Statement [458] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 [ play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] ( main:11::play_init:23 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] { } ) always clobbers reg byte a Statement [459] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:11::play_init:23 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 ] { } ) always clobbers reg byte a @@ -15991,16 +15991,16 @@ Statement [487] *((const nomodify byte*) SPRITES_EXPAND_Y) ← *((const nomodify Statement [488] *((const nomodify byte*) SPRITES_EXPAND_X) ← *((const nomodify byte*) SPRITES_EXPAND_Y) [ ] ( main:11::sprites_init:19 [ score_bcd ] { } ) always clobbers reg byte a Statement [490] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:11::sprites_init:19 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] { } ) always clobbers reg byte a Statement [491] *((const nomodify byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:19 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] { } ) always clobbers reg byte a -Statement [492] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:19 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] { } ) always clobbers reg byte a +Statement [492] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:19 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] { } ) always clobbers reg byte a Statement [493] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:11::sprites_init:19 [ score_bcd sprites_init::s#2 sprites_init::xpos#1 ] { } ) always clobbers reg byte a Statement [498] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (byte) 3 [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a Statement [500] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a Statement [501] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_ECM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a -Statement [502] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a -Statement [503] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a -Statement [504] *((const nomodify byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a -Statement [505] *((const nomodify byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a -Statement [506] *((const nomodify byte*) BGCOL4) ← (const nomodify byte) GREY [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a +Statement [502] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a +Statement [503] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a +Statement [504] *((const nomodify byte*) BG_COLOR1) ← *((const byte*) PIECES_COLORS_1) [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a +Statement [505] *((const nomodify byte*) BG_COLOR2) ← *((const byte*) PIECES_COLORS_2) [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a +Statement [506] *((const nomodify byte*) BG_COLOR3) ← (const nomodify byte) GREY [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a Statement [511] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:11::render_init:17 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] { } ) always clobbers reg byte a Statement [512] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:11::render_init:17 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] { } ) always clobbers reg byte a Statement [513] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ( main:11::render_init:17 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] { } ) always clobbers reg byte a @@ -16135,8 +16135,8 @@ Statement [442] *((const byte*) keyboard_events + (byte) keyboard_events_size#10 Statement [444] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:11::keyboard_event_scan:44::keyboard_matrix_read:394 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 ] { { keyboard_matrix_read::rowid#0 = keyboard_event_scan::row#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Statement [445] (byte) keyboard_matrix_read::return#0 ← ~ *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:11::keyboard_event_scan:44::keyboard_matrix_read:394 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_matrix_read::return#0 ] { { keyboard_matrix_read::rowid#0 = keyboard_event_scan::row#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Statement [447] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a -Statement [451] *((const nomodify byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a reg byte y -Statement [452] *((const nomodify byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a reg byte y +Statement [451] *((const nomodify byte*) BG_COLOR1) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a reg byte y +Statement [452] *((const nomodify byte*) BG_COLOR2) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a reg byte y Statement [453] (volatile byte) render_screen_showing ← (byte) render_screen_show#16 [ render_screen_show#16 level#10 ] ( main:11::render_show:42 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] { } ) always clobbers reg byte a Statement [458] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 [ play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] ( main:11::play_init:23 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] { } ) always clobbers reg byte a Statement [459] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:11::play_init:23 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 ] { } ) always clobbers reg byte a @@ -16162,16 +16162,16 @@ Statement [487] *((const nomodify byte*) SPRITES_EXPAND_Y) ← *((const nomodify Statement [488] *((const nomodify byte*) SPRITES_EXPAND_X) ← *((const nomodify byte*) SPRITES_EXPAND_Y) [ ] ( main:11::sprites_init:19 [ score_bcd ] { } ) always clobbers reg byte a Statement [490] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:11::sprites_init:19 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] { } ) always clobbers reg byte a Statement [491] *((const nomodify byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:19 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] { } ) always clobbers reg byte a -Statement [492] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:19 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] { } ) always clobbers reg byte a +Statement [492] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:19 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] { } ) always clobbers reg byte a Statement [493] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:11::sprites_init:19 [ score_bcd sprites_init::s#2 sprites_init::xpos#1 ] { } ) always clobbers reg byte a Statement [498] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (byte) 3 [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a Statement [500] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a Statement [501] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_ECM|(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a -Statement [502] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a -Statement [503] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a -Statement [504] *((const nomodify byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a -Statement [505] *((const nomodify byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a -Statement [506] *((const nomodify byte*) BGCOL4) ← (const nomodify byte) GREY [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a +Statement [502] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a +Statement [503] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a +Statement [504] *((const nomodify byte*) BG_COLOR1) ← *((const byte*) PIECES_COLORS_1) [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a +Statement [505] *((const nomodify byte*) BG_COLOR2) ← *((const byte*) PIECES_COLORS_2) [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a +Statement [506] *((const nomodify byte*) BG_COLOR3) ← (const nomodify byte) GREY [ ] ( main:11::render_init:17 [ score_bcd ] { } ) always clobbers reg byte a Statement [511] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:11::render_init:17 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] { } ) always clobbers reg byte a Statement [512] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:11::render_init:17 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] { } ) always clobbers reg byte a Statement [513] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ( main:11::render_init:17 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] { } ) always clobbers reg byte a @@ -16839,17 +16839,17 @@ ASSEMBLER BEFORE OPTIMIZATION .const toSpritePtr1_return = PLAYFIELD_SPRITES/$40 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_MC = $d01c .label SPRITES_EXPAND_X = $d01d .label RASTER = $d012 - .label BORDERCOL = $d020 - .label BGCOL1 = $d021 - .label BGCOL2 = $d022 - .label BGCOL3 = $d023 - .label BGCOL4 = $d024 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 + .label BG_COLOR1 = $d022 + .label BG_COLOR2 = $d023 + .label BG_COLOR3 = $d024 .label VIC_CONTROL = $d011 .label D011 = $d011 .label D018 = $d018 @@ -17210,7 +17210,7 @@ main: { // main::@3 __b3: // [42] call render_show - //*BORDERCOL = render_screen_show/0x10; + //*BORDER_COLOR = render_screen_show/0x10; // Update D018 to show the selected screen jsr render_show // [43] phi from main::@3 to main::@18 [phi:main::@3->main::@18] @@ -17243,8 +17243,8 @@ main: { jmp __b5 // main::@5 __b5: - // [50] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // [50] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __b5 // main::@4 __b4: @@ -19505,14 +19505,14 @@ render_show: { __b1: // [450] *((const nomodify byte*) D018) ← (byte) render_show::d018val#3 -- _deref_pbuc1=vbuaa sta D018 - // [451] *((const nomodify byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [451] *((const nomodify byte*) BG_COLOR1) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy.z level lda PIECES_COLORS_1,y - sta BGCOL2 - // [452] *((const nomodify byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + sta BG_COLOR1 + // [452] *((const nomodify byte*) BG_COLOR2) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy.z level lda PIECES_COLORS_2,y - sta BGCOL3 + sta BG_COLOR2 // [453] (volatile byte) render_screen_showing ← (byte) render_screen_show#16 -- vbuz1=vbuz2 lda.z render_screen_show sta.z render_screen_showing @@ -19721,9 +19721,9 @@ sprites_init: { // [491] *((const nomodify byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 lda.z xpos sta SPRITES_XPOS,x - // [492] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK -- pbuc1_derefidx_vbuyy=vbuc2 + // [492] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK -- pbuc1_derefidx_vbuyy=vbuc2 lda #BLACK - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // [493] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 lax.z xpos axs #-[$18] @@ -19770,21 +19770,21 @@ render_init: { // Enable Extended Background Color Mode lda #VIC_ECM|VIC_DEN|VIC_RSEL|3 sta D011 - // [502] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [502] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL - // [503] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [503] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL1 - // [504] *((const nomodify byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) -- _deref_pbuc1=_deref_pbuc2 + sta BG_COLOR + // [504] *((const nomodify byte*) BG_COLOR1) ← *((const byte*) PIECES_COLORS_1) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_1 - sta BGCOL2 - // [505] *((const nomodify byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) -- _deref_pbuc1=_deref_pbuc2 + sta BG_COLOR1 + // [505] *((const nomodify byte*) BG_COLOR2) ← *((const byte*) PIECES_COLORS_2) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_2 - sta BGCOL3 - // [506] *((const nomodify byte*) BGCOL4) ← (const nomodify byte) GREY -- _deref_pbuc1=vbuc2 + sta BG_COLOR2 + // [506] *((const nomodify byte*) BG_COLOR3) ← (const nomodify byte) GREY -- _deref_pbuc1=vbuc2 lda #GREY - sta BGCOL4 + sta BG_COLOR3 // [507] call render_screen_original // Setup chars on the screens // [519] phi from render_init::@2 to render_screen_original [phi:render_init::@2->render_screen_original] @@ -20058,7 +20058,7 @@ sprites_irq: { sta rega+1 stx regx+1 // asm { cld } - //(*BGCOL)++; + //(*BG_COLOR)++; // Clear decimal flag (because it is used by the score algorithm) cld // [548] (byte) sprites_irq::ypos#0 ← (volatile byte) irq_sprite_ypos -- vbuaa=vbuz1 @@ -20961,13 +20961,13 @@ FINAL SYMBOL TABLE (label) @5 (label) @begin (label) @end -(const nomodify byte*) BGCOL1 = (byte*) 53281 -(const nomodify byte*) BGCOL2 = (byte*) 53282 -(const nomodify byte*) BGCOL3 = (byte*) 53283 -(const nomodify byte*) BGCOL4 = (byte*) 53284 +(const nomodify byte*) BG_COLOR = (byte*) 53281 +(const nomodify byte*) BG_COLOR1 = (byte*) 53282 +(const nomodify byte*) BG_COLOR2 = (byte*) 53283 +(const nomodify byte*) BG_COLOR3 = (byte*) 53284 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte) BLUE = (byte) 6 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify byte*) CIA1_INTERRUPT = (byte*) 56333 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*) 56576 @@ -21136,7 +21136,7 @@ FINAL SYMBOL TABLE (const to_nomodify dword*) SCORE_BASE_BCD[] = { (dword) 0, (dword) $40, (dword) $100, (dword) $300, (dword) $1200 } (const nomodify struct MOS6581_SID*) SID = (struct MOS6581_SID*) 54272 (const nomodify byte) SID_CONTROL_NOISE = (byte) $80 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_ENABLE = (byte*) 53269 (const nomodify byte*) SPRITES_EXPAND_X = (byte*) 53277 (const nomodify byte*) SPRITES_EXPAND_Y = (byte*) 53271 @@ -22186,17 +22186,17 @@ Score: 3348915 .const toSpritePtr1_return = PLAYFIELD_SPRITES/$40 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_MC = $d01c .label SPRITES_EXPAND_X = $d01d .label RASTER = $d012 - .label BORDERCOL = $d020 - .label BGCOL1 = $d021 - .label BGCOL2 = $d022 - .label BGCOL3 = $d023 - .label BGCOL4 = $d024 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 + .label BG_COLOR1 = $d022 + .label BG_COLOR2 = $d023 + .label BG_COLOR3 = $d024 .label VIC_CONTROL = $d011 .label D011 = $d011 .label D018 = $d018 @@ -22507,7 +22507,7 @@ main: { // main::@3 // render_show() // [42] call render_show - //*BORDERCOL = render_screen_show/0x10; + //*BORDER_COLOR = render_screen_show/0x10; // Update D018 to show the selected screen jsr render_show // [43] phi from main::@3 to main::@18 [phi:main::@3->main::@18] @@ -22534,9 +22534,9 @@ main: { beq __b4 // main::@5 __b5: - // (*BORDERCOL)++; - // [50] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // (*BORDER_COLOR)++; + // [50] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __b5 // main::@4 __b4: @@ -24648,15 +24648,15 @@ render_show: { // *D018 = d018val // [450] *((const nomodify byte*) D018) ← (byte) render_show::d018val#3 -- _deref_pbuc1=vbuaa sta D018 - // *BGCOL2 = PIECES_COLORS_1[level] - // [451] *((const nomodify byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // *BG_COLOR1 = PIECES_COLORS_1[level] + // [451] *((const nomodify byte*) BG_COLOR1) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy.z level lda PIECES_COLORS_1,y - sta BGCOL2 - // *BGCOL3 = PIECES_COLORS_2[level] - // [452] *((const nomodify byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + sta BG_COLOR1 + // *BG_COLOR2 = PIECES_COLORS_2[level] + // [452] *((const nomodify byte*) BG_COLOR2) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 lda PIECES_COLORS_2,y - sta BGCOL3 + sta BG_COLOR2 // render_screen_showing = render_screen_show // [453] (volatile byte) render_screen_showing ← (byte) render_screen_show#16 -- vbuz1=vbuz2 lda.z render_screen_show @@ -24870,10 +24870,10 @@ sprites_init: { // [491] *((const nomodify byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 lda.z xpos sta SPRITES_XPOS,x - // SPRITES_COLS[s] = BLACK - // [492] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK -- pbuc1_derefidx_vbuyy=vbuc2 + // SPRITES_COLOR[s] = BLACK + // [492] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::s#2) ← (const nomodify byte) BLACK -- pbuc1_derefidx_vbuyy=vbuc2 lda #BLACK - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // xpos = xpos+24 // [493] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 lax.z xpos @@ -24915,25 +24915,25 @@ render_init: { // Enable Extended Background Color Mode lda #VIC_ECM|VIC_DEN|VIC_RSEL|3 sta D011 - // *BORDERCOL = BLACK - // [502] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = BLACK + // [502] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL - // *BGCOL1 = BLACK - // [503] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 - sta BGCOL1 - // *BGCOL2 = PIECES_COLORS_1[0] - // [504] *((const nomodify byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) -- _deref_pbuc1=_deref_pbuc2 + sta BORDER_COLOR + // *BG_COLOR = BLACK + // [503] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // *BG_COLOR1 = PIECES_COLORS_1[0] + // [504] *((const nomodify byte*) BG_COLOR1) ← *((const byte*) PIECES_COLORS_1) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_1 - sta BGCOL2 - // *BGCOL3 = PIECES_COLORS_2[0] - // [505] *((const nomodify byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) -- _deref_pbuc1=_deref_pbuc2 + sta BG_COLOR1 + // *BG_COLOR2 = PIECES_COLORS_2[0] + // [505] *((const nomodify byte*) BG_COLOR2) ← *((const byte*) PIECES_COLORS_2) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_2 - sta BGCOL3 - // *BGCOL4 = GREY - // [506] *((const nomodify byte*) BGCOL4) ← (const nomodify byte) GREY -- _deref_pbuc1=vbuc2 + sta BG_COLOR2 + // *BG_COLOR3 = GREY + // [506] *((const nomodify byte*) BG_COLOR3) ← (const nomodify byte) GREY -- _deref_pbuc1=vbuc2 lda #GREY - sta BGCOL4 + sta BG_COLOR3 // render_screen_original(PLAYFIELD_SCREEN_1) // [507] call render_screen_original // Setup chars on the screens @@ -25202,7 +25202,7 @@ sprites_irq: { stx regx+1 // asm // asm { cld } - //(*BGCOL)++; + //(*BG_COLOR)++; // Clear decimal flag (because it is used by the score algorithm) cld // ypos = irq_sprite_ypos diff --git a/src/test/ref/complex/tetris/tetris.sym b/src/test/ref/complex/tetris/tetris.sym index a9c3ca10c..06790845d 100644 --- a/src/test/ref/complex/tetris/tetris.sym +++ b/src/test/ref/complex/tetris/tetris.sym @@ -5,13 +5,13 @@ (label) @5 (label) @begin (label) @end -(const nomodify byte*) BGCOL1 = (byte*) 53281 -(const nomodify byte*) BGCOL2 = (byte*) 53282 -(const nomodify byte*) BGCOL3 = (byte*) 53283 -(const nomodify byte*) BGCOL4 = (byte*) 53284 +(const nomodify byte*) BG_COLOR = (byte*) 53281 +(const nomodify byte*) BG_COLOR1 = (byte*) 53282 +(const nomodify byte*) BG_COLOR2 = (byte*) 53283 +(const nomodify byte*) BG_COLOR3 = (byte*) 53284 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte) BLUE = (byte) 6 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify byte*) CIA1_INTERRUPT = (byte*) 56333 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*) 56576 @@ -180,7 +180,7 @@ (const to_nomodify dword*) SCORE_BASE_BCD[] = { (dword) 0, (dword) $40, (dword) $100, (dword) $300, (dword) $1200 } (const nomodify struct MOS6581_SID*) SID = (struct MOS6581_SID*) 54272 (const nomodify byte) SID_CONTROL_NOISE = (byte) $80 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_ENABLE = (byte*) 53269 (const nomodify byte*) SPRITES_EXPAND_X = (byte*) 53277 (const nomodify byte*) SPRITES_EXPAND_Y = (byte*) 53271 diff --git a/src/test/ref/complex/xmega65/xmega65.asm b/src/test/ref/complex/xmega65/xmega65.asm index 0304c30bb..6c5c09c36 100644 --- a/src/test/ref/complex/xmega65/xmega65.asm +++ b/src/test/ref/complex/xmega65/xmega65.asm @@ -15,7 +15,7 @@ .label RASTER = $d012 .label VIC_MEMORY = $d018 .label SCREEN = $400 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label COLS = $d800 __bbegin: .segment Code @@ -64,14 +64,14 @@ main: { lda #$42 cmp RASTER beq __b4 - // *BGCOL = BLACK + // *BG_COLOR = BLACK lda #BLACK - sta BGCOL + sta BG_COLOR jmp __b3 __b4: - // *BGCOL = WHITE + // *BG_COLOR = WHITE lda #WHITE - sta BGCOL + sta BG_COLOR jmp __b3 __b2: // *sc++ = *msg++ diff --git a/src/test/ref/complex/xmega65/xmega65.cfg b/src/test/ref/complex/xmega65/xmega65.cfg index 88c964b67..2576abb16 100644 --- a/src/test/ref/complex/xmega65/xmega65.cfg +++ b/src/test/ref/complex/xmega65/xmega65.cfg @@ -29,10 +29,10 @@ main::@7: scope:[main] from main::@3 [11] if(*((const nomodify byte*) RASTER)==(byte) $42) goto main::@4 to:main::@5 main::@5: scope:[main] from main::@7 - [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK to:main::@3 main::@4: scope:[main] from main::@3 main::@7 - [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE + [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE to:main::@3 main::@2: scope:[main] from main::@1 [14] *((byte*) main::sc#2) ← *((byte*) main::msg#2) diff --git a/src/test/ref/complex/xmega65/xmega65.log b/src/test/ref/complex/xmega65/xmega65.log index 367810e5b..1d3406fd2 100644 --- a/src/test/ref/complex/xmega65/xmega65.log +++ b/src/test/ref/complex/xmega65/xmega65.log @@ -91,10 +91,10 @@ main::@4: scope:[main] from main::@3 if((bool~) main::$4) goto main::@5 to:main::@6 main::@5: scope:[main] from main::@4 - *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE to:main::@3 main::@6: scope:[main] from main::@4 - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK to:main::@3 main::@return: scope:[main] from main::@3 return @@ -127,7 +127,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) COLS = (byte*)(number) $d800 (const nomodify byte) JMP = (byte) $4c @@ -394,10 +394,10 @@ main::@7: scope:[main] from main::@3 [11] if(*((const nomodify byte*) RASTER)==(byte) $42) goto main::@4 to:main::@5 main::@5: scope:[main] from main::@7 - [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK to:main::@3 main::@4: scope:[main] from main::@3 main::@7 - [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE + [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE to:main::@3 main::@2: scope:[main] from main::@1 [14] *((byte*) main::sc#2) ← *((byte*) main::msg#2) @@ -513,7 +513,7 @@ Target platform is custom / MOS6502X .label RASTER = $d012 .label VIC_MEMORY = $d018 .label SCREEN = $400 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label COLS = $d800 // @begin __bbegin: @@ -606,15 +606,15 @@ main: { jmp __b5 // main::@5 __b5: - // [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR jmp __b3 // main::@4 __b4: - // [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL + sta BG_COLOR jmp __b3 // main::@2 __b2: @@ -737,8 +737,8 @@ Statement [4] *((const nomodify byte*) VIC_MEMORY) ← (byte) $14 [ ] ( [ ] { } Statement [9] if((byte) 0!=*((byte*) main::msg#2)) goto main::@2 [ main::msg#2 main::sc#2 ] ( [ main::msg#2 main::sc#2 ] { } main:2 [ main::msg#2 main::sc#2 ] { } ) always clobbers reg byte a reg byte y Statement [10] if(*((const nomodify byte*) RASTER)==(byte) $36) goto main::@4 [ ] ( [ ] { } main:2 [ ] { } ) always clobbers reg byte a Statement [11] if(*((const nomodify byte*) RASTER)==(byte) $42) goto main::@4 [ ] ( [ ] { } main:2 [ ] { } ) always clobbers reg byte a -Statement [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( [ ] { } main:2 [ ] { } ) always clobbers reg byte a -Statement [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE [ ] ( [ ] { } main:2 [ ] { } ) always clobbers reg byte a +Statement [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( [ ] { } main:2 [ ] { } ) always clobbers reg byte a +Statement [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [ ] ( [ ] { } main:2 [ ] { } ) always clobbers reg byte a Statement [14] *((byte*) main::sc#2) ← *((byte*) main::msg#2) [ main::msg#2 main::sc#2 ] ( [ main::msg#2 main::sc#2 ] { } main:2 [ main::msg#2 main::sc#2 ] { } ) always clobbers reg byte a reg byte y Statement [18] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word)(number) $28*(number) $19 [ memset::str#3 memset::c#4 memset::end#0 ] ( memset:5 [ memset::str#3 memset::c#4 memset::end#0 ] { } main:2::memset:5 [ memset::str#3 memset::c#4 memset::end#0 ] { } memset:7 [ memset::str#3 memset::c#4 memset::end#0 ] { } main:2::memset:7 [ memset::str#3 memset::c#4 memset::end#0 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:8 [ memset::c#4 ] @@ -752,8 +752,8 @@ Statement [4] *((const nomodify byte*) VIC_MEMORY) ← (byte) $14 [ ] ( [ ] { } Statement [9] if((byte) 0!=*((byte*) main::msg#2)) goto main::@2 [ main::msg#2 main::sc#2 ] ( [ main::msg#2 main::sc#2 ] { } main:2 [ main::msg#2 main::sc#2 ] { } ) always clobbers reg byte a reg byte y Statement [10] if(*((const nomodify byte*) RASTER)==(byte) $36) goto main::@4 [ ] ( [ ] { } main:2 [ ] { } ) always clobbers reg byte a Statement [11] if(*((const nomodify byte*) RASTER)==(byte) $42) goto main::@4 [ ] ( [ ] { } main:2 [ ] { } ) always clobbers reg byte a -Statement [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( [ ] { } main:2 [ ] { } ) always clobbers reg byte a -Statement [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE [ ] ( [ ] { } main:2 [ ] { } ) always clobbers reg byte a +Statement [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( [ ] { } main:2 [ ] { } ) always clobbers reg byte a +Statement [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [ ] ( [ ] { } main:2 [ ] { } ) always clobbers reg byte a Statement [14] *((byte*) main::sc#2) ← *((byte*) main::msg#2) [ main::msg#2 main::sc#2 ] ( [ main::msg#2 main::sc#2 ] { } main:2 [ main::msg#2 main::sc#2 ] { } ) always clobbers reg byte a reg byte y Statement [18] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word)(number) $28*(number) $19 [ memset::str#3 memset::c#4 memset::end#0 ] ( memset:5 [ memset::str#3 memset::c#4 memset::end#0 ] { } main:2::memset:5 [ memset::str#3 memset::c#4 memset::end#0 ] { } memset:7 [ memset::str#3 memset::c#4 memset::end#0 ] { } main:2::memset:7 [ memset::str#3 memset::c#4 memset::end#0 ] { } ) always clobbers reg byte a Statement [19] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3 [ memset::c#4 memset::end#0 memset::dst#4 ] ( memset:5 [ memset::c#4 memset::end#0 memset::dst#4 ] { } main:2::memset:5 [ memset::c#4 memset::end#0 memset::dst#4 ] { } memset:7 [ memset::c#4 memset::end#0 memset::dst#4 ] { } main:2::memset:7 [ memset::c#4 memset::end#0 memset::dst#4 ] { } ) always clobbers reg byte a @@ -806,7 +806,7 @@ ASSEMBLER BEFORE OPTIMIZATION .label RASTER = $d012 .label VIC_MEMORY = $d018 .label SCREEN = $400 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label COLS = $d800 // @begin __bbegin: @@ -897,15 +897,15 @@ main: { jmp __b5 // main::@5 __b5: - // [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR jmp __b3 // main::@4 __b4: - // [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL + sta BG_COLOR jmp __b3 // main::@2 __b2: @@ -1062,7 +1062,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) COLS = (byte*) 55296 (const nomodify byte) JMP = (byte) $4c @@ -1143,7 +1143,7 @@ Score: 1600 .label RASTER = $d012 .label VIC_MEMORY = $d018 .label SCREEN = $400 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label COLS = $d800 // @begin __bbegin: @@ -1220,17 +1220,17 @@ main: { cmp RASTER beq __b4 // main::@5 - // *BGCOL = BLACK - // [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // *BG_COLOR = BLACK + // [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR jmp __b3 // main::@4 __b4: - // *BGCOL = WHITE - // [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // *BG_COLOR = WHITE + // [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL + sta BG_COLOR jmp __b3 // main::@2 __b2: diff --git a/src/test/ref/complex/xmega65/xmega65.sym b/src/test/ref/complex/xmega65/xmega65.sym index 64d6cc411..00e2fd2bb 100644 --- a/src/test/ref/complex/xmega65/xmega65.sym +++ b/src/test/ref/complex/xmega65/xmega65.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) COLS = (byte*) 55296 (const nomodify byte) JMP = (byte) $4c diff --git a/src/test/ref/constantmin.asm b/src/test/ref/constantmin.asm index d661accc0..7c66e2d73 100644 --- a/src/test/ref/constantmin.asm +++ b/src/test/ref/constantmin.asm @@ -9,7 +9,7 @@ main: { // *SCREEN = STAR lda #STAR sta SCREEN - // *BGCOL = RED + // *BG_COLOR = RED lda #RED sta VIC+$10*2+1 ldx #$28 diff --git a/src/test/ref/constantmin.log b/src/test/ref/constantmin.log index ecac14315..21b8d69f0 100644 --- a/src/test/ref/constantmin.log +++ b/src/test/ref/constantmin.log @@ -3,14 +3,14 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*~) $0 ← (const byte*) VIC + (number) $10*(number) 2 (byte*~) $1 ← (byte*~) $0 + (number) 1 - (byte*) BGCOL#0 ← (byte*~) $1 + (byte*) BG_COLOR#0 ← (byte*~) $1 to:@1 (void()) main() main: scope:[main] from @1 - (byte*) BGCOL#1 ← phi( @1/(byte*) BGCOL#2 ) + (byte*) BG_COLOR#1 ← phi( @1/(byte*) BG_COLOR#2 ) *((const nomodify byte*) SCREEN) ← (const nomodify byte) STAR - *((byte*) BGCOL#1) ← (const byte) RED + *((byte*) BG_COLOR#1) ← (const byte) RED (byte) main::i#0 ← (byte) $28 to:main::@1 main::@1: scope:[main] from main main::@1 @@ -24,7 +24,7 @@ main::@return: scope:[main] from main::@1 return to:@return @1: scope:[] from @begin - (byte*) BGCOL#2 ← phi( @begin/(byte*) BGCOL#0 ) + (byte*) BG_COLOR#2 ← phi( @begin/(byte*) BG_COLOR#0 ) call main to:@2 @2: scope:[] from @1 @@ -38,10 +38,10 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(byte*) BGCOL -(byte*) BGCOL#0 -(byte*) BGCOL#1 -(byte*) BGCOL#2 +(byte*) BG_COLOR +(byte*) BG_COLOR#0 +(byte*) BG_COLOR#1 +(byte*) BG_COLOR#2 (const byte) RED = (byte) 2 (const nomodify byte*) SCREEN = (byte*)(number) $400 (const nomodify byte) STAR = (byte) $51 @@ -71,9 +71,9 @@ Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 Successful SSA optimization PassNFinalizeNumberTypeConversions -Alias BGCOL#0 = $1 BGCOL#2 +Alias BG_COLOR#0 = $1 BG_COLOR#2 Successful SSA optimization Pass2AliasElimination -Identical Phi Values (byte*) BGCOL#1 (byte*) BGCOL#0 +Identical Phi Values (byte*) BG_COLOR#1 (byte*) BG_COLOR#0 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) main::$0 [10] if((byte) main::i#1!=rangelast($28,$4f)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification @@ -84,9 +84,9 @@ Constant (const byte) main::i#0 = $28 Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [8] main::i#1 ← ++ main::i#2 to ++ Resolved ranged comparison value [10] if(main::i#1!=rangelast($28,$4f)) goto main::@1 to (number) $50 -Converting *(pointer+n) to pointer[n] [4] *((byte*) BGCOL#0) ← (const byte) RED -- *($0 + 1) +Converting *(pointer+n) to pointer[n] [4] *((byte*) BG_COLOR#0) ← (const byte) RED -- *($0 + 1) Successful SSA optimization Pass2InlineDerefIdx -Eliminating unused variable (byte*) BGCOL#0 and assignment [0] (byte*) BGCOL#0 ← (const byte*) $0 + (byte) 1 +Eliminating unused variable (byte*) BG_COLOR#0 and assignment [0] (byte*) BG_COLOR#0 ← (const byte*) $0 + (byte) 1 Successful SSA optimization PassNEliminateUnusedVars Adding number conversion cast (unumber) $50 in if((byte) main::i#1!=(number) $50) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions @@ -145,7 +145,7 @@ main::@return: scope:[main] from main::@1 VARIABLE REGISTER WEIGHTS -(byte*) BGCOL +(byte*) BG_COLOR (void()) main() (byte) main::i (byte) main::i#1 151.5 @@ -327,7 +327,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(byte*) BGCOL +(byte*) BG_COLOR (const byte) RED = (byte) 2 (const nomodify byte*) SCREEN = (byte*) 1024 (const nomodify byte) STAR = (byte) $51 @@ -367,7 +367,7 @@ main: { // [4] *((const nomodify byte*) SCREEN) ← (const nomodify byte) STAR -- _deref_pbuc1=vbuc2 lda #STAR sta SCREEN - // *BGCOL = RED + // *BG_COLOR = RED // [5] *((const byte*) VIC+(byte)(number) $10*(number) 2+(byte) 1) ← (const byte) RED -- _deref_pbuc1=vbuc2 lda #RED sta VIC+$10*2+1 diff --git a/src/test/ref/constantmin.sym b/src/test/ref/constantmin.sym index 421a0abe8..6a62819c4 100644 --- a/src/test/ref/constantmin.sym +++ b/src/test/ref/constantmin.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(byte*) BGCOL +(byte*) BG_COLOR (const byte) RED = (byte) 2 (const nomodify byte*) SCREEN = (byte*) 1024 (const nomodify byte) STAR = (byte) $51 diff --git a/src/test/ref/constants.asm b/src/test/ref/constants.asm index a41c11c0e..0fe4cb13d 100644 --- a/src/test/ref/constants.asm +++ b/src/test/ref/constants.asm @@ -3,15 +3,15 @@ .pc = $80d "Program" .const GREEN = 5 .const RED = 2 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label print_char_cursor = 2 .label print_line_cursor = 4 main: { // print_cls() jsr print_cls - // *BGCOL = GREEN + // *BG_COLOR = GREEN lda #GREEN - sta BGCOL + sta BG_COLOR // test_bytes() jsr test_bytes // test_sbytes() @@ -112,9 +112,9 @@ assert_sbyte: { // } rts __b1: - // *BGCOL = RED + // *BG_COLOR = RED lda #RED - sta BGCOL + sta BG_COLOR // print_str("fail!") lda #test_bytes] test_bytes_from___b1: @@ -1838,9 +1838,9 @@ assert_sbyte: { rts // assert_sbyte::@1 __b1: - // [34] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // [34] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BGCOL + sta BG_COLOR // [35] call print_str // [36] phi from assert_sbyte::@1 to print_str [phi:assert_sbyte::@1->print_str] print_str_from___b1: @@ -2108,9 +2108,9 @@ assert_byte: { rts // assert_byte::@1 __b1: - // [69] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // [69] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BGCOL + sta BG_COLOR // [70] call print_str // [36] phi from assert_byte::@1 to print_str [phi:assert_byte::@1->print_str] print_str_from___b1: @@ -2195,12 +2195,12 @@ memset: { .byte 0 REGISTER UPLIFT POTENTIAL REGISTERS -Statement [6] *((const nomodify byte*) BGCOL) ← (const nomodify byte) GREEN [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [6] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) GREEN [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [23] (byte*) print_str::str#5 ← (byte*) assert_sbyte::msg#5 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_line_cursor#1 ] ( main:2::test_sbytes:9::assert_sbyte:12 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:14 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:16 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:18 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:20 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:4 [ assert_sbyte::b#5 ] Removing always clobbered register reg byte a as potential for zp[1]:5 [ assert_sbyte::c#5 ] Statement [24] (byte*) print_char_cursor#90 ← (byte*) print_line_cursor#1 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_char_cursor#90 print_line_cursor#1 ] ( main:2::test_sbytes:9::assert_sbyte:12 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_char_cursor#90 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:14 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_char_cursor#90 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:16 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_char_cursor#90 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:18 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_char_cursor#90 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:20 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_char_cursor#90 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } ) always clobbers reg byte a -Statement [34] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::test_sbytes:9::assert_sbyte:12 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:14 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:16 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:18 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:20 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } ) always clobbers reg byte a +Statement [34] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::test_sbytes:9::assert_sbyte:12 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:14 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:16 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:18 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:20 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } ) always clobbers reg byte a Statement [38] if((byte) 0!=*((byte*) print_str::str#10)) goto print_str::@2 [ print_char_cursor#2 print_str::str#10 ] ( main:2::test_sbytes:9::assert_sbyte:12::print_str:25 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:14::print_str:25 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:16::print_str:25 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:18::print_str:25 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:20::print_str:25 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:12::print_str:27 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:14::print_str:27 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:16::print_str:27 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:18::print_str:27 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:20::print_str:27 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:12::print_str:30 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:14::print_str:30 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:16::print_str:30 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:18::print_str:30 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:20::print_str:30 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:12::print_str:35 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:14::print_str:35 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:16::print_str:35 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:18::print_str:35 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:20::print_str:35 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:52::print_str:60 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 ] { { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } { print_char_cursor#75 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54::print_str:60 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#75 = print_char_cursor#96 print_char_cursor#85 } { print_line_cursor#1 = print_line_cursor#50 } { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } } main:2::test_bytes:7::assert_byte:56::print_str:60 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#75 = print_char_cursor#97 print_char_cursor#85 } { print_line_cursor#1 = print_line_cursor#50 } { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } } main:2::test_bytes:7::assert_byte:52::print_str:62 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54::print_str:62 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:56::print_str:62 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:52::print_str:65 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54::print_str:65 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:56::print_str:65 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:52::print_str:70 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54::print_str:70 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:56::print_str:70 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp[1]:4 [ assert_sbyte::b#5 ] Removing always clobbered register reg byte y as potential for zp[1]:5 [ assert_sbyte::c#5 ] @@ -2215,13 +2215,13 @@ Statement [49] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto Statement [53] (byte*) print_char_cursor#96 ← (byte*) print_line_cursor#1 [ print_line_cursor#1 print_char_cursor#96 ] ( main:2::test_bytes:7 [ print_line_cursor#1 print_char_cursor#96 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } } ) always clobbers reg byte a Statement [55] (byte*) print_char_cursor#97 ← (byte*) print_line_cursor#1 [ print_line_cursor#1 print_char_cursor#97 ] ( main:2::test_bytes:7 [ print_line_cursor#1 print_char_cursor#97 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } } ) always clobbers reg byte a Statement [59] (byte*) print_str::str#1 ← (byte*) assert_byte::msg#3 [ print_str::str#1 print_char_cursor#75 print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 ] ( main:2::test_bytes:7::assert_byte:52 [ print_str::str#1 print_char_cursor#75 print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 ] { { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } { print_char_cursor#75 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54 [ print_str::str#1 print_char_cursor#75 print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 ] { { print_char_cursor#75 = print_char_cursor#96 print_char_cursor#85 } { print_line_cursor#1 = print_line_cursor#50 } { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } } main:2::test_bytes:7::assert_byte:56 [ print_str::str#1 print_char_cursor#75 print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 ] { { print_char_cursor#75 = print_char_cursor#97 print_char_cursor#85 } { print_line_cursor#1 = print_line_cursor#50 } { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } } ) always clobbers reg byte a -Statement [69] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED [ print_char_cursor#2 print_line_cursor#50 ] ( main:2::test_bytes:7::assert_byte:52 [ print_char_cursor#2 print_line_cursor#50 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54 [ print_char_cursor#2 print_line_cursor#50 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:56 [ print_char_cursor#2 print_line_cursor#50 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } ) always clobbers reg byte a +Statement [69] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED [ print_char_cursor#2 print_line_cursor#50 ] ( main:2::test_bytes:7::assert_byte:52 [ print_char_cursor#2 print_line_cursor#50 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54 [ print_char_cursor#2 print_line_cursor#50 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:56 [ print_char_cursor#2 print_line_cursor#50 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } ) always clobbers reg byte a Statement [76] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:2::print_cls:5::memset:72 [ memset::dst#2 ] { } ) always clobbers reg byte a Statement [78] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::print_cls:5::memset:72 [ memset::dst#2 ] { } ) always clobbers reg byte a reg byte y -Statement [6] *((const nomodify byte*) BGCOL) ← (const nomodify byte) GREEN [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [6] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) GREEN [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [23] (byte*) print_str::str#5 ← (byte*) assert_sbyte::msg#5 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_line_cursor#1 ] ( main:2::test_sbytes:9::assert_sbyte:12 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:14 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:16 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:18 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:20 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } ) always clobbers reg byte a Statement [24] (byte*) print_char_cursor#90 ← (byte*) print_line_cursor#1 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_char_cursor#90 print_line_cursor#1 ] ( main:2::test_sbytes:9::assert_sbyte:12 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_char_cursor#90 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:14 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_char_cursor#90 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:16 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_char_cursor#90 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:18 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_char_cursor#90 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:20 [ assert_sbyte::b#5 assert_sbyte::c#5 print_str::str#5 print_char_cursor#90 print_line_cursor#1 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } ) always clobbers reg byte a -Statement [34] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::test_sbytes:9::assert_sbyte:12 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:14 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:16 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:18 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:20 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } ) always clobbers reg byte a +Statement [34] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::test_sbytes:9::assert_sbyte:12 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:14 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:16 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:18 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:20 [ print_line_cursor#1 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } ) always clobbers reg byte a Statement [38] if((byte) 0!=*((byte*) print_str::str#10)) goto print_str::@2 [ print_char_cursor#2 print_str::str#10 ] ( main:2::test_sbytes:9::assert_sbyte:12::print_str:25 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:14::print_str:25 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:16::print_str:25 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:18::print_str:25 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:20::print_str:25 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:12::print_str:27 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:14::print_str:27 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:16::print_str:27 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:18::print_str:27 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:20::print_str:27 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:12::print_str:30 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:14::print_str:30 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:16::print_str:30 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:18::print_str:30 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:20::print_str:30 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:12::print_str:35 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:14::print_str:35 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:16::print_str:35 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:18::print_str:35 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:20::print_str:35 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:52::print_str:60 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 ] { { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } { print_char_cursor#75 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54::print_str:60 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#75 = print_char_cursor#96 print_char_cursor#85 } { print_line_cursor#1 = print_line_cursor#50 } { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } } main:2::test_bytes:7::assert_byte:56::print_str:60 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#75 = print_char_cursor#97 print_char_cursor#85 } { print_line_cursor#1 = print_line_cursor#50 } { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } } main:2::test_bytes:7::assert_byte:52::print_str:62 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54::print_str:62 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:56::print_str:62 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:52::print_str:65 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54::print_str:65 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:56::print_str:65 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:52::print_str:70 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54::print_str:70 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:56::print_str:70 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } ) always clobbers reg byte a reg byte y Statement [40] (byte) print_char::ch#0 ← *((byte*) print_str::str#10) [ print_char_cursor#2 print_str::str#10 print_char::ch#0 ] ( main:2::test_sbytes:9::assert_sbyte:12::print_str:25 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:14::print_str:25 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:16::print_str:25 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:18::print_str:25 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:20::print_str:25 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:12::print_str:27 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:14::print_str:27 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:16::print_str:27 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:18::print_str:27 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:20::print_str:27 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:12::print_str:30 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:14::print_str:30 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:16::print_str:30 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:18::print_str:30 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:20::print_str:30 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:12::print_str:35 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:14::print_str:35 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:16::print_str:35 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:18::print_str:35 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:20::print_str:35 [ print_line_cursor#1 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:52::print_str:60 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } { print_char_cursor#75 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54::print_str:60 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#75 = print_char_cursor#96 print_char_cursor#85 } { print_line_cursor#1 = print_line_cursor#50 } { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } } main:2::test_bytes:7::assert_byte:56::print_str:60 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#75 = print_char_cursor#97 print_char_cursor#85 } { print_line_cursor#1 = print_line_cursor#50 } { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } } main:2::test_bytes:7::assert_byte:52::print_str:62 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54::print_str:62 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:56::print_str:62 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:52::print_str:65 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54::print_str:65 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:56::print_str:65 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:52::print_str:70 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54::print_str:70 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:56::print_str:70 [ print_line_cursor#50 print_char_cursor#2 print_str::str#10 print_char::ch#0 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } ) always clobbers reg byte a reg byte y Statement [43] *((byte*) print_char_cursor#2) ← (byte) print_char::ch#0 [ print_char_cursor#2 ] ( main:2::test_sbytes:9::assert_sbyte:12::print_str:25::print_char:41 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:14::print_str:25::print_char:41 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:16::print_str:25::print_char:41 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:18::print_str:25::print_char:41 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:20::print_str:25::print_char:41 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_str::str#12 = print_str::str#5 assert_sbyte::msg#5 } { print_char_cursor#85 = print_char_cursor#90 } } main:2::test_sbytes:9::assert_sbyte:12::print_str:27::print_char:41 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:14::print_str:27::print_char:41 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:16::print_str:27::print_char:41 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:18::print_str:27::print_char:41 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:20::print_str:27::print_char:41 [ assert_sbyte::b#5 assert_sbyte::c#5 print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:12::print_str:30::print_char:41 [ print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:14::print_str:30::print_char:41 [ print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:16::print_str:30::print_char:41 [ print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:18::print_str:30::print_char:41 [ print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:20::print_str:30::print_char:41 [ print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:12::print_str:35::print_char:41 [ print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:14::print_str:35::print_char:41 [ print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:16::print_str:35::print_char:41 [ print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:18::print_str:35::print_char:41 [ print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_sbytes:9::assert_sbyte:20::print_str:35::print_char:41 [ print_line_cursor#1 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:52::print_str:60::print_char:41 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_str::str#10 print_char_cursor#2 ] { { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } { print_char_cursor#75 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54::print_str:60::print_char:41 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#75 = print_char_cursor#96 print_char_cursor#85 } { print_line_cursor#1 = print_line_cursor#50 } { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } } main:2::test_bytes:7::assert_byte:56::print_str:60::print_char:41 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#75 = print_char_cursor#97 print_char_cursor#85 } { print_line_cursor#1 = print_line_cursor#50 } { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } } main:2::test_bytes:7::assert_byte:52::print_str:62::print_char:41 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54::print_str:62::print_char:41 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:56::print_str:62::print_char:41 [ print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:52::print_str:65::print_char:41 [ print_line_cursor#50 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54::print_str:65::print_char:41 [ print_line_cursor#50 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:56::print_str:65::print_char:41 [ print_line_cursor#50 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:52::print_str:70::print_char:41 [ print_line_cursor#50 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54::print_str:70::print_char:41 [ print_line_cursor#50 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:56::print_str:70::print_char:41 [ print_line_cursor#50 print_str::str#10 print_char_cursor#2 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } ) always clobbers reg byte y @@ -2230,7 +2230,7 @@ Statement [49] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto Statement [53] (byte*) print_char_cursor#96 ← (byte*) print_line_cursor#1 [ print_line_cursor#1 print_char_cursor#96 ] ( main:2::test_bytes:7 [ print_line_cursor#1 print_char_cursor#96 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } } ) always clobbers reg byte a Statement [55] (byte*) print_char_cursor#97 ← (byte*) print_line_cursor#1 [ print_line_cursor#1 print_char_cursor#97 ] ( main:2::test_bytes:7 [ print_line_cursor#1 print_char_cursor#97 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } } ) always clobbers reg byte a Statement [59] (byte*) print_str::str#1 ← (byte*) assert_byte::msg#3 [ print_str::str#1 print_char_cursor#75 print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 ] ( main:2::test_bytes:7::assert_byte:52 [ print_str::str#1 print_char_cursor#75 print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 ] { { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } { print_char_cursor#75 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54 [ print_str::str#1 print_char_cursor#75 print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 ] { { print_char_cursor#75 = print_char_cursor#96 print_char_cursor#85 } { print_line_cursor#1 = print_line_cursor#50 } { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } } main:2::test_bytes:7::assert_byte:56 [ print_str::str#1 print_char_cursor#75 print_line_cursor#50 assert_byte::b#3 assert_byte::c#3 ] { { print_char_cursor#75 = print_char_cursor#97 print_char_cursor#85 } { print_line_cursor#1 = print_line_cursor#50 } { print_str::str#1 = print_str::str#12 assert_byte::msg#3 } } ) always clobbers reg byte a -Statement [69] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED [ print_char_cursor#2 print_line_cursor#50 ] ( main:2::test_bytes:7::assert_byte:52 [ print_char_cursor#2 print_line_cursor#50 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54 [ print_char_cursor#2 print_line_cursor#50 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:56 [ print_char_cursor#2 print_line_cursor#50 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } ) always clobbers reg byte a +Statement [69] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED [ print_char_cursor#2 print_line_cursor#50 ] ( main:2::test_bytes:7::assert_byte:52 [ print_char_cursor#2 print_line_cursor#50 ] { { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:54 [ print_char_cursor#2 print_line_cursor#50 ] { { print_char_cursor#75 = print_char_cursor#96 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } main:2::test_bytes:7::assert_byte:56 [ print_char_cursor#2 print_line_cursor#50 ] { { print_char_cursor#75 = print_char_cursor#97 } { print_line_cursor#1 = print_line_cursor#50 } { print_char_cursor#2 = print_char_cursor#85 } } ) always clobbers reg byte a Statement [76] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:2::print_cls:5::memset:72 [ memset::dst#2 ] { } ) always clobbers reg byte a Statement [78] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::print_cls:5::memset:72 [ memset::dst#2 ] { } ) always clobbers reg byte a reg byte y Potential registers zp[2]:2 [ assert_sbyte::msg#5 ] : zp[2]:2 , @@ -2293,7 +2293,7 @@ ASSEMBLER BEFORE OPTIMIZATION // Global Constants & labels .const GREEN = 5 .const RED = 2 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label print_char_cursor = 2 .label print_line_cursor = 4 // @begin @@ -2321,9 +2321,9 @@ main: { jmp __b1 // main::@1 __b1: - // [6] *((const nomodify byte*) BGCOL) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // [6] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BGCOL + sta BG_COLOR // [7] call test_bytes // [51] phi from main::@1 to test_bytes [phi:main::@1->test_bytes] test_bytes_from___b1: @@ -2524,9 +2524,9 @@ assert_sbyte: { rts // assert_sbyte::@1 __b1: - // [34] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // [34] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BGCOL + sta BG_COLOR // [35] call print_str // [36] phi from assert_sbyte::@1 to print_str [phi:assert_sbyte::@1->print_str] print_str_from___b1: @@ -2782,9 +2782,9 @@ assert_byte: { rts // assert_byte::@1 __b1: - // [69] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // [69] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BGCOL + sta BG_COLOR // [70] call print_str // [36] phi from assert_byte::@1 to print_str [phi:assert_byte::@1->print_str] print_str_from___b1: @@ -2990,7 +2990,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) GREEN = (byte) 5 (const byte) RADIX::BINARY = (number) 2 (const byte) RADIX::DECIMAL = (number) $a @@ -3130,7 +3130,7 @@ Score: 1783 // Global Constants & labels .const GREEN = 5 .const RED = 2 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label print_char_cursor = 2 .label print_line_cursor = 4 // @begin @@ -3147,10 +3147,10 @@ main: { // [71] phi from main to print_cls [phi:main->print_cls] jsr print_cls // main::@1 - // *BGCOL = GREEN - // [6] *((const nomodify byte*) BGCOL) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // *BG_COLOR = GREEN + // [6] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BGCOL + sta BG_COLOR // test_bytes() // [7] call test_bytes // [51] phi from main::@1 to test_bytes [phi:main::@1->test_bytes] @@ -3324,10 +3324,10 @@ assert_sbyte: { rts // assert_sbyte::@1 __b1: - // *BGCOL = RED - // [34] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // *BG_COLOR = RED + // [34] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BGCOL + sta BG_COLOR // print_str("fail!") // [35] call print_str // [36] phi from assert_sbyte::@1 to print_str [phi:assert_sbyte::@1->print_str] @@ -3563,10 +3563,10 @@ assert_byte: { rts // assert_byte::@1 __b1: - // *BGCOL = RED - // [69] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // *BG_COLOR = RED + // [69] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BGCOL + sta BG_COLOR // print_str("fail!") // [70] call print_str // [36] phi from assert_byte::@1 to print_str [phi:assert_byte::@1->print_str] diff --git a/src/test/ref/constants.sym b/src/test/ref/constants.sym index 2c330fdb1..285622eaa 100644 --- a/src/test/ref/constants.sym +++ b/src/test/ref/constants.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) GREEN = (byte) 5 (const byte) RADIX::BINARY = (number) 2 (const byte) RADIX::DECIMAL = (number) $a diff --git a/src/test/ref/double-import.asm b/src/test/ref/double-import.asm index 8a9a1d759..98e4a4039 100644 --- a/src/test/ref/double-import.asm +++ b/src/test/ref/double-import.asm @@ -2,11 +2,11 @@ :BasicUpstart(main) .pc = $80d "Program" .const RED = 2 - .label BGCOL = $d021 + .label BG_COLOR = $d021 main: { - // *BGCOL = RED + // *BG_COLOR = RED lda #RED - sta BGCOL + sta BG_COLOR // } rts } diff --git a/src/test/ref/double-import.cfg b/src/test/ref/double-import.cfg index 619cfd4f8..937c92800 100644 --- a/src/test/ref/double-import.cfg +++ b/src/test/ref/double-import.cfg @@ -10,7 +10,7 @@ (void()) main() main: scope:[main] from @1 - [4] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED + [4] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED to:main::@return main::@return: scope:[main] from main [5] return diff --git a/src/test/ref/double-import.log b/src/test/ref/double-import.log index 5abd63fa3..d4655c2d0 100644 --- a/src/test/ref/double-import.log +++ b/src/test/ref/double-import.log @@ -5,7 +5,7 @@ CONTROL FLOW GRAPH SSA (void()) main() main: scope:[main] from @1 - *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED to:main::@return main::@return: scope:[main] from main return @@ -22,7 +22,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const nomodify byte) RED = (byte) 2 (void()) main() (label) main::@return @@ -56,7 +56,7 @@ FINAL CONTROL FLOW GRAPH (void()) main() main: scope:[main] from @1 - [4] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED + [4] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED to:main::@return main::@return: scope:[main] from main [5] return @@ -78,7 +78,7 @@ Target platform is c64basic / MOS6502X .pc = $80d "Program" // Global Constants & labels .const RED = 2 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -95,9 +95,9 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // [4] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BGCOL + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -107,7 +107,7 @@ main: { // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [4] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [4] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED [ ] ( main:2 [ ] { } ) always clobbers reg byte a REGISTER UPLIFT SCOPES Uplift Scope [main] @@ -124,7 +124,7 @@ ASSEMBLER BEFORE OPTIMIZATION .pc = $80d "Program" // Global Constants & labels .const RED = 2 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -141,9 +141,9 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // [4] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BGCOL + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -174,7 +174,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) RED = (byte) 2 (void()) main() (label) main::@return @@ -191,7 +191,7 @@ Score: 12 .pc = $80d "Program" // Global Constants & labels .const RED = 2 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] // @1 @@ -200,10 +200,10 @@ Score: 12 // @end // main main: { - // *BGCOL = RED - // [4] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // *BG_COLOR = RED + // [4] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BGCOL + sta BG_COLOR // main::@return // } // [5] return diff --git a/src/test/ref/double-import.sym b/src/test/ref/double-import.sym index e7855d7fb..d65a278f7 100644 --- a/src/test/ref/double-import.sym +++ b/src/test/ref/double-import.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) RED = (byte) 2 (void()) main() (label) main::@return diff --git a/src/test/ref/examples/3d/3d.asm b/src/test/ref/examples/3d/3d.asm index a825792d9..8a7aa021d 100644 --- a/src/test/ref/examples/3d/3d.asm +++ b/src/test/ref/examples/3d/3d.asm @@ -14,7 +14,7 @@ .const sz = 0 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 // The VIC-II MOS 6567/6569 .label VICII = $d000 // The rotated point - updated by calling rotate_matrix() @@ -1209,9 +1209,9 @@ sprites_init: { // sprites_ptr[i] = (char)(SPRITE/$40) lda #SPRITE/$40 sta sprites_ptr,x - // SPRITES_COLS[i] = GREEN + // SPRITES_COLOR[i] = GREEN lda #GREEN - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // for(char i: 0..7) inx cpx #8 diff --git a/src/test/ref/examples/3d/3d.cfg b/src/test/ref/examples/3d/3d.cfg index 7074b7816..99daac829 100644 --- a/src/test/ref/examples/3d/3d.cfg +++ b/src/test/ref/examples/3d/3d.cfg @@ -491,7 +491,7 @@ sprites_init: scope:[sprites_init] from main sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1 [260] (byte) sprites_init::i#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::i#1 ) [261] *((const byte*) sprites_init::sprites_ptr#0 + (byte) sprites_init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 - [262] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN + [262] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN [263] (byte) sprites_init::i#1 ← ++ (byte) sprites_init::i#2 [264] if((byte) sprites_init::i#1!=(byte) 8) goto sprites_init::@1 to:sprites_init::@return diff --git a/src/test/ref/examples/3d/3d.log b/src/test/ref/examples/3d/3d.log index 17240e327..ab39d445b 100644 --- a/src/test/ref/examples/3d/3d.log +++ b/src/test/ref/examples/3d/3d.log @@ -961,7 +961,7 @@ sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1 (byte*) sprites_init::sprites_ptr#1 ← phi( sprites_init/(byte*) sprites_init::sprites_ptr#0 sprites_init::@1/(byte*) sprites_init::sprites_ptr#1 ) (byte*~) sprites_init::$1 ← (const byte*) SPRITE / (number) $40 *((byte*) sprites_init::sprites_ptr#1 + (byte) sprites_init::i#2) ← (byte)(byte*~) sprites_init::$1 - *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN + *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN (byte) sprites_init::i#1 ← (byte) sprites_init::i#2 + rangenext(0,7) (bool~) sprites_init::$2 ← (byte) sprites_init::i#1 != rangelast(0,7) if((bool~) sprites_init::$2) goto sprites_init::@1 @@ -1212,7 +1212,7 @@ SYMBOL TABLE SSA } }} (const byte*) SPRITE = (byte*)(number) $3000 -(const nomodify byte*) SPRITES_COLS = (byte*)(number) $d027 +(const nomodify byte*) SPRITES_COLOR = (byte*)(number) $d027 (const nomodify byte*) SPRITES_XPOS = (byte*)(number) $d000 (const nomodify byte*) SPRITES_YPOS = (byte*)(number) $d001 (const nomodify struct MOS6569_VICII*) VICII = (struct MOS6569_VICII*)(number) $d000 @@ -3743,7 +3743,7 @@ sprites_init: scope:[sprites_init] from main sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1 [260] (byte) sprites_init::i#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::i#1 ) [261] *((const byte*) sprites_init::sprites_ptr#0 + (byte) sprites_init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 - [262] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN + [262] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN [263] (byte) sprites_init::i#1 ← ++ (byte) sprites_init::i#2 [264] if((byte) sprites_init::i#1!=(byte) 8) goto sprites_init::@1 to:sprites_init::@return @@ -4351,7 +4351,7 @@ Target platform is c64basic / MOS6502X .const sz = 0 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 // The VIC-II MOS 6567/6569 .label VICII = $d000 // The rotated point - updated by calling rotate_matrix() @@ -6265,10 +6265,10 @@ sprites_init: { lda #SPRITE/$40 ldy.z i sta sprites_ptr,y - // [262] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuz1=vbuc2 + // [262] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuz1=vbuc2 lda #GREEN ldy.z i - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // [263] (byte) sprites_init::i#1 ← ++ (byte) sprites_init::i#2 -- vbuz1=_inc_vbuz1 inc.z i // [264] if((byte) sprites_init::i#1!=(byte) 8) goto sprites_init::@1 -- vbuz1_neq_vbuc1_then_la1 @@ -6505,7 +6505,7 @@ Statement [257] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset:: Statement [259] *((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) OFFSET_STRUCT_MOS6569_VICII_SPRITES_ENABLE) ← (byte) $ff [ ] ( main:2::sprites_init:5 [ ] { } ) always clobbers reg byte a Statement [261] *((const byte*) sprites_init::sprites_ptr#0 + (byte) sprites_init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 [ sprites_init::i#2 ] ( main:2::sprites_init:5 [ sprites_init::i#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:22 [ sprites_init::i#2 sprites_init::i#1 ] -Statement [262] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN [ sprites_init::i#2 ] ( main:2::sprites_init:5 [ sprites_init::i#2 ] { } ) always clobbers reg byte a +Statement [262] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN [ sprites_init::i#2 ] ( main:2::sprites_init:5 [ sprites_init::i#2 ] { } ) always clobbers reg byte a Statement [6] *((const word*) psp1) ← (word)(const byte*) mulf_sqr1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [7] *((const word*) psp2) ← (word)(const byte*) mulf_sqr2 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [14] if(*((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) OFFSET_STRUCT_MOS6569_VICII_RASTER)!=(byte) $ff) goto anim::@2 [ sx#10 sy#10 ] ( main:2::anim:10 [ sx#10 sy#10 ] { } ) always clobbers reg byte a @@ -6613,7 +6613,7 @@ Statement [255] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto mems Statement [257] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::debug_print_init:8::print_cls:182::memset:251 [ memset::dst#2 ] { } ) always clobbers reg byte a reg byte y Statement [259] *((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) OFFSET_STRUCT_MOS6569_VICII_SPRITES_ENABLE) ← (byte) $ff [ ] ( main:2::sprites_init:5 [ ] { } ) always clobbers reg byte a Statement [261] *((const byte*) sprites_init::sprites_ptr#0 + (byte) sprites_init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 [ sprites_init::i#2 ] ( main:2::sprites_init:5 [ sprites_init::i#2 ] { } ) always clobbers reg byte a -Statement [262] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN [ sprites_init::i#2 ] ( main:2::sprites_init:5 [ sprites_init::i#2 ] { } ) always clobbers reg byte a +Statement [262] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN [ sprites_init::i#2 ] ( main:2::sprites_init:5 [ sprites_init::i#2 ] { } ) always clobbers reg byte a Statement [6] *((const word*) psp1) ← (word)(const byte*) mulf_sqr1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [7] *((const word*) psp2) ← (word)(const byte*) mulf_sqr2 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [14] if(*((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) OFFSET_STRUCT_MOS6569_VICII_RASTER)!=(byte) $ff) goto anim::@2 [ sx#10 sy#10 ] ( main:2::anim:10 [ sx#10 sy#10 ] { } ) always clobbers reg byte a @@ -6724,7 +6724,7 @@ Statement [255] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto mems Statement [257] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::debug_print_init:8::print_cls:182::memset:251 [ memset::dst#2 ] { } ) always clobbers reg byte a reg byte y Statement [259] *((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) OFFSET_STRUCT_MOS6569_VICII_SPRITES_ENABLE) ← (byte) $ff [ ] ( main:2::sprites_init:5 [ ] { } ) always clobbers reg byte a Statement [261] *((const byte*) sprites_init::sprites_ptr#0 + (byte) sprites_init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 [ sprites_init::i#2 ] ( main:2::sprites_init:5 [ sprites_init::i#2 ] { } ) always clobbers reg byte a -Statement [262] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN [ sprites_init::i#2 ] ( main:2::sprites_init:5 [ sprites_init::i#2 ] { } ) always clobbers reg byte a +Statement [262] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN [ sprites_init::i#2 ] ( main:2::sprites_init:5 [ sprites_init::i#2 ] { } ) always clobbers reg byte a Potential registers zp[1]:2 [ sx#10 sx#3 ] : zp[1]:2 , Potential registers zp[1]:3 [ sy#10 sy#3 ] : zp[1]:3 , Potential registers zp[1]:4 [ anim::i#2 anim::i#1 ] : zp[1]:4 , @@ -7017,7 +7017,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const sz = 0 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 // The VIC-II MOS 6567/6569 .label VICII = $d000 // The rotated point - updated by calling rotate_matrix() @@ -8759,9 +8759,9 @@ sprites_init: { // [261] *((const byte*) sprites_init::sprites_ptr#0 + (byte) sprites_init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuxx=vbuc2 lda #SPRITE/$40 sta sprites_ptr,x - // [262] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 + // [262] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 lda #GREEN - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // [263] (byte) sprites_init::i#1 ← ++ (byte) sprites_init::i#2 -- vbuxx=_inc_vbuxx inx // [264] if((byte) sprites_init::i#1!=(byte) 8) goto sprites_init::@1 -- vbuxx_neq_vbuc1_then_la1 @@ -9258,7 +9258,7 @@ FINAL SYMBOL TABLE } }} (const byte*) SPRITE = (byte*) 12288 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_XPOS = (byte*) 53248 (const nomodify byte*) SPRITES_YPOS = (byte*) 53249 (const nomodify struct MOS6569_VICII*) VICII = (struct MOS6569_VICII*) 53248 @@ -9746,7 +9746,7 @@ Score: 67977 .const sz = 0 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 // The VIC-II MOS 6567/6569 .label VICII = $d000 // The rotated point - updated by calling rotate_matrix() @@ -11437,10 +11437,10 @@ sprites_init: { // [261] *((const byte*) sprites_init::sprites_ptr#0 + (byte) sprites_init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuxx=vbuc2 lda #SPRITE/$40 sta sprites_ptr,x - // SPRITES_COLS[i] = GREEN - // [262] *((const nomodify byte*) SPRITES_COLS + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 + // SPRITES_COLOR[i] = GREEN + // [262] *((const nomodify byte*) SPRITES_COLOR + (byte) sprites_init::i#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 lda #GREEN - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // for(char i: 0..7) // [263] (byte) sprites_init::i#1 ← ++ (byte) sprites_init::i#2 -- vbuxx=_inc_vbuxx inx diff --git a/src/test/ref/examples/3d/3d.sym b/src/test/ref/examples/3d/3d.sym index 334153a90..e0c443eb0 100644 --- a/src/test/ref/examples/3d/3d.sym +++ b/src/test/ref/examples/3d/3d.sym @@ -132,7 +132,7 @@ } }} (const byte*) SPRITE = (byte*) 12288 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_XPOS = (byte*) 53248 (const nomodify byte*) SPRITES_YPOS = (byte*) 53249 (const nomodify struct MOS6569_VICII*) VICII = (struct MOS6569_VICII*) 53248 diff --git a/src/test/ref/examples/kernalload/kernalload.asm b/src/test/ref/examples/kernalload/kernalload.asm index bbcdfb51d..3d6e22f94 100644 --- a/src/test/ref/examples/kernalload/kernalload.asm +++ b/src/test/ref/examples/kernalload/kernalload.asm @@ -22,7 +22,7 @@ .const OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR = $20 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 // The VIC-II MOS 6567/6569 .label VICII = $d000 // Address to load to @@ -55,9 +55,9 @@ main: { // SPRITES_PTR[0] = toSpritePtr(LOAD_SPRITE) lda #toSpritePtr1_return sta SPRITES_PTR - // SPRITES_COLS[0] = GREEN + // SPRITES_COLOR[0] = GREEN lda #GREEN - sta SPRITES_COLS + sta SPRITES_COLOR // SPRITES_XPOS[0] = 0x15 lda #$15 sta SPRITES_XPOS diff --git a/src/test/ref/examples/kernalload/kernalload.cfg b/src/test/ref/examples/kernalload/kernalload.cfg index e914edd53..e5dc2e3d0 100644 --- a/src/test/ref/examples/kernalload/kernalload.cfg +++ b/src/test/ref/examples/kernalload/kernalload.cfg @@ -31,7 +31,7 @@ main::toSpritePtr1: scope:[main] from main::@1 to:main::@3 main::@3: scope:[main] from main::toSpritePtr1 [14] *((const nomodify byte*) SPRITES_PTR) ← (const byte) main::toSpritePtr1_return#0 - [15] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) GREEN + [15] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) GREEN [16] *((const nomodify byte*) SPRITES_XPOS) ← (byte) $15 [17] *((const nomodify byte*) SPRITES_YPOS) ← (byte) $33 to:main::@return diff --git a/src/test/ref/examples/kernalload/kernalload.log b/src/test/ref/examples/kernalload/kernalload.log index 8b9174bc2..857044c6b 100644 --- a/src/test/ref/examples/kernalload/kernalload.log +++ b/src/test/ref/examples/kernalload/kernalload.log @@ -67,7 +67,7 @@ main::@3: scope:[main] from main::toSpritePtr1_@return (byte) main::toSpritePtr1_return#3 ← phi( main::toSpritePtr1_@return/(byte) main::toSpritePtr1_return#1 ) (byte~) main::$3 ← (byte) main::toSpritePtr1_return#3 *((const nomodify byte*) SPRITES_PTR + (number) 0) ← (byte~) main::$3 - *((const nomodify byte*) SPRITES_COLS + (number) 0) ← (const nomodify byte) GREEN + *((const nomodify byte*) SPRITES_COLOR + (number) 0) ← (const nomodify byte) GREEN *((const nomodify byte*) SPRITES_XPOS + (number) 0) ← (number) $15 *((const nomodify byte*) SPRITES_YPOS + (number) 0) ← (number) $33 to:main::@return @@ -274,7 +274,7 @@ SYMBOL TABLE SSA .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }} -(const nomodify byte*) SPRITES_COLS = (byte*)(number) $d027 +(const nomodify byte*) SPRITES_COLOR = (byte*)(number) $d027 (const nomodify byte*) SPRITES_PTR = (const nomodify byte*) SCREEN+(const nomodify word) SPRITE_PTRS (const nomodify byte*) SPRITES_XPOS = (byte*)(number) $d000 (const nomodify byte*) SPRITES_YPOS = (byte*)(number) $d001 @@ -402,7 +402,7 @@ Adding number conversion cast (unumber) 1 in *((byte*)(const nomodify struct MOS Adding number conversion cast (unumber) $40 in (number~) main::toSpritePtr1_$0 ← (word~) main::toSpritePtr1_$1 / (number) $40 Adding number conversion cast (unumber) main::toSpritePtr1_$0 in (number~) main::toSpritePtr1_$0 ← (word~) main::toSpritePtr1_$1 / (unumber)(number) $40 Adding number conversion cast (unumber) 0 in *((const nomodify byte*) SPRITES_PTR + (number) 0) ← (byte~) main::$3 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) SPRITES_COLS + (number) 0) ← (const nomodify byte) GREEN +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) SPRITES_COLOR + (number) 0) ← (const nomodify byte) GREEN Adding number conversion cast (unumber) $15 in *((const nomodify byte*) SPRITES_XPOS + (number) 0) ← (number) $15 Adding number conversion cast (unumber) 0 in *((const nomodify byte*) SPRITES_XPOS + (number) 0) ← ((unumber)) (number) $15 Adding number conversion cast (unumber) $33 in *((const nomodify byte*) SPRITES_YPOS + (number) 0) ← (number) $33 @@ -503,7 +503,7 @@ Successful SSA optimization Pass2ConstantValues Simplifying constant evaluating to zero (byte)(const bool) load::verify#0 in [58] *((const byte*) load::loadOrVerify) ← (byte)(const bool) load::verify#0 Successful SSA optimization PassNSimplifyConstantZero Simplifying expression containing zero SPRITES_PTR in [21] *((const nomodify byte*) SPRITES_PTR + (byte) 0) ← (byte) main::toSpritePtr1_return#0 -Simplifying expression containing zero SPRITES_COLS in [22] *((const nomodify byte*) SPRITES_COLS + (byte) 0) ← (const nomodify byte) GREEN +Simplifying expression containing zero SPRITES_COLOR in [22] *((const nomodify byte*) SPRITES_COLOR + (byte) 0) ← (const nomodify byte) GREEN Simplifying expression containing zero SPRITES_XPOS in [23] *((const nomodify byte*) SPRITES_XPOS + (byte) 0) ← (byte) $15 Simplifying expression containing zero SPRITES_YPOS in [24] *((const nomodify byte*) SPRITES_YPOS + (byte) 0) ← (byte) $33 Successful SSA optimization PassNSimplifyExpressionWithZero @@ -601,7 +601,7 @@ main::toSpritePtr1: scope:[main] from main::@1 to:main::@3 main::@3: scope:[main] from main::toSpritePtr1 [14] *((const nomodify byte*) SPRITES_PTR) ← (const byte) main::toSpritePtr1_return#0 - [15] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) GREEN + [15] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) GREEN [16] *((const nomodify byte*) SPRITES_XPOS) ← (byte) $15 [17] *((const nomodify byte*) SPRITES_YPOS) ← (byte) $33 to:main::@return @@ -876,7 +876,7 @@ Target platform is custom / MOS6502X .const OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR = $20 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 // The VIC-II MOS 6567/6569 .label VICII = $d000 // Address to load to @@ -950,9 +950,9 @@ main: { // [14] *((const nomodify byte*) SPRITES_PTR) ← (const byte) main::toSpritePtr1_return#0 -- _deref_pbuc1=vbuc2 lda #toSpritePtr1_return sta SPRITES_PTR - // [15] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // [15] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta SPRITES_COLS + sta SPRITES_COLOR // [16] *((const nomodify byte*) SPRITES_XPOS) ← (byte) $15 -- _deref_pbuc1=vbuc2 lda #$15 sta SPRITES_XPOS @@ -1190,7 +1190,7 @@ Statement [9] *((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) Removing always clobbered register reg byte a as potential for zp[1]:7 [ main::status#0 ] Statement [12] *((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) OFFSET_STRUCT_MOS6569_VICII_SPRITES_ENABLE) ← (byte) 1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [14] *((const nomodify byte*) SPRITES_PTR) ← (const byte) main::toSpritePtr1_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [15] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) GREEN [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [15] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) GREEN [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [16] *((const nomodify byte*) SPRITES_XPOS) ← (byte) $15 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [17] *((const nomodify byte*) SPRITES_YPOS) ← (byte) $33 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement asm { ldxerrCode jsr$a437 } always clobbers reg byte a reg byte x reg byte y @@ -1208,7 +1208,7 @@ Statement [49] if((byte) 0!=*((byte*) strlen::str#2)) goto strlen::@2 [ strlen:: Statement [9] *((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR) ← (byte) 2 [ main::status#0 ] ( main:2 [ main::status#0 ] { { error::err#0 = main::status#0 } } ) always clobbers reg byte a Statement [12] *((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) OFFSET_STRUCT_MOS6569_VICII_SPRITES_ENABLE) ← (byte) 1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [14] *((const nomodify byte*) SPRITES_PTR) ← (const byte) main::toSpritePtr1_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [15] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) GREEN [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [15] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) GREEN [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [16] *((const nomodify byte*) SPRITES_XPOS) ← (byte) $15 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [17] *((const nomodify byte*) SPRITES_YPOS) ← (byte) $33 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement asm { ldxerrCode jsr$a437 } always clobbers reg byte a reg byte x reg byte y @@ -1289,7 +1289,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR = $20 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 // The VIC-II MOS 6567/6569 .label VICII = $d000 // Address to load to @@ -1357,9 +1357,9 @@ main: { // [14] *((const nomodify byte*) SPRITES_PTR) ← (const byte) main::toSpritePtr1_return#0 -- _deref_pbuc1=vbuc2 lda #toSpritePtr1_return sta SPRITES_PTR - // [15] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // [15] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta SPRITES_COLS + sta SPRITES_COLOR // [16] *((const nomodify byte*) SPRITES_XPOS) ← (byte) $15 -- _deref_pbuc1=vbuc2 lda #$15 sta SPRITES_XPOS @@ -1731,7 +1731,7 @@ FINAL SYMBOL TABLE .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }} -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_PTR = (const nomodify byte*) SCREEN+(const nomodify word) SPRITE_PTRS (const nomodify byte*) SPRITES_XPOS = (byte*) 53248 (const nomodify byte*) SPRITES_YPOS = (byte*) 53249 @@ -1841,7 +1841,7 @@ Score: 811 .const OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR = $20 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 // The VIC-II MOS 6567/6569 .label VICII = $d000 // Address to load to @@ -1898,10 +1898,10 @@ main: { // [14] *((const nomodify byte*) SPRITES_PTR) ← (const byte) main::toSpritePtr1_return#0 -- _deref_pbuc1=vbuc2 lda #toSpritePtr1_return sta SPRITES_PTR - // SPRITES_COLS[0] = GREEN - // [15] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // SPRITES_COLOR[0] = GREEN + // [15] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta SPRITES_COLS + sta SPRITES_COLOR // SPRITES_XPOS[0] = 0x15 // [16] *((const nomodify byte*) SPRITES_XPOS) ← (byte) $15 -- _deref_pbuc1=vbuc2 lda #$15 diff --git a/src/test/ref/examples/kernalload/kernalload.sym b/src/test/ref/examples/kernalload/kernalload.sym index 028af44f5..9ac4a97d9 100644 --- a/src/test/ref/examples/kernalload/kernalload.sym +++ b/src/test/ref/examples/kernalload/kernalload.sym @@ -95,7 +95,7 @@ .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }} -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_PTR = (const nomodify byte*) SCREEN+(const nomodify word) SPRITE_PTRS (const nomodify byte*) SPRITES_XPOS = (byte*) 53248 (const nomodify byte*) SPRITES_YPOS = (byte*) 53249 diff --git a/src/test/ref/examples/linking/linking.asm b/src/test/ref/examples/linking/linking.asm index 8efeb20f4..69167e16c 100644 --- a/src/test/ref/examples/linking/linking.asm +++ b/src/test/ref/examples/linking/linking.asm @@ -15,7 +15,7 @@ .segment Code - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label SCREEN = $400 __bbegin: .segment Code @@ -30,12 +30,12 @@ main: { cpx #0 bne __b1 __b2: - // fillscreen(*BGCOL) - lda BGCOL + // fillscreen(*BG_COLOR) + lda BG_COLOR sta.z fillscreen.c jsr fillscreen - // (*BGCOL)++; - inc BGCOL + // (*BG_COLOR)++; + inc BG_COLOR jmp __b2 } .segment CodeHigh diff --git a/src/test/ref/examples/linking/linking.cfg b/src/test/ref/examples/linking/linking.cfg index 12f41f21c..73d8686d5 100644 --- a/src/test/ref/examples/linking/linking.cfg +++ b/src/test/ref/examples/linking/linking.cfg @@ -19,11 +19,11 @@ main::@1: scope:[main] from main main::@1 [8] if((byte) main::i#1!=(byte) 0) goto main::@1 to:main::@2 main::@2: scope:[main] from main::@1 main::@3 - [9] (byte) fillscreen::c#0 ← *((const byte*) BGCOL) + [9] (byte) fillscreen::c#0 ← *((const byte*) BG_COLOR) [10] call fillscreen to:main::@3 main::@3: scope:[main] from main::@2 - [11] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) + [11] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) to:main::@2 (void()) fillscreen((byte) fillscreen::c) diff --git a/src/test/ref/examples/linking/linking.log b/src/test/ref/examples/linking/linking.log index 93f328dc1..5b321fcd2 100644 --- a/src/test/ref/examples/linking/linking.log +++ b/src/test/ref/examples/linking/linking.log @@ -21,11 +21,11 @@ main::@2: scope:[main] from main::@1 main::@4 if(true) goto main::@3 to:main::@return main::@3: scope:[main] from main::@2 - (byte) fillscreen::c#0 ← *((const byte*) BGCOL) + (byte) fillscreen::c#0 ← *((const byte*) BG_COLOR) call fillscreen to:main::@4 main::@4: scope:[main] from main::@3 - *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) + *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) to:main::@2 main::@return: scope:[main] from main::@2 return @@ -69,7 +69,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const byte*) BGCOL = (byte*)(number) $d021 +(const byte*) BG_COLOR = (byte*)(number) $d021 (const byte*) SCREEN = (byte*)(number) $400 (const byte*) base[(number) $100] = { fill( $100, 0) } (void()) fillscreen((byte) fillscreen::c) @@ -201,11 +201,11 @@ main::@1: scope:[main] from main main::@1 [8] if((byte) main::i#1!=(byte) 0) goto main::@1 to:main::@2 main::@2: scope:[main] from main::@1 main::@3 - [9] (byte) fillscreen::c#0 ← *((const byte*) BGCOL) + [9] (byte) fillscreen::c#0 ← *((const byte*) BG_COLOR) [10] call fillscreen to:main::@3 main::@3: scope:[main] from main::@2 - [11] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) + [11] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) to:main::@2 (void()) fillscreen((byte) fillscreen::c) @@ -284,7 +284,7 @@ Target platform is custom / MOS6502X // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label SCREEN = $400 // @begin __bbegin: @@ -331,8 +331,8 @@ main: { jmp __b2 // main::@2 __b2: - // [9] (byte) fillscreen::c#0 ← *((const byte*) BGCOL) -- vbuz1=_deref_pbuc1 - lda BGCOL + // [9] (byte) fillscreen::c#0 ← *((const byte*) BG_COLOR) -- vbuz1=_deref_pbuc1 + lda BG_COLOR sta.z fillscreen.c // [10] call fillscreen // [12] phi from main::@2 to fillscreen [phi:main::@2->fillscreen] @@ -341,8 +341,8 @@ main: { jmp __b3 // main::@3 __b3: - // [11] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [11] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __b2 } .segment CodeHigh @@ -460,7 +460,7 @@ ASSEMBLER BEFORE OPTIMIZATION // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label SCREEN = $400 // @begin __bbegin: @@ -503,8 +503,8 @@ main: { jmp __b2 // main::@2 __b2: - // [9] (byte) fillscreen::c#0 ← *((const byte*) BGCOL) -- vbuz1=_deref_pbuc1 - lda BGCOL + // [9] (byte) fillscreen::c#0 ← *((const byte*) BG_COLOR) -- vbuz1=_deref_pbuc1 + lda BG_COLOR sta.z fillscreen.c // [10] call fillscreen // [12] phi from main::@2 to fillscreen [phi:main::@2->fillscreen] @@ -513,8 +513,8 @@ main: { jmp __b3 // main::@3 __b3: - // [11] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [11] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __b2 } .segment CodeHigh @@ -608,7 +608,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const byte*) BGCOL = (byte*) 53281 +(const byte*) BG_COLOR = (byte*) 53281 (const byte*) SCREEN = (byte*) 1024 (const byte*) base[(number) $100] = { fill( $100, 0) } (void()) fillscreen((byte) fillscreen::c) @@ -662,7 +662,7 @@ Score: 6777 // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label SCREEN = $400 // @begin __bbegin: @@ -694,17 +694,17 @@ main: { bne __b1 // main::@2 __b2: - // fillscreen(*BGCOL) - // [9] (byte) fillscreen::c#0 ← *((const byte*) BGCOL) -- vbuz1=_deref_pbuc1 - lda BGCOL + // fillscreen(*BG_COLOR) + // [9] (byte) fillscreen::c#0 ← *((const byte*) BG_COLOR) -- vbuz1=_deref_pbuc1 + lda BG_COLOR sta.z fillscreen.c // [10] call fillscreen // [12] phi from main::@2 to fillscreen [phi:main::@2->fillscreen] jsr fillscreen // main::@3 - // (*BGCOL)++; - // [11] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // (*BG_COLOR)++; + // [11] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __b2 } .segment CodeHigh diff --git a/src/test/ref/examples/linking/linking.sym b/src/test/ref/examples/linking/linking.sym index a12998dee..a298c5d68 100644 --- a/src/test/ref/examples/linking/linking.sym +++ b/src/test/ref/examples/linking/linking.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const byte*) BGCOL = (byte*) 53281 +(const byte*) BG_COLOR = (byte*) 53281 (const byte*) SCREEN = (byte*) 1024 (const byte*) base[(number) $100] = { fill( $100, 0) } (void()) fillscreen((byte) fillscreen::c) diff --git a/src/test/ref/examples/multiplexer/simple-multiplexer.asm b/src/test/ref/examples/multiplexer/simple-multiplexer.asm index b0d852681..95b146683 100644 --- a/src/test/ref/examples/multiplexer/simple-multiplexer.asm +++ b/src/test/ref/examples/multiplexer/simple-multiplexer.asm @@ -16,7 +16,7 @@ .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label D011 = $d011 // The VIC-II MOS 6567/6569 .label VICII = $d000 @@ -340,9 +340,9 @@ init: { sta VICII+OFFSET_STRUCT_MOS6569_VICII_SPRITES_ENABLE ldx #0 __b3: - // SPRITES_COLS[ss] = GREEN + // SPRITES_COLOR[ss] = GREEN lda #GREEN - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // for(char ss: 0..7) inx cpx #8 diff --git a/src/test/ref/examples/multiplexer/simple-multiplexer.cfg b/src/test/ref/examples/multiplexer/simple-multiplexer.cfg index 211659809..152c5c9bd 100644 --- a/src/test/ref/examples/multiplexer/simple-multiplexer.cfg +++ b/src/test/ref/examples/multiplexer/simple-multiplexer.cfg @@ -207,7 +207,7 @@ init::@2: scope:[init] from init::@1 to:init::@3 init::@3: scope:[init] from init::@2 init::@3 [100] (byte) init::ss#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::ss#1 ) - [101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN + [101] *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN [102] (byte) init::ss#1 ← ++ (byte) init::ss#2 [103] if((byte) init::ss#1!=(byte) 8) goto init::@3 to:init::@return diff --git a/src/test/ref/examples/multiplexer/simple-multiplexer.log b/src/test/ref/examples/multiplexer/simple-multiplexer.log index 3930c2c3d..f4a9e4936 100644 --- a/src/test/ref/examples/multiplexer/simple-multiplexer.log +++ b/src/test/ref/examples/multiplexer/simple-multiplexer.log @@ -231,7 +231,7 @@ init::@2: scope:[init] from init::@1 init::@3: scope:[init] from init::@2 init::@3 (byte*) PLEX_SCREEN_PTR#20 ← phi( init::@2/(byte*) PLEX_SCREEN_PTR#24 init::@3/(byte*) PLEX_SCREEN_PTR#20 ) (byte) init::ss#2 ← phi( init::@2/(byte) init::ss#0 init::@3/(byte) init::ss#1 ) - *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN + *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN (byte) init::ss#1 ← (byte) init::ss#2 + rangenext(0,7) (bool~) init::$3 ← (byte) init::ss#1 != rangelast(0,7) if((bool~) init::$3) goto init::@3 @@ -521,7 +521,7 @@ SYMBOL TABLE SSA (const byte*) SCREEN = (byte*)(number) $400 (const byte) SIZEOF_WORD = (byte) 2 (const byte*) SPRITE = (byte*)(number) $2000 -(const nomodify byte*) SPRITES_COLS = (byte*)(number) $d027 +(const nomodify byte*) SPRITES_COLOR = (byte*)(number) $d027 (const nomodify byte*) SPRITES_XMSB = (byte*)(number) $d010 (const nomodify byte*) SPRITES_XPOS = (byte*)(number) $d000 (const nomodify byte*) SPRITES_YPOS = (byte*)(number) $d001 @@ -1374,7 +1374,7 @@ init::@2: scope:[init] from init::@1 to:init::@3 init::@3: scope:[init] from init::@2 init::@3 [100] (byte) init::ss#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::ss#1 ) - [101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN + [101] *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN [102] (byte) init::ss#1 ← ++ (byte) init::ss#2 [103] if((byte) init::ss#1!=(byte) 8) goto init::@3 to:init::@return @@ -1685,7 +1685,7 @@ Target platform is c64basic / MOS6502X .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label D011 = $d011 // The VIC-II MOS 6567/6569 .label VICII = $d000 @@ -2270,10 +2270,10 @@ init: { jmp __b3 // init::@3 __b3: - // [101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuz1=vbuc2 + // [101] *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuz1=vbuc2 lda #GREEN ldy.z ss - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // [102] (byte) init::ss#1 ← ++ (byte) init::ss#2 -- vbuz1=_inc_vbuz1 inc.z ss // [103] if((byte) init::ss#1!=(byte) 8) goto init::@3 -- vbuz1_neq_vbuc1_then_la1 @@ -2409,7 +2409,7 @@ Statement [94] (byte~) init::$4 ← (byte) init::sx#2 << (byte) 1 [ init::sx#2 i Statement [95] *((const word*) PLEX_XPOS + (byte~) init::$4) ← (word) init::xp#2 [ init::sx#2 init::xp#2 ] ( main:7::init:10 [ init::sx#2 init::xp#2 ] { } ) always clobbers reg byte a Statement [96] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 [ init::sx#2 init::xp#1 ] ( main:7::init:10 [ init::sx#2 init::xp#1 ] { } ) always clobbers reg byte a Statement [99] *((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) OFFSET_STRUCT_MOS6569_VICII_SPRITES_ENABLE) ← (byte) $ff [ ] ( main:7::init:10 [ ] { } ) always clobbers reg byte a -Statement [101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:7::init:10 [ init::ss#2 ] { } ) always clobbers reg byte a +Statement [101] *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:7::init:10 [ init::ss#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:12 [ init::ss#2 init::ss#1 ] Statement [1] (volatile byte) plex_show_idx ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [2] (volatile byte) plex_sprite_idx ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a @@ -2455,7 +2455,7 @@ Statement [94] (byte~) init::$4 ← (byte) init::sx#2 << (byte) 1 [ init::sx#2 i Statement [95] *((const word*) PLEX_XPOS + (byte~) init::$4) ← (word) init::xp#2 [ init::sx#2 init::xp#2 ] ( main:7::init:10 [ init::sx#2 init::xp#2 ] { } ) always clobbers reg byte a Statement [96] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 [ init::sx#2 init::xp#1 ] ( main:7::init:10 [ init::sx#2 init::xp#1 ] { } ) always clobbers reg byte a Statement [99] *((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) OFFSET_STRUCT_MOS6569_VICII_SPRITES_ENABLE) ← (byte) $ff [ ] ( main:7::init:10 [ ] { } ) always clobbers reg byte a -Statement [101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:7::init:10 [ init::ss#2 ] { } ) always clobbers reg byte a +Statement [101] *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:7::init:10 [ init::ss#2 ] { } ) always clobbers reg byte a Statement [1] (volatile byte) plex_show_idx ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [2] (volatile byte) plex_sprite_idx ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [3] (volatile byte) plex_sprite_msb ← (byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a @@ -2499,7 +2499,7 @@ Statement [94] (byte~) init::$4 ← (byte) init::sx#2 << (byte) 1 [ init::sx#2 i Statement [95] *((const word*) PLEX_XPOS + (byte~) init::$4) ← (word) init::xp#2 [ init::sx#2 init::xp#2 ] ( main:7::init:10 [ init::sx#2 init::xp#2 ] { } ) always clobbers reg byte a Statement [96] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 [ init::sx#2 init::xp#1 ] ( main:7::init:10 [ init::sx#2 init::xp#1 ] { } ) always clobbers reg byte a Statement [99] *((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) OFFSET_STRUCT_MOS6569_VICII_SPRITES_ENABLE) ← (byte) $ff [ ] ( main:7::init:10 [ ] { } ) always clobbers reg byte a -Statement [101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:7::init:10 [ init::ss#2 ] { } ) always clobbers reg byte a +Statement [101] *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:7::init:10 [ init::ss#2 ] { } ) always clobbers reg byte a Potential registers zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] : zp[1]:2 , Potential registers zp[1]:3 [ loop::y_idx#2 loop::y_idx#3 loop::y_idx#1 ] : zp[1]:3 , reg byte x , reg byte y , Potential registers zp[1]:4 [ loop::sy#2 loop::sy#1 ] : zp[1]:4 , reg byte x , reg byte y , @@ -2642,7 +2642,7 @@ ASSEMBLER BEFORE OPTIMIZATION .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label D011 = $d011 // The VIC-II MOS 6567/6569 .label VICII = $d000 @@ -3164,9 +3164,9 @@ init: { jmp __b3 // init::@3 __b3: - // [101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 + // [101] *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 lda #GREEN - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // [102] (byte) init::ss#1 ← ++ (byte) init::ss#2 -- vbuxx=_inc_vbuxx inx // [103] if((byte) init::ss#1!=(byte) 8) goto init::@3 -- vbuxx_neq_vbuc1_then_la1 @@ -3475,7 +3475,7 @@ FINAL SYMBOL TABLE (const byte*) PLEX_YPOS[(const nomodify byte) PLEX_COUNT] = { fill( PLEX_COUNT, 0) } (const byte*) SCREEN = (byte*) 1024 (const byte*) SPRITE = (byte*) 8192 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_XMSB = (byte*) 53264 (const nomodify byte*) SPRITES_XPOS = (byte*) 53248 (const nomodify byte*) SPRITES_YPOS = (byte*) 53249 @@ -3660,7 +3660,7 @@ Score: 60648 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label D011 = $d011 // The VIC-II MOS 6567/6569 .label VICII = $d000 @@ -4158,10 +4158,10 @@ init: { // [100] phi (byte) init::ss#2 = (byte) init::ss#1 [phi:init::@3->init::@3#0] -- register_copy // init::@3 __b3: - // SPRITES_COLS[ss] = GREEN - // [101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 + // SPRITES_COLOR[ss] = GREEN + // [101] *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 lda #GREEN - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // for(char ss: 0..7) // [102] (byte) init::ss#1 ← ++ (byte) init::ss#2 -- vbuxx=_inc_vbuxx inx diff --git a/src/test/ref/examples/multiplexer/simple-multiplexer.sym b/src/test/ref/examples/multiplexer/simple-multiplexer.sym index 1b1449dde..bac4d1487 100644 --- a/src/test/ref/examples/multiplexer/simple-multiplexer.sym +++ b/src/test/ref/examples/multiplexer/simple-multiplexer.sym @@ -104,7 +104,7 @@ (const byte*) PLEX_YPOS[(const nomodify byte) PLEX_COUNT] = { fill( PLEX_COUNT, 0) } (const byte*) SCREEN = (byte*) 1024 (const byte*) SPRITE = (byte*) 8192 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_XMSB = (byte*) 53264 (const nomodify byte*) SPRITES_XPOS = (byte*) 53248 (const nomodify byte*) SPRITES_YPOS = (byte*) 53249 diff --git a/src/test/ref/examples/rotate/rotate.asm b/src/test/ref/examples/rotate/rotate.asm index cc38ea2eb..34a020e9e 100644 --- a/src/test/ref/examples/rotate/rotate.asm +++ b/src/test/ref/examples/rotate/rotate.asm @@ -19,7 +19,7 @@ .const OFFSET_STRUCT_MOS6569_VICII_SPRITES_XMSB = $10 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 // The VIC-II MOS 6567/6569 .label VICII = $d000 // The CIA#2: Serial bus, RS-232, VIC memory bank @@ -461,9 +461,9 @@ init: { // sprites_ptr[i] = (char)(SPRITE/$40) lda #SPRITE/$40 sta sprites_ptr,x - // SPRITES_COLS[i] = GREEN + // SPRITES_COLOR[i] = GREEN lda #GREEN - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // for(char i: 0..7) inx cpx #8 diff --git a/src/test/ref/examples/rotate/rotate.cfg b/src/test/ref/examples/rotate/rotate.cfg index 91daaceec..53258f1f0 100644 --- a/src/test/ref/examples/rotate/rotate.cfg +++ b/src/test/ref/examples/rotate/rotate.cfg @@ -260,7 +260,7 @@ init::@2: scope:[init] from init init::@1: scope:[init] from init::@1 init::@2 [124] (byte) init::i#2 ← phi( init::@1/(byte) init::i#1 init::@2/(byte) 0 ) [125] *((const byte*) init::sprites_ptr#0 + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 - [126] *((const nomodify byte*) SPRITES_COLS + (byte) init::i#2) ← (const nomodify byte) GREEN + [126] *((const nomodify byte*) SPRITES_COLOR + (byte) init::i#2) ← (const nomodify byte) GREEN [127] (byte) init::i#1 ← ++ (byte) init::i#2 [128] if((byte) init::i#1!=(byte) 8) goto init::@1 to:init::@return diff --git a/src/test/ref/examples/rotate/rotate.log b/src/test/ref/examples/rotate/rotate.log index c91c17a74..a9947ba63 100644 --- a/src/test/ref/examples/rotate/rotate.log +++ b/src/test/ref/examples/rotate/rotate.log @@ -317,7 +317,7 @@ init::@1: scope:[init] from init::@1 init::@2 (byte*) init::sprites_ptr#1 ← phi( init::@1/(byte*) init::sprites_ptr#1 init::@2/(byte*) init::sprites_ptr#0 ) (byte*~) init::$2 ← (const byte*) SPRITE / (number) $40 *((byte*) init::sprites_ptr#1 + (byte) init::i#2) ← (byte)(byte*~) init::$2 - *((const nomodify byte*) SPRITES_COLS + (byte) init::i#2) ← (const nomodify byte) GREEN + *((const nomodify byte*) SPRITES_COLOR + (byte) init::i#2) ← (const nomodify byte) GREEN (byte) init::i#1 ← (byte) init::i#2 + rangenext(0,7) (bool~) init::$3 ← (byte) init::i#1 != rangelast(0,7) if((bool~) init::$3) goto init::@1 @@ -688,7 +688,7 @@ SYMBOL TABLE SSA .byte >round($7fff*sin(i*2*PI/256)) }} (const byte*) SPRITE = (byte*)(number) $3000 -(const nomodify byte*) SPRITES_COLS = (byte*)(number) $d027 +(const nomodify byte*) SPRITES_COLOR = (byte*)(number) $d027 (const nomodify byte*) SPRITES_XPOS = (byte*)(number) $d000 (const nomodify byte*) SPRITES_YPOS = (byte*)(number) $d001 (const nomodify struct MOS6569_VICII*) VICII = (struct MOS6569_VICII*)(number) $d000 @@ -1896,7 +1896,7 @@ init::@2: scope:[init] from init init::@1: scope:[init] from init::@1 init::@2 [124] (byte) init::i#2 ← phi( init::@1/(byte) init::i#1 init::@2/(byte) 0 ) [125] *((const byte*) init::sprites_ptr#0 + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 - [126] *((const nomodify byte*) SPRITES_COLS + (byte) init::i#2) ← (const nomodify byte) GREEN + [126] *((const nomodify byte*) SPRITES_COLOR + (byte) init::i#2) ← (const nomodify byte) GREEN [127] (byte) init::i#1 ← ++ (byte) init::i#2 [128] if((byte) init::i#1!=(byte) 8) goto init::@1 to:init::@return @@ -2405,7 +2405,7 @@ Target platform is c64basic / MOS6502X .const OFFSET_STRUCT_MOS6569_VICII_SPRITES_XMSB = $10 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 // The VIC-II MOS 6567/6569 .label VICII = $d000 // The CIA#2: Serial bus, RS-232, VIC memory bank @@ -3202,10 +3202,10 @@ init: { lda #SPRITE/$40 ldy.z i sta sprites_ptr,y - // [126] *((const nomodify byte*) SPRITES_COLS + (byte) init::i#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuz1=vbuc2 + // [126] *((const nomodify byte*) SPRITES_COLOR + (byte) init::i#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuz1=vbuc2 lda #GREEN ldy.z i - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // [127] (byte) init::i#1 ← ++ (byte) init::i#2 -- vbuz1=_inc_vbuz1 inc.z i // [128] if((byte) init::i#1!=(byte) 8) goto init::@1 -- vbuz1_neq_vbuc1_then_la1 @@ -3542,7 +3542,7 @@ Statement [119] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) Statement [123] *((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) OFFSET_STRUCT_MOS6569_VICII_SPRITES_ENABLE) ← (byte) $ff [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a Statement [125] *((const byte*) init::sprites_ptr#0 + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 [ init::i#2 ] ( main:2::init:5 [ init::i#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:19 [ init::i#2 init::i#1 ] -Statement [126] *((const nomodify byte*) SPRITES_COLS + (byte) init::i#2) ← (const nomodify byte) GREEN [ init::i#2 ] ( main:2::init:5 [ init::i#2 ] { } ) always clobbers reg byte a +Statement [126] *((const nomodify byte*) SPRITES_COLOR + (byte) init::i#2) ← (const nomodify byte) GREEN [ init::i#2 ] ( main:2::init:5 [ init::i#2 ] { } ) always clobbers reg byte a Statement [132] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:2::init:5::mulf_init:122 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:22 [ mulf_init::c#2 mulf_init::c#1 ] Removing always clobbered register reg byte a as potential for zp[1]:25 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] @@ -3615,7 +3615,7 @@ Statement [118] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) Statement [119] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) ← (const nomodify byte) CIA_TIMER_CONTROL_START [ ] ( main:2::anim:7::clock_start:13 [ anim::angle#9 ] { } ) always clobbers reg byte a Statement [123] *((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) OFFSET_STRUCT_MOS6569_VICII_SPRITES_ENABLE) ← (byte) $ff [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a Statement [125] *((const byte*) init::sprites_ptr#0 + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 [ init::i#2 ] ( main:2::init:5 [ init::i#2 ] { } ) always clobbers reg byte a -Statement [126] *((const nomodify byte*) SPRITES_COLS + (byte) init::i#2) ← (const nomodify byte) GREEN [ init::i#2 ] ( main:2::init:5 [ init::i#2 ] { } ) always clobbers reg byte a +Statement [126] *((const nomodify byte*) SPRITES_COLOR + (byte) init::i#2) ← (const nomodify byte) GREEN [ init::i#2 ] ( main:2::init:5 [ init::i#2 ] { } ) always clobbers reg byte a Statement [132] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:2::init:5::mulf_init:122 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] { } ) always clobbers reg byte a Statement [134] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::init:5::mulf_init:122 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a Statement [135] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) [ ] ( main:2::init:5::mulf_init:122 [ ] { } ) always clobbers reg byte a @@ -3678,7 +3678,7 @@ Statement [118] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) Statement [119] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) ← (const nomodify byte) CIA_TIMER_CONTROL_START [ ] ( main:2::anim:7::clock_start:13 [ anim::angle#9 ] { } ) always clobbers reg byte a Statement [123] *((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) OFFSET_STRUCT_MOS6569_VICII_SPRITES_ENABLE) ← (byte) $ff [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a Statement [125] *((const byte*) init::sprites_ptr#0 + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 [ init::i#2 ] ( main:2::init:5 [ init::i#2 ] { } ) always clobbers reg byte a -Statement [126] *((const nomodify byte*) SPRITES_COLS + (byte) init::i#2) ← (const nomodify byte) GREEN [ init::i#2 ] ( main:2::init:5 [ init::i#2 ] { } ) always clobbers reg byte a +Statement [126] *((const nomodify byte*) SPRITES_COLOR + (byte) init::i#2) ← (const nomodify byte) GREEN [ init::i#2 ] ( main:2::init:5 [ init::i#2 ] { } ) always clobbers reg byte a Statement [132] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:2::init:5::mulf_init:122 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] { } ) always clobbers reg byte a Statement [134] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::init:5::mulf_init:122 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a Statement [135] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) [ ] ( main:2::init:5::mulf_init:122 [ ] { } ) always clobbers reg byte a @@ -3878,7 +3878,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const OFFSET_STRUCT_MOS6569_VICII_SPRITES_XMSB = $10 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 // The VIC-II MOS 6567/6569 .label VICII = $d000 // The CIA#2: Serial bus, RS-232, VIC memory bank @@ -4562,9 +4562,9 @@ init: { // [125] *((const byte*) init::sprites_ptr#0 + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuxx=vbuc2 lda #SPRITE/$40 sta sprites_ptr,x - // [126] *((const nomodify byte*) SPRITES_COLS + (byte) init::i#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 + // [126] *((const nomodify byte*) SPRITES_COLOR + (byte) init::i#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 lda #GREEN - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // [127] (byte) init::i#1 ← ++ (byte) init::i#2 -- vbuxx=_inc_vbuxx inx // [128] if((byte) init::i#1!=(byte) 8) goto init::@1 -- vbuxx_neq_vbuc1_then_la1 @@ -5086,7 +5086,7 @@ FINAL SYMBOL TABLE .byte >round($7fff*sin(i*2*PI/256)) }} (const byte*) SPRITE = (byte*) 12288 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_XPOS = (byte*) 53248 (const nomodify byte*) SPRITES_YPOS = (byte*) 53249 (const nomodify struct MOS6569_VICII*) VICII = (struct MOS6569_VICII*) 53248 @@ -5365,7 +5365,7 @@ Score: 30994 .const OFFSET_STRUCT_MOS6569_VICII_SPRITES_XMSB = $10 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 // The VIC-II MOS 6567/6569 .label VICII = $d000 // The CIA#2: Serial bus, RS-232, VIC memory bank @@ -6025,10 +6025,10 @@ init: { // [125] *((const byte*) init::sprites_ptr#0 + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuxx=vbuc2 lda #SPRITE/$40 sta sprites_ptr,x - // SPRITES_COLS[i] = GREEN - // [126] *((const nomodify byte*) SPRITES_COLS + (byte) init::i#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 + // SPRITES_COLOR[i] = GREEN + // [126] *((const nomodify byte*) SPRITES_COLOR + (byte) init::i#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 lda #GREEN - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // for(char i: 0..7) // [127] (byte) init::i#1 ← ++ (byte) init::i#2 -- vbuxx=_inc_vbuxx inx diff --git a/src/test/ref/examples/rotate/rotate.sym b/src/test/ref/examples/rotate/rotate.sym index 81b6e4339..2778e31a9 100644 --- a/src/test/ref/examples/rotate/rotate.sym +++ b/src/test/ref/examples/rotate/rotate.sym @@ -108,7 +108,7 @@ .byte >round($7fff*sin(i*2*PI/256)) }} (const byte*) SPRITE = (byte*) 12288 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_XPOS = (byte*) 53248 (const nomodify byte*) SPRITES_YPOS = (byte*) 53249 (const nomodify struct MOS6569_VICII*) VICII = (struct MOS6569_VICII*) 53248 diff --git a/src/test/ref/examples/sinsprites/sinus-sprites.asm b/src/test/ref/examples/sinsprites/sinus-sprites.asm index 5696d40ac..1cecfc5ee 100644 --- a/src/test/ref/examples/sinsprites/sinus-sprites.asm +++ b/src/test/ref/examples/sinsprites/sinus-sprites.asm @@ -11,7 +11,7 @@ .const OFFSET_STRUCT_MOS6569_VICII_SPRITES_EXPAND_Y = $17 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 // Processor Port Register controlling RAM/ROM configuration and the datasette .label PROCPORT = 1 // The address of the CHARGEN character set @@ -779,10 +779,10 @@ place_sprites: { // SPRITES_YPOS[j2] = 80 lda #$50 sta SPRITES_YPOS,y - // SPRITES_COLS[j] = col + // SPRITES_COLOR[j] = col lda.z col ldy.z j - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // spr_x = spr_x + 32 lax.z spr_x axs #-[$20] diff --git a/src/test/ref/examples/sinsprites/sinus-sprites.cfg b/src/test/ref/examples/sinsprites/sinus-sprites.cfg index c8e62c4d5..b00849158 100644 --- a/src/test/ref/examples/sinsprites/sinus-sprites.cfg +++ b/src/test/ref/examples/sinsprites/sinus-sprites.cfg @@ -497,7 +497,7 @@ place_sprites::@1: scope:[place_sprites] from place_sprites place_sprites::@1 [218] (byte) place_sprites::spr_id#1 ← ++ (byte) place_sprites::spr_id#2 [219] *((const nomodify byte*) SPRITES_XPOS + (byte) place_sprites::j2#3) ← (byte) place_sprites::spr_x#2 [220] *((const nomodify byte*) SPRITES_YPOS + (byte) place_sprites::j2#3) ← (byte) $50 - [221] *((const nomodify byte*) SPRITES_COLS + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 + [221] *((const nomodify byte*) SPRITES_COLOR + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 [222] (byte) place_sprites::spr_x#1 ← (byte) place_sprites::spr_x#2 + (byte) $20 [223] (byte) place_sprites::col#1 ← (byte) place_sprites::col#2 ^ (byte)(number) 7^(number) 5 [224] (byte) place_sprites::j2#1 ← ++ (byte) place_sprites::j2#3 diff --git a/src/test/ref/examples/sinsprites/sinus-sprites.log b/src/test/ref/examples/sinsprites/sinus-sprites.log index f4b3d40b3..5b9e07318 100644 --- a/src/test/ref/examples/sinsprites/sinus-sprites.log +++ b/src/test/ref/examples/sinsprites/sinus-sprites.log @@ -497,7 +497,7 @@ place_sprites::@1: scope:[place_sprites] from place_sprites place_sprites::@1 (byte) place_sprites::spr_id#1 ← ++ (byte) place_sprites::spr_id#2 *((const nomodify byte*) SPRITES_XPOS + (byte) place_sprites::j2#3) ← (byte) place_sprites::spr_x#2 *((const nomodify byte*) SPRITES_YPOS + (byte) place_sprites::j2#3) ← (number) $50 - *((const nomodify byte*) SPRITES_COLS + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 + *((const nomodify byte*) SPRITES_COLOR + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 (number~) place_sprites::$0 ← (byte) place_sprites::spr_x#2 + (number) $20 (byte) place_sprites::spr_x#1 ← (number~) place_sprites::$0 (number~) place_sprites::$1 ← (byte) place_sprites::col#2 ^ (number) 7^(number) 5 @@ -1012,7 +1012,7 @@ SYMBOL TABLE SSA (const byte) RADIX::HEXADECIMAL = (number) $10 (const byte) RADIX::OCTAL = (number) 8 (const nomodify byte*) SCREEN = (byte*)(number) $400 -(const nomodify byte*) SPRITES_COLS = (byte*)(number) $d027 +(const nomodify byte*) SPRITES_COLOR = (byte*)(number) $d027 (const nomodify byte*) SPRITES_XPOS = (byte*)(number) $d000 (const nomodify byte*) SPRITES_YPOS = (byte*)(number) $d001 (const nomodify struct MOS6569_VICII*) VICII = (struct MOS6569_VICII*)(number) $d000 @@ -3041,7 +3041,7 @@ place_sprites::@1: scope:[place_sprites] from place_sprites place_sprites::@1 [218] (byte) place_sprites::spr_id#1 ← ++ (byte) place_sprites::spr_id#2 [219] *((const nomodify byte*) SPRITES_XPOS + (byte) place_sprites::j2#3) ← (byte) place_sprites::spr_x#2 [220] *((const nomodify byte*) SPRITES_YPOS + (byte) place_sprites::j2#3) ← (byte) $50 - [221] *((const nomodify byte*) SPRITES_COLS + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 + [221] *((const nomodify byte*) SPRITES_COLOR + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 [222] (byte) place_sprites::spr_x#1 ← (byte) place_sprites::spr_x#2 + (byte) $20 [223] (byte) place_sprites::col#1 ← (byte) place_sprites::col#2 ^ (byte)(number) 7^(number) 5 [224] (byte) place_sprites::j2#1 ← ++ (byte) place_sprites::j2#3 @@ -3506,7 +3506,7 @@ Target platform is c64basic / MOS6502X .const OFFSET_STRUCT_MOS6569_VICII_SPRITES_EXPAND_Y = $17 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 // Processor Port Register controlling RAM/ROM configuration and the datasette .label PROCPORT = 1 // The address of the CHARGEN character set @@ -4929,10 +4929,10 @@ place_sprites: { lda #$50 ldy.z j2_1 sta SPRITES_YPOS,y - // [221] *((const nomodify byte*) SPRITES_COLS + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 -- pbuc1_derefidx_vbuz1=vbuz2 + // [221] *((const nomodify byte*) SPRITES_COLOR + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z col ldy.z j - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // [222] (byte) place_sprites::spr_x#1 ← (byte) place_sprites::spr_x#2 + (byte) $20 -- vbuz1=vbuz1_plus_vbuc1 lax.z spr_x axs #-[$20] @@ -5057,7 +5057,7 @@ Removing always clobbered register reg byte a as potential for zp[1]:47 [ place_ Removing always clobbered register reg byte a as potential for zp[1]:48 [ place_sprites::j2#3 place_sprites::j2#2 ] Removing always clobbered register reg byte a as potential for zp[1]:49 [ place_sprites::col#2 place_sprites::col#1 ] Removing always clobbered register reg byte a as potential for zp[1]:45 [ place_sprites::spr_id#2 place_sprites::spr_id#1 ] -Statement [221] *((const nomodify byte*) SPRITES_COLS + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] ( main:2::init:5::place_sprites:51 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] { } ) always clobbers reg byte a +Statement [221] *((const nomodify byte*) SPRITES_COLOR + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] ( main:2::init:5::place_sprites:51 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] { } ) always clobbers reg byte a Statement [222] (byte) place_sprites::spr_x#1 ← (byte) place_sprites::spr_x#2 + (byte) $20 [ place_sprites::j#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 place_sprites::spr_x#1 ] ( main:2::init:5::place_sprites:51 [ place_sprites::j#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 place_sprites::spr_x#1 ] { } ) always clobbers reg byte a Statement [223] (byte) place_sprites::col#1 ← (byte) place_sprites::col#2 ^ (byte)(number) 7^(number) 5 [ place_sprites::j#2 place_sprites::j2#3 place_sprites::spr_id#1 place_sprites::spr_x#1 place_sprites::col#1 ] ( main:2::init:5::place_sprites:51 [ place_sprites::j#2 place_sprites::j2#3 place_sprites::spr_id#1 place_sprites::spr_x#1 place_sprites::col#1 ] { } ) always clobbers reg byte a Statement [7] if(*((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) OFFSET_STRUCT_MOS6569_VICII_RASTER)!=(byte) $ff) goto main::@1 [ sin_idx_x#13 sin_idx_y#13 ] ( main:2 [ sin_idx_x#13 sin_idx_y#13 ] { } ) always clobbers reg byte a @@ -5116,7 +5116,7 @@ Statement [215] *((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byt Statement [217] *((const byte*) place_sprites::sprites_ptr + (byte) place_sprites::j#2) ← (byte) place_sprites::spr_id#2 [ place_sprites::spr_id#2 place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 ] ( main:2::init:5::place_sprites:51 [ place_sprites::spr_id#2 place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 ] { } ) always clobbers reg byte a Statement [219] *((const nomodify byte*) SPRITES_XPOS + (byte) place_sprites::j2#3) ← (byte) place_sprites::spr_x#2 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] ( main:2::init:5::place_sprites:51 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] { } ) always clobbers reg byte a Statement [220] *((const nomodify byte*) SPRITES_YPOS + (byte) place_sprites::j2#3) ← (byte) $50 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] ( main:2::init:5::place_sprites:51 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] { } ) always clobbers reg byte a -Statement [221] *((const nomodify byte*) SPRITES_COLS + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] ( main:2::init:5::place_sprites:51 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] { } ) always clobbers reg byte a +Statement [221] *((const nomodify byte*) SPRITES_COLOR + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] ( main:2::init:5::place_sprites:51 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] { } ) always clobbers reg byte a Statement [222] (byte) place_sprites::spr_x#1 ← (byte) place_sprites::spr_x#2 + (byte) $20 [ place_sprites::j#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 place_sprites::spr_x#1 ] ( main:2::init:5::place_sprites:51 [ place_sprites::j#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 place_sprites::spr_x#1 ] { } ) always clobbers reg byte a Statement [223] (byte) place_sprites::col#1 ← (byte) place_sprites::col#2 ^ (byte)(number) 7^(number) 5 [ place_sprites::j#2 place_sprites::j2#3 place_sprites::spr_id#1 place_sprites::spr_x#1 place_sprites::col#1 ] ( main:2::init:5::place_sprites:51 [ place_sprites::j#2 place_sprites::j2#3 place_sprites::spr_id#1 place_sprites::spr_x#1 place_sprites::col#1 ] { } ) always clobbers reg byte a Statement [7] if(*((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byte) OFFSET_STRUCT_MOS6569_VICII_RASTER)!=(byte) $ff) goto main::@1 [ sin_idx_x#13 sin_idx_y#13 ] ( main:2 [ sin_idx_x#13 sin_idx_y#13 ] { } ) always clobbers reg byte a @@ -5174,7 +5174,7 @@ Statement [215] *((byte*)(const nomodify struct MOS6569_VICII*) VICII+(const byt Statement [217] *((const byte*) place_sprites::sprites_ptr + (byte) place_sprites::j#2) ← (byte) place_sprites::spr_id#2 [ place_sprites::spr_id#2 place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 ] ( main:2::init:5::place_sprites:51 [ place_sprites::spr_id#2 place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 ] { } ) always clobbers reg byte a Statement [219] *((const nomodify byte*) SPRITES_XPOS + (byte) place_sprites::j2#3) ← (byte) place_sprites::spr_x#2 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] ( main:2::init:5::place_sprites:51 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] { } ) always clobbers reg byte a Statement [220] *((const nomodify byte*) SPRITES_YPOS + (byte) place_sprites::j2#3) ← (byte) $50 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] ( main:2::init:5::place_sprites:51 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] { } ) always clobbers reg byte a -Statement [221] *((const nomodify byte*) SPRITES_COLS + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] ( main:2::init:5::place_sprites:51 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] { } ) always clobbers reg byte a +Statement [221] *((const nomodify byte*) SPRITES_COLOR + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] ( main:2::init:5::place_sprites:51 [ place_sprites::j#2 place_sprites::spr_x#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 ] { } ) always clobbers reg byte a Statement [222] (byte) place_sprites::spr_x#1 ← (byte) place_sprites::spr_x#2 + (byte) $20 [ place_sprites::j#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 place_sprites::spr_x#1 ] ( main:2::init:5::place_sprites:51 [ place_sprites::j#2 place_sprites::j2#3 place_sprites::col#2 place_sprites::spr_id#1 place_sprites::spr_x#1 ] { } ) always clobbers reg byte a Statement [223] (byte) place_sprites::col#1 ← (byte) place_sprites::col#2 ^ (byte)(number) 7^(number) 5 [ place_sprites::j#2 place_sprites::j2#3 place_sprites::spr_id#1 place_sprites::spr_x#1 place_sprites::col#1 ] ( main:2::init:5::place_sprites:51 [ place_sprites::j#2 place_sprites::j2#3 place_sprites::spr_id#1 place_sprites::spr_x#1 place_sprites::col#1 ] { } ) always clobbers reg byte a Potential registers zp[1]:2 [ sin_idx_x#13 sin_idx_x#11 sin_idx_x#3 ] : zp[1]:2 , reg byte x , reg byte y , @@ -5391,7 +5391,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const OFFSET_STRUCT_MOS6569_VICII_SPRITES_EXPAND_Y = $17 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 // Processor Port Register controlling RAM/ROM configuration and the datasette .label PROCPORT = 1 // The address of the CHARGEN character set @@ -6744,10 +6744,10 @@ place_sprites: { lda #$50 ldy.z j2 sta SPRITES_YPOS,y - // [221] *((const nomodify byte*) SPRITES_COLS + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 -- pbuc1_derefidx_vbuz1=vbuz2 + // [221] *((const nomodify byte*) SPRITES_COLOR + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z col ldy.z j - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // [222] (byte) place_sprites::spr_x#1 ← (byte) place_sprites::spr_x#2 + (byte) $20 -- vbuz1=vbuz1_plus_vbuc1 lax.z spr_x axs #-[$20] @@ -7184,7 +7184,7 @@ FINAL SYMBOL TABLE (const byte) RADIX::HEXADECIMAL = (number) $10 (const byte) RADIX::OCTAL = (number) 8 (const nomodify byte*) SCREEN = (byte*) 1024 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_XPOS = (byte*) 53248 (const nomodify byte*) SPRITES_YPOS = (byte*) 53249 (const nomodify struct MOS6569_VICII*) VICII = (struct MOS6569_VICII*) 53248 @@ -7516,7 +7516,7 @@ Score: 769690 .const OFFSET_STRUCT_MOS6569_VICII_SPRITES_EXPAND_Y = $17 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 // Processor Port Register controlling RAM/ROM configuration and the datasette .label PROCPORT = 1 // The address of the CHARGEN character set @@ -8743,11 +8743,11 @@ place_sprites: { // [220] *((const nomodify byte*) SPRITES_YPOS + (byte) place_sprites::j2#3) ← (byte) $50 -- pbuc1_derefidx_vbuz1=vbuc2 lda #$50 sta SPRITES_YPOS,y - // SPRITES_COLS[j] = col - // [221] *((const nomodify byte*) SPRITES_COLS + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 -- pbuc1_derefidx_vbuz1=vbuz2 + // SPRITES_COLOR[j] = col + // [221] *((const nomodify byte*) SPRITES_COLOR + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z col ldy.z j - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // spr_x = spr_x + 32 // [222] (byte) place_sprites::spr_x#1 ← (byte) place_sprites::spr_x#2 + (byte) $20 -- vbuz1=vbuz1_plus_vbuc1 lax.z spr_x diff --git a/src/test/ref/examples/sinsprites/sinus-sprites.sym b/src/test/ref/examples/sinsprites/sinus-sprites.sym index af236a8c5..af4ecc018 100644 --- a/src/test/ref/examples/sinsprites/sinus-sprites.sym +++ b/src/test/ref/examples/sinsprites/sinus-sprites.sym @@ -99,7 +99,7 @@ (const byte) RADIX::HEXADECIMAL = (number) $10 (const byte) RADIX::OCTAL = (number) 8 (const nomodify byte*) SCREEN = (byte*) 1024 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_XPOS = (byte*) 53248 (const nomodify byte*) SPRITES_YPOS = (byte*) 53249 (const nomodify struct MOS6569_VICII*) VICII = (struct MOS6569_VICII*) 53248 diff --git a/src/test/ref/examples/zpcode/zpcode.asm b/src/test/ref/examples/zpcode/zpcode.asm index 1007fbf74..1ef6b7f1a 100644 --- a/src/test/ref/examples/zpcode/zpcode.asm +++ b/src/test/ref/examples/zpcode/zpcode.asm @@ -13,7 +13,7 @@ .label RASTER = $d012 - .label BGCOL = $d020 + .label BG_COLOR = $d020 __bbegin: .segment Code main: { @@ -37,9 +37,9 @@ main: { // zpLoop() // Call code on zeropage jsr zpLoop - // *BGCOL = 0 + // *BG_COLOR = 0 lda #0 - sta BGCOL + sta BG_COLOR jmp __b3 __b2: // zpCode[i] = zpCodeData[i] @@ -53,8 +53,8 @@ main: { zpLoop: { ldx #0 __b1: - // (*BGCOL)++; - inc BGCOL + // (*BG_COLOR)++; + inc BG_COLOR // for(char i:0..100) inx cpx #$65 @@ -67,8 +67,8 @@ zpLoop: { loop: { ldx #0 __b1: - // (*BGCOL)--; - dec BGCOL + // (*BG_COLOR)--; + dec BG_COLOR // for(char i:0..100) inx cpx #$65 diff --git a/src/test/ref/examples/zpcode/zpcode.cfg b/src/test/ref/examples/zpcode/zpcode.cfg index 0994c3b33..95914d10f 100644 --- a/src/test/ref/examples/zpcode/zpcode.cfg +++ b/src/test/ref/examples/zpcode/zpcode.cfg @@ -28,7 +28,7 @@ main::@5: scope:[main] from main::@4 [11] call zpLoop to:main::@6 main::@6: scope:[main] from main::@5 - [12] *((const byte*) BGCOL) ← (byte) 0 + [12] *((const byte*) BG_COLOR) ← (byte) 0 to:main::@3 main::@2: scope:[main] from main::@1 [13] *((const byte*) main::zpCode + (byte) main::i#2) ← *((const byte*) zpCodeData + (byte) main::i#2) @@ -41,7 +41,7 @@ zpLoop: scope:[zpLoop] from main::@5 to:zpLoop::@1 zpLoop::@1: scope:[zpLoop] from zpLoop zpLoop::@1 [16] (byte) zpLoop::i#2 ← phi( zpLoop/(byte) 0 zpLoop::@1/(byte) zpLoop::i#1 ) - [17] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) + [17] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) [18] (byte) zpLoop::i#1 ← ++ (byte) zpLoop::i#2 [19] if((byte) zpLoop::i#1!=(byte) $65) goto zpLoop::@1 to:zpLoop::@return @@ -55,7 +55,7 @@ loop: scope:[loop] from main::@4 to:loop::@1 loop::@1: scope:[loop] from loop loop::@1 [22] (byte) loop::i#2 ← phi( loop/(byte) 0 loop::@1/(byte) loop::i#1 ) - [23] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) + [23] *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) [24] (byte) loop::i#1 ← ++ (byte) loop::i#2 [25] if((byte) loop::i#1!=(byte) $65) goto loop::@1 to:loop::@return diff --git a/src/test/ref/examples/zpcode/zpcode.log b/src/test/ref/examples/zpcode/zpcode.log index c59012ea7..12cf2d33a 100644 --- a/src/test/ref/examples/zpcode/zpcode.log +++ b/src/test/ref/examples/zpcode/zpcode.log @@ -35,7 +35,7 @@ main::@6: scope:[main] from main::@5 call zpLoop to:main::@7 main::@7: scope:[main] from main::@6 - *((const byte*) BGCOL) ← (number) 0 + *((const byte*) BG_COLOR) ← (number) 0 to:main::@3 main::@return: scope:[main] from main::@3 return @@ -47,7 +47,7 @@ loop: scope:[loop] from main::@5 to:loop::@1 loop::@1: scope:[loop] from loop loop::@1 (byte) loop::i#2 ← phi( loop/(byte) loop::i#0 loop::@1/(byte) loop::i#1 ) - *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) + *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) (byte) loop::i#1 ← (byte) loop::i#2 + rangenext(0,$64) (bool~) loop::$1 ← (byte) loop::i#1 != rangelast(0,$64) if((bool~) loop::$1) goto loop::@1 @@ -62,7 +62,7 @@ zpLoop: scope:[zpLoop] from main::@6 to:zpLoop::@1 zpLoop::@1: scope:[zpLoop] from zpLoop zpLoop::@1 (byte) zpLoop::i#2 ← phi( zpLoop/(byte) zpLoop::i#0 zpLoop::@1/(byte) zpLoop::i#1 ) - *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) + *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) (byte) zpLoop::i#1 ← (byte) zpLoop::i#2 + rangenext(0,$64) (bool~) zpLoop::$1 ← (byte) zpLoop::i#1 != rangelast(0,$64) if((bool~) zpLoop::$1) goto zpLoop::@1 @@ -82,7 +82,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const byte*) BGCOL = (byte*)(number) $d020 +(const byte*) BG_COLOR = (byte*)(number) $d020 (const byte*) RASTER = (byte*)(number) $d012 (void()) loop() (bool~) loop::$1 @@ -122,9 +122,9 @@ SYMBOL TABLE SSA Adding number conversion cast (unumber) $14 in (bool~) main::$0 ← (byte) main::i#2 < (number) $14 Adding number conversion cast (unumber) $ff in (bool~) main::$1 ← *((const byte*) RASTER) != (number) $ff -Adding number conversion cast (unumber) 0 in *((const byte*) BGCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const byte*) BG_COLOR) ← (number) 0 Successful SSA optimization PassNAddNumberTypeConversions -Inlining cast *((const byte*) BGCOL) ← (unumber)(number) 0 +Inlining cast *((const byte*) BG_COLOR) ← (unumber)(number) 0 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 53266 Simplifying constant pointer cast (byte*) 53280 @@ -238,7 +238,7 @@ main::@5: scope:[main] from main::@4 [11] call zpLoop to:main::@6 main::@6: scope:[main] from main::@5 - [12] *((const byte*) BGCOL) ← (byte) 0 + [12] *((const byte*) BG_COLOR) ← (byte) 0 to:main::@3 main::@2: scope:[main] from main::@1 [13] *((const byte*) main::zpCode + (byte) main::i#2) ← *((const byte*) zpCodeData + (byte) main::i#2) @@ -251,7 +251,7 @@ zpLoop: scope:[zpLoop] from main::@5 to:zpLoop::@1 zpLoop::@1: scope:[zpLoop] from zpLoop zpLoop::@1 [16] (byte) zpLoop::i#2 ← phi( zpLoop/(byte) 0 zpLoop::@1/(byte) zpLoop::i#1 ) - [17] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) + [17] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) [18] (byte) zpLoop::i#1 ← ++ (byte) zpLoop::i#2 [19] if((byte) zpLoop::i#1!=(byte) $65) goto zpLoop::@1 to:zpLoop::@return @@ -265,7 +265,7 @@ loop: scope:[loop] from main::@4 to:loop::@1 loop::@1: scope:[loop] from loop loop::@1 [22] (byte) loop::i#2 ← phi( loop/(byte) 0 loop::@1/(byte) loop::i#1 ) - [23] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) + [23] *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) [24] (byte) loop::i#1 ← ++ (byte) loop::i#2 [25] if((byte) loop::i#1!=(byte) $65) goto loop::@1 to:loop::@return @@ -320,7 +320,7 @@ Target platform is custom / MOS6502X // Global Constants & labels .label RASTER = $d012 - .label BGCOL = $d020 + .label BG_COLOR = $d020 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -385,9 +385,9 @@ main: { jmp __b6 // main::@6 __b6: - // [12] *((const byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [12] *((const byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL + sta BG_COLOR jmp __b3 // main::@2 __b2: @@ -418,8 +418,8 @@ zpLoop: { jmp __b1 // zpLoop::@1 __b1: - // [17] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [17] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // [18] (byte) zpLoop::i#1 ← ++ (byte) zpLoop::i#2 -- vbuz1=_inc_vbuz1 inc.z i // [19] if((byte) zpLoop::i#1!=(byte) $65) goto zpLoop::@1 -- vbuz1_neq_vbuc1_then_la1 @@ -449,8 +449,8 @@ loop: { jmp __b1 // loop::@1 __b1: - // [23] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BGCOL + // [23] *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BG_COLOR // [24] (byte) loop::i#1 ← ++ (byte) loop::i#2 -- vbuz1=_inc_vbuz1 inc.z i // [25] if((byte) loop::i#1!=(byte) $65) goto loop::@1 -- vbuz1_neq_vbuc1_then_la1 @@ -472,11 +472,11 @@ zpCodeData: REGISTER UPLIFT POTENTIAL REGISTERS Statement [7] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [12] *((const byte*) BGCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [12] *((const byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [13] *((const byte*) main::zpCode + (byte) main::i#2) ← *((const byte*) zpCodeData + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::i#2 main::i#1 ] Statement [7] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [12] *((const byte*) BGCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [12] *((const byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [13] *((const byte*) main::zpCode + (byte) main::i#2) ← *((const byte*) zpCodeData + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a Potential registers zp[1]:2 [ main::i#2 main::i#1 ] : zp[1]:2 , reg byte x , reg byte y , Potential registers zp[1]:3 [ zpLoop::i#2 zpLoop::i#1 ] : zp[1]:3 , reg byte a , reg byte x , reg byte y , @@ -512,7 +512,7 @@ ASSEMBLER BEFORE OPTIMIZATION // Global Constants & labels .label RASTER = $d012 - .label BGCOL = $d020 + .label BG_COLOR = $d020 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -574,9 +574,9 @@ main: { jmp __b6 // main::@6 __b6: - // [12] *((const byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [12] *((const byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL + sta BG_COLOR jmp __b3 // main::@2 __b2: @@ -604,8 +604,8 @@ zpLoop: { jmp __b1 // zpLoop::@1 __b1: - // [17] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [17] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // [18] (byte) zpLoop::i#1 ← ++ (byte) zpLoop::i#2 -- vbuxx=_inc_vbuxx inx // [19] if((byte) zpLoop::i#1!=(byte) $65) goto zpLoop::@1 -- vbuxx_neq_vbuc1_then_la1 @@ -632,8 +632,8 @@ loop: { jmp __b1 // loop::@1 __b1: - // [23] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BGCOL + // [23] *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BG_COLOR // [24] (byte) loop::i#1 ← ++ (byte) loop::i#2 -- vbuxx=_inc_vbuxx inx // [25] if((byte) loop::i#1!=(byte) $65) goto loop::@1 -- vbuxx_neq_vbuc1_then_la1 @@ -698,7 +698,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const byte*) BGCOL = (byte*) 53280 +(const byte*) BG_COLOR = (byte*) 53280 (const byte*) RASTER = (byte*) 53266 (void()) loop() (label) loop::@1 @@ -752,7 +752,7 @@ Score: 4076 // Global Constants & labels .label RASTER = $d012 - .label BGCOL = $d020 + .label BG_COLOR = $d020 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -799,10 +799,10 @@ main: { // [15] phi from main::@5 to zpLoop [phi:main::@5->zpLoop] jsr zpLoop // main::@6 - // *BGCOL = 0 - // [12] *((const byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 0 + // [12] *((const byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL + sta BG_COLOR jmp __b3 // main::@2 __b2: @@ -827,9 +827,9 @@ zpLoop: { // [16] phi (byte) zpLoop::i#2 = (byte) zpLoop::i#1 [phi:zpLoop::@1->zpLoop::@1#0] -- register_copy // zpLoop::@1 __b1: - // (*BGCOL)++; - // [17] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // (*BG_COLOR)++; + // [17] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // for(char i:0..100) // [18] (byte) zpLoop::i#1 ← ++ (byte) zpLoop::i#2 -- vbuxx=_inc_vbuxx inx @@ -852,9 +852,9 @@ loop: { // [22] phi (byte) loop::i#2 = (byte) loop::i#1 [phi:loop::@1->loop::@1#0] -- register_copy // loop::@1 __b1: - // (*BGCOL)--; - // [23] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BGCOL + // (*BG_COLOR)--; + // [23] *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BG_COLOR // for(char i:0..100) // [24] (byte) loop::i#1 ← ++ (byte) loop::i#2 -- vbuxx=_inc_vbuxx inx diff --git a/src/test/ref/examples/zpcode/zpcode.sym b/src/test/ref/examples/zpcode/zpcode.sym index 0ede6be50..ae8be8442 100644 --- a/src/test/ref/examples/zpcode/zpcode.sym +++ b/src/test/ref/examples/zpcode/zpcode.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const byte*) BGCOL = (byte*) 53280 +(const byte*) BG_COLOR = (byte*) 53280 (const byte*) RASTER = (byte*) 53266 (void()) loop() (label) loop::@1 diff --git a/src/test/ref/function-pointer-noarg-2.log b/src/test/ref/function-pointer-noarg-2.log index 679735f03..0a24c1285 100644 --- a/src/test/ref/function-pointer-noarg-2.log +++ b/src/test/ref/function-pointer-noarg-2.log @@ -30,7 +30,7 @@ main::@return: scope:[main] from main::@2 (void()) fn1() fn1: scope:[fn1] from - *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 return @@ -38,7 +38,7 @@ fn1::@return: scope:[fn1] from fn1 (void()) fn2() fn2: scope:[fn2] from - *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 return @@ -57,10 +57,10 @@ SYMBOL TABLE SSA (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*)(number) $d020 (void()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*)(number) $d021 +(const nomodify byte*) fn2::BG_COLOR = (byte*)(number) $d021 (void()) main() (number~) main::$0 (bool~) main::$1 diff --git a/src/test/ref/function-pointer-noarg-3.asm b/src/test/ref/function-pointer-noarg-3.asm index 9c86ba05c..6b3bc8f46 100644 --- a/src/test/ref/function-pointer-noarg-3.asm +++ b/src/test/ref/function-pointer-noarg-3.asm @@ -35,16 +35,16 @@ main: { jmp __b2 } fn2: { - .label BGCOL = $d021 - // (*BGCOL)++; - inc BGCOL + .label BG_COLOR = $d021 + // (*BG_COLOR)++; + inc BG_COLOR // } rts } fn1: { - .label BORDERCOL = $d020 - // (*BORDERCOL)++; - inc BORDERCOL + .label BORDER_COLOR = $d020 + // (*BORDER_COLOR)++; + inc BORDER_COLOR // } rts } diff --git a/src/test/ref/function-pointer-noarg-3.cfg b/src/test/ref/function-pointer-noarg-3.cfg index 9df492cf2..584277d18 100644 --- a/src/test/ref/function-pointer-noarg-3.cfg +++ b/src/test/ref/function-pointer-noarg-3.cfg @@ -36,7 +36,7 @@ main::@4: scope:[main] from main::@2 main::@3 (void()) fn2() fn2: scope:[fn2] from - [13] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + [13] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [14] return @@ -44,7 +44,7 @@ fn2::@return: scope:[fn2] from fn2 (void()) fn1() fn1: scope:[fn1] from - [15] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + [15] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [16] return diff --git a/src/test/ref/function-pointer-noarg-3.log b/src/test/ref/function-pointer-noarg-3.log index b0642e23c..f710c754c 100644 --- a/src/test/ref/function-pointer-noarg-3.log +++ b/src/test/ref/function-pointer-noarg-3.log @@ -46,7 +46,7 @@ main::@return: scope:[main] from main::@1 (void()) fn1() fn1: scope:[fn1] from - *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 return @@ -54,7 +54,7 @@ fn1::@return: scope:[fn1] from fn1 (void()) fn2() fn2: scope:[fn2] from - *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 return @@ -74,10 +74,10 @@ SYMBOL TABLE SSA (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*)(number) $d020 (void()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*)(number) $d021 +(const nomodify byte*) fn2::BG_COLOR = (byte*)(number) $d021 (void()) main() (number~) main::$0 (bool~) main::$1 @@ -199,7 +199,7 @@ main::@4: scope:[main] from main::@2 main::@3 (void()) fn2() fn2: scope:[fn2] from - [13] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + [13] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [14] return @@ -207,7 +207,7 @@ fn2::@return: scope:[fn2] from fn2 (void()) fn1() fn1: scope:[fn1] from - [15] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + [15] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [16] return @@ -328,9 +328,9 @@ main: { } // fn2 fn2: { - .label BGCOL = $d021 - // [13] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // [13] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // fn2::@return __breturn: @@ -339,9 +339,9 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // [15] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // [15] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __breturn // fn1::@return __breturn: @@ -452,9 +452,9 @@ main: { } // fn2 fn2: { - .label BGCOL = $d021 - // [13] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // [13] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // fn2::@return __breturn: @@ -463,9 +463,9 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // [15] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // [15] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __breturn // fn1::@return __breturn: @@ -516,10 +516,10 @@ FINAL SYMBOL TABLE (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*) 53280 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*) 53280 (void()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*) 53281 +(const nomodify byte*) fn2::BG_COLOR = (byte*) 53281 (void()) main() (byte~) main::$0 reg byte a 202.0 (label) main::@1 @@ -608,10 +608,10 @@ main: { } // fn2 fn2: { - .label BGCOL = $d021 - // (*BGCOL)++; - // [13] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // (*BG_COLOR)++; + // [13] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // fn2::@return // } // [14] return @@ -619,10 +619,10 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // (*BORDERCOL)++; - // [15] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // (*BORDER_COLOR)++; + // [15] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // fn1::@return // } // [16] return diff --git a/src/test/ref/function-pointer-noarg-3.sym b/src/test/ref/function-pointer-noarg-3.sym index 660fba50c..62e90f39f 100644 --- a/src/test/ref/function-pointer-noarg-3.sym +++ b/src/test/ref/function-pointer-noarg-3.sym @@ -4,10 +4,10 @@ (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*) 53280 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*) 53280 (void()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*) 53281 +(const nomodify byte*) fn2::BG_COLOR = (byte*) 53281 (void()) main() (byte~) main::$0 reg byte a 202.0 (label) main::@1 diff --git a/src/test/ref/function-pointer-noarg-call-2.asm b/src/test/ref/function-pointer-noarg-call-2.asm index 6e7d079a6..dc4d12182 100644 --- a/src/test/ref/function-pointer-noarg-call-2.asm +++ b/src/test/ref/function-pointer-noarg-call-2.asm @@ -34,16 +34,16 @@ main: { jmp (f) } fn2: { - .label BGCOL = $d021 - // (*BGCOL)++; - inc BGCOL + .label BG_COLOR = $d021 + // (*BG_COLOR)++; + inc BG_COLOR // } rts } fn1: { - .label BORDERCOL = $d020 - // (*BORDERCOL)++; - inc BORDERCOL + .label BORDER_COLOR = $d020 + // (*BORDER_COLOR)++; + inc BORDER_COLOR // } rts } diff --git a/src/test/ref/function-pointer-noarg-call-2.cfg b/src/test/ref/function-pointer-noarg-call-2.cfg index 627a2a3b9..b8c3e045f 100644 --- a/src/test/ref/function-pointer-noarg-call-2.cfg +++ b/src/test/ref/function-pointer-noarg-call-2.cfg @@ -30,7 +30,7 @@ main::@4: scope:[main] from main::@2 main::@3 (void()) fn2() fn2: scope:[fn2] from - [12] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + [12] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [13] return @@ -38,7 +38,7 @@ fn2::@return: scope:[fn2] from fn2 (void()) fn1() fn1: scope:[fn1] from - [14] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + [14] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [15] return diff --git a/src/test/ref/function-pointer-noarg-call-2.log b/src/test/ref/function-pointer-noarg-call-2.log index b7a70f0e9..38b8cb304 100644 --- a/src/test/ref/function-pointer-noarg-call-2.log +++ b/src/test/ref/function-pointer-noarg-call-2.log @@ -40,7 +40,7 @@ main::@return: scope:[main] from main::@1 (void()) fn1() fn1: scope:[fn1] from - *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 return @@ -48,7 +48,7 @@ fn1::@return: scope:[fn1] from fn1 (void()) fn2() fn2: scope:[fn2] from - *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 return @@ -67,10 +67,10 @@ SYMBOL TABLE SSA (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*)(number) $d020 (void()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*)(number) $d021 +(const nomodify byte*) fn2::BG_COLOR = (byte*)(number) $d021 (void()) main() (number~) main::$0 (bool~) main::$1 @@ -186,7 +186,7 @@ main::@4: scope:[main] from main::@2 main::@3 (void()) fn2() fn2: scope:[fn2] from - [12] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + [12] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [13] return @@ -194,7 +194,7 @@ fn2::@return: scope:[fn2] from fn2 (void()) fn1() fn1: scope:[fn1] from - [14] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + [14] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [15] return @@ -309,9 +309,9 @@ main: { } // fn2 fn2: { - .label BGCOL = $d021 - // [12] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // [12] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // fn2::@return __breturn: @@ -320,9 +320,9 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // [14] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // [14] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __breturn // fn1::@return __breturn: @@ -436,9 +436,9 @@ main: { } // fn2 fn2: { - .label BGCOL = $d021 - // [12] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // [12] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // fn2::@return __breturn: @@ -447,9 +447,9 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // [14] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // [14] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __breturn // fn1::@return __breturn: @@ -497,10 +497,10 @@ FINAL SYMBOL TABLE (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*) 53280 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*) 53280 (void()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*) 53281 +(const nomodify byte*) fn2::BG_COLOR = (byte*) 53281 (void()) main() (byte~) main::$0 reg byte a 202.0 (label) main::@1 @@ -586,10 +586,10 @@ main: { } // fn2 fn2: { - .label BGCOL = $d021 - // (*BGCOL)++; - // [12] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // (*BG_COLOR)++; + // [12] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // fn2::@return // } // [13] return @@ -597,10 +597,10 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // (*BORDERCOL)++; - // [14] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // (*BORDER_COLOR)++; + // [14] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // fn1::@return // } // [15] return diff --git a/src/test/ref/function-pointer-noarg-call-2.sym b/src/test/ref/function-pointer-noarg-call-2.sym index 1b4302559..19e122ec4 100644 --- a/src/test/ref/function-pointer-noarg-call-2.sym +++ b/src/test/ref/function-pointer-noarg-call-2.sym @@ -3,10 +3,10 @@ (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*) 53280 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*) 53280 (void()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*) 53281 +(const nomodify byte*) fn2::BG_COLOR = (byte*) 53281 (void()) main() (byte~) main::$0 reg byte a 202.0 (label) main::@1 diff --git a/src/test/ref/function-pointer-noarg-call-3.asm b/src/test/ref/function-pointer-noarg-call-3.asm index 1685d8847..f57f8a772 100644 --- a/src/test/ref/function-pointer-noarg-call-3.asm +++ b/src/test/ref/function-pointer-noarg-call-3.asm @@ -41,16 +41,16 @@ getfn: { rts } fn2: { - .label BGCOL = $d021 - // (*BGCOL)++; - inc BGCOL + .label BG_COLOR = $d021 + // (*BG_COLOR)++; + inc BG_COLOR // } rts } fn1: { - .label BORDERCOL = $d020 - // (*BORDERCOL)++; - inc BORDERCOL + .label BORDER_COLOR = $d020 + // (*BORDER_COLOR)++; + inc BORDER_COLOR // } rts } diff --git a/src/test/ref/function-pointer-noarg-call-3.cfg b/src/test/ref/function-pointer-noarg-call-3.cfg index 12d9fbc99..06f4ab16e 100644 --- a/src/test/ref/function-pointer-noarg-call-3.cfg +++ b/src/test/ref/function-pointer-noarg-call-3.cfg @@ -41,7 +41,7 @@ getfn::@return: scope:[getfn] from getfn getfn::@1 (void()) fn2() fn2: scope:[fn2] from - [17] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + [17] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [18] return @@ -49,7 +49,7 @@ fn2::@return: scope:[fn2] from fn2 (void()) fn1() fn1: scope:[fn1] from - [19] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + [19] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [20] return diff --git a/src/test/ref/function-pointer-noarg-call-3.log b/src/test/ref/function-pointer-noarg-call-3.log index 770fbf939..c32d0dba3 100644 --- a/src/test/ref/function-pointer-noarg-call-3.log +++ b/src/test/ref/function-pointer-noarg-call-3.log @@ -51,7 +51,7 @@ getfn::@return: scope:[getfn] from getfn::@1 getfn::@2 (void()) fn1() fn1: scope:[fn1] from - *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 return @@ -59,7 +59,7 @@ fn1::@return: scope:[fn1] from fn1 (void()) fn2() fn2: scope:[fn2] from - *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 return @@ -78,10 +78,10 @@ SYMBOL TABLE SSA (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*)(number) $d020 (void()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*)(number) $d021 +(const nomodify byte*) fn2::BG_COLOR = (byte*)(number) $d021 (void()*()) getfn((byte) getfn::b) (number~) getfn::$0 (bool~) getfn::$1 @@ -214,7 +214,7 @@ getfn::@return: scope:[getfn] from getfn getfn::@1 (void()) fn2() fn2: scope:[fn2] from - [17] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + [17] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [18] return @@ -222,7 +222,7 @@ fn2::@return: scope:[fn2] from fn2 (void()) fn1() fn1: scope:[fn1] from - [19] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + [19] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [20] return @@ -378,9 +378,9 @@ getfn: { } // fn2 fn2: { - .label BGCOL = $d021 - // [17] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // [17] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // fn2::@return __breturn: @@ -389,9 +389,9 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // [19] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // [19] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __breturn // fn1::@return __breturn: @@ -530,9 +530,9 @@ getfn: { } // fn2 fn2: { - .label BGCOL = $d021 - // [17] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // [17] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // fn2::@return __breturn: @@ -541,9 +541,9 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // [19] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // [19] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __breturn // fn1::@return __breturn: @@ -596,10 +596,10 @@ FINAL SYMBOL TABLE (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*) 53280 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*) 53280 (void()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*) 53281 +(const nomodify byte*) fn2::BG_COLOR = (byte*) 53281 (void()*()) getfn((byte) getfn::b) (byte~) getfn::$0 reg byte a 2002.0 (label) getfn::@1 @@ -706,10 +706,10 @@ getfn: { } // fn2 fn2: { - .label BGCOL = $d021 - // (*BGCOL)++; - // [17] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // (*BG_COLOR)++; + // [17] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // fn2::@return // } // [18] return @@ -717,10 +717,10 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // (*BORDERCOL)++; - // [19] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // (*BORDER_COLOR)++; + // [19] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // fn1::@return // } // [20] return diff --git a/src/test/ref/function-pointer-noarg-call-3.sym b/src/test/ref/function-pointer-noarg-call-3.sym index 91ae3ec27..829a410d2 100644 --- a/src/test/ref/function-pointer-noarg-call-3.sym +++ b/src/test/ref/function-pointer-noarg-call-3.sym @@ -3,10 +3,10 @@ (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*) 53280 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*) 53280 (void()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*) 53281 +(const nomodify byte*) fn2::BG_COLOR = (byte*) 53281 (void()*()) getfn((byte) getfn::b) (byte~) getfn::$0 reg byte a 2002.0 (label) getfn::@1 diff --git a/src/test/ref/function-pointer-noarg-call-4.asm b/src/test/ref/function-pointer-noarg-call-4.asm index 44c4a475e..4c2b72f99 100644 --- a/src/test/ref/function-pointer-noarg-call-4.asm +++ b/src/test/ref/function-pointer-noarg-call-4.asm @@ -14,9 +14,9 @@ main: { jmp __b2 } fn1: { - .label BORDERCOL = $d020 - // (*BORDERCOL)++; - inc BORDERCOL + .label BORDER_COLOR = $d020 + // (*BORDER_COLOR)++; + inc BORDER_COLOR // } rts } diff --git a/src/test/ref/function-pointer-noarg-call-4.cfg b/src/test/ref/function-pointer-noarg-call-4.cfg index ccdd0ee9a..9d20815c4 100644 --- a/src/test/ref/function-pointer-noarg-call-4.cfg +++ b/src/test/ref/function-pointer-noarg-call-4.cfg @@ -26,7 +26,7 @@ main::@3: scope:[main] from main::@2 (void()) fn1() fn1: scope:[fn1] from main::@3 - [10] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + [10] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [11] return diff --git a/src/test/ref/function-pointer-noarg-call-4.log b/src/test/ref/function-pointer-noarg-call-4.log index 915b6f8cf..60b4629ab 100644 --- a/src/test/ref/function-pointer-noarg-call-4.log +++ b/src/test/ref/function-pointer-noarg-call-4.log @@ -41,7 +41,7 @@ getfn::@return: scope:[getfn] from getfn (void()) fn1() fn1: scope:[fn1] from - *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 return @@ -60,7 +60,7 @@ SYMBOL TABLE SSA (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*)(number) $d020 (void()*()) getfn((byte) getfn::b) (label) getfn::@return (byte) getfn::b @@ -165,7 +165,7 @@ main::@3: scope:[main] from main::@2 (void()) fn1() fn1: scope:[fn1] from main::@3 - [10] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + [10] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [11] return @@ -255,9 +255,9 @@ main: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // [10] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // [10] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __breturn // fn1::@return __breturn: @@ -344,9 +344,9 @@ main: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // [10] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // [10] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __breturn // fn1::@return __breturn: @@ -400,7 +400,7 @@ FINAL SYMBOL TABLE (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*) 53280 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*) 53280 (void()*()) getfn((byte) getfn::b) (label) getfn::@return (byte) getfn::b @@ -459,10 +459,10 @@ main: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // (*BORDERCOL)++; - // [10] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // (*BORDER_COLOR)++; + // [10] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // fn1::@return // } // [11] return diff --git a/src/test/ref/function-pointer-noarg-call-4.sym b/src/test/ref/function-pointer-noarg-call-4.sym index c5a999127..0c6029f29 100644 --- a/src/test/ref/function-pointer-noarg-call-4.sym +++ b/src/test/ref/function-pointer-noarg-call-4.sym @@ -3,7 +3,7 @@ (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*) 53280 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*) 53280 (void()*()) getfn((byte) getfn::b) (label) getfn::@return (byte) getfn::b diff --git a/src/test/ref/function-pointer-noarg-call-5.asm b/src/test/ref/function-pointer-noarg-call-5.asm index 3fbcb2417..e946359e5 100644 --- a/src/test/ref/function-pointer-noarg-call-5.asm +++ b/src/test/ref/function-pointer-noarg-call-5.asm @@ -27,16 +27,16 @@ main: { jmp (f) } fn2: { - .label BGCOL = $d021 - // (*BGCOL)++; - inc BGCOL + .label BG_COLOR = $d021 + // (*BG_COLOR)++; + inc BG_COLOR // } rts } fn1: { - .label BORDERCOL = $d020 - // (*BORDERCOL)++; - inc BORDERCOL + .label BORDER_COLOR = $d020 + // (*BORDER_COLOR)++; + inc BORDER_COLOR // } rts } diff --git a/src/test/ref/function-pointer-noarg-call-5.cfg b/src/test/ref/function-pointer-noarg-call-5.cfg index d5594115b..a6ef39680 100644 --- a/src/test/ref/function-pointer-noarg-call-5.cfg +++ b/src/test/ref/function-pointer-noarg-call-5.cfg @@ -25,7 +25,7 @@ main::@2: scope:[main] from main::@1 (void()) fn2() fn2: scope:[fn2] from - [11] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + [11] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [12] return @@ -33,7 +33,7 @@ fn2::@return: scope:[fn2] from fn2 (void()) fn1() fn1: scope:[fn1] from - [13] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + [13] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [14] return diff --git a/src/test/ref/function-pointer-noarg-call-5.log b/src/test/ref/function-pointer-noarg-call-5.log index 5b1466684..75aea69f0 100644 --- a/src/test/ref/function-pointer-noarg-call-5.log +++ b/src/test/ref/function-pointer-noarg-call-5.log @@ -5,7 +5,7 @@ CONTROL FLOW GRAPH SSA (void()) fn1() fn1: scope:[fn1] from - *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 return @@ -13,7 +13,7 @@ fn1::@return: scope:[fn1] from fn1 (void()) fn2() fn2: scope:[fn2] from - *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 return @@ -53,10 +53,10 @@ SYMBOL TABLE SSA (const byte) SIZEOF_POINTER = (byte) 2 (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*)(number) $d020 (void()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*)(number) $d021 +(const nomodify byte*) fn2::BG_COLOR = (byte*)(number) $d021 (const void()**) fns[(number) 2] = { &(void()) fn1(), &(void()) fn2() } (void()) main() (number~) main::$0 @@ -144,7 +144,7 @@ main::@2: scope:[main] from main::@1 (void()) fn2() fn2: scope:[fn2] from - [11] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + [11] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [12] return @@ -152,7 +152,7 @@ fn2::@return: scope:[fn2] from fn2 (void()) fn1() fn1: scope:[fn1] from - [13] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + [13] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [14] return @@ -255,9 +255,9 @@ main: { } // fn2 fn2: { - .label BGCOL = $d021 - // [11] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // [11] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // fn2::@return __breturn: @@ -266,9 +266,9 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // [13] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // [13] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __breturn // fn1::@return __breturn: @@ -371,9 +371,9 @@ main: { } // fn2 fn2: { - .label BGCOL = $d021 - // [11] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // [11] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // fn2::@return __breturn: @@ -382,9 +382,9 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // [13] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // [13] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __breturn // fn1::@return __breturn: @@ -427,10 +427,10 @@ FINAL SYMBOL TABLE (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*) 53280 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*) 53280 (void()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*) 53281 +(const nomodify byte*) fn2::BG_COLOR = (byte*) 53281 (const void()**) fns[(number) 2] = { &(void()) fn1(), &(void()) fn2() } (void()) main() (byte~) main::$0 reg byte a 202.0 @@ -504,10 +504,10 @@ main: { } // fn2 fn2: { - .label BGCOL = $d021 - // (*BGCOL)++; - // [11] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // (*BG_COLOR)++; + // [11] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // fn2::@return // } // [12] return @@ -515,10 +515,10 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // (*BORDERCOL)++; - // [13] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // (*BORDER_COLOR)++; + // [13] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // fn1::@return // } // [14] return diff --git a/src/test/ref/function-pointer-noarg-call-5.sym b/src/test/ref/function-pointer-noarg-call-5.sym index 038d1c63f..e7ec277cc 100644 --- a/src/test/ref/function-pointer-noarg-call-5.sym +++ b/src/test/ref/function-pointer-noarg-call-5.sym @@ -3,10 +3,10 @@ (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*) 53280 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*) 53280 (void()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*) 53281 +(const nomodify byte*) fn2::BG_COLOR = (byte*) 53281 (const void()**) fns[(number) 2] = { &(void()) fn1(), &(void()) fn2() } (void()) main() (byte~) main::$0 reg byte a 202.0 diff --git a/src/test/ref/function-pointer-noarg-call.asm b/src/test/ref/function-pointer-noarg-call.asm index 6c0b6e9d7..bb1676bad 100644 --- a/src/test/ref/function-pointer-noarg-call.asm +++ b/src/test/ref/function-pointer-noarg-call.asm @@ -9,9 +9,9 @@ main: { rts } fn1: { - .label BORDERCOL = $d020 - // (*BORDERCOL)++; - inc BORDERCOL + .label BORDER_COLOR = $d020 + // (*BORDER_COLOR)++; + inc BORDER_COLOR // } rts } diff --git a/src/test/ref/function-pointer-noarg-call.cfg b/src/test/ref/function-pointer-noarg-call.cfg index d1be5ad38..812aba703 100644 --- a/src/test/ref/function-pointer-noarg-call.cfg +++ b/src/test/ref/function-pointer-noarg-call.cfg @@ -19,7 +19,7 @@ main::@return: scope:[main] from main (void()) fn1() fn1: scope:[fn1] from main - [7] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + [7] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [8] return diff --git a/src/test/ref/function-pointer-noarg-call.log b/src/test/ref/function-pointer-noarg-call.log index 83511fe49..d94f5d9e0 100644 --- a/src/test/ref/function-pointer-noarg-call.log +++ b/src/test/ref/function-pointer-noarg-call.log @@ -5,7 +5,7 @@ CONTROL FLOW GRAPH SSA (void()) fn1() fn1: scope:[fn1] from - *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 return @@ -32,7 +32,7 @@ SYMBOL TABLE SSA (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*)(number) $d020 (void()) main() (label) main::@return (const void()*) main::f = &(void()) fn1() @@ -82,7 +82,7 @@ main::@return: scope:[main] from main (void()) fn1() fn1: scope:[fn1] from main - [7] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + [7] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [8] return @@ -133,9 +133,9 @@ main: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // [7] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // [7] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __breturn // fn1::@return __breturn: @@ -191,9 +191,9 @@ main: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // [7] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // [7] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __breturn // fn1::@return __breturn: @@ -229,7 +229,7 @@ FINAL SYMBOL TABLE (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*) 53280 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*) 53280 (void()) main() (label) main::@return @@ -264,10 +264,10 @@ main: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // (*BORDERCOL)++; - // [7] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // (*BORDER_COLOR)++; + // [7] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // fn1::@return // } // [8] return diff --git a/src/test/ref/function-pointer-noarg-call.sym b/src/test/ref/function-pointer-noarg-call.sym index ce11b06d9..48a85166d 100644 --- a/src/test/ref/function-pointer-noarg-call.sym +++ b/src/test/ref/function-pointer-noarg-call.sym @@ -3,7 +3,7 @@ (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*) 53280 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*) 53280 (void()) main() (label) main::@return diff --git a/src/test/ref/function-pointer-noarg.asm b/src/test/ref/function-pointer-noarg.asm index 4b6aff5a9..d8bb55cbb 100644 --- a/src/test/ref/function-pointer-noarg.asm +++ b/src/test/ref/function-pointer-noarg.asm @@ -20,16 +20,16 @@ main: { rts } fn2: { - .label BGCOL = $d021 - // (*BGCOL)++; - inc BGCOL + .label BG_COLOR = $d021 + // (*BG_COLOR)++; + inc BG_COLOR // } rts } fn1: { - .label BORDERCOL = $d020 - // (*BORDERCOL)++; - inc BORDERCOL + .label BORDER_COLOR = $d020 + // (*BORDER_COLOR)++; + inc BORDER_COLOR // } rts } diff --git a/src/test/ref/function-pointer-noarg.cfg b/src/test/ref/function-pointer-noarg.cfg index ce29fe2e9..83263d1e5 100644 --- a/src/test/ref/function-pointer-noarg.cfg +++ b/src/test/ref/function-pointer-noarg.cfg @@ -21,7 +21,7 @@ main::@return: scope:[main] from main (void()) fn2() fn2: scope:[fn2] from - [9] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + [9] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [10] return @@ -29,7 +29,7 @@ fn2::@return: scope:[fn2] from fn2 (void()) fn1() fn1: scope:[fn1] from - [11] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + [11] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [12] return diff --git a/src/test/ref/function-pointer-noarg.log b/src/test/ref/function-pointer-noarg.log index 0122a3931..06cdce84e 100644 --- a/src/test/ref/function-pointer-noarg.log +++ b/src/test/ref/function-pointer-noarg.log @@ -25,7 +25,7 @@ main::@return: scope:[main] from main (void()) fn1() fn1: scope:[fn1] from - *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 return @@ -33,7 +33,7 @@ fn1::@return: scope:[fn1] from fn1 (void()) fn2() fn2: scope:[fn2] from - *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 return @@ -52,10 +52,10 @@ SYMBOL TABLE SSA (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*)(number) $d020 (void()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*)(number) $d021 +(const nomodify byte*) fn2::BG_COLOR = (byte*)(number) $d021 (void()) main() (byte~) main::$0 (byte~) main::$1 @@ -160,7 +160,7 @@ main::@return: scope:[main] from main (void()) fn2() fn2: scope:[fn2] from - [9] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + [9] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [10] return @@ -168,7 +168,7 @@ fn2::@return: scope:[fn2] from fn2 (void()) fn1() fn1: scope:[fn1] from - [11] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + [11] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [12] return @@ -230,9 +230,9 @@ main: { } // fn2 fn2: { - .label BGCOL = $d021 - // [9] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // [9] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // fn2::@return __breturn: @@ -241,9 +241,9 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // [11] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // [11] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __breturn // fn1::@return __breturn: @@ -314,9 +314,9 @@ main: { } // fn2 fn2: { - .label BGCOL = $d021 - // [9] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // [9] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // fn2::@return __breturn: @@ -325,9 +325,9 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // [11] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // [11] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __breturn // fn1::@return __breturn: @@ -364,10 +364,10 @@ FINAL SYMBOL TABLE (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*) 53280 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*) 53280 (void()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*) 53281 +(const nomodify byte*) fn2::BG_COLOR = (byte*) 53281 (void()) main() (label) main::@return (const nomodify byte*) main::SCREEN = (byte*) 1024 @@ -417,10 +417,10 @@ main: { } // fn2 fn2: { - .label BGCOL = $d021 - // (*BGCOL)++; - // [9] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // (*BG_COLOR)++; + // [9] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // fn2::@return // } // [10] return @@ -428,10 +428,10 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // (*BORDERCOL)++; - // [11] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // (*BORDER_COLOR)++; + // [11] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // fn1::@return // } // [12] return diff --git a/src/test/ref/function-pointer-noarg.sym b/src/test/ref/function-pointer-noarg.sym index c2fdae8ce..25cc8787a 100644 --- a/src/test/ref/function-pointer-noarg.sym +++ b/src/test/ref/function-pointer-noarg.sym @@ -3,10 +3,10 @@ (label) @end (void()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*) 53280 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*) 53280 (void()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*) 53281 +(const nomodify byte*) fn2::BG_COLOR = (byte*) 53281 (void()) main() (label) main::@return (const nomodify byte*) main::SCREEN = (byte*) 1024 diff --git a/src/test/ref/function-pointer-return.asm b/src/test/ref/function-pointer-return.asm index 1b26cf8c3..230f8da4d 100644 --- a/src/test/ref/function-pointer-return.asm +++ b/src/test/ref/function-pointer-return.asm @@ -32,16 +32,16 @@ main: { jmp __b2 } fn2: { - .label BGCOL = $d021 - // (*BGCOL)++; - inc BGCOL + .label BG_COLOR = $d021 + // (*BG_COLOR)++; + inc BG_COLOR // } rts } fn1: { - .label BORDERCOL = $d020 - // (*BORDERCOL)++; - inc BORDERCOL + .label BORDER_COLOR = $d020 + // (*BORDER_COLOR)++; + inc BORDER_COLOR // } rts } diff --git a/src/test/ref/function-pointer-return.cfg b/src/test/ref/function-pointer-return.cfg index bc072fa6c..7d32c95cf 100644 --- a/src/test/ref/function-pointer-return.cfg +++ b/src/test/ref/function-pointer-return.cfg @@ -30,7 +30,7 @@ main::@4: scope:[main] from main::@2 main::@3 (byte()) fn2() fn2: scope:[fn2] from - [12] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + [12] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [13] return @@ -38,7 +38,7 @@ fn2::@return: scope:[fn2] from fn2 (byte()) fn1() fn1: scope:[fn1] from - [14] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + [14] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [15] return diff --git a/src/test/ref/function-pointer-return.log b/src/test/ref/function-pointer-return.log index 9e0b48cef..abac296c9 100644 --- a/src/test/ref/function-pointer-return.log +++ b/src/test/ref/function-pointer-return.log @@ -40,8 +40,8 @@ main::@return: scope:[main] from main::@1 (byte()) fn1() fn1: scope:[fn1] from - *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) - (byte) fn1::return#0 ← *((const nomodify byte*) fn1::BORDERCOL) + *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) + (byte) fn1::return#0 ← *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 (byte) fn1::return#2 ← phi( fn1/(byte) fn1::return#0 ) @@ -51,8 +51,8 @@ fn1::@return: scope:[fn1] from fn1 (byte()) fn2() fn2: scope:[fn2] from - *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) - (byte) fn2::return#0 ← *((const nomodify byte*) fn2::BGCOL) + *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) + (byte) fn2::return#0 ← *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 (byte) fn2::return#2 ← phi( fn2/(byte) fn2::return#0 ) @@ -73,14 +73,14 @@ SYMBOL TABLE SSA (label) @end (byte()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*)(number) $d020 (byte) fn1::return (byte) fn1::return#0 (byte) fn1::return#1 (byte) fn1::return#2 (byte()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*)(number) $d021 +(const nomodify byte*) fn2::BG_COLOR = (byte*)(number) $d021 (byte) fn2::return (byte) fn2::return#0 (byte) fn2::return#1 @@ -144,8 +144,8 @@ if() condition always true - replacing block destination [3] if(true) goto main: Successful SSA optimization Pass2ConstantIfs Simplifying expression containing zero main::SCREEN in [11] *((const nomodify byte*) main::SCREEN + (byte) 0) ← (byte)(byte()*) main::f#3 Successful SSA optimization PassNSimplifyExpressionWithZero -Eliminating unused variable (byte) fn1::return#0 and assignment [8] (byte) fn1::return#0 ← *((const nomodify byte*) fn1::BORDERCOL) -Eliminating unused variable (byte) fn2::return#0 and assignment [11] (byte) fn2::return#0 ← *((const nomodify byte*) fn2::BGCOL) +Eliminating unused variable (byte) fn1::return#0 and assignment [8] (byte) fn1::return#0 ← *((const nomodify byte*) fn1::BORDER_COLOR) +Eliminating unused variable (byte) fn2::return#0 and assignment [11] (byte) fn2::return#0 ← *((const nomodify byte*) fn2::BG_COLOR) Eliminating unused constant (const byte()*) main::f#0 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return @@ -211,7 +211,7 @@ main::@4: scope:[main] from main::@2 main::@3 (byte()) fn2() fn2: scope:[fn2] from - [12] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) + [12] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [13] return @@ -219,7 +219,7 @@ fn2::@return: scope:[fn2] from fn2 (byte()) fn1() fn1: scope:[fn1] from - [14] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) + [14] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [15] return @@ -336,9 +336,9 @@ main: { } // fn2 fn2: { - .label BGCOL = $d021 - // [12] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // [12] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // fn2::@return __breturn: @@ -347,9 +347,9 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // [14] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // [14] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __breturn // fn1::@return __breturn: @@ -458,9 +458,9 @@ main: { } // fn2 fn2: { - .label BGCOL = $d021 - // [12] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // [12] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // fn2::@return __breturn: @@ -469,9 +469,9 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // [14] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // [14] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __breturn // fn1::@return __breturn: @@ -519,11 +519,11 @@ FINAL SYMBOL TABLE (label) @end (byte()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*) 53280 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*) 53280 (byte) fn1::return (byte()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*) 53281 +(const nomodify byte*) fn2::BG_COLOR = (byte*) 53281 (byte) fn2::return (void()) main() (byte~) main::$0 reg byte a 202.0 @@ -609,10 +609,10 @@ main: { } // fn2 fn2: { - .label BGCOL = $d021 - // (*BGCOL)++; - // [12] *((const nomodify byte*) fn2::BGCOL) ← ++ *((const nomodify byte*) fn2::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + .label BG_COLOR = $d021 + // (*BG_COLOR)++; + // [12] *((const nomodify byte*) fn2::BG_COLOR) ← ++ *((const nomodify byte*) fn2::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // fn2::@return // } // [13] return @@ -620,10 +620,10 @@ fn2: { } // fn1 fn1: { - .label BORDERCOL = $d020 - // (*BORDERCOL)++; - // [14] *((const nomodify byte*) fn1::BORDERCOL) ← ++ *((const nomodify byte*) fn1::BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + .label BORDER_COLOR = $d020 + // (*BORDER_COLOR)++; + // [14] *((const nomodify byte*) fn1::BORDER_COLOR) ← ++ *((const nomodify byte*) fn1::BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // fn1::@return // } // [15] return diff --git a/src/test/ref/function-pointer-return.sym b/src/test/ref/function-pointer-return.sym index 52caf21d4..1bd9ec424 100644 --- a/src/test/ref/function-pointer-return.sym +++ b/src/test/ref/function-pointer-return.sym @@ -3,11 +3,11 @@ (label) @end (byte()) fn1() (label) fn1::@return -(const nomodify byte*) fn1::BORDERCOL = (byte*) 53280 +(const nomodify byte*) fn1::BORDER_COLOR = (byte*) 53280 (byte) fn1::return (byte()) fn2() (label) fn2::@return -(const nomodify byte*) fn2::BGCOL = (byte*) 53281 +(const nomodify byte*) fn2::BG_COLOR = (byte*) 53281 (byte) fn2::return (void()) main() (byte~) main::$0 reg byte a 202.0 diff --git a/src/test/ref/global-pc-multiple.asm b/src/test/ref/global-pc-multiple.asm index 7744f0788..bb6ea6ebb 100644 --- a/src/test/ref/global-pc-multiple.asm +++ b/src/test/ref/global-pc-multiple.asm @@ -2,7 +2,7 @@ .pc = $801 "Basic" :BasicUpstart(main) .pc = $2000 "Program" - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label RASTER = $d012 main: { // asm @@ -12,9 +12,9 @@ main: { lda RASTER cmp #$1e bcc __b2 - // *BGCOL = 0 + // *BG_COLOR = 0 lda #0 - sta BGCOL + sta BG_COLOR jmp __b1 __b2: // incScreen() @@ -22,9 +22,9 @@ main: { jmp __b1 } incScreen: { - // *BGCOL = *RASTER + // *BG_COLOR = *RASTER lda RASTER - sta BGCOL + sta BG_COLOR // } rts } diff --git a/src/test/ref/global-pc-multiple.cfg b/src/test/ref/global-pc-multiple.cfg index a8e323b1f..955701a64 100644 --- a/src/test/ref/global-pc-multiple.cfg +++ b/src/test/ref/global-pc-multiple.cfg @@ -16,7 +16,7 @@ main::@1: scope:[main] from main main::@2 main::@3 [5] if(*((const nomodify byte*) RASTER)<(byte) $1e) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@1 - [6] *((const nomodify byte*) BGCOL) ← (byte) 0 + [6] *((const nomodify byte*) BG_COLOR) ← (byte) 0 to:main::@1 main::@2: scope:[main] from main::@1 [7] phi() @@ -25,7 +25,7 @@ main::@2: scope:[main] from main::@1 (void()) incScreen() incScreen: scope:[incScreen] from main::@2 - [9] *((const nomodify byte*) BGCOL) ← *((const nomodify byte*) RASTER) + [9] *((const nomodify byte*) BG_COLOR) ← *((const nomodify byte*) RASTER) to:incScreen::@return incScreen::@return: scope:[incScreen] from incScreen [10] return diff --git a/src/test/ref/global-pc-multiple.log b/src/test/ref/global-pc-multiple.log index 43316bb6c..f25da0bfa 100644 --- a/src/test/ref/global-pc-multiple.log +++ b/src/test/ref/global-pc-multiple.log @@ -20,7 +20,7 @@ main::@3: scope:[main] from main::@2 main::@5: scope:[main] from main::@3 to:main::@1 main::@4: scope:[main] from main::@2 - *((const nomodify byte*) BGCOL) ← (number) 0 + *((const nomodify byte*) BG_COLOR) ← (number) 0 to:main::@1 main::@return: scope:[main] from main::@1 return @@ -28,7 +28,7 @@ main::@return: scope:[main] from main::@1 (void()) incScreen() incScreen: scope:[incScreen] from main::@3 - *((const nomodify byte*) BGCOL) ← *((const nomodify byte*) RASTER) + *((const nomodify byte*) BG_COLOR) ← *((const nomodify byte*) RASTER) to:incScreen::@return incScreen::@return: scope:[incScreen] from incScreen return @@ -45,7 +45,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const nomodify byte*) RASTER = (byte*)(number) $d012 (void()) incScreen() (label) incScreen::@return @@ -59,9 +59,9 @@ SYMBOL TABLE SSA (label) main::@return Adding number conversion cast (unumber) $1e in (bool~) main::$0 ← *((const nomodify byte*) RASTER) < (number) $1e -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BGCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BG_COLOR) ← (number) 0 Successful SSA optimization PassNAddNumberTypeConversions -Inlining cast *((const nomodify byte*) BGCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BG_COLOR) ← (unumber)(number) 0 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 53281 Simplifying constant pointer cast (byte*) 53266 @@ -120,7 +120,7 @@ main::@1: scope:[main] from main main::@2 main::@3 [5] if(*((const nomodify byte*) RASTER)<(byte) $1e) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@1 - [6] *((const nomodify byte*) BGCOL) ← (byte) 0 + [6] *((const nomodify byte*) BG_COLOR) ← (byte) 0 to:main::@1 main::@2: scope:[main] from main::@1 [7] phi() @@ -129,7 +129,7 @@ main::@2: scope:[main] from main::@1 (void()) incScreen() incScreen: scope:[incScreen] from main::@2 - [9] *((const nomodify byte*) BGCOL) ← *((const nomodify byte*) RASTER) + [9] *((const nomodify byte*) BG_COLOR) ← *((const nomodify byte*) RASTER) to:incScreen::@return incScreen::@return: scope:[incScreen] from incScreen [10] return @@ -152,7 +152,7 @@ Target platform is c64basic / MOS6502X :BasicUpstart(__bbegin) .pc = $2000 "Program" // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label RASTER = $d012 // @begin __bbegin: @@ -182,9 +182,9 @@ main: { jmp __b3 // main::@3 __b3: - // [6] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [6] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL + sta BG_COLOR jmp __b1 // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2] __b2_from___b1: @@ -197,9 +197,9 @@ main: { } // incScreen incScreen: { - // [9] *((const nomodify byte*) BGCOL) ← *((const nomodify byte*) RASTER) -- _deref_pbuc1=_deref_pbuc2 + // [9] *((const nomodify byte*) BG_COLOR) ← *((const nomodify byte*) RASTER) -- _deref_pbuc1=_deref_pbuc2 lda RASTER - sta BGCOL + sta BG_COLOR jmp __breturn // incScreen::@return __breturn: @@ -210,8 +210,8 @@ incScreen: { REGISTER UPLIFT POTENTIAL REGISTERS Statement [5] if(*((const nomodify byte*) RASTER)<(byte) $1e) goto main::@2 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [6] *((const nomodify byte*) BGCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [9] *((const nomodify byte*) BGCOL) ← *((const nomodify byte*) RASTER) [ ] ( main:2::incScreen:8 [ ] { } ) always clobbers reg byte a +Statement [6] *((const nomodify byte*) BG_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [9] *((const nomodify byte*) BG_COLOR) ← *((const nomodify byte*) RASTER) [ ] ( main:2::incScreen:8 [ ] { } ) always clobbers reg byte a REGISTER UPLIFT SCOPES Uplift Scope [main] @@ -230,7 +230,7 @@ ASSEMBLER BEFORE OPTIMIZATION :BasicUpstart(__bbegin) .pc = $2000 "Program" // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label RASTER = $d012 // @begin __bbegin: @@ -260,9 +260,9 @@ main: { jmp __b3 // main::@3 __b3: - // [6] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [6] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL + sta BG_COLOR jmp __b1 // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2] __b2_from___b1: @@ -275,9 +275,9 @@ main: { } // incScreen incScreen: { - // [9] *((const nomodify byte*) BGCOL) ← *((const nomodify byte*) RASTER) -- _deref_pbuc1=_deref_pbuc2 + // [9] *((const nomodify byte*) BG_COLOR) ← *((const nomodify byte*) RASTER) -- _deref_pbuc1=_deref_pbuc2 lda RASTER - sta BGCOL + sta BG_COLOR jmp __breturn // incScreen::@return __breturn: @@ -314,7 +314,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte*) RASTER = (byte*) 53266 (void()) incScreen() (label) incScreen::@return @@ -335,7 +335,7 @@ Score: 281 :BasicUpstart(main) .pc = $2000 "Program" // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label RASTER = $d012 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] @@ -356,10 +356,10 @@ main: { cmp #$1e bcc __b2 // main::@3 - // *BGCOL = 0 - // [6] *((const nomodify byte*) BGCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 0 + // [6] *((const nomodify byte*) BG_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BGCOL + sta BG_COLOR jmp __b1 // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2] // main::@2 @@ -371,10 +371,10 @@ main: { } // incScreen incScreen: { - // *BGCOL = *RASTER - // [9] *((const nomodify byte*) BGCOL) ← *((const nomodify byte*) RASTER) -- _deref_pbuc1=_deref_pbuc2 + // *BG_COLOR = *RASTER + // [9] *((const nomodify byte*) BG_COLOR) ← *((const nomodify byte*) RASTER) -- _deref_pbuc1=_deref_pbuc2 lda RASTER - sta BGCOL + sta BG_COLOR // incScreen::@return // } // [10] return diff --git a/src/test/ref/global-pc-multiple.sym b/src/test/ref/global-pc-multiple.sym index ffff4fbdd..1aae13101 100644 --- a/src/test/ref/global-pc-multiple.sym +++ b/src/test/ref/global-pc-multiple.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte*) RASTER = (byte*) 53266 (void()) incScreen() (label) incScreen::@return diff --git a/src/test/ref/global-pc.asm b/src/test/ref/global-pc.asm index a8070f7ee..3ac4e79f8 100644 --- a/src/test/ref/global-pc.asm +++ b/src/test/ref/global-pc.asm @@ -2,7 +2,7 @@ .pc = $801 "Basic" :BasicUpstart(main) .pc = $1000 "Program" - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label RASTER = $d012 main: { // asm @@ -10,7 +10,7 @@ main: { __b1: // col = *RASTER lda RASTER - // *BGCOL = col - sta BGCOL + // *BG_COLOR = col + sta BG_COLOR jmp __b1 } diff --git a/src/test/ref/global-pc.cfg b/src/test/ref/global-pc.cfg index 7e4064853..f909b13e5 100644 --- a/src/test/ref/global-pc.cfg +++ b/src/test/ref/global-pc.cfg @@ -14,5 +14,5 @@ main: scope:[main] from @1 to:main::@1 main::@1: scope:[main] from main main::@1 [5] (byte) main::col#0 ← *((const nomodify byte*) RASTER) - [6] *((const nomodify byte*) BGCOL) ← (byte) main::col#0 + [6] *((const nomodify byte*) BG_COLOR) ← (byte) main::col#0 to:main::@1 diff --git a/src/test/ref/global-pc.log b/src/test/ref/global-pc.log index de27cd7a6..ae819ca7f 100644 --- a/src/test/ref/global-pc.log +++ b/src/test/ref/global-pc.log @@ -12,7 +12,7 @@ main::@1: scope:[main] from main main::@2 to:main::@return main::@2: scope:[main] from main::@1 (byte) main::col#0 ← *((const nomodify byte*) RASTER) - *((const nomodify byte*) BGCOL) ← (byte) main::col#0 + *((const nomodify byte*) BG_COLOR) ← (byte) main::col#0 to:main::@1 main::@return: scope:[main] from main::@1 return @@ -29,7 +29,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const nomodify byte*) RASTER = (byte*)(number) $d012 (void()) main() (label) main::@1 @@ -79,7 +79,7 @@ main: scope:[main] from @1 to:main::@1 main::@1: scope:[main] from main main::@1 [5] (byte) main::col#0 ← *((const nomodify byte*) RASTER) - [6] *((const nomodify byte*) BGCOL) ← (byte) main::col#0 + [6] *((const nomodify byte*) BG_COLOR) ← (byte) main::col#0 to:main::@1 @@ -103,7 +103,7 @@ Target platform is c64basic / MOS6502X :BasicUpstart(__bbegin) .pc = $1000 "Program" // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label RASTER = $d012 // @begin __bbegin: @@ -130,9 +130,9 @@ main: { // [5] (byte) main::col#0 ← *((const nomodify byte*) RASTER) -- vbuz1=_deref_pbuc1 lda RASTER sta.z col - // [6] *((const nomodify byte*) BGCOL) ← (byte) main::col#0 -- _deref_pbuc1=vbuz1 + // [6] *((const nomodify byte*) BG_COLOR) ← (byte) main::col#0 -- _deref_pbuc1=vbuz1 lda.z col - sta BGCOL + sta BG_COLOR jmp __b1 } // File Data @@ -155,7 +155,7 @@ ASSEMBLER BEFORE OPTIMIZATION :BasicUpstart(__bbegin) .pc = $1000 "Program" // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label RASTER = $d012 // @begin __bbegin: @@ -180,8 +180,8 @@ main: { __b1: // [5] (byte) main::col#0 ← *((const nomodify byte*) RASTER) -- vbuaa=_deref_pbuc1 lda RASTER - // [6] *((const nomodify byte*) BGCOL) ← (byte) main::col#0 -- _deref_pbuc1=vbuaa - sta BGCOL + // [6] *((const nomodify byte*) BG_COLOR) ← (byte) main::col#0 -- _deref_pbuc1=vbuaa + sta BG_COLOR jmp __b1 } // File Data @@ -207,7 +207,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte*) RASTER = (byte*) 53266 (void()) main() (label) main::@1 @@ -227,7 +227,7 @@ Score: 112 :BasicUpstart(main) .pc = $1000 "Program" // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label RASTER = $d012 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] @@ -245,9 +245,9 @@ main: { // col = *RASTER // [5] (byte) main::col#0 ← *((const nomodify byte*) RASTER) -- vbuaa=_deref_pbuc1 lda RASTER - // *BGCOL = col - // [6] *((const nomodify byte*) BGCOL) ← (byte) main::col#0 -- _deref_pbuc1=vbuaa - sta BGCOL + // *BG_COLOR = col + // [6] *((const nomodify byte*) BG_COLOR) ← (byte) main::col#0 -- _deref_pbuc1=vbuaa + sta BG_COLOR jmp __b1 } // File Data diff --git a/src/test/ref/global-pc.sym b/src/test/ref/global-pc.sym index b77e39785..13c8958cf 100644 --- a/src/test/ref/global-pc.sym +++ b/src/test/ref/global-pc.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte*) RASTER = (byte*) 53266 (void()) main() (label) main::@1 diff --git a/src/test/ref/hex2dec.asm b/src/test/ref/hex2dec.asm index 604e9579c..4b73a972f 100644 --- a/src/test/ref/hex2dec.asm +++ b/src/test/ref/hex2dec.asm @@ -4,7 +4,7 @@ .pc = $80d "Program" .label control = $d011 .label raster = $d012 - .label bordercol = $d020 + .label BORDER_COLOR = $d020 main: { .label __1 = 6 .label time_start = 7 @@ -25,9 +25,9 @@ main: { // while (rst!=0x30) cmp #$30 bne __b1 - // *bordercol = 1 + // *BORDER_COLOR = 1 lda #1 - sta bordercol + sta BORDER_COLOR // time_start = *raster lda raster sta.z time_start @@ -40,8 +40,8 @@ main: { sta.z utoa16w.value sta.z utoa16w.value+1 jsr utoa16w - // (*bordercol)++; - inc bordercol + // (*BORDER_COLOR)++; + inc BORDER_COLOR // utoa16w(01234, screen) lda #<$400+$28 sta.z utoa16w.dst @@ -52,8 +52,8 @@ main: { lda #>$4d2 sta.z utoa16w.value+1 jsr utoa16w - // (*bordercol)++; - inc bordercol + // (*BORDER_COLOR)++; + inc BORDER_COLOR // utoa16w(05678, screen) lda #<$400+$28+$28 sta.z utoa16w.dst @@ -64,8 +64,8 @@ main: { lda #>$162e sta.z utoa16w.value+1 jsr utoa16w - // (*bordercol)++; - inc bordercol + // (*BORDER_COLOR)++; + inc BORDER_COLOR // utoa16w(09999, screen) lda #<$400+$28+$28+$28 sta.z utoa16w.dst @@ -76,8 +76,8 @@ main: { lda #>$270f sta.z utoa16w.value+1 jsr utoa16w - // (*bordercol)++; - inc bordercol + // (*BORDER_COLOR)++; + inc BORDER_COLOR // utoa16w(58888, screen) lda #<$400+$28+$28+$28+$28 sta.z utoa16w.dst @@ -90,9 +90,9 @@ main: { jsr utoa16w // time_end = *raster ldx raster - // *bordercol = 0 + // *BORDER_COLOR = 0 lda #0 - sta bordercol + sta BORDER_COLOR // time = time_end - time_start txa sec diff --git a/src/test/ref/hex2dec.cfg b/src/test/ref/hex2dec.cfg index a502d4676..bc53fad7a 100644 --- a/src/test/ref/hex2dec.cfg +++ b/src/test/ref/hex2dec.cfg @@ -20,34 +20,34 @@ main::@1: scope:[main] from main main::@1 main::@3 [9] if((byte) main::rst#0!=(byte) $30) goto main::@1 to:main::@2 main::@2: scope:[main] from main::@1 - [10] *((const nomodify byte*) bordercol) ← (byte) 1 + [10] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 [11] (byte) main::time_start#0 ← *((const nomodify byte*) raster) [12] (volatile byte*) utoa16w::dst ← (byte*) 1024 [13] call utoa16w to:main::@5 main::@5: scope:[main] from main::@2 - [14] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) + [14] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) [15] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28 [16] call utoa16w to:main::@6 main::@6: scope:[main] from main::@5 - [17] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) + [17] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) [18] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28 [19] call utoa16w to:main::@7 main::@7: scope:[main] from main::@6 - [20] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) + [20] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) [21] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28+(byte) $28 [22] call utoa16w to:main::@8 main::@8: scope:[main] from main::@7 - [23] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) + [23] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) [24] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28+(byte) $28+(byte) $28 [25] call utoa16w to:main::@9 main::@9: scope:[main] from main::@8 [26] (byte) main::time_end#0 ← *((const nomodify byte*) raster) - [27] *((const nomodify byte*) bordercol) ← (byte) 0 + [27] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [28] (byte) main::time#0 ← (byte) main::time_end#0 - (byte) main::time_start#0 [29] (word) utoa10w::value#0 ← (word)(byte) main::time#0 [30] call utoa10w diff --git a/src/test/ref/hex2dec.log b/src/test/ref/hex2dec.log index 5370cc3fe..4c6d1b49b 100644 --- a/src/test/ref/hex2dec.log +++ b/src/test/ref/hex2dec.log @@ -27,7 +27,7 @@ main::@2: scope:[main] from main::@1 main::@2 to:main::@3 main::@3: scope:[main] from main::@2 (byte*) main::screen#0 ← (byte*)(number) $400 - *((const nomodify byte*) bordercol) ← (number) 1 + *((const nomodify byte*) BORDER_COLOR) ← (number) 1 (byte) main::time_start#0 ← *((const nomodify byte*) raster) (word) utoa16w::value#0 ← (number) 0 (volatile byte*) utoa16w::dst ← (byte*) main::screen#0 @@ -36,7 +36,7 @@ main::@3: scope:[main] from main::@2 main::@7: scope:[main] from main::@3 (byte) main::time_start#5 ← phi( main::@3/(byte) main::time_start#0 ) (byte*) main::screen#5 ← phi( main::@3/(byte*) main::screen#0 ) - *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) + *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) (byte*) main::screen#1 ← (byte*) main::screen#5 + (number) $28 (word) utoa16w::value#1 ← (number) $4d2 (volatile byte*) utoa16w::dst ← (byte*) main::screen#1 @@ -45,7 +45,7 @@ main::@7: scope:[main] from main::@3 main::@8: scope:[main] from main::@7 (byte) main::time_start#4 ← phi( main::@7/(byte) main::time_start#5 ) (byte*) main::screen#6 ← phi( main::@7/(byte*) main::screen#1 ) - *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) + *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) (byte*) main::screen#2 ← (byte*) main::screen#6 + (number) $28 (word) utoa16w::value#2 ← (number) $162e (volatile byte*) utoa16w::dst ← (byte*) main::screen#2 @@ -54,7 +54,7 @@ main::@8: scope:[main] from main::@7 main::@9: scope:[main] from main::@8 (byte) main::time_start#3 ← phi( main::@8/(byte) main::time_start#4 ) (byte*) main::screen#7 ← phi( main::@8/(byte*) main::screen#2 ) - *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) + *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) (byte*) main::screen#3 ← (byte*) main::screen#7 + (number) $28 (word) utoa16w::value#3 ← (number) $270f (volatile byte*) utoa16w::dst ← (byte*) main::screen#3 @@ -63,7 +63,7 @@ main::@9: scope:[main] from main::@8 main::@10: scope:[main] from main::@9 (byte) main::time_start#2 ← phi( main::@9/(byte) main::time_start#3 ) (byte*) main::screen#8 ← phi( main::@9/(byte*) main::screen#3 ) - *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) + *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) (byte*) main::screen#4 ← (byte*) main::screen#8 + (number) $28 (word) utoa16w::value#4 ← (number) $e608 (volatile byte*) utoa16w::dst ← (byte*) main::screen#4 @@ -73,7 +73,7 @@ main::@11: scope:[main] from main::@10 (byte*) main::screen#9 ← phi( main::@10/(byte*) main::screen#4 ) (byte) main::time_start#1 ← phi( main::@10/(byte) main::time_start#2 ) (byte) main::time_end#0 ← *((const nomodify byte*) raster) - *((const nomodify byte*) bordercol) ← (number) 0 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 (byte~) main::$14 ← (byte) main::time_end#0 - (byte) main::time_start#1 (byte) main::time#0 ← (byte~) main::$14 (byte*~) main::$15 ← (byte*) main::screen#9 + (number) $50 @@ -314,11 +314,11 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const byte*) DIGITS[] = (byte*) "0123456789abcdef" (const byte) SIZEOF_WORD = (byte) 2 (const word*) UTOA10_SUB[] = { (word) $7530, (word) $2710, (word) $bb8, (word) $3e8, (word) $12c, (word) $64, (word) $1e, (word) $a } (const byte*) UTOA10_VAL[] = { (byte) 3, (byte) 1, (byte) 3, (byte) 1, (byte) 3, (byte) 1, (byte) 3, (byte) 1 } -(const nomodify byte*) bordercol = (byte*)(number) $d020 (void()) cls() (byte*~) cls::$0 (bool~) cls::$1 @@ -549,7 +549,7 @@ Adding number conversion cast (unumber) main::$1 in (number~) main::$1 ← *((co Adding number conversion cast (unumber) 1 in (byte~) main::$2 ← *((const nomodify byte*) raster) >> (number) 1 Adding number conversion cast (unumber) main::$3 in (number~) main::$3 ← (unumber~) main::$1 | (byte~) main::$2 Adding number conversion cast (unumber) $30 in (bool~) main::$4 ← (byte) main::rst#0 != (number) $30 -Adding number conversion cast (unumber) 1 in *((const nomodify byte*) bordercol) ← (number) 1 +Adding number conversion cast (unumber) 1 in *((const nomodify byte*) BORDER_COLOR) ← (number) 1 Adding number conversion cast (unumber) 0 in (word) utoa16w::value#0 ← (number) 0 Adding number conversion cast (unumber) $28 in (byte*) main::screen#1 ← (byte*) main::screen#5 + (number) $28 Adding number conversion cast (unumber) $4d2 in (word) utoa16w::value#1 ← (number) $4d2 @@ -559,7 +559,7 @@ Adding number conversion cast (unumber) $28 in (byte*) main::screen#3 ← (byte* Adding number conversion cast (unumber) $270f in (word) utoa16w::value#3 ← (number) $270f Adding number conversion cast (unumber) $28 in (byte*) main::screen#4 ← (byte*) main::screen#8 + (number) $28 Adding number conversion cast (unumber) $e608 in (word) utoa16w::value#4 ← (number) $e608 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) bordercol) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 Adding number conversion cast (unumber) $50 in (byte*~) main::$15 ← (byte*) main::screen#9 + (number) $50 Adding number conversion cast (unumber) 0 in (bool~) main::$17 ← *((const byte*) main::msg + (byte) main::i#2) != (number) 0 Adding number conversion cast (unumber) $50 in (byte*~) main::$18 ← (byte*) main::screen#10 + (number) $50 @@ -584,13 +584,13 @@ Adding number conversion cast (unumber) 0 in (bool~) utoa16n::$0 ← (byte) utoa Adding number conversion cast (unumber) 0 in (bool~) utoa16n::$2 ← (byte) utoa16n::started#5 != (number) 0 Adding number conversion cast (unumber) 1 in (byte) utoa16n::started#4 ← (number) 1 Successful SSA optimization PassNAddNumberTypeConversions -Inlining cast *((const nomodify byte*) bordercol) ← (unumber)(number) 1 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 1 Inlining cast (word) utoa16w::value#0 ← (unumber)(number) 0 Inlining cast (word) utoa16w::value#1 ← (unumber)(number) $4d2 Inlining cast (word) utoa16w::value#2 ← (unumber)(number) $162e Inlining cast (word) utoa16w::value#3 ← (unumber)(number) $270f Inlining cast (word) utoa16w::value#4 ← (unumber)(number) $e608 -Inlining cast *((const nomodify byte*) bordercol) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 Inlining cast (byte) utoa10w::bStarted#1 ← (unumber)(number) 1 Inlining cast (byte) utoa10w::digit#2 ← (unumber)(number) 0 Inlining cast *((byte*) utoa10w::dst#2) ← (unumber)(number) 0 @@ -979,34 +979,34 @@ main::@1: scope:[main] from main main::@1 main::@3 [9] if((byte) main::rst#0!=(byte) $30) goto main::@1 to:main::@2 main::@2: scope:[main] from main::@1 - [10] *((const nomodify byte*) bordercol) ← (byte) 1 + [10] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 [11] (byte) main::time_start#0 ← *((const nomodify byte*) raster) [12] (volatile byte*) utoa16w::dst ← (byte*) 1024 [13] call utoa16w to:main::@5 main::@5: scope:[main] from main::@2 - [14] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) + [14] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) [15] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28 [16] call utoa16w to:main::@6 main::@6: scope:[main] from main::@5 - [17] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) + [17] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) [18] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28 [19] call utoa16w to:main::@7 main::@7: scope:[main] from main::@6 - [20] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) + [20] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) [21] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28+(byte) $28 [22] call utoa16w to:main::@8 main::@8: scope:[main] from main::@7 - [23] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) + [23] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) [24] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28+(byte) $28+(byte) $28 [25] call utoa16w to:main::@9 main::@9: scope:[main] from main::@8 [26] (byte) main::time_end#0 ← *((const nomodify byte*) raster) - [27] *((const nomodify byte*) bordercol) ← (byte) 0 + [27] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [28] (byte) main::time#0 ← (byte) main::time_end#0 - (byte) main::time_start#0 [29] (word) utoa10w::value#0 ← (word)(byte) main::time#0 [30] call utoa10w @@ -1315,7 +1315,7 @@ Target platform is c64basic / MOS6502X // Global Constants & labels .label control = $d011 .label raster = $d012 - .label bordercol = $d020 + .label BORDER_COLOR = $d020 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -1367,9 +1367,9 @@ main: { jmp __b2 // main::@2 __b2: - // [10] *((const nomodify byte*) bordercol) ← (byte) 1 -- _deref_pbuc1=vbuc2 + // [10] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 -- _deref_pbuc1=vbuc2 lda #1 - sta bordercol + sta BORDER_COLOR // [11] (byte) main::time_start#0 ← *((const nomodify byte*) raster) -- vbuz1=_deref_pbuc1 lda raster sta.z time_start @@ -1390,8 +1390,8 @@ main: { jmp __b5 // main::@5 __b5: - // [14] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) -- _deref_pbuc1=_inc__deref_pbuc1 - inc bordercol + // [14] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // [15] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28 -- pbuz1=pbuc1 lda #<$400+$28 sta.z utoa16w.dst @@ -1409,8 +1409,8 @@ main: { jmp __b6 // main::@6 __b6: - // [17] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) -- _deref_pbuc1=_inc__deref_pbuc1 - inc bordercol + // [17] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // [18] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28 -- pbuz1=pbuc1 lda #<$400+$28+$28 sta.z utoa16w.dst @@ -1428,8 +1428,8 @@ main: { jmp __b7 // main::@7 __b7: - // [20] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) -- _deref_pbuc1=_inc__deref_pbuc1 - inc bordercol + // [20] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // [21] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28+(byte) $28 -- pbuz1=pbuc1 lda #<$400+$28+$28+$28 sta.z utoa16w.dst @@ -1447,8 +1447,8 @@ main: { jmp __b8 // main::@8 __b8: - // [23] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) -- _deref_pbuc1=_inc__deref_pbuc1 - inc bordercol + // [23] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // [24] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28+(byte) $28+(byte) $28 -- pbuz1=pbuc1 lda #<$400+$28+$28+$28+$28 sta.z utoa16w.dst @@ -1469,9 +1469,9 @@ main: { // [26] (byte) main::time_end#0 ← *((const nomodify byte*) raster) -- vbuz1=_deref_pbuc1 lda raster sta.z time_end - // [27] *((const nomodify byte*) bordercol) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [27] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta bordercol + sta BORDER_COLOR // [28] (byte) main::time#0 ← (byte) main::time_end#0 - (byte) main::time_start#0 -- vbuz1=vbuz2_minus_vbuz3 lda.z time_end sec @@ -1913,14 +1913,14 @@ REGISTER UPLIFT POTENTIAL REGISTERS Statement [6] (byte~) main::$1 ← *((const nomodify byte*) control) & (byte) $80 [ main::$1 ] ( main:2 [ main::$1 ] { } ) always clobbers reg byte a Statement [7] (byte~) main::$2 ← *((const nomodify byte*) raster) >> (byte) 1 [ main::$1 main::$2 ] ( main:2 [ main::$1 main::$2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:16 [ main::$1 ] -Statement [10] *((const nomodify byte*) bordercol) ← (byte) 1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [10] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [12] (volatile byte*) utoa16w::dst ← (byte*) 1024 [ main::time_start#0 utoa16w::dst ] ( main:2 [ main::time_start#0 utoa16w::dst ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:19 [ main::time_start#0 ] Statement [15] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28 [ main::time_start#0 utoa16w::dst ] ( main:2 [ main::time_start#0 utoa16w::dst ] { } ) always clobbers reg byte a Statement [18] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28 [ main::time_start#0 utoa16w::dst ] ( main:2 [ main::time_start#0 utoa16w::dst ] { } ) always clobbers reg byte a Statement [21] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28+(byte) $28 [ main::time_start#0 utoa16w::dst ] ( main:2 [ main::time_start#0 utoa16w::dst ] { } ) always clobbers reg byte a Statement [24] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28+(byte) $28+(byte) $28 [ main::time_start#0 utoa16w::dst ] ( main:2 [ main::time_start#0 utoa16w::dst ] { } ) always clobbers reg byte a -Statement [27] *((const nomodify byte*) bordercol) ← (byte) 0 [ main::time_start#0 main::time_end#0 ] ( main:2 [ main::time_start#0 main::time_end#0 ] { } ) always clobbers reg byte a +Statement [27] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ main::time_start#0 main::time_end#0 ] ( main:2 [ main::time_start#0 main::time_end#0 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:22 [ main::time_end#0 ] Statement [28] (byte) main::time#0 ← (byte) main::time_end#0 - (byte) main::time_start#0 [ main::time#0 ] ( main:2 [ main::time#0 ] { } ) always clobbers reg byte a Statement [29] (word) utoa10w::value#0 ← (word)(byte) main::time#0 [ utoa10w::value#0 ] ( main:2 [ utoa10w::value#0 ] { } ) always clobbers reg byte a @@ -1955,13 +1955,13 @@ Statement [87] *((byte*) cls::sc#2) ← (byte) ' ' [ cls::sc#2 ] ( main:2::cls:5 Statement [89] if((byte*) cls::sc#1!=(const byte*) cls::screen+(word) $3e7+(byte) 1) goto cls::@1 [ cls::sc#1 ] ( main:2::cls:5 [ cls::sc#1 ] { } ) always clobbers reg byte a Statement [6] (byte~) main::$1 ← *((const nomodify byte*) control) & (byte) $80 [ main::$1 ] ( main:2 [ main::$1 ] { } ) always clobbers reg byte a Statement [7] (byte~) main::$2 ← *((const nomodify byte*) raster) >> (byte) 1 [ main::$1 main::$2 ] ( main:2 [ main::$1 main::$2 ] { } ) always clobbers reg byte a -Statement [10] *((const nomodify byte*) bordercol) ← (byte) 1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [10] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [12] (volatile byte*) utoa16w::dst ← (byte*) 1024 [ main::time_start#0 utoa16w::dst ] ( main:2 [ main::time_start#0 utoa16w::dst ] { } ) always clobbers reg byte a Statement [15] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28 [ main::time_start#0 utoa16w::dst ] ( main:2 [ main::time_start#0 utoa16w::dst ] { } ) always clobbers reg byte a Statement [18] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28 [ main::time_start#0 utoa16w::dst ] ( main:2 [ main::time_start#0 utoa16w::dst ] { } ) always clobbers reg byte a Statement [21] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28+(byte) $28 [ main::time_start#0 utoa16w::dst ] ( main:2 [ main::time_start#0 utoa16w::dst ] { } ) always clobbers reg byte a Statement [24] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28+(byte) $28+(byte) $28 [ main::time_start#0 utoa16w::dst ] ( main:2 [ main::time_start#0 utoa16w::dst ] { } ) always clobbers reg byte a -Statement [27] *((const nomodify byte*) bordercol) ← (byte) 0 [ main::time_start#0 main::time_end#0 ] ( main:2 [ main::time_start#0 main::time_end#0 ] { } ) always clobbers reg byte a +Statement [27] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ main::time_start#0 main::time_end#0 ] ( main:2 [ main::time_start#0 main::time_end#0 ] { } ) always clobbers reg byte a Statement [28] (byte) main::time#0 ← (byte) main::time_end#0 - (byte) main::time_start#0 [ main::time#0 ] ( main:2 [ main::time#0 ] { } ) always clobbers reg byte a Statement [29] (word) utoa10w::value#0 ← (word)(byte) main::time#0 [ utoa10w::value#0 ] ( main:2 [ utoa10w::value#0 ] { } ) always clobbers reg byte a Statement [32] if(*((const byte*) main::msg + (byte) main::i#2)!=(byte) 0) goto main::@4 [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a @@ -2073,7 +2073,7 @@ ASSEMBLER BEFORE OPTIMIZATION // Global Constants & labels .label control = $d011 .label raster = $d012 - .label bordercol = $d020 + .label BORDER_COLOR = $d020 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -2116,9 +2116,9 @@ main: { jmp __b2 // main::@2 __b2: - // [10] *((const nomodify byte*) bordercol) ← (byte) 1 -- _deref_pbuc1=vbuc2 + // [10] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 -- _deref_pbuc1=vbuc2 lda #1 - sta bordercol + sta BORDER_COLOR // [11] (byte) main::time_start#0 ← *((const nomodify byte*) raster) -- vbuz1=_deref_pbuc1 lda raster sta.z time_start @@ -2139,8 +2139,8 @@ main: { jmp __b5 // main::@5 __b5: - // [14] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) -- _deref_pbuc1=_inc__deref_pbuc1 - inc bordercol + // [14] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // [15] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28 -- pbuz1=pbuc1 lda #<$400+$28 sta.z utoa16w.dst @@ -2158,8 +2158,8 @@ main: { jmp __b6 // main::@6 __b6: - // [17] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) -- _deref_pbuc1=_inc__deref_pbuc1 - inc bordercol + // [17] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // [18] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28 -- pbuz1=pbuc1 lda #<$400+$28+$28 sta.z utoa16w.dst @@ -2177,8 +2177,8 @@ main: { jmp __b7 // main::@7 __b7: - // [20] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) -- _deref_pbuc1=_inc__deref_pbuc1 - inc bordercol + // [20] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // [21] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28+(byte) $28 -- pbuz1=pbuc1 lda #<$400+$28+$28+$28 sta.z utoa16w.dst @@ -2196,8 +2196,8 @@ main: { jmp __b8 // main::@8 __b8: - // [23] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) -- _deref_pbuc1=_inc__deref_pbuc1 - inc bordercol + // [23] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // [24] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28+(byte) $28+(byte) $28 -- pbuz1=pbuc1 lda #<$400+$28+$28+$28+$28 sta.z utoa16w.dst @@ -2217,9 +2217,9 @@ main: { __b9: // [26] (byte) main::time_end#0 ← *((const nomodify byte*) raster) -- vbuxx=_deref_pbuc1 ldx raster - // [27] *((const nomodify byte*) bordercol) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [27] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta bordercol + sta BORDER_COLOR // [28] (byte) main::time#0 ← (byte) main::time_end#0 - (byte) main::time_start#0 -- vbuaa=vbuxx_minus_vbuz1 txa sec @@ -2703,10 +2703,10 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const byte*) DIGITS[] = (byte*) "0123456789abcdef" (const word*) UTOA10_SUB[] = { (word) $7530, (word) $2710, (word) $bb8, (word) $3e8, (word) $12c, (word) $64, (word) $1e, (word) $a } (const byte*) UTOA10_VAL[] = { (byte) 3, (byte) 1, (byte) 3, (byte) 1, (byte) 3, (byte) 1, (byte) 3, (byte) 1 } -(const nomodify byte*) bordercol = (byte*) 53280 (void()) cls() (label) cls::@1 (label) cls::@return @@ -2850,7 +2850,7 @@ Score: 22318 // Global Constants & labels .label control = $d011 .label raster = $d012 - .label bordercol = $d020 + .label BORDER_COLOR = $d020 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] // @1 @@ -2887,10 +2887,10 @@ main: { cmp #$30 bne __b1 // main::@2 - // *bordercol = 1 - // [10] *((const nomodify byte*) bordercol) ← (byte) 1 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 1 + // [10] *((const nomodify byte*) BORDER_COLOR) ← (byte) 1 -- _deref_pbuc1=vbuc2 lda #1 - sta bordercol + sta BORDER_COLOR // time_start = *raster // [11] (byte) main::time_start#0 ← *((const nomodify byte*) raster) -- vbuz1=_deref_pbuc1 lda raster @@ -2909,9 +2909,9 @@ main: { sta.z utoa16w.value+1 jsr utoa16w // main::@5 - // (*bordercol)++; - // [14] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) -- _deref_pbuc1=_inc__deref_pbuc1 - inc bordercol + // (*BORDER_COLOR)++; + // [14] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // utoa16w(01234, screen) // [15] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28 -- pbuz1=pbuc1 lda #<$400+$28 @@ -2927,9 +2927,9 @@ main: { sta.z utoa16w.value+1 jsr utoa16w // main::@6 - // (*bordercol)++; - // [17] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) -- _deref_pbuc1=_inc__deref_pbuc1 - inc bordercol + // (*BORDER_COLOR)++; + // [17] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // utoa16w(05678, screen) // [18] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28 -- pbuz1=pbuc1 lda #<$400+$28+$28 @@ -2945,9 +2945,9 @@ main: { sta.z utoa16w.value+1 jsr utoa16w // main::@7 - // (*bordercol)++; - // [20] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) -- _deref_pbuc1=_inc__deref_pbuc1 - inc bordercol + // (*BORDER_COLOR)++; + // [20] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // utoa16w(09999, screen) // [21] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28+(byte) $28 -- pbuz1=pbuc1 lda #<$400+$28+$28+$28 @@ -2963,9 +2963,9 @@ main: { sta.z utoa16w.value+1 jsr utoa16w // main::@8 - // (*bordercol)++; - // [23] *((const nomodify byte*) bordercol) ← ++ *((const nomodify byte*) bordercol) -- _deref_pbuc1=_inc__deref_pbuc1 - inc bordercol + // (*BORDER_COLOR)++; + // [23] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // utoa16w(58888, screen) // [24] (volatile byte*) utoa16w::dst ← (byte*) 1024+(byte) $28+(byte) $28+(byte) $28+(byte) $28 -- pbuz1=pbuc1 lda #<$400+$28+$28+$28+$28 @@ -2984,10 +2984,10 @@ main: { // time_end = *raster // [26] (byte) main::time_end#0 ← *((const nomodify byte*) raster) -- vbuxx=_deref_pbuc1 ldx raster - // *bordercol = 0 - // [27] *((const nomodify byte*) bordercol) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 0 + // [27] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta bordercol + sta BORDER_COLOR // time = time_end - time_start // [28] (byte) main::time#0 ← (byte) main::time_end#0 - (byte) main::time_start#0 -- vbuaa=vbuxx_minus_vbuz1 txa diff --git a/src/test/ref/hex2dec.sym b/src/test/ref/hex2dec.sym index 5062447f5..44203b751 100644 --- a/src/test/ref/hex2dec.sym +++ b/src/test/ref/hex2dec.sym @@ -1,10 +1,10 @@ (label) @1 (label) @begin (label) @end +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const byte*) DIGITS[] = (byte*) "0123456789abcdef" (const word*) UTOA10_SUB[] = { (word) $7530, (word) $2710, (word) $bb8, (word) $3e8, (word) $12c, (word) $64, (word) $1e, (word) $a } (const byte*) UTOA10_VAL[] = { (byte) 3, (byte) 1, (byte) 3, (byte) 1, (byte) 3, (byte) 1, (byte) 3, (byte) 1 } -(const nomodify byte*) bordercol = (byte*) 53280 (void()) cls() (label) cls::@1 (label) cls::@return diff --git a/src/test/ref/importing.asm b/src/test/ref/importing.asm index c8c1dd95f..0b1b5170d 100644 --- a/src/test/ref/importing.asm +++ b/src/test/ref/importing.asm @@ -2,15 +2,15 @@ :BasicUpstart(main) .pc = $80d "Program" .const RED = 2 - .label BGCOL = $d021 + .label BG_COLOR = $d021 main: { .label screen = $400 // *screen = 1 lda #1 sta screen - // *BGCOL = RED + // *BG_COLOR = RED lda #RED - sta BGCOL + sta BG_COLOR // } rts } diff --git a/src/test/ref/importing.cfg b/src/test/ref/importing.cfg index f7891e93a..a5c92d202 100644 --- a/src/test/ref/importing.cfg +++ b/src/test/ref/importing.cfg @@ -11,7 +11,7 @@ (void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen) ← (byte) 1 - [5] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED + [5] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED to:main::@return main::@return: scope:[main] from main [6] return diff --git a/src/test/ref/importing.log b/src/test/ref/importing.log index f677ad370..836644c2e 100644 --- a/src/test/ref/importing.log +++ b/src/test/ref/importing.log @@ -6,7 +6,7 @@ CONTROL FLOW GRAPH SSA (void()) main() main: scope:[main] from @1 *((const byte*) main::screen) ← (number) 1 - *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED to:main::@return main::@return: scope:[main] from main return @@ -23,7 +23,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const nomodify byte) RED = (byte) 2 (void()) main() (label) main::@return @@ -67,7 +67,7 @@ FINAL CONTROL FLOW GRAPH (void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen) ← (byte) 1 - [5] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED + [5] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED to:main::@return main::@return: scope:[main] from main [6] return @@ -89,7 +89,7 @@ Target platform is c64basic / MOS6502X .pc = $80d "Program" // Global Constants & labels .const RED = 2 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -110,9 +110,9 @@ main: { // [4] *((const byte*) main::screen) ← (byte) 1 -- _deref_pbuc1=vbuc2 lda #1 sta screen - // [5] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // [5] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BGCOL + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -123,7 +123,7 @@ main: { REGISTER UPLIFT POTENTIAL REGISTERS Statement [4] *((const byte*) main::screen) ← (byte) 1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [5] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [5] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED [ ] ( main:2 [ ] { } ) always clobbers reg byte a REGISTER UPLIFT SCOPES Uplift Scope [main] @@ -140,7 +140,7 @@ ASSEMBLER BEFORE OPTIMIZATION .pc = $80d "Program" // Global Constants & labels .const RED = 2 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -161,9 +161,9 @@ main: { // [4] *((const byte*) main::screen) ← (byte) 1 -- _deref_pbuc1=vbuc2 lda #1 sta screen - // [5] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // [5] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BGCOL + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -194,7 +194,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) RED = (byte) 2 (void()) main() (label) main::@return @@ -212,7 +212,7 @@ Score: 18 .pc = $80d "Program" // Global Constants & labels .const RED = 2 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] // @1 @@ -226,10 +226,10 @@ main: { // [4] *((const byte*) main::screen) ← (byte) 1 -- _deref_pbuc1=vbuc2 lda #1 sta screen - // *BGCOL = RED - // [5] *((const nomodify byte*) BGCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // *BG_COLOR = RED + // [5] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BGCOL + sta BG_COLOR // main::@return // } // [6] return diff --git a/src/test/ref/importing.sym b/src/test/ref/importing.sym index 709ec4fd3..95dcec390 100644 --- a/src/test/ref/importing.sym +++ b/src/test/ref/importing.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) RED = (byte) 2 (void()) main() (label) main::@return diff --git a/src/test/ref/incd020.asm b/src/test/ref/incd020.asm index 0c2b97231..827ae9674 100644 --- a/src/test/ref/incd020.asm +++ b/src/test/ref/incd020.asm @@ -3,12 +3,12 @@ .pc = $801 "Basic" :BasicUpstart(main) .pc = $80d "Program" - .label BGCOL = $d020 + .label BG_COLOR = $d020 main: { __b1: - // ++*BGCOL; - inc BGCOL - // (*BGCOL)--; - dec BGCOL + // ++*BG_COLOR; + inc BG_COLOR + // (*BG_COLOR)--; + dec BG_COLOR jmp __b1 } diff --git a/src/test/ref/incd020.cfg b/src/test/ref/incd020.cfg index 14ae2d2c7..6bb0ee116 100644 --- a/src/test/ref/incd020.cfg +++ b/src/test/ref/incd020.cfg @@ -13,6 +13,6 @@ main: scope:[main] from @1 [4] phi() to:main::@1 main::@1: scope:[main] from main main::@1 - [5] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) - [6] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) + [5] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) + [6] *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) to:main::@1 diff --git a/src/test/ref/incd020.log b/src/test/ref/incd020.log index 37ba8431f..722ad17c1 100644 --- a/src/test/ref/incd020.log +++ b/src/test/ref/incd020.log @@ -7,8 +7,8 @@ CONTROL FLOW GRAPH SSA main: scope:[main] from @1 to:main::@1 main::@1: scope:[main] from main main::@1 - *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) - *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) + *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) + *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) if(true) goto main::@1 to:main::@return main::@return: scope:[main] from main::@1 @@ -26,7 +26,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const byte*) BGCOL = (byte*)(number) $d020 +(const byte*) BG_COLOR = (byte*)(number) $d020 (void()) main() (label) main::@1 (label) main::@return @@ -69,8 +69,8 @@ main: scope:[main] from @1 [4] phi() to:main::@1 main::@1: scope:[main] from main main::@1 - [5] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) - [6] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) + [5] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) + [6] *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) to:main::@1 @@ -90,7 +90,7 @@ Target platform is c64basic / MOS6502X :BasicUpstart(__bbegin) .pc = $80d "Program" // Global Constants & labels - .label BGCOL = $d020 + .label BG_COLOR = $d020 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -112,10 +112,10 @@ main: { jmp __b1 // main::@1 __b1: - // [5] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL - // [6] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BGCOL + // [5] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR + // [6] *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BG_COLOR jmp __b1 } // File Data @@ -138,7 +138,7 @@ ASSEMBLER BEFORE OPTIMIZATION :BasicUpstart(__bbegin) .pc = $80d "Program" // Global Constants & labels - .label BGCOL = $d020 + .label BG_COLOR = $d020 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -160,10 +160,10 @@ main: { jmp __b1 // main::@1 __b1: - // [5] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL - // [6] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BGCOL + // [5] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR + // [6] *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BG_COLOR jmp __b1 } // File Data @@ -190,7 +190,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const byte*) BGCOL = (byte*) 53280 +(const byte*) BG_COLOR = (byte*) 53280 (void()) main() (label) main::@1 @@ -207,7 +207,7 @@ Score: 150 :BasicUpstart(main) .pc = $80d "Program" // Global Constants & labels - .label BGCOL = $d020 + .label BG_COLOR = $d020 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] // @1 @@ -219,12 +219,12 @@ Score: 150 main: { // main::@1 __b1: - // ++*BGCOL; - // [5] *((const byte*) BGCOL) ← ++ *((const byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL - // (*BGCOL)--; - // [6] *((const byte*) BGCOL) ← -- *((const byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BGCOL + // ++*BG_COLOR; + // [5] *((const byte*) BG_COLOR) ← ++ *((const byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR + // (*BG_COLOR)--; + // [6] *((const byte*) BG_COLOR) ← -- *((const byte*) BG_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BG_COLOR jmp __b1 } // File Data diff --git a/src/test/ref/incd020.sym b/src/test/ref/incd020.sym index 46ff4c877..f0105b30e 100644 --- a/src/test/ref/incd020.sym +++ b/src/test/ref/incd020.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const byte*) BGCOL = (byte*) 53280 +(const byte*) BG_COLOR = (byte*) 53280 (void()) main() (label) main::@1 diff --git a/src/test/ref/inline-function.asm b/src/test/ref/inline-function.asm index 57837b338..1d20b957a 100644 --- a/src/test/ref/inline-function.asm +++ b/src/test/ref/inline-function.asm @@ -5,7 +5,7 @@ .pc = $80d "Program" .label RASTER = $d012 .label D018 = $d018 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label screen = $400 .label charset1 = $1000 .label charset2 = $1800 @@ -22,9 +22,9 @@ main: { // *D018 = toD018(screen, charset1) lda #toD0181_return sta D018 - // *BGCOL = $6 + // *BG_COLOR = $6 lda #6 - sta BGCOL + sta BG_COLOR __b2: // while(*RASTER!=$62) lda #$62 @@ -33,8 +33,8 @@ main: { // *D018 = toD018(screen, charset2) lda #toD0182_return sta D018 - // *BGCOL = $b + // *BG_COLOR = $b lda #$b - sta BGCOL + sta BG_COLOR jmp __b1 } diff --git a/src/test/ref/inline-function.cfg b/src/test/ref/inline-function.cfg index a468f7fb2..bc373d148 100644 --- a/src/test/ref/inline-function.cfg +++ b/src/test/ref/inline-function.cfg @@ -20,7 +20,7 @@ main::toD0181: scope:[main] from main::@1 to:main::@3 main::@3: scope:[main] from main::toD0181 [7] *((const byte*) D018) ← (const byte) main::toD0181_return#0 - [8] *((const byte*) BGCOL) ← (byte) 6 + [8] *((const byte*) BG_COLOR) ← (byte) 6 to:main::@2 main::@2: scope:[main] from main::@2 main::@3 [9] if(*((const byte*) RASTER)!=(byte) $62) goto main::@2 @@ -30,5 +30,5 @@ main::toD0182: scope:[main] from main::@2 to:main::@4 main::@4: scope:[main] from main::toD0182 [11] *((const byte*) D018) ← (const byte) main::toD0182_return#0 - [12] *((const byte*) BGCOL) ← (byte) $b + [12] *((const byte*) BG_COLOR) ← (byte) $b to:main::@1 diff --git a/src/test/ref/inline-function.log b/src/test/ref/inline-function.log index a0f5bd19a..1a9005716 100644 --- a/src/test/ref/inline-function.log +++ b/src/test/ref/inline-function.log @@ -38,7 +38,7 @@ main::@6: scope:[main] from main::toD0181_@return (byte) main::toD0181_return#3 ← phi( main::toD0181_@return/(byte) main::toD0181_return#1 ) (byte~) main::$1 ← (byte) main::toD0181_return#3 *((const byte*) D018) ← (byte~) main::$1 - *((const byte*) BGCOL) ← (number) 6 + *((const byte*) BG_COLOR) ← (number) 6 to:main::@4 main::@4: scope:[main] from main::@4 main::@6 (bool~) main::$2 ← *((const byte*) RASTER) != (number) $62 @@ -66,7 +66,7 @@ main::@7: scope:[main] from main::toD0182_@return (byte) main::toD0182_return#3 ← phi( main::toD0182_@return/(byte) main::toD0182_return#1 ) (byte~) main::$3 ← (byte) main::toD0182_return#3 *((const byte*) D018) ← (byte~) main::$3 - *((const byte*) BGCOL) ← (number) $b + *((const byte*) BG_COLOR) ← (number) $b to:main::@1 main::@return: scope:[main] from main::@1 return @@ -83,7 +83,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const byte*) BGCOL = (byte*)(number) $d021 +(const byte*) BG_COLOR = (byte*)(number) $d021 (const byte*) D018 = (byte*)(number) $d018 (const byte*) RASTER = (byte*)(number) $d012 (const byte*) charset1 = (byte*)(number) $1000 @@ -145,17 +145,17 @@ Adding number conversion cast (unumber) main::toD0181_$0 in (number~) main::toD0 Adding number conversion cast (unumber) $400 in (number~) main::toD0181_$1 ← (word~) main::toD0181_$4 / (number) $400 Adding number conversion cast (unumber) main::toD0181_$1 in (number~) main::toD0181_$1 ← (word~) main::toD0181_$4 / (unumber)(number) $400 Adding number conversion cast (unumber) main::toD0181_$2 in (number~) main::toD0181_$2 ← (unumber~) main::toD0181_$0 | (unumber~) main::toD0181_$1 -Adding number conversion cast (unumber) 6 in *((const byte*) BGCOL) ← (number) 6 +Adding number conversion cast (unumber) 6 in *((const byte*) BG_COLOR) ← (number) 6 Adding number conversion cast (unumber) $62 in (bool~) main::$2 ← *((const byte*) RASTER) != (number) $62 Adding number conversion cast (unumber) $40 in (number~) main::toD0182_$0 ← (word~) main::toD0182_$3 / (number) $40 Adding number conversion cast (unumber) main::toD0182_$0 in (number~) main::toD0182_$0 ← (word~) main::toD0182_$3 / (unumber)(number) $40 Adding number conversion cast (unumber) $400 in (number~) main::toD0182_$1 ← (word~) main::toD0182_$4 / (number) $400 Adding number conversion cast (unumber) main::toD0182_$1 in (number~) main::toD0182_$1 ← (word~) main::toD0182_$4 / (unumber)(number) $400 Adding number conversion cast (unumber) main::toD0182_$2 in (number~) main::toD0182_$2 ← (unumber~) main::toD0182_$0 | (unumber~) main::toD0182_$1 -Adding number conversion cast (unumber) $b in *((const byte*) BGCOL) ← (number) $b +Adding number conversion cast (unumber) $b in *((const byte*) BG_COLOR) ← (number) $b Successful SSA optimization PassNAddNumberTypeConversions -Inlining cast *((const byte*) BGCOL) ← (unumber)(number) 6 -Inlining cast *((const byte*) BGCOL) ← (unumber)(number) $b +Inlining cast *((const byte*) BG_COLOR) ← (unumber)(number) 6 +Inlining cast *((const byte*) BG_COLOR) ← (unumber)(number) $b Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 53266 Simplifying constant pointer cast (byte*) 53272 @@ -300,7 +300,7 @@ main::toD0181: scope:[main] from main::@1 to:main::@3 main::@3: scope:[main] from main::toD0181 [7] *((const byte*) D018) ← (const byte) main::toD0181_return#0 - [8] *((const byte*) BGCOL) ← (byte) 6 + [8] *((const byte*) BG_COLOR) ← (byte) 6 to:main::@2 main::@2: scope:[main] from main::@2 main::@3 [9] if(*((const byte*) RASTER)!=(byte) $62) goto main::@2 @@ -310,7 +310,7 @@ main::toD0182: scope:[main] from main::@2 to:main::@4 main::@4: scope:[main] from main::toD0182 [11] *((const byte*) D018) ← (const byte) main::toD0182_return#0 - [12] *((const byte*) BGCOL) ← (byte) $b + [12] *((const byte*) BG_COLOR) ← (byte) $b to:main::@1 @@ -338,7 +338,7 @@ Target platform is c64basic / MOS6502X // Global Constants & labels .label RASTER = $d012 .label D018 = $d018 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label screen = $400 .label charset1 = $1000 .label charset2 = $1800 @@ -380,9 +380,9 @@ main: { // [7] *((const byte*) D018) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 - // [8] *((const byte*) BGCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 + // [8] *((const byte*) BG_COLOR) ← (byte) 6 -- _deref_pbuc1=vbuc2 lda #6 - sta BGCOL + sta BG_COLOR jmp __b2 // main::@2 __b2: @@ -401,9 +401,9 @@ main: { // [11] *((const byte*) D018) ← (const byte) main::toD0182_return#0 -- _deref_pbuc1=vbuc2 lda #toD0182_return sta D018 - // [12] *((const byte*) BGCOL) ← (byte) $b -- _deref_pbuc1=vbuc2 + // [12] *((const byte*) BG_COLOR) ← (byte) $b -- _deref_pbuc1=vbuc2 lda #$b - sta BGCOL + sta BG_COLOR jmp __b1 } // File Data @@ -411,10 +411,10 @@ main: { REGISTER UPLIFT POTENTIAL REGISTERS Statement [5] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [7] *((const byte*) D018) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [8] *((const byte*) BGCOL) ← (byte) 6 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [8] *((const byte*) BG_COLOR) ← (byte) 6 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [9] if(*((const byte*) RASTER)!=(byte) $62) goto main::@2 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [11] *((const byte*) D018) ← (const byte) main::toD0182_return#0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [12] *((const byte*) BGCOL) ← (byte) $b [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [12] *((const byte*) BG_COLOR) ← (byte) $b [ ] ( main:2 [ ] { } ) always clobbers reg byte a REGISTER UPLIFT SCOPES Uplift Scope [main] @@ -434,7 +434,7 @@ ASSEMBLER BEFORE OPTIMIZATION // Global Constants & labels .label RASTER = $d012 .label D018 = $d018 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label screen = $400 .label charset1 = $1000 .label charset2 = $1800 @@ -476,9 +476,9 @@ main: { // [7] *((const byte*) D018) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 - // [8] *((const byte*) BGCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 + // [8] *((const byte*) BG_COLOR) ← (byte) 6 -- _deref_pbuc1=vbuc2 lda #6 - sta BGCOL + sta BG_COLOR jmp __b2 // main::@2 __b2: @@ -497,9 +497,9 @@ main: { // [11] *((const byte*) D018) ← (const byte) main::toD0182_return#0 -- _deref_pbuc1=vbuc2 lda #toD0182_return sta D018 - // [12] *((const byte*) BGCOL) ← (byte) $b -- _deref_pbuc1=vbuc2 + // [12] *((const byte*) BG_COLOR) ← (byte) $b -- _deref_pbuc1=vbuc2 lda #$b - sta BGCOL + sta BG_COLOR jmp __b1 } // File Data @@ -536,7 +536,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const byte*) BGCOL = (byte*) 53281 +(const byte*) BG_COLOR = (byte*) 53281 (const byte*) D018 = (byte*) 53272 (const byte*) RASTER = (byte*) 53266 (const byte*) charset1 = (byte*) 4096 @@ -573,7 +573,7 @@ Score: 1972 // Global Constants & labels .label RASTER = $d012 .label D018 = $d018 - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label screen = $400 .label charset1 = $1000 .label charset2 = $1800 @@ -604,10 +604,10 @@ main: { // [7] *((const byte*) D018) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 - // *BGCOL = $6 - // [8] *((const byte*) BGCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = $6 + // [8] *((const byte*) BG_COLOR) ← (byte) 6 -- _deref_pbuc1=vbuc2 lda #6 - sta BGCOL + sta BG_COLOR // main::@2 __b2: // while(*RASTER!=$62) @@ -622,10 +622,10 @@ main: { // [11] *((const byte*) D018) ← (const byte) main::toD0182_return#0 -- _deref_pbuc1=vbuc2 lda #toD0182_return sta D018 - // *BGCOL = $b - // [12] *((const byte*) BGCOL) ← (byte) $b -- _deref_pbuc1=vbuc2 + // *BG_COLOR = $b + // [12] *((const byte*) BG_COLOR) ← (byte) $b -- _deref_pbuc1=vbuc2 lda #$b - sta BGCOL + sta BG_COLOR jmp __b1 } // File Data diff --git a/src/test/ref/inline-function.sym b/src/test/ref/inline-function.sym index c7e3250a0..b9e01ea6b 100644 --- a/src/test/ref/inline-function.sym +++ b/src/test/ref/inline-function.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const byte*) BGCOL = (byte*) 53281 +(const byte*) BG_COLOR = (byte*) 53281 (const byte*) D018 = (byte*) 53272 (const byte*) RASTER = (byte*) 53266 (const byte*) charset1 = (byte*) 4096 diff --git a/src/test/ref/irq-hardware-clobber-jsr.asm b/src/test/ref/irq-hardware-clobber-jsr.asm index 42be0e7a4..2028e50fb 100644 --- a/src/test/ref/irq-hardware-clobber-jsr.asm +++ b/src/test/ref/irq-hardware-clobber-jsr.asm @@ -15,8 +15,8 @@ .const WHITE = 1 .const OFFSET_STRUCT_MOS6526_CIA_INTERRUPT = $d .label RASTER = $d012 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 .label VIC_CONTROL = $d011 // VIC II IRQ Status Register .label IRQ_STATUS = $d019 @@ -65,8 +65,8 @@ main: { // asm cli __b1: - // (*BORDERCOL)++; - inc BORDERCOL + // (*BORDER_COLOR)++; + inc BORDER_COLOR jmp __b1 } // Interrupt Routine @@ -80,12 +80,12 @@ irq: { rti } do_irq: { - // *BGCOL = WHITE + // *BG_COLOR = WHITE lda #WHITE - sta BGCOL - // *BGCOL = BLACK + sta BG_COLOR + // *BG_COLOR = BLACK lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER diff --git a/src/test/ref/irq-hardware-clobber-jsr.cfg b/src/test/ref/irq-hardware-clobber-jsr.cfg index 9a5561048..0b743dd4f 100644 --- a/src/test/ref/irq-hardware-clobber-jsr.cfg +++ b/src/test/ref/irq-hardware-clobber-jsr.cfg @@ -21,7 +21,7 @@ main: scope:[main] from @1 asm { cli } to:main::@1 main::@1: scope:[main] from main main::@1 - [13] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [13] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) to:main::@1 interrupt(HARDWARE_CLOBBER)(void()) irq() @@ -35,8 +35,8 @@ irq::@return: scope:[irq] from irq (void()) do_irq() do_irq: scope:[do_irq] from irq - [17] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - [18] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [17] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + [18] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [19] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:do_irq::@return do_irq::@return: scope:[do_irq] from do_irq diff --git a/src/test/ref/irq-hardware-clobber-jsr.log b/src/test/ref/irq-hardware-clobber-jsr.log index f5f43944b..2be5390f9 100644 --- a/src/test/ref/irq-hardware-clobber-jsr.log +++ b/src/test/ref/irq-hardware-clobber-jsr.log @@ -21,7 +21,7 @@ main::@1: scope:[main] from main main::@2 if(true) goto main::@2 to:main::@return main::@2: scope:[main] from main::@1 - *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) to:main::@1 main::@return: scope:[main] from main::@1 return @@ -39,8 +39,8 @@ irq::@return: scope:[irq] from irq::@1 (void()) do_irq() do_irq: scope:[do_irq] from irq - *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:do_irq::@return do_irq::@return: scope:[do_irq] from do_irq @@ -58,9 +58,9 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const nomodify byte) BLACK = (byte) 0 -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*)(number) $dc00 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f (const nomodify void()**) HARDWARE_IRQ = (void()**)(number) $fffe @@ -240,7 +240,7 @@ main: scope:[main] from @1 asm { cli } to:main::@1 main::@1: scope:[main] from main main::@1 - [13] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [13] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) to:main::@1 interrupt(HARDWARE_CLOBBER)(void()) irq() @@ -254,8 +254,8 @@ irq::@return: scope:[irq] from irq (void()) do_irq() do_irq: scope:[do_irq] from irq - [17] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - [18] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [17] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + [18] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [19] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:do_irq::@return do_irq::@return: scope:[do_irq] from do_irq @@ -377,8 +377,8 @@ Target platform is c64basic / MOS6502X .const WHITE = 1 .const OFFSET_STRUCT_MOS6526_CIA_INTERRUPT = $d .label RASTER = $d012 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 .label VIC_CONTROL = $d011 // VIC II IRQ Status Register .label IRQ_STATUS = $d019 @@ -444,8 +444,8 @@ main: { jmp __b1 // main::@1 __b1: - // [13] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // [13] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __b1 } // irq @@ -471,12 +471,12 @@ irq: { } // do_irq do_irq: { - // [17] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [17] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // [18] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [18] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [19] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -498,8 +498,8 @@ Statement [9] *((const nomodify byte*) RASTER) ← (byte) 0 [ ] ( main:2 [ ] { } Statement [10] *((const nomodify byte*) IRQ_ENABLE) ← (const nomodify byte) IRQ_RASTER [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [11] *((const nomodify void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [16] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y -Statement [17] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE [ ] ( do_irq:15 [ ] { } ) always clobbers reg byte a -Statement [18] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( do_irq:15 [ ] { } ) always clobbers reg byte a +Statement [17] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [ ] ( do_irq:15 [ ] { } ) always clobbers reg byte a +Statement [18] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( do_irq:15 [ ] { } ) always clobbers reg byte a Statement [19] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [ ] ( do_irq:15 [ ] { } ) always clobbers reg byte a REGISTER UPLIFT SCOPES @@ -547,8 +547,8 @@ ASSEMBLER BEFORE OPTIMIZATION .const WHITE = 1 .const OFFSET_STRUCT_MOS6526_CIA_INTERRUPT = $d .label RASTER = $d012 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 .label VIC_CONTROL = $d011 // VIC II IRQ Status Register .label IRQ_STATUS = $d019 @@ -614,8 +614,8 @@ main: { jmp __b1 // main::@1 __b1: - // [13] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // [13] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __b1 } // irq @@ -635,12 +635,12 @@ irq: { } // do_irq do_irq: { - // [17] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [17] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // [18] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [18] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [19] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -678,9 +678,9 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) BLACK = (byte) 0 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f (const nomodify void()**) HARDWARE_IRQ = (void()**) 65534 @@ -811,8 +811,8 @@ Score: 224 .const WHITE = 1 .const OFFSET_STRUCT_MOS6526_CIA_INTERRUPT = $d .label RASTER = $d012 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 .label VIC_CONTROL = $d011 // VIC II IRQ Status Register .label IRQ_STATUS = $d019 @@ -878,9 +878,9 @@ main: { cli // main::@1 __b1: - // (*BORDERCOL)++; - // [13] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // (*BORDER_COLOR)++; + // [13] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __b1 } // irq @@ -900,14 +900,14 @@ irq: { } // do_irq do_irq: { - // *BGCOL = WHITE - // [17] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // *BG_COLOR = WHITE + // [17] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // *BGCOL = BLACK - // [18] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // *BG_COLOR = BLACK + // [18] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // [19] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ diff --git a/src/test/ref/irq-hardware-clobber-jsr.sym b/src/test/ref/irq-hardware-clobber-jsr.sym index a751adf4c..e52e0046c 100644 --- a/src/test/ref/irq-hardware-clobber-jsr.sym +++ b/src/test/ref/irq-hardware-clobber-jsr.sym @@ -1,9 +1,9 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) BLACK = (byte) 0 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f (const nomodify void()**) HARDWARE_IRQ = (void()**) 65534 diff --git a/src/test/ref/irq-hardware-clobber.asm b/src/test/ref/irq-hardware-clobber.asm index d58092c79..d5e7b16c3 100644 --- a/src/test/ref/irq-hardware-clobber.asm +++ b/src/test/ref/irq-hardware-clobber.asm @@ -15,7 +15,7 @@ .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label CIA1_INTERRUPT = $dc0d // Processor port data direction register @@ -65,12 +65,12 @@ main: { // Interrupt Routine irq: { sta rega+1 - // *BGCOL = WHITE + // *BG_COLOR = WHITE lda #WHITE - sta BGCOL - // *BGCOL = BLACK + sta BG_COLOR + // *BG_COLOR = BLACK lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER diff --git a/src/test/ref/irq-hardware-clobber.cfg b/src/test/ref/irq-hardware-clobber.cfg index 7616770f9..bb8e80fdb 100644 --- a/src/test/ref/irq-hardware-clobber.cfg +++ b/src/test/ref/irq-hardware-clobber.cfg @@ -26,8 +26,8 @@ main::@1: scope:[main] from main main::@1 interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from - [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq diff --git a/src/test/ref/irq-hardware-clobber.log b/src/test/ref/irq-hardware-clobber.log index 56584d516..75c8e07a6 100644 --- a/src/test/ref/irq-hardware-clobber.log +++ b/src/test/ref/irq-hardware-clobber.log @@ -28,8 +28,8 @@ main::@return: scope:[main] from main::@1 interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from - *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq @@ -47,7 +47,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d020 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d020 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) CIA1_INTERRUPT = (byte*)(number) $dc0d (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f @@ -141,8 +141,8 @@ main::@1: scope:[main] from main main::@1 interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from - [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq @@ -179,7 +179,7 @@ Target platform is c64basic / MOS6502X .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label CIA1_INTERRUPT = $dc0d // Processor port data direction register @@ -250,12 +250,12 @@ irq: { sta rega+1 stx regx+1 sty regy+1 - // [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -282,8 +282,8 @@ Statement [8] *((const nomodify byte*) VIC_CONTROL) ← *((const nomodify byte*) Statement [9] *((const nomodify byte*) RASTER) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [10] *((const nomodify byte*) IRQ_ENABLE) ← (const nomodify byte) IRQ_RASTER [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [11] *((const nomodify void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE [ ] ( [ ] { } ) always clobbers reg byte a -Statement [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a +Statement [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [ ] ( [ ] { } ) always clobbers reg byte a +Statement [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a Statement [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [ ] ( [ ] { } ) always clobbers reg byte a Statement [17] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y @@ -324,7 +324,7 @@ ASSEMBLER BEFORE OPTIMIZATION .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label CIA1_INTERRUPT = $dc0d // Processor port data direction register @@ -393,12 +393,12 @@ main: { irq: { // entry interrupt(HARDWARE_CLOBBER) sta rega+1 - // [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -436,7 +436,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) CIA1_INTERRUPT = (byte*) 56333 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f @@ -482,7 +482,7 @@ Score: 212 .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label CIA1_INTERRUPT = $dc0d // Processor port data direction register @@ -552,14 +552,14 @@ main: { irq: { // entry interrupt(HARDWARE_CLOBBER) sta rega+1 - // *BGCOL = WHITE - // [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // *BG_COLOR = WHITE + // [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // *BGCOL = BLACK - // [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // *BG_COLOR = BLACK + // [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ diff --git a/src/test/ref/irq-hardware-clobber.sym b/src/test/ref/irq-hardware-clobber.sym index 9c27d7984..27d864a28 100644 --- a/src/test/ref/irq-hardware-clobber.sym +++ b/src/test/ref/irq-hardware-clobber.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) CIA1_INTERRUPT = (byte*) 56333 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f diff --git a/src/test/ref/irq-hardware-stack.asm b/src/test/ref/irq-hardware-stack.asm index 3ec646795..411329a9b 100644 --- a/src/test/ref/irq-hardware-stack.asm +++ b/src/test/ref/irq-hardware-stack.asm @@ -15,7 +15,7 @@ .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label CIA1_INTERRUPT = $dc0d // Processor port data direction register @@ -69,12 +69,12 @@ irq: { pha tya pha - // *BGCOL = WHITE + // *BG_COLOR = WHITE lda #WHITE - sta BGCOL - // *BGCOL = BLACK + sta BG_COLOR + // *BG_COLOR = BLACK lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER diff --git a/src/test/ref/irq-hardware-stack.cfg b/src/test/ref/irq-hardware-stack.cfg index 5d90ce690..f9372ca6c 100644 --- a/src/test/ref/irq-hardware-stack.cfg +++ b/src/test/ref/irq-hardware-stack.cfg @@ -26,8 +26,8 @@ main::@1: scope:[main] from main main::@1 interrupt(HARDWARE_STACK)(void()) irq() irq: scope:[irq] from - [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq diff --git a/src/test/ref/irq-hardware-stack.log b/src/test/ref/irq-hardware-stack.log index 5455260e1..647535c1f 100644 --- a/src/test/ref/irq-hardware-stack.log +++ b/src/test/ref/irq-hardware-stack.log @@ -28,8 +28,8 @@ main::@return: scope:[main] from main::@1 interrupt(HARDWARE_STACK)(void()) irq() irq: scope:[irq] from - *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq @@ -47,7 +47,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d020 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d020 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) CIA1_INTERRUPT = (byte*)(number) $dc0d (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f @@ -141,8 +141,8 @@ main::@1: scope:[main] from main main::@1 interrupt(HARDWARE_STACK)(void()) irq() irq: scope:[irq] from - [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq @@ -179,7 +179,7 @@ Target platform is c64basic / MOS6502X .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label CIA1_INTERRUPT = $dc0d // Processor port data direction register @@ -252,12 +252,12 @@ irq: { pha tya pha - // [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -283,8 +283,8 @@ Statement [8] *((const nomodify byte*) VIC_CONTROL) ← *((const nomodify byte*) Statement [9] *((const nomodify byte*) RASTER) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [10] *((const nomodify byte*) IRQ_ENABLE) ← (const nomodify byte) IRQ_RASTER [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [11] *((const nomodify void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_STACK)(void()) irq() [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE [ ] ( [ ] { } ) always clobbers reg byte a -Statement [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a +Statement [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [ ] ( [ ] { } ) always clobbers reg byte a +Statement [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a Statement [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [ ] ( [ ] { } ) always clobbers reg byte a Statement [17] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y @@ -318,7 +318,7 @@ ASSEMBLER BEFORE OPTIMIZATION .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label CIA1_INTERRUPT = $dc0d // Processor port data direction register @@ -391,12 +391,12 @@ irq: { pha tya pha - // [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -437,7 +437,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) CIA1_INTERRUPT = (byte*) 56333 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f @@ -483,7 +483,7 @@ Score: 316 .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label CIA1_INTERRUPT = $dc0d // Processor port data direction register @@ -557,14 +557,14 @@ irq: { pha tya pha - // *BGCOL = WHITE - // [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // *BG_COLOR = WHITE + // [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // *BGCOL = BLACK - // [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // *BG_COLOR = BLACK + // [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ diff --git a/src/test/ref/irq-hardware-stack.sym b/src/test/ref/irq-hardware-stack.sym index e0f4e90f5..9380b9255 100644 --- a/src/test/ref/irq-hardware-stack.sym +++ b/src/test/ref/irq-hardware-stack.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) CIA1_INTERRUPT = (byte*) 56333 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f diff --git a/src/test/ref/irq-hardware.asm b/src/test/ref/irq-hardware.asm index 9528eeaa5..0d83b6726 100644 --- a/src/test/ref/irq-hardware.asm +++ b/src/test/ref/irq-hardware.asm @@ -15,7 +15,7 @@ .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label CIA1_INTERRUPT = $dc0d // Processor port data direction register @@ -67,12 +67,12 @@ irq: { sta rega+1 stx regx+1 sty regy+1 - // *BGCOL = WHITE + // *BG_COLOR = WHITE lda #WHITE - sta BGCOL - // *BGCOL = BLACK + sta BG_COLOR + // *BG_COLOR = BLACK lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER diff --git a/src/test/ref/irq-hardware.cfg b/src/test/ref/irq-hardware.cfg index 9642ef9dd..9831c9eba 100644 --- a/src/test/ref/irq-hardware.cfg +++ b/src/test/ref/irq-hardware.cfg @@ -26,8 +26,8 @@ main::@1: scope:[main] from main main::@1 interrupt(HARDWARE_ALL)(void()) irq() irq: scope:[irq] from - [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq diff --git a/src/test/ref/irq-hardware.log b/src/test/ref/irq-hardware.log index e1da2d51f..6f8355687 100644 --- a/src/test/ref/irq-hardware.log +++ b/src/test/ref/irq-hardware.log @@ -28,8 +28,8 @@ main::@return: scope:[main] from main::@1 interrupt(HARDWARE_ALL)(void()) irq() irq: scope:[irq] from - *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq @@ -47,7 +47,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d020 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d020 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) CIA1_INTERRUPT = (byte*)(number) $dc0d (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f @@ -141,8 +141,8 @@ main::@1: scope:[main] from main main::@1 interrupt(HARDWARE_ALL)(void()) irq() irq: scope:[irq] from - [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq @@ -179,7 +179,7 @@ Target platform is c64basic / MOS6502X .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label CIA1_INTERRUPT = $dc0d // Processor port data direction register @@ -250,12 +250,12 @@ irq: { sta rega+1 stx regx+1 sty regy+1 - // [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -282,8 +282,8 @@ Statement [8] *((const nomodify byte*) VIC_CONTROL) ← *((const nomodify byte*) Statement [9] *((const nomodify byte*) RASTER) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [10] *((const nomodify byte*) IRQ_ENABLE) ← (const nomodify byte) IRQ_RASTER [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [11] *((const nomodify void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_ALL)(void()) irq() [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE [ ] ( [ ] { } ) always clobbers reg byte a -Statement [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a +Statement [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [ ] ( [ ] { } ) always clobbers reg byte a +Statement [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a Statement [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [ ] ( [ ] { } ) always clobbers reg byte a Statement [17] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y @@ -317,7 +317,7 @@ ASSEMBLER BEFORE OPTIMIZATION .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label CIA1_INTERRUPT = $dc0d // Processor port data direction register @@ -388,12 +388,12 @@ irq: { sta rega+1 stx regx+1 sty regy+1 - // [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -435,7 +435,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) CIA1_INTERRUPT = (byte*) 56333 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f @@ -481,7 +481,7 @@ Score: 296 .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label CIA1_INTERRUPT = $dc0d // Processor port data direction register @@ -553,14 +553,14 @@ irq: { sta rega+1 stx regx+1 sty regy+1 - // *BGCOL = WHITE - // [14] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // *BG_COLOR = WHITE + // [14] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // *BGCOL = BLACK - // [15] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // *BG_COLOR = BLACK + // [15] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // [16] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ diff --git a/src/test/ref/irq-hardware.sym b/src/test/ref/irq-hardware.sym index 3b41bf3e1..90da02c4e 100644 --- a/src/test/ref/irq-hardware.sym +++ b/src/test/ref/irq-hardware.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) CIA1_INTERRUPT = (byte*) 56333 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f diff --git a/src/test/ref/irq-kernel-minimal.asm b/src/test/ref/irq-kernel-minimal.asm index 70b525dbd..e9ac2bead 100644 --- a/src/test/ref/irq-kernel-minimal.asm +++ b/src/test/ref/irq-kernel-minimal.asm @@ -5,7 +5,7 @@ // The colors of the C64 .const BLACK = 0 .const WHITE = 1 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // The vector used when the KERNAL serves IRQ interrupts .label KERNEL_IRQ = $314 // Setup the IRQ routine @@ -24,12 +24,12 @@ main: { } // The Interrupt Handler irq: { - // *BGCOL = WHITE + // *BG_COLOR = WHITE lda #WHITE - sta BGCOL - // *BGCOL = BLACK + sta BG_COLOR + // *BG_COLOR = BLACK lda #BLACK - sta BGCOL + sta BG_COLOR // } jmp $ea31 } diff --git a/src/test/ref/irq-kernel-minimal.cfg b/src/test/ref/irq-kernel-minimal.cfg index 890711898..b02b937c0 100644 --- a/src/test/ref/irq-kernel-minimal.cfg +++ b/src/test/ref/irq-kernel-minimal.cfg @@ -20,8 +20,8 @@ main::@return: scope:[main] from main interrupt(KERNEL_KEYBOARD)(void()) irq() irq: scope:[irq] from - [8] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - [9] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [8] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + [9] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK to:irq::@return irq::@return: scope:[irq] from irq [10] return diff --git a/src/test/ref/irq-kernel-minimal.log b/src/test/ref/irq-kernel-minimal.log index 30370df03..f48863833 100644 --- a/src/test/ref/irq-kernel-minimal.log +++ b/src/test/ref/irq-kernel-minimal.log @@ -17,8 +17,8 @@ main::@return: scope:[main] from main interrupt(KERNEL_KEYBOARD)(void()) irq() irq: scope:[irq] from - *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK to:irq::@return irq::@return: scope:[irq] from irq return @@ -35,7 +35,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const nomodify byte) BLACK = (byte) 0 (const nomodify void()**) KERNEL_IRQ = (void()**)(number) $314 (byte) MOS6526_CIA::INTERRUPT @@ -168,8 +168,8 @@ main::@return: scope:[main] from main interrupt(KERNEL_KEYBOARD)(void()) irq() irq: scope:[irq] from - [8] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - [9] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [8] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + [9] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK to:irq::@return irq::@return: scope:[irq] from irq [10] return @@ -279,7 +279,7 @@ Target platform is c64basic / MOS6502X // The colors of the C64 .const BLACK = 0 .const WHITE = 1 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // The vector used when the KERNAL serves IRQ interrupts .label KERNEL_IRQ = $314 // @begin @@ -318,12 +318,12 @@ main: { // The Interrupt Handler irq: { // entry interrupt(KERNEL_KEYBOARD) - // [8] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [8] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // [9] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [9] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR jmp __breturn // irq::@return __breturn: @@ -334,8 +334,8 @@ irq: { REGISTER UPLIFT POTENTIAL REGISTERS Statement [5] *((const nomodify void()**) KERNEL_IRQ) ← &interrupt(KERNEL_KEYBOARD)(void()) irq() [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [8] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE [ ] ( [ ] { } ) always clobbers reg byte a -Statement [9] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a +Statement [8] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [ ] ( [ ] { } ) always clobbers reg byte a +Statement [9] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a REGISTER UPLIFT SCOPES Uplift Scope [MOS6526_CIA] @@ -363,7 +363,7 @@ ASSEMBLER BEFORE OPTIMIZATION // The colors of the C64 .const BLACK = 0 .const WHITE = 1 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // The vector used when the KERNAL serves IRQ interrupts .label KERNEL_IRQ = $314 // @begin @@ -402,12 +402,12 @@ main: { // The Interrupt Handler irq: { // entry interrupt(KERNEL_KEYBOARD) - // [8] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [8] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // [9] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [9] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR jmp __breturn // irq::@return __breturn: @@ -440,7 +440,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) BLACK = (byte) 0 (const nomodify void()**) KERNEL_IRQ = (void()**) 788 (byte) MOS6526_CIA::INTERRUPT @@ -548,7 +548,7 @@ Score: 37 // The colors of the C64 .const BLACK = 0 .const WHITE = 1 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // The vector used when the KERNAL serves IRQ interrupts .label KERNEL_IRQ = $314 // @begin @@ -581,14 +581,14 @@ main: { // The Interrupt Handler irq: { // entry interrupt(KERNEL_KEYBOARD) - // *BGCOL = WHITE - // [8] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // *BG_COLOR = WHITE + // [8] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // *BGCOL = BLACK - // [9] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // *BG_COLOR = BLACK + // [9] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // irq::@return // } // [10] return - exit interrupt(KERNEL_KEYBOARD) diff --git a/src/test/ref/irq-kernel-minimal.sym b/src/test/ref/irq-kernel-minimal.sym index 46f4bb032..fb422bb61 100644 --- a/src/test/ref/irq-kernel-minimal.sym +++ b/src/test/ref/irq-kernel-minimal.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) BLACK = (byte) 0 (const nomodify void()**) KERNEL_IRQ = (void()**) 788 (byte) MOS6526_CIA::INTERRUPT diff --git a/src/test/ref/irq-kernel.asm b/src/test/ref/irq-kernel.asm index 3f25d2745..2ec5e6727 100644 --- a/src/test/ref/irq-kernel.asm +++ b/src/test/ref/irq-kernel.asm @@ -11,7 +11,7 @@ .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label CIA1_INTERRUPT = $dc0d main: { // asm @@ -45,12 +45,12 @@ main: { } // Interrupt Routine irq: { - // *BGCOL = WHITE + // *BG_COLOR = WHITE lda #WHITE - sta BGCOL - // *BGCOL = BLACK + sta BG_COLOR + // *BG_COLOR = BLACK lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER diff --git a/src/test/ref/irq-kernel.cfg b/src/test/ref/irq-kernel.cfg index 1924b695c..8eb5b1381 100644 --- a/src/test/ref/irq-kernel.cfg +++ b/src/test/ref/irq-kernel.cfg @@ -24,8 +24,8 @@ main::@return: scope:[main] from main interrupt(KERNEL_KEYBOARD)(void()) irq() irq: scope:[irq] from - [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq diff --git a/src/test/ref/irq-kernel.log b/src/test/ref/irq-kernel.log index 19b5b3a39..b30faac60 100644 --- a/src/test/ref/irq-kernel.log +++ b/src/test/ref/irq-kernel.log @@ -20,8 +20,8 @@ main::@return: scope:[main] from main interrupt(KERNEL_KEYBOARD)(void()) irq() irq: scope:[irq] from - *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq @@ -39,7 +39,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d020 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d020 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) CIA1_INTERRUPT = (byte*)(number) $dc0d (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f @@ -114,8 +114,8 @@ main::@return: scope:[main] from main interrupt(KERNEL_KEYBOARD)(void()) irq() irq: scope:[irq] from - [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq @@ -148,7 +148,7 @@ Target platform is c64basic / MOS6502X .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label CIA1_INTERRUPT = $dc0d // @begin __bbegin: @@ -202,12 +202,12 @@ main: { // Interrupt Routine irq: { // entry interrupt(KERNEL_KEYBOARD) - // [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -226,8 +226,8 @@ Statement [6] *((const nomodify byte*) VIC_CONTROL) ← *((const nomodify byte*) Statement [7] *((const nomodify byte*) RASTER) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [8] *((const nomodify byte*) IRQ_ENABLE) ← (const nomodify byte) IRQ_RASTER [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [9] *((const nomodify void()**) KERNEL_IRQ) ← &interrupt(KERNEL_KEYBOARD)(void()) irq() [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE [ ] ( [ ] { } ) always clobbers reg byte a -Statement [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a +Statement [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [ ] ( [ ] { } ) always clobbers reg byte a +Statement [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a Statement [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [ ] ( [ ] { } ) always clobbers reg byte a REGISTER UPLIFT SCOPES @@ -256,7 +256,7 @@ ASSEMBLER BEFORE OPTIMIZATION .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label CIA1_INTERRUPT = $dc0d // @begin __bbegin: @@ -310,12 +310,12 @@ main: { // Interrupt Routine irq: { // entry interrupt(KERNEL_KEYBOARD) - // [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -352,7 +352,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) CIA1_INTERRUPT = (byte*) 56333 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f @@ -389,7 +389,7 @@ Score: 71 .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label CIA1_INTERRUPT = $dc0d // @begin // [1] phi from @begin to @1 [phi:@begin->@1] @@ -441,14 +441,14 @@ main: { // Interrupt Routine irq: { // entry interrupt(KERNEL_KEYBOARD) - // *BGCOL = WHITE - // [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // *BG_COLOR = WHITE + // [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // *BGCOL = BLACK - // [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // *BG_COLOR = BLACK + // [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ diff --git a/src/test/ref/irq-kernel.sym b/src/test/ref/irq-kernel.sym index 2d7a3e60f..71adfc2ad 100644 --- a/src/test/ref/irq-kernel.sym +++ b/src/test/ref/irq-kernel.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) CIA1_INTERRUPT = (byte*) 56333 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f diff --git a/src/test/ref/irq-local-var-overlap-problem.asm b/src/test/ref/irq-local-var-overlap-problem.asm index b24d5416f..30d6a42a8 100644 --- a/src/test/ref/irq-local-var-overlap-problem.asm +++ b/src/test/ref/irq-local-var-overlap-problem.asm @@ -9,7 +9,7 @@ .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label CIA1_INTERRUPT = $dc0d main: { @@ -95,8 +95,8 @@ sub_main: { sty.z $ff clc adc.z $ff - // *BGCOL = i+j+k - sta BGCOL + // *BG_COLOR = i+j+k + sta BG_COLOR // for( byte k: 0..10 ) iny cpy #$b @@ -117,8 +117,8 @@ irq: { .label k = 8 .label j = 7 .label i = 6 - // (*BGCOL)++; - inc BGCOL + // (*BG_COLOR)++; + inc BG_COLOR lda #0 sta.z i __b1: @@ -155,8 +155,8 @@ irq: { // *IRQ_STATUS = IRQ_RASTER lda #IRQ_RASTER sta IRQ_STATUS - // (*BGCOL)--; - dec BGCOL + // (*BG_COLOR)--; + dec BG_COLOR // } jmp $ea81 } @@ -177,8 +177,8 @@ sub_irq: { sty.z $ff clc adc.z $ff - // *BGCOL = i+j+k - sta BGCOL + // *BG_COLOR = i+j+k + sta BG_COLOR // for( byte k: 0..10 ) iny cpy #$b diff --git a/src/test/ref/irq-local-var-overlap-problem.cfg b/src/test/ref/irq-local-var-overlap-problem.cfg index 32eccebf7..ca36acd14 100644 --- a/src/test/ref/irq-local-var-overlap-problem.cfg +++ b/src/test/ref/irq-local-var-overlap-problem.cfg @@ -61,7 +61,7 @@ sub_main::@3: scope:[sub_main] from sub_main::@2 sub_main::@3 [28] (byte) sub_main::k#2 ← phi( sub_main::@2/(byte) 0 sub_main::@3/(byte) sub_main::k#1 ) [29] (byte~) sub_main::$0 ← (byte) sub_main::i#6 + (byte) sub_main::j#4 [30] (byte~) sub_main::$1 ← (byte~) sub_main::$0 + (byte) sub_main::k#2 - [31] *((const nomodify byte*) BGCOL) ← (byte~) sub_main::$1 + [31] *((const nomodify byte*) BG_COLOR) ← (byte~) sub_main::$1 [32] (byte) sub_main::k#1 ← ++ (byte) sub_main::k#2 [33] if((byte) sub_main::k#1!=(byte) $b) goto sub_main::@3 to:sub_main::@4 @@ -79,7 +79,7 @@ sub_main::@return: scope:[sub_main] from sub_main::@5 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from - [39] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + [39] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) to:irq::@1 irq::@1: scope:[irq] from irq irq::@5 [40] (byte) irq::i#7 ← phi( irq/(byte) 0 irq::@5/(byte) irq::i#1 ) @@ -108,7 +108,7 @@ irq::@5: scope:[irq] from irq::@4 to:irq::@6 irq::@6: scope:[irq] from irq::@5 [53] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER - [54] *((const nomodify byte*) BGCOL) ← -- *((const nomodify byte*) BGCOL) + [54] *((const nomodify byte*) BG_COLOR) ← -- *((const nomodify byte*) BG_COLOR) to:irq::@return irq::@return: scope:[irq] from irq::@6 [55] return @@ -128,7 +128,7 @@ sub_irq::@3: scope:[sub_irq] from sub_irq::@2 sub_irq::@3 [59] (byte) sub_irq::k#2 ← phi( sub_irq::@2/(byte) 0 sub_irq::@3/(byte) sub_irq::k#1 ) [60] (byte~) sub_irq::$0 ← (byte) sub_irq::i#6 + (byte) sub_irq::j#4 [61] (byte~) sub_irq::$1 ← (byte~) sub_irq::$0 + (byte) sub_irq::k#2 - [62] *((const nomodify byte*) BGCOL) ← (byte~) sub_irq::$1 + [62] *((const nomodify byte*) BG_COLOR) ← (byte~) sub_irq::$1 [63] (byte) sub_irq::k#1 ← ++ (byte) sub_irq::k#2 [64] if((byte) sub_irq::k#1!=(byte) $b) goto sub_irq::@3 to:sub_irq::@4 diff --git a/src/test/ref/irq-local-var-overlap-problem.log b/src/test/ref/irq-local-var-overlap-problem.log index 8aee9db59..4185c96ab 100644 --- a/src/test/ref/irq-local-var-overlap-problem.log +++ b/src/test/ref/irq-local-var-overlap-problem.log @@ -65,7 +65,7 @@ main::@return: scope:[main] from main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from - *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) (byte) irq::i#0 ← (byte) 0 to:irq::@1 irq::@1: scope:[irq] from irq irq::@5 @@ -109,7 +109,7 @@ irq::@5: scope:[irq] from irq::@4 to:irq::@6 irq::@6: scope:[irq] from irq::@5 *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER - *((const nomodify byte*) BGCOL) ← -- *((const nomodify byte*) BGCOL) + *((const nomodify byte*) BG_COLOR) ← -- *((const nomodify byte*) BG_COLOR) to:irq::@return irq::@return: scope:[irq] from irq::@6 return @@ -134,7 +134,7 @@ sub_main::@3: scope:[sub_main] from sub_main::@2 sub_main::@3 (byte) sub_main::i#2 ← phi( sub_main::@2/(byte) sub_main::i#4 sub_main::@3/(byte) sub_main::i#2 ) (byte~) sub_main::$0 ← (byte) sub_main::i#2 + (byte) sub_main::j#2 (byte~) sub_main::$1 ← (byte~) sub_main::$0 + (byte) sub_main::k#2 - *((const nomodify byte*) BGCOL) ← (byte~) sub_main::$1 + *((const nomodify byte*) BG_COLOR) ← (byte~) sub_main::$1 (byte) sub_main::k#1 ← (byte) sub_main::k#2 + rangenext(0,$a) (bool~) sub_main::$2 ← (byte) sub_main::k#1 != rangelast(0,$a) if((bool~) sub_main::$2) goto sub_main::@3 @@ -175,7 +175,7 @@ sub_irq::@3: scope:[sub_irq] from sub_irq::@2 sub_irq::@3 (byte) sub_irq::i#2 ← phi( sub_irq::@2/(byte) sub_irq::i#4 sub_irq::@3/(byte) sub_irq::i#2 ) (byte~) sub_irq::$0 ← (byte) sub_irq::i#2 + (byte) sub_irq::j#2 (byte~) sub_irq::$1 ← (byte~) sub_irq::$0 + (byte) sub_irq::k#2 - *((const nomodify byte*) BGCOL) ← (byte~) sub_irq::$1 + *((const nomodify byte*) BG_COLOR) ← (byte~) sub_irq::$1 (byte) sub_irq::k#1 ← (byte) sub_irq::k#2 + rangenext(0,$a) (bool~) sub_irq::$2 ← (byte) sub_irq::k#1 != rangelast(0,$a) if((bool~) sub_irq::$2) goto sub_irq::@3 @@ -208,7 +208,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d020 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d020 (const nomodify byte*) CIA1_INTERRUPT = (byte*)(number) $dc0d (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f (const nomodify byte*) FGCOL = (byte*)(number) $d021 @@ -643,7 +643,7 @@ sub_main::@3: scope:[sub_main] from sub_main::@2 sub_main::@3 [28] (byte) sub_main::k#2 ← phi( sub_main::@2/(byte) 0 sub_main::@3/(byte) sub_main::k#1 ) [29] (byte~) sub_main::$0 ← (byte) sub_main::i#6 + (byte) sub_main::j#4 [30] (byte~) sub_main::$1 ← (byte~) sub_main::$0 + (byte) sub_main::k#2 - [31] *((const nomodify byte*) BGCOL) ← (byte~) sub_main::$1 + [31] *((const nomodify byte*) BG_COLOR) ← (byte~) sub_main::$1 [32] (byte) sub_main::k#1 ← ++ (byte) sub_main::k#2 [33] if((byte) sub_main::k#1!=(byte) $b) goto sub_main::@3 to:sub_main::@4 @@ -661,7 +661,7 @@ sub_main::@return: scope:[sub_main] from sub_main::@5 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from - [39] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + [39] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) to:irq::@1 irq::@1: scope:[irq] from irq irq::@5 [40] (byte) irq::i#7 ← phi( irq/(byte) 0 irq::@5/(byte) irq::i#1 ) @@ -690,7 +690,7 @@ irq::@5: scope:[irq] from irq::@4 to:irq::@6 irq::@6: scope:[irq] from irq::@5 [53] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER - [54] *((const nomodify byte*) BGCOL) ← -- *((const nomodify byte*) BGCOL) + [54] *((const nomodify byte*) BG_COLOR) ← -- *((const nomodify byte*) BG_COLOR) to:irq::@return irq::@return: scope:[irq] from irq::@6 [55] return @@ -710,7 +710,7 @@ sub_irq::@3: scope:[sub_irq] from sub_irq::@2 sub_irq::@3 [59] (byte) sub_irq::k#2 ← phi( sub_irq::@2/(byte) 0 sub_irq::@3/(byte) sub_irq::k#1 ) [60] (byte~) sub_irq::$0 ← (byte) sub_irq::i#6 + (byte) sub_irq::j#4 [61] (byte~) sub_irq::$1 ← (byte~) sub_irq::$0 + (byte) sub_irq::k#2 - [62] *((const nomodify byte*) BGCOL) ← (byte~) sub_irq::$1 + [62] *((const nomodify byte*) BG_COLOR) ← (byte~) sub_irq::$1 [63] (byte) sub_irq::k#1 ← ++ (byte) sub_irq::k#2 [64] if((byte) sub_irq::k#1!=(byte) $b) goto sub_irq::@3 to:sub_irq::@4 @@ -856,7 +856,7 @@ Target platform is c64basic / MOS6502X .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label CIA1_INTERRUPT = $dc0d // @begin @@ -1047,9 +1047,9 @@ sub_main: { clc adc.z k sta.z __1 - // [31] *((const nomodify byte*) BGCOL) ← (byte~) sub_main::$1 -- _deref_pbuc1=vbuz1 + // [31] *((const nomodify byte*) BG_COLOR) ← (byte~) sub_main::$1 -- _deref_pbuc1=vbuz1 lda.z __1 - sta BGCOL + sta BG_COLOR // [32] (byte) sub_main::k#1 ← ++ (byte) sub_main::k#2 -- vbuz1=_inc_vbuz1 inc.z k // [33] if((byte) sub_main::k#1!=(byte) $b) goto sub_main::@3 -- vbuz1_neq_vbuc1_then_la1 @@ -1088,8 +1088,8 @@ irq: { .label j = 9 .label i = 8 // entry interrupt(KERNEL_MIN) - // [39] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [39] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // [40] phi from irq to irq::@1 [phi:irq->irq::@1] __b1_from_irq: // [40] phi (byte) irq::i#7 = (byte) 0 [phi:irq->irq::@1#0] -- vbuz1=vbuc1 @@ -1176,8 +1176,8 @@ irq: { // [53] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 lda #IRQ_RASTER sta IRQ_STATUS - // [54] *((const nomodify byte*) BGCOL) ← -- *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BGCOL + // [54] *((const nomodify byte*) BG_COLOR) ← -- *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BG_COLOR jmp __breturn // irq::@return __breturn: @@ -1237,9 +1237,9 @@ sub_irq: { clc adc.z k sta.z __1 - // [62] *((const nomodify byte*) BGCOL) ← (byte~) sub_irq::$1 -- _deref_pbuc1=vbuz1 + // [62] *((const nomodify byte*) BG_COLOR) ← (byte~) sub_irq::$1 -- _deref_pbuc1=vbuz1 lda.z __1 - sta BGCOL + sta BG_COLOR // [63] (byte) sub_irq::k#1 ← ++ (byte) sub_irq::k#2 -- vbuz1=_inc_vbuz1 inc.z k // [64] if((byte) sub_irq::k#1!=(byte) $b) goto sub_irq::@3 -- vbuz1_neq_vbuc1_then_la1 @@ -1386,7 +1386,7 @@ ASSEMBLER BEFORE OPTIMIZATION .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label CIA1_INTERRUPT = $dc0d // @begin @@ -1563,8 +1563,8 @@ sub_main: { sty.z $ff clc adc.z $ff - // [31] *((const nomodify byte*) BGCOL) ← (byte~) sub_main::$1 -- _deref_pbuc1=vbuaa - sta BGCOL + // [31] *((const nomodify byte*) BG_COLOR) ← (byte~) sub_main::$1 -- _deref_pbuc1=vbuaa + sta BG_COLOR // [32] (byte) sub_main::k#1 ← ++ (byte) sub_main::k#2 -- vbuyy=_inc_vbuyy iny // [33] if((byte) sub_main::k#1!=(byte) $b) goto sub_main::@3 -- vbuyy_neq_vbuc1_then_la1 @@ -1599,8 +1599,8 @@ irq: { .label j = 7 .label i = 6 // entry interrupt(KERNEL_MIN) - // [39] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [39] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // [40] phi from irq to irq::@1 [phi:irq->irq::@1] __b1_from_irq: // [40] phi (byte) irq::i#7 = (byte) 0 [phi:irq->irq::@1#0] -- vbuz1=vbuc1 @@ -1683,8 +1683,8 @@ irq: { // [53] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 lda #IRQ_RASTER sta IRQ_STATUS - // [54] *((const nomodify byte*) BGCOL) ← -- *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BGCOL + // [54] *((const nomodify byte*) BG_COLOR) ← -- *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BG_COLOR jmp __breturn // irq::@return __breturn: @@ -1736,8 +1736,8 @@ sub_irq: { sty.z $ff clc adc.z $ff - // [62] *((const nomodify byte*) BGCOL) ← (byte~) sub_irq::$1 -- _deref_pbuc1=vbuaa - sta BGCOL + // [62] *((const nomodify byte*) BG_COLOR) ← (byte~) sub_irq::$1 -- _deref_pbuc1=vbuaa + sta BG_COLOR // [63] (byte) sub_irq::k#1 ← ++ (byte) sub_irq::k#2 -- vbuyy=_inc_vbuyy iny // [64] if((byte) sub_irq::k#1!=(byte) $b) goto sub_irq::@3 -- vbuyy_neq_vbuc1_then_la1 @@ -1892,7 +1892,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte*) CIA1_INTERRUPT = (byte*) 56333 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f (const nomodify byte*) FGCOL = (byte*) 53281 @@ -2017,7 +2017,7 @@ Score: 314173644 .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 .label CIA1_INTERRUPT = $dc0d // @begin @@ -2166,9 +2166,9 @@ sub_main: { sty.z $ff clc adc.z $ff - // *BGCOL = i+j+k - // [31] *((const nomodify byte*) BGCOL) ← (byte~) sub_main::$1 -- _deref_pbuc1=vbuaa - sta BGCOL + // *BG_COLOR = i+j+k + // [31] *((const nomodify byte*) BG_COLOR) ← (byte~) sub_main::$1 -- _deref_pbuc1=vbuaa + sta BG_COLOR // for( byte k: 0..10 ) // [32] (byte) sub_main::k#1 ← ++ (byte) sub_main::k#2 -- vbuyy=_inc_vbuyy iny @@ -2201,9 +2201,9 @@ irq: { .label j = 7 .label i = 6 // entry interrupt(KERNEL_MIN) - // (*BGCOL)++; - // [39] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // (*BG_COLOR)++; + // [39] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // [40] phi from irq to irq::@1 [phi:irq->irq::@1] // [40] phi (byte) irq::i#7 = (byte) 0 [phi:irq->irq::@1#0] -- vbuz1=vbuc1 lda #0 @@ -2271,9 +2271,9 @@ irq: { // [53] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 lda #IRQ_RASTER sta IRQ_STATUS - // (*BGCOL)--; - // [54] *((const nomodify byte*) BGCOL) ← -- *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BGCOL + // (*BG_COLOR)--; + // [54] *((const nomodify byte*) BG_COLOR) ← -- *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BG_COLOR // irq::@return // } // [55] return - exit interrupt(KERNEL_MIN) @@ -2314,9 +2314,9 @@ sub_irq: { sty.z $ff clc adc.z $ff - // *BGCOL = i+j+k - // [62] *((const nomodify byte*) BGCOL) ← (byte~) sub_irq::$1 -- _deref_pbuc1=vbuaa - sta BGCOL + // *BG_COLOR = i+j+k + // [62] *((const nomodify byte*) BG_COLOR) ← (byte~) sub_irq::$1 -- _deref_pbuc1=vbuaa + sta BG_COLOR // for( byte k: 0..10 ) // [63] (byte) sub_irq::k#1 ← ++ (byte) sub_irq::k#2 -- vbuyy=_inc_vbuyy iny diff --git a/src/test/ref/irq-local-var-overlap-problem.sym b/src/test/ref/irq-local-var-overlap-problem.sym index c81d53757..d039bdc8e 100644 --- a/src/test/ref/irq-local-var-overlap-problem.sym +++ b/src/test/ref/irq-local-var-overlap-problem.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte*) CIA1_INTERRUPT = (byte*) 56333 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f (const nomodify byte*) FGCOL = (byte*) 53281 diff --git a/src/test/ref/irq-raster.asm b/src/test/ref/irq-raster.asm index 9941913a6..e1cfd1494 100644 --- a/src/test/ref/irq-raster.asm +++ b/src/test/ref/irq-raster.asm @@ -11,7 +11,7 @@ .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label CIA1_INTERRUPT = $dc0d main: { // asm @@ -45,12 +45,12 @@ main: { } // Interrupt Routine irq: { - // *BGCOL = WHITE + // *BG_COLOR = WHITE lda #WHITE - sta BGCOL - // *BGCOL = BLACK + sta BG_COLOR + // *BG_COLOR = BLACK lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER diff --git a/src/test/ref/irq-raster.cfg b/src/test/ref/irq-raster.cfg index 3ae3dddef..53e0177f9 100644 --- a/src/test/ref/irq-raster.cfg +++ b/src/test/ref/irq-raster.cfg @@ -24,8 +24,8 @@ main::@return: scope:[main] from main interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from - [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq diff --git a/src/test/ref/irq-raster.log b/src/test/ref/irq-raster.log index f9661fc91..d311a009e 100644 --- a/src/test/ref/irq-raster.log +++ b/src/test/ref/irq-raster.log @@ -20,8 +20,8 @@ main::@return: scope:[main] from main interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from - *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq @@ -39,7 +39,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d020 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d020 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) CIA1_INTERRUPT = (byte*)(number) $dc0d (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f @@ -114,8 +114,8 @@ main::@return: scope:[main] from main interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from - [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER to:irq::@return irq::@return: scope:[irq] from irq @@ -148,7 +148,7 @@ Target platform is c64basic / MOS6502X .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label CIA1_INTERRUPT = $dc0d // @begin __bbegin: @@ -202,12 +202,12 @@ main: { // Interrupt Routine irq: { // entry interrupt(KERNEL_MIN) - // [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -226,8 +226,8 @@ Statement [6] *((const nomodify byte*) VIC_CONTROL) ← *((const nomodify byte*) Statement [7] *((const nomodify byte*) RASTER) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [8] *((const nomodify byte*) IRQ_ENABLE) ← (const nomodify byte) IRQ_RASTER [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [9] *((const nomodify void()**) KERNEL_IRQ) ← &interrupt(KERNEL_MIN)(void()) irq() [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE [ ] ( [ ] { } ) always clobbers reg byte a -Statement [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a +Statement [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [ ] ( [ ] { } ) always clobbers reg byte a +Statement [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a Statement [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [ ] ( [ ] { } ) always clobbers reg byte a REGISTER UPLIFT SCOPES @@ -256,7 +256,7 @@ ASSEMBLER BEFORE OPTIMIZATION .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label CIA1_INTERRUPT = $dc0d // @begin __bbegin: @@ -310,12 +310,12 @@ main: { // Interrupt Routine irq: { // entry interrupt(KERNEL_MIN) - // [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER @@ -352,7 +352,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) CIA1_INTERRUPT = (byte*) 56333 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f @@ -389,7 +389,7 @@ Score: 71 .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label CIA1_INTERRUPT = $dc0d // @begin // [1] phi from @begin to @1 [phi:@begin->@1] @@ -441,14 +441,14 @@ main: { // Interrupt Routine irq: { // entry interrupt(KERNEL_MIN) - // *BGCOL = WHITE - // [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // *BG_COLOR = WHITE + // [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // *BGCOL = BLACK - // [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // *BG_COLOR = BLACK + // [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // *IRQ_STATUS = IRQ_RASTER // [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ diff --git a/src/test/ref/irq-raster.sym b/src/test/ref/irq-raster.sym index 1f4ee2c06..4a6efb789 100644 --- a/src/test/ref/irq-raster.sym +++ b/src/test/ref/irq-raster.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte*) CIA1_INTERRUPT = (byte*) 56333 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f diff --git a/src/test/ref/irq-volatile-bool-problem.asm b/src/test/ref/irq-volatile-bool-problem.asm index 427f3855d..2537bdf4c 100644 --- a/src/test/ref/irq-volatile-bool-problem.asm +++ b/src/test/ref/irq-volatile-bool-problem.asm @@ -10,7 +10,7 @@ .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label CIA1_INTERRUPT = $dc0d main: { // asm @@ -47,16 +47,16 @@ main: { jmp __b1 } irq: { - // (*BGCOL)++; - inc BGCOL + // (*BG_COLOR)++; + inc BG_COLOR // *IRQ_STATUS = IRQ_RASTER lda #IRQ_RASTER sta IRQ_STATUS // if (*RASTER>50) lda RASTER cmp #$32+1 - // (*BGCOL)--; - dec BGCOL + // (*BG_COLOR)--; + dec BG_COLOR // } jmp $ea81 } diff --git a/src/test/ref/irq-volatile-bool-problem.cfg b/src/test/ref/irq-volatile-bool-problem.cfg index 166849993..1eb3934b5 100644 --- a/src/test/ref/irq-volatile-bool-problem.cfg +++ b/src/test/ref/irq-volatile-bool-problem.cfg @@ -27,7 +27,7 @@ main::@2: scope:[main] from main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from - [13] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + [13] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [15] if(*((const nomodify byte*) RASTER)<(byte) $32+(byte) 1) goto irq::@1 to:irq::@2 @@ -35,7 +35,7 @@ irq::@2: scope:[irq] from irq [16] phi() to:irq::@1 irq::@1: scope:[irq] from irq irq::@2 - [17] *((const nomodify byte*) BGCOL) ← -- *((const nomodify byte*) BGCOL) + [17] *((const nomodify byte*) BG_COLOR) ← -- *((const nomodify byte*) BG_COLOR) to:irq::@return irq::@return: scope:[irq] from irq::@1 [18] return diff --git a/src/test/ref/irq-volatile-bool-problem.log b/src/test/ref/irq-volatile-bool-problem.log index c161f7ce3..d6a602398 100644 --- a/src/test/ref/irq-volatile-bool-problem.log +++ b/src/test/ref/irq-volatile-bool-problem.log @@ -31,14 +31,14 @@ main::@return: scope:[main] from main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from - *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER (bool~) irq::$1 ← *((const nomodify byte*) RASTER) > (number) $32 (bool~) irq::$2 ← ! (bool~) irq::$1 if((bool~) irq::$2) goto irq::@1 to:irq::@2 irq::@1: scope:[irq] from irq irq::@2 - *((const nomodify byte*) BGCOL) ← -- *((const nomodify byte*) BGCOL) + *((const nomodify byte*) BG_COLOR) ← -- *((const nomodify byte*) BG_COLOR) to:irq::@return irq::@2: scope:[irq] from irq to:irq::@1 @@ -57,7 +57,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d020 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d020 (const nomodify byte*) CIA1_INTERRUPT = (byte*)(number) $dc0d (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f (const nomodify byte*) IRQ_ENABLE = (byte*)(number) $d01a @@ -175,7 +175,7 @@ main::@2: scope:[main] from main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from - [13] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + [13] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [15] if(*((const nomodify byte*) RASTER)<(byte) $32+(byte) 1) goto irq::@1 to:irq::@2 @@ -183,7 +183,7 @@ irq::@2: scope:[irq] from irq [16] phi() to:irq::@1 irq::@1: scope:[irq] from irq irq::@2 - [17] *((const nomodify byte*) BGCOL) ← -- *((const nomodify byte*) BGCOL) + [17] *((const nomodify byte*) BG_COLOR) ← -- *((const nomodify byte*) BG_COLOR) to:irq::@return irq::@return: scope:[irq] from irq::@1 [18] return @@ -214,7 +214,7 @@ Target platform is c64basic / MOS6502X .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label CIA1_INTERRUPT = $dc0d // @begin __bbegin: @@ -275,8 +275,8 @@ main: { // irq irq: { // entry interrupt(KERNEL_MIN) - // [13] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [13] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 lda #IRQ_RASTER sta IRQ_STATUS @@ -292,8 +292,8 @@ irq: { jmp __b1 // irq::@1 __b1: - // [17] *((const nomodify byte*) BGCOL) ← -- *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BGCOL + // [17] *((const nomodify byte*) BG_COLOR) ← -- *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BG_COLOR jmp __breturn // irq::@return __breturn: @@ -337,7 +337,7 @@ ASSEMBLER BEFORE OPTIMIZATION .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label CIA1_INTERRUPT = $dc0d // @begin __bbegin: @@ -398,8 +398,8 @@ main: { // irq irq: { // entry interrupt(KERNEL_MIN) - // [13] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [13] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 lda #IRQ_RASTER sta IRQ_STATUS @@ -415,8 +415,8 @@ irq: { jmp __b1 // irq::@1 __b1: - // [17] *((const nomodify byte*) BGCOL) ← -- *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BGCOL + // [17] *((const nomodify byte*) BG_COLOR) ← -- *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BG_COLOR jmp __breturn // irq::@return __breturn: @@ -458,7 +458,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte*) CIA1_INTERRUPT = (byte*) 56333 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f (const nomodify byte*) IRQ_ENABLE = (byte*) 53274 @@ -495,7 +495,7 @@ Score: 951 .label VIC_CONTROL = $d011 .label IRQ_STATUS = $d019 .label IRQ_ENABLE = $d01a - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label CIA1_INTERRUPT = $dc0d // @begin // [1] phi from @begin to @1 [phi:@begin->@1] @@ -552,9 +552,9 @@ main: { // irq irq: { // entry interrupt(KERNEL_MIN) - // (*BGCOL)++; - // [13] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // (*BG_COLOR)++; + // [13] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // *IRQ_STATUS = IRQ_RASTER // [14] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 lda #IRQ_RASTER @@ -566,9 +566,9 @@ irq: { // [16] phi from irq to irq::@2 [phi:irq->irq::@2] // irq::@2 // irq::@1 - // (*BGCOL)--; - // [17] *((const nomodify byte*) BGCOL) ← -- *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BGCOL + // (*BG_COLOR)--; + // [17] *((const nomodify byte*) BG_COLOR) ← -- *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BG_COLOR // irq::@return // } // [18] return - exit interrupt(KERNEL_MIN) diff --git a/src/test/ref/irq-volatile-bool-problem.sym b/src/test/ref/irq-volatile-bool-problem.sym index 0bc9a8bc9..854802ec0 100644 --- a/src/test/ref/irq-volatile-bool-problem.sym +++ b/src/test/ref/irq-volatile-bool-problem.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte*) CIA1_INTERRUPT = (byte*) 56333 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f (const nomodify byte*) IRQ_ENABLE = (byte*) 53274 diff --git a/src/test/ref/keyboard-glitch.asm b/src/test/ref/keyboard-glitch.asm index 15d5f34c0..c67857f14 100644 --- a/src/test/ref/keyboard-glitch.asm +++ b/src/test/ref/keyboard-glitch.asm @@ -2,7 +2,7 @@ // The glitch is caused by the "normal" C64 interrupt occuring just as the keyboard is read. // Press "I" to disable interrupts (red border) // Press "E" to enable interrupts (green border) -// Press "C" to enter pressed state (increaded bgcol) - and "SPACE" to leave presssed state again. +// Press "C" to enter pressed state (increaded BG_COLOR) - and "SPACE" to leave presssed state again. // Holding SPACE will sometimes trigger the pressed state when normal interrupts are enabled (green border) // but never when they are disabled (red border) .pc = $801 "Basic" @@ -15,15 +15,15 @@ .const RED = 2 .const GREEN = 5 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 .label SCREEN = $400 main: { - // *BORDERCOL = GREEN + // *BORDER_COLOR = GREEN lda #GREEN - sta BORDERCOL + sta BORDER_COLOR __b1: // menu() jsr menu @@ -50,9 +50,9 @@ menu: { // if(keyboard_key_pressed(KEY_I)!=0) cmp #0 beq __b3 - // *BORDERCOL = RED + // *BORDER_COLOR = RED lda #RED - sta BORDERCOL + sta BORDER_COLOR // asm sei rts @@ -64,9 +64,9 @@ menu: { // if(keyboard_key_pressed(KEY_E)!=0) cmp #0 beq __b4 - // *BORDERCOL = GREEN + // *BORDER_COLOR = GREEN lda #GREEN - sta BORDERCOL + sta BORDER_COLOR // asm cli rts @@ -115,8 +115,8 @@ keyboard_matrix_read: { rts } pressed: { - // (*BGCOL)++; - inc BGCOL + // (*BG_COLOR)++; + inc BG_COLOR __b1: // keyboard_key_pressed(KEY_SPACE) ldx #KEY_SPACE diff --git a/src/test/ref/keyboard-glitch.cfg b/src/test/ref/keyboard-glitch.cfg index 841988900..bc35dafe3 100644 --- a/src/test/ref/keyboard-glitch.cfg +++ b/src/test/ref/keyboard-glitch.cfg @@ -10,7 +10,7 @@ (void()) main() main: scope:[main] from @1 - [4] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN + [4] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN to:main::@1 main::@1: scope:[main] from main main::@1 [5] phi() @@ -47,7 +47,7 @@ menu::@9: scope:[menu] from menu::@2 [20] if((byte~) menu::$4==(byte) 0) goto menu::@3 to:menu::@6 menu::@6: scope:[menu] from menu::@9 - [21] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED + [21] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED asm { sei } to:menu::@return menu::@3: scope:[menu] from menu::@9 @@ -60,7 +60,7 @@ menu::@10: scope:[menu] from menu::@3 [27] if((byte~) menu::$7==(byte) 0) goto menu::@4 to:menu::@7 menu::@7: scope:[menu] from menu::@10 - [28] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN + [28] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN asm { cli } to:menu::@return menu::@4: scope:[menu] from menu::@10 @@ -95,7 +95,7 @@ keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matri (void()) pressed() pressed: scope:[pressed] from menu::@5 - [43] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + [43] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) to:pressed::@1 pressed::@1: scope:[pressed] from pressed pressed::@2 [44] phi() diff --git a/src/test/ref/keyboard-glitch.log b/src/test/ref/keyboard-glitch.log index a39bbb229..36dcf5646 100644 --- a/src/test/ref/keyboard-glitch.log +++ b/src/test/ref/keyboard-glitch.log @@ -44,7 +44,7 @@ keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_p (void()) main() main: scope:[main] from @1 - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN to:main::@1 main::@1: scope:[main] from main main::@3 if(true) goto main::@2 @@ -109,20 +109,20 @@ menu::@12: scope:[menu] from menu::@4 if((bool~) menu::$9) goto menu::@5 to:menu::@8 menu::@7: scope:[menu] from menu::@10 - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED asm { sei } to:menu::@return menu::@5: scope:[menu] from menu::@12 *((const byte*) SCREEN) ← ++ *((const byte*) SCREEN) to:menu::@1 menu::@8: scope:[menu] from menu::@12 - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN asm { cli } to:menu::@return (void()) pressed() pressed: scope:[pressed] from menu::@6 - *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) to:pressed::@1 pressed::@1: scope:[pressed] from pressed pressed::@3 if(true) goto pressed::@2 @@ -154,8 +154,8 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*)(number) $dc00 (const nomodify byte) GREEN = (byte) 5 (const nomodify byte) KEY_C = (byte) $14 @@ -476,7 +476,7 @@ FINAL CONTROL FLOW GRAPH (void()) main() main: scope:[main] from @1 - [4] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN + [4] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN to:main::@1 main::@1: scope:[main] from main main::@1 [5] phi() @@ -513,7 +513,7 @@ menu::@9: scope:[menu] from menu::@2 [20] if((byte~) menu::$4==(byte) 0) goto menu::@3 to:menu::@6 menu::@6: scope:[menu] from menu::@9 - [21] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED + [21] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED asm { sei } to:menu::@return menu::@3: scope:[menu] from menu::@9 @@ -526,7 +526,7 @@ menu::@10: scope:[menu] from menu::@3 [27] if((byte~) menu::$7==(byte) 0) goto menu::@4 to:menu::@7 menu::@7: scope:[menu] from menu::@10 - [28] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN + [28] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN asm { cli } to:menu::@return menu::@4: scope:[menu] from menu::@10 @@ -561,7 +561,7 @@ keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matri (void()) pressed() pressed: scope:[pressed] from menu::@5 - [43] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + [43] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) to:pressed::@1 pressed::@1: scope:[pressed] from pressed pressed::@2 [44] phi() @@ -750,7 +750,7 @@ Target platform is c64basic / MOS6502X // The glitch is caused by the "normal" C64 interrupt occuring just as the keyboard is read. // Press "I" to disable interrupts (red border) // Press "E" to enable interrupts (green border) -// Press "C" to enter pressed state (increaded bgcol) - and "SPACE" to leave presssed state again. +// Press "C" to enter pressed state (increaded BG_COLOR) - and "SPACE" to leave presssed state again. // Holding SPACE will sometimes trigger the pressed state when normal interrupts are enabled (green border) // but never when they are disabled (red border) // Upstart @@ -765,8 +765,8 @@ Target platform is c64basic / MOS6502X .const RED = 2 .const GREEN = 5 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 .label SCREEN = $400 @@ -786,9 +786,9 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // [4] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BORDERCOL + sta BORDER_COLOR // [5] phi from main main::@1 to main::@1 [phi:main/main::@1->main::@1] __b1_from_main: __b1_from___b1: @@ -872,9 +872,9 @@ menu: { jmp __b6 // menu::@6 __b6: - // [21] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // [21] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BORDERCOL + sta BORDER_COLOR // asm { sei } sei jmp __breturn @@ -906,9 +906,9 @@ menu: { jmp __b7 // menu::@7 __b7: - // [28] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // [28] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BORDERCOL + sta BORDER_COLOR // asm { cli } cli jmp __breturn @@ -997,8 +997,8 @@ keyboard_matrix_read: { // pressed pressed: { .label __1 = $11 - // [43] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [43] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // [44] phi from pressed pressed::@2 to pressed::@1 [phi:pressed/pressed::@2->pressed::@1] __b1_from_pressed: __b1_from___b2: @@ -1038,16 +1038,16 @@ pressed: { keyboard_matrix_col_bitmask: .byte 1, 2, 4, 8, $10, $20, $40, $80 REGISTER UPLIFT POTENTIAL REGISTERS -Statement [4] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [21] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED [ ] ( main:2::menu:6 [ ] { } ) always clobbers reg byte a -Statement [28] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN [ ] ( main:2::menu:6 [ ] { } ) always clobbers reg byte a +Statement [4] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [21] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED [ ] ( main:2::menu:6 [ ] { } ) always clobbers reg byte a +Statement [28] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN [ ] ( main:2::menu:6 [ ] { } ) always clobbers reg byte a Statement [33] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#4 >> (byte) 3 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ( main:2::menu:6::keyboard_key_pressed:9 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::keyboard_key_pressed:17 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::keyboard_key_pressed:24 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#4 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::pressed:14::keyboard_key_pressed:45 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#10 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:9 [ keyboard_key_pressed::colidx#0 ] Statement [40] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::menu:6::keyboard_key_pressed:9::keyboard_matrix_read:35 [ keyboard_key_pressed::colidx#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::keyboard_key_pressed:17::keyboard_matrix_read:35 [ keyboard_key_pressed::colidx#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::keyboard_key_pressed:24::keyboard_matrix_read:35 [ keyboard_key_pressed::colidx#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#4 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::pressed:14::keyboard_key_pressed:45::keyboard_matrix_read:35 [ keyboard_key_pressed::colidx#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#10 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Statement [41] (byte) keyboard_matrix_read::return#0 ← ~ *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:2::menu:6::keyboard_key_pressed:9::keyboard_matrix_read:35 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::keyboard_key_pressed:17::keyboard_matrix_read:35 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::keyboard_key_pressed:24::keyboard_matrix_read:35 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#4 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::pressed:14::keyboard_key_pressed:45::keyboard_matrix_read:35 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#10 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a -Statement [4] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [21] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED [ ] ( main:2::menu:6 [ ] { } ) always clobbers reg byte a -Statement [28] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN [ ] ( main:2::menu:6 [ ] { } ) always clobbers reg byte a +Statement [4] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [21] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED [ ] ( main:2::menu:6 [ ] { } ) always clobbers reg byte a +Statement [28] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN [ ] ( main:2::menu:6 [ ] { } ) always clobbers reg byte a Statement [33] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#4 >> (byte) 3 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ( main:2::menu:6::keyboard_key_pressed:9 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::keyboard_key_pressed:17 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::keyboard_key_pressed:24 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#4 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::pressed:14::keyboard_key_pressed:45 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#10 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Statement [40] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::menu:6::keyboard_key_pressed:9::keyboard_matrix_read:35 [ keyboard_key_pressed::colidx#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::keyboard_key_pressed:17::keyboard_matrix_read:35 [ keyboard_key_pressed::colidx#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::keyboard_key_pressed:24::keyboard_matrix_read:35 [ keyboard_key_pressed::colidx#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#4 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::pressed:14::keyboard_key_pressed:45::keyboard_matrix_read:35 [ keyboard_key_pressed::colidx#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#10 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Statement [41] (byte) keyboard_matrix_read::return#0 ← ~ *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:2::menu:6::keyboard_key_pressed:9::keyboard_matrix_read:35 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::keyboard_key_pressed:17::keyboard_matrix_read:35 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::keyboard_key_pressed:24::keyboard_matrix_read:35 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#4 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::menu:6::pressed:14::keyboard_key_pressed:45::keyboard_matrix_read:35 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#10 } { keyboard_matrix_read::rowid#0 = keyboard_key_pressed::rowidx#0 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a @@ -1108,7 +1108,7 @@ ASSEMBLER BEFORE OPTIMIZATION // The glitch is caused by the "normal" C64 interrupt occuring just as the keyboard is read. // Press "I" to disable interrupts (red border) // Press "E" to enable interrupts (green border) -// Press "C" to enter pressed state (increaded bgcol) - and "SPACE" to leave presssed state again. +// Press "C" to enter pressed state (increaded BG_COLOR) - and "SPACE" to leave presssed state again. // Holding SPACE will sometimes trigger the pressed state when normal interrupts are enabled (green border) // but never when they are disabled (red border) // Upstart @@ -1123,8 +1123,8 @@ ASSEMBLER BEFORE OPTIMIZATION .const RED = 2 .const GREEN = 5 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 .label SCREEN = $400 @@ -1144,9 +1144,9 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // [4] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BORDERCOL + sta BORDER_COLOR // [5] phi from main main::@1 to main::@1 [phi:main/main::@1->main::@1] __b1_from_main: __b1_from___b1: @@ -1215,9 +1215,9 @@ menu: { jmp __b6 // menu::@6 __b6: - // [21] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // [21] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BORDERCOL + sta BORDER_COLOR // asm { sei } sei jmp __breturn @@ -1243,9 +1243,9 @@ menu: { jmp __b7 // menu::@7 __b7: - // [28] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // [28] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BORDERCOL + sta BORDER_COLOR // asm { cli } cli jmp __breturn @@ -1310,8 +1310,8 @@ keyboard_matrix_read: { } // pressed pressed: { - // [43] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [43] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // [44] phi from pressed pressed::@2 to pressed::@1 [phi:pressed/pressed::@2->pressed::@1] __b1_from_pressed: __b1_from___b2: @@ -1413,8 +1413,8 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53281 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify byte) GREEN = (byte) 5 (const nomodify byte) KEY_C = (byte) $14 @@ -1583,7 +1583,7 @@ Score: 3151 // The glitch is caused by the "normal" C64 interrupt occuring just as the keyboard is read. // Press "I" to disable interrupts (red border) // Press "E" to enable interrupts (green border) -// Press "C" to enter pressed state (increaded bgcol) - and "SPACE" to leave presssed state again. +// Press "C" to enter pressed state (increaded BG_COLOR) - and "SPACE" to leave presssed state again. // Holding SPACE will sometimes trigger the pressed state when normal interrupts are enabled (green border) // but never when they are disabled (red border) // Upstart @@ -1598,8 +1598,8 @@ Score: 3151 .const RED = 2 .const GREEN = 5 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 .label SCREEN = $400 @@ -1611,10 +1611,10 @@ Score: 3151 // @end // main main: { - // *BORDERCOL = GREEN - // [4] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = GREEN + // [4] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BORDERCOL + sta BORDER_COLOR // [5] phi from main main::@1 to main::@1 [phi:main/main::@1->main::@1] // main::@1 __b1: @@ -1670,10 +1670,10 @@ menu: { cmp #0 beq __b3 // menu::@6 - // *BORDERCOL = RED - // [21] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = RED + // [21] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BORDERCOL + sta BORDER_COLOR // asm // asm { sei } sei @@ -1696,10 +1696,10 @@ menu: { cmp #0 beq __b4 // menu::@7 - // *BORDERCOL = GREEN - // [28] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = GREEN + // [28] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BORDERCOL + sta BORDER_COLOR // asm // asm { cli } cli @@ -1768,9 +1768,9 @@ keyboard_matrix_read: { } // pressed pressed: { - // (*BGCOL)++; - // [43] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // (*BG_COLOR)++; + // [43] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // [44] phi from pressed pressed::@2 to pressed::@1 [phi:pressed/pressed::@2->pressed::@1] // pressed::@1 __b1: diff --git a/src/test/ref/keyboard-glitch.sym b/src/test/ref/keyboard-glitch.sym index 1ce5d16a8..fd1a14d23 100644 --- a/src/test/ref/keyboard-glitch.sym +++ b/src/test/ref/keyboard-glitch.sym @@ -1,8 +1,8 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53281 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify byte) GREEN = (byte) 5 (const nomodify byte) KEY_C = (byte) $14 diff --git a/src/test/ref/kickasm-uses-prevent-deletion.asm b/src/test/ref/kickasm-uses-prevent-deletion.asm index d89946cea..263feabeb 100644 --- a/src/test/ref/kickasm-uses-prevent-deletion.asm +++ b/src/test/ref/kickasm-uses-prevent-deletion.asm @@ -6,7 +6,7 @@ .const WHITE = 1 // The vector used when the KERNAL serves IRQ interrupts .label KERNEL_IRQ = $314 - .label BGCOL = $d021 + .label BG_COLOR = $d021 main: { // kickasm sei @@ -21,12 +21,12 @@ main: { } // The Interrupt Handler irq: { - // *BGCOL = WHITE + // *BG_COLOR = WHITE lda #WHITE - sta BGCOL - // *BGCOL = BLACK + sta BG_COLOR + // *BG_COLOR = BLACK lda #BLACK - sta BGCOL + sta BG_COLOR // } jmp $ea31 } diff --git a/src/test/ref/kickasm-uses-prevent-deletion.cfg b/src/test/ref/kickasm-uses-prevent-deletion.cfg index e4831bab3..2d59a7941 100644 --- a/src/test/ref/kickasm-uses-prevent-deletion.cfg +++ b/src/test/ref/kickasm-uses-prevent-deletion.cfg @@ -24,8 +24,8 @@ main::@return: scope:[main] from main interrupt(KERNEL_KEYBOARD)(void()) irq() irq: scope:[irq] from - [6] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - [7] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [6] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + [7] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK to:irq::@return irq::@return: scope:[irq] from irq [8] return diff --git a/src/test/ref/kickasm-uses-prevent-deletion.log b/src/test/ref/kickasm-uses-prevent-deletion.log index f8f4b952c..5009ea399 100644 --- a/src/test/ref/kickasm-uses-prevent-deletion.log +++ b/src/test/ref/kickasm-uses-prevent-deletion.log @@ -20,8 +20,8 @@ main::@return: scope:[main] from main interrupt(KERNEL_KEYBOARD)(void()) irq() irq: scope:[irq] from - *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK to:irq::@return irq::@return: scope:[irq] from irq return @@ -38,7 +38,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const nomodify byte) BLACK = (byte) 0 (const nomodify void()**) KERNEL_IRQ = (void()**)(number) $314 (const nomodify byte) WHITE = (byte) 1 @@ -91,8 +91,8 @@ main::@return: scope:[main] from main interrupt(KERNEL_KEYBOARD)(void()) irq() irq: scope:[irq] from - [6] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE - [7] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK + [6] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE + [7] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK to:irq::@return irq::@return: scope:[irq] from irq [8] return @@ -119,7 +119,7 @@ Target platform is c64basic / MOS6502X .const WHITE = 1 // The vector used when the KERNAL serves IRQ interrupts .label KERNEL_IRQ = $314 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -154,12 +154,12 @@ main: { // The Interrupt Handler irq: { // entry interrupt(KERNEL_KEYBOARD) - // [6] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [6] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // [7] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [7] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR jmp __breturn // irq::@return __breturn: @@ -169,8 +169,8 @@ irq: { // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [6] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE [ ] ( [ ] { } ) always clobbers reg byte a -Statement [7] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a +Statement [6] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE [ ] ( [ ] { } ) always clobbers reg byte a +Statement [7] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( [ ] { } ) always clobbers reg byte a REGISTER UPLIFT SCOPES Uplift Scope [main] @@ -193,7 +193,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const WHITE = 1 // The vector used when the KERNAL serves IRQ interrupts .label KERNEL_IRQ = $314 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -228,12 +228,12 @@ main: { // The Interrupt Handler irq: { // entry interrupt(KERNEL_KEYBOARD) - // [6] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [6] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // [7] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [7] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR jmp __breturn // irq::@return __breturn: @@ -266,7 +266,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) BLACK = (byte) 0 (const nomodify void()**) KERNEL_IRQ = (void()**) 788 (const nomodify byte) WHITE = (byte) 1 @@ -291,7 +291,7 @@ Score: 277 .const WHITE = 1 // The vector used when the KERNAL serves IRQ interrupts .label KERNEL_IRQ = $314 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] // @1 @@ -318,14 +318,14 @@ main: { // The Interrupt Handler irq: { // entry interrupt(KERNEL_KEYBOARD) - // *BGCOL = WHITE - // [6] *((const nomodify byte*) BGCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // *BG_COLOR = WHITE + // [6] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BGCOL - // *BGCOL = BLACK - // [7] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // *BG_COLOR = BLACK + // [7] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL + sta BG_COLOR // irq::@return // } // [8] return - exit interrupt(KERNEL_KEYBOARD) diff --git a/src/test/ref/kickasm-uses-prevent-deletion.sym b/src/test/ref/kickasm-uses-prevent-deletion.sym index f90445868..301d3f833 100644 --- a/src/test/ref/kickasm-uses-prevent-deletion.sym +++ b/src/test/ref/kickasm-uses-prevent-deletion.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) BLACK = (byte) 0 (const nomodify void()**) KERNEL_IRQ = (void()**) 788 (const nomodify byte) WHITE = (byte) 1 diff --git a/src/test/ref/line-anim.asm b/src/test/ref/line-anim.asm index cd25176f8..a72017b35 100644 --- a/src/test/ref/line-anim.asm +++ b/src/test/ref/line-anim.asm @@ -15,7 +15,7 @@ .const DELAY = 8 .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D011 = $d011 .label D018 = $d018 // Processor port data direction register @@ -84,8 +84,8 @@ main: { lda #$ff cmp RASTER bne __b2 - // (*BORDERCOL)++; - inc BORDERCOL + // (*BORDER_COLOR)++; + inc BORDER_COLOR jmp __b2 } // Plot a single dot in the bitmap diff --git a/src/test/ref/line-anim.cfg b/src/test/ref/line-anim.cfg index e2241020b..f4c14727c 100644 --- a/src/test/ref/line-anim.cfg +++ b/src/test/ref/line-anim.cfg @@ -58,7 +58,7 @@ main::@2: scope:[main] from main::@2 main::@3 main::@8 [27] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@2 - [28] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [28] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) to:main::@2 (void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) diff --git a/src/test/ref/line-anim.log b/src/test/ref/line-anim.log index 5e57558a5..eda09cca0 100644 --- a/src/test/ref/line-anim.log +++ b/src/test/ref/line-anim.log @@ -268,7 +268,7 @@ main::@3: scope:[main] from main::@2 main::@3 if((bool~) main::$8) goto main::@3 to:main::@4 main::@4: scope:[main] from main::@3 - *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) to:main::@2 main::@return: scope:[main] from main::@2 return @@ -576,7 +576,7 @@ SYMBOL TABLE SSA (label) @begin (label) @end (const byte*) BITMAP = (byte*)(number) $a000 -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*)(number) $dd00 (const nomodify byte*) D011 = (byte*)(number) $d011 (const nomodify byte*) D018 = (byte*)(number) $d018 @@ -1865,7 +1865,7 @@ main::@2: scope:[main] from main::@2 main::@3 main::@8 [27] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@2 - [28] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [28] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) to:main::@2 (void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) @@ -2565,7 +2565,7 @@ Target platform is c64basic / MOS6502X .const DELAY = 8 .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D011 = $d011 .label D018 = $d018 // Processor port data direction register @@ -2712,8 +2712,8 @@ main: { jmp __b3 // main::@3 __b3: - // [28] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // [28] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __b2 } // bitmap_plot @@ -3923,7 +3923,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const DELAY = 8 .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D011 = $d011 .label D018 = $d018 // Processor port data direction register @@ -4065,8 +4065,8 @@ main: { jmp __b3 // main::@3 __b3: - // [28] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // [28] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __b2 } // bitmap_plot @@ -5027,7 +5027,7 @@ FINAL SYMBOL TABLE (label) @begin (label) @end (const byte*) BITMAP = (byte*) 40960 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*) 56576 (const nomodify byte*) D011 = (byte*) 53265 (const nomodify byte*) D018 = (byte*) 53272 @@ -5408,7 +5408,7 @@ Score: 21967 .const DELAY = 8 .const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label D011 = $d011 .label D018 = $d018 // Processor port data direction register @@ -5525,9 +5525,9 @@ main: { cmp RASTER bne __b2 // main::@3 - // (*BORDERCOL)++; - // [28] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // (*BORDER_COLOR)++; + // [28] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR jmp __b2 } // bitmap_plot diff --git a/src/test/ref/line-anim.sym b/src/test/ref/line-anim.sym index 279873240..2ad22d036 100644 --- a/src/test/ref/line-anim.sym +++ b/src/test/ref/line-anim.sym @@ -2,7 +2,7 @@ (label) @begin (label) @end (const byte*) BITMAP = (byte*) 40960 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*) 56576 (const nomodify byte*) D011 = (byte*) 53265 (const nomodify byte*) D018 = (byte*) 53272 diff --git a/src/test/ref/localscope-simple.asm b/src/test/ref/localscope-simple.asm index b49fc6695..5cdfd1401 100644 --- a/src/test/ref/localscope-simple.asm +++ b/src/test/ref/localscope-simple.asm @@ -2,15 +2,15 @@ .pc = $801 "Basic" :BasicUpstart(main) .pc = $80d "Program" - .label BGCOL = $d021 + .label BG_COLOR = $d021 main: { .const i = 0 .const i1 = 1 - // *BGCOL = i + // *BG_COLOR = i lda #i - sta BGCOL + sta BG_COLOR lda #i1 - sta BGCOL + sta BG_COLOR // } rts } diff --git a/src/test/ref/localscope-simple.cfg b/src/test/ref/localscope-simple.cfg index 41ea53f9f..28576d460 100644 --- a/src/test/ref/localscope-simple.cfg +++ b/src/test/ref/localscope-simple.cfg @@ -10,8 +10,8 @@ (void()) main() main: scope:[main] from @1 - [4] *((const nomodify byte*) BGCOL) ← (const byte) main::i - [5] *((const nomodify byte*) BGCOL) ← (const byte) main::i1 + [4] *((const nomodify byte*) BG_COLOR) ← (const byte) main::i + [5] *((const nomodify byte*) BG_COLOR) ← (const byte) main::i1 to:main::@return main::@return: scope:[main] from main [6] return diff --git a/src/test/ref/localscope-simple.log b/src/test/ref/localscope-simple.log index d3250f209..8a4707f69 100644 --- a/src/test/ref/localscope-simple.log +++ b/src/test/ref/localscope-simple.log @@ -5,8 +5,8 @@ CONTROL FLOW GRAPH SSA (void()) main() main: scope:[main] from @1 - *((const nomodify byte*) BGCOL) ← (const byte) main::i - *((const nomodify byte*) BGCOL) ← (const byte) main::i1 + *((const nomodify byte*) BG_COLOR) ← (const byte) main::i + *((const nomodify byte*) BG_COLOR) ← (const byte) main::i1 to:main::@return main::@return: scope:[main] from main return @@ -23,7 +23,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (void()) main() (label) main::@return (const byte) main::i = (byte) 0 @@ -58,8 +58,8 @@ FINAL CONTROL FLOW GRAPH (void()) main() main: scope:[main] from @1 - [4] *((const nomodify byte*) BGCOL) ← (const byte) main::i - [5] *((const nomodify byte*) BGCOL) ← (const byte) main::i1 + [4] *((const nomodify byte*) BG_COLOR) ← (const byte) main::i + [5] *((const nomodify byte*) BG_COLOR) ← (const byte) main::i1 to:main::@return main::@return: scope:[main] from main [6] return @@ -81,7 +81,7 @@ Target platform is c64basic / MOS6502X :BasicUpstart(__bbegin) .pc = $80d "Program" // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -100,12 +100,12 @@ __bend: main: { .const i = 0 .const i1 = 1 - // [4] *((const nomodify byte*) BGCOL) ← (const byte) main::i -- _deref_pbuc1=vbuc2 + // [4] *((const nomodify byte*) BG_COLOR) ← (const byte) main::i -- _deref_pbuc1=vbuc2 lda #i - sta BGCOL - // [5] *((const nomodify byte*) BGCOL) ← (const byte) main::i1 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [5] *((const nomodify byte*) BG_COLOR) ← (const byte) main::i1 -- _deref_pbuc1=vbuc2 lda #i1 - sta BGCOL + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -115,8 +115,8 @@ main: { // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [4] *((const nomodify byte*) BGCOL) ← (const byte) main::i [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [5] *((const nomodify byte*) BGCOL) ← (const byte) main::i1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [4] *((const nomodify byte*) BG_COLOR) ← (const byte) main::i [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [5] *((const nomodify byte*) BG_COLOR) ← (const byte) main::i1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a REGISTER UPLIFT SCOPES Uplift Scope [main] @@ -133,7 +133,7 @@ ASSEMBLER BEFORE OPTIMIZATION :BasicUpstart(__bbegin) .pc = $80d "Program" // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -152,12 +152,12 @@ __bend: main: { .const i = 0 .const i1 = 1 - // [4] *((const nomodify byte*) BGCOL) ← (const byte) main::i -- _deref_pbuc1=vbuc2 + // [4] *((const nomodify byte*) BG_COLOR) ← (const byte) main::i -- _deref_pbuc1=vbuc2 lda #i - sta BGCOL - // [5] *((const nomodify byte*) BGCOL) ← (const byte) main::i1 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [5] *((const nomodify byte*) BG_COLOR) ← (const byte) main::i1 -- _deref_pbuc1=vbuc2 lda #i1 - sta BGCOL + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -188,7 +188,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (void()) main() (label) main::@return (const byte) main::i = (byte) 0 @@ -206,7 +206,7 @@ Score: 18 :BasicUpstart(main) .pc = $80d "Program" // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] // @1 @@ -217,13 +217,13 @@ Score: 18 main: { .const i = 0 .const i1 = 1 - // *BGCOL = i - // [4] *((const nomodify byte*) BGCOL) ← (const byte) main::i -- _deref_pbuc1=vbuc2 + // *BG_COLOR = i + // [4] *((const nomodify byte*) BG_COLOR) ← (const byte) main::i -- _deref_pbuc1=vbuc2 lda #i - sta BGCOL - // [5] *((const nomodify byte*) BGCOL) ← (const byte) main::i1 -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [5] *((const nomodify byte*) BG_COLOR) ← (const byte) main::i1 -- _deref_pbuc1=vbuc2 lda #i1 - sta BGCOL + sta BG_COLOR // main::@return // } // [6] return diff --git a/src/test/ref/localscope-simple.sym b/src/test/ref/localscope-simple.sym index 71461bf7e..302fa6fa2 100644 --- a/src/test/ref/localscope-simple.sym +++ b/src/test/ref/localscope-simple.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (void()) main() (label) main::@return (const byte) main::i = (byte) 0 diff --git a/src/test/ref/longbranch-interrupt-problem.asm b/src/test/ref/longbranch-interrupt-problem.asm index 46687dddf..a36e01bfc 100644 --- a/src/test/ref/longbranch-interrupt-problem.asm +++ b/src/test/ref/longbranch-interrupt-problem.asm @@ -3,7 +3,7 @@ :BasicUpstart(__bbegin) .pc = $80d "Program" .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label col = 2 __bbegin: // col = 0 @@ -30,9 +30,9 @@ main: { irq: { // asm lda $dc0d - // *BGCOL = col + // *BG_COLOR = col lda.z col - sta BGCOL + sta BG_COLOR // if(col!=0) lda.z col cmp #0 diff --git a/src/test/ref/longbranch-interrupt-problem.cfg b/src/test/ref/longbranch-interrupt-problem.cfg index dae343f04..97d4c0943 100644 --- a/src/test/ref/longbranch-interrupt-problem.cfg +++ b/src/test/ref/longbranch-interrupt-problem.cfg @@ -22,7 +22,7 @@ main::@2: scope:[main] from main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from asm { lda$dc0d } - [8] *((const nomodify byte*) BGCOL) ← (volatile byte) col + [8] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col [9] if((volatile byte) col==(byte) 0) goto irq::@return to:irq::@1 irq::@1: scope:[irq] from irq diff --git a/src/test/ref/longbranch-interrupt-problem.log b/src/test/ref/longbranch-interrupt-problem.log index 22f900221..474cf86b9 100644 --- a/src/test/ref/longbranch-interrupt-problem.log +++ b/src/test/ref/longbranch-interrupt-problem.log @@ -27,7 +27,7 @@ main::@return: scope:[main] from main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from asm { lda$dc0d } - *((const nomodify byte*) BGCOL) ← (volatile byte) col + *((const nomodify byte*) BG_COLOR) ← (volatile byte) col (bool~) irq::$0 ← (volatile byte) col != (number) 0 (bool~) irq::$1 ← ! (bool~) irq::$0 if((bool~) irq::$1) goto irq::@return @@ -50,7 +50,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d020 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d020 (const nomodify void()**) KERNEL_IRQ = (void()**)(number) $314 (volatile byte) col loadstore interrupt(KERNEL_MIN)(void()) irq() @@ -142,7 +142,7 @@ main::@2: scope:[main] from main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from asm { lda$dc0d } - [8] *((const nomodify byte*) BGCOL) ← (volatile byte) col + [8] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col [9] if((volatile byte) col==(byte) 0) goto irq::@return to:irq::@1 irq::@1: scope:[irq] from irq @@ -174,7 +174,7 @@ Target platform is c64basic / MOS6502X .pc = $80d "Program" // Global Constants & labels .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label col = 2 // @begin __bbegin: @@ -220,9 +220,9 @@ irq: { // entry interrupt(KERNEL_MIN) // asm { lda$dc0d } lda $dc0d - // [8] *((const nomodify byte*) BGCOL) ← (volatile byte) col -- _deref_pbuc1=vbuz1 + // [8] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col -- _deref_pbuc1=vbuz1 lda.z col - sta BGCOL + sta BG_COLOR // [9] if((volatile byte) col==(byte) 0) goto irq::@return -- vbuz1_eq_0_then_la1 lda.z col cmp #0 @@ -246,7 +246,7 @@ Statement [4] *((const nomodify void()**) KERNEL_IRQ) ← &interrupt(KERNEL_MIN) Statement [5] if((volatile byte) col<(byte) $a+(byte) 1) goto main::@1 [ col ] ( main:2 [ col ] { } ) always clobbers reg byte a Statement [6] (volatile byte) col ← (byte) 0 [ col ] ( main:2 [ col ] { } ) always clobbers reg byte a Statement asm { lda$dc0d } always clobbers reg byte a -Statement [8] *((const nomodify byte*) BGCOL) ← (volatile byte) col [ col ] ( [ col ] { } ) always clobbers reg byte a +Statement [8] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col [ col ] ( [ col ] { } ) always clobbers reg byte a Statement [9] if((volatile byte) col==(byte) 0) goto irq::@return [ col ] ( [ col ] { } ) always clobbers reg byte a Potential registers zp[1]:2 [ col ] : zp[1]:2 , @@ -270,7 +270,7 @@ ASSEMBLER BEFORE OPTIMIZATION .pc = $80d "Program" // Global Constants & labels .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label col = 2 // @begin __bbegin: @@ -316,9 +316,9 @@ irq: { // entry interrupt(KERNEL_MIN) // asm { lda$dc0d } lda $dc0d - // [8] *((const nomodify byte*) BGCOL) ← (volatile byte) col -- _deref_pbuc1=vbuz1 + // [8] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col -- _deref_pbuc1=vbuz1 lda.z col - sta BGCOL + sta BG_COLOR // [9] if((volatile byte) col==(byte) 0) goto irq::@return -- vbuz1_eq_0_then_la1 lda.z col cmp #0 @@ -364,7 +364,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify void()**) KERNEL_IRQ = (void()**) 788 (volatile byte) col loadstore zp[1]:2 139.0 interrupt(KERNEL_MIN)(void()) irq() @@ -388,7 +388,7 @@ Score: 888 .pc = $80d "Program" // Global Constants & labels .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label col = 2 // @begin __bbegin: @@ -431,10 +431,10 @@ irq: { // asm // asm { lda$dc0d } lda $dc0d - // *BGCOL = col - // [8] *((const nomodify byte*) BGCOL) ← (volatile byte) col -- _deref_pbuc1=vbuz1 + // *BG_COLOR = col + // [8] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col -- _deref_pbuc1=vbuz1 lda.z col - sta BGCOL + sta BG_COLOR // if(col!=0) // [9] if((volatile byte) col==(byte) 0) goto irq::@return -- vbuz1_eq_0_then_la1 lda.z col diff --git a/src/test/ref/longbranch-interrupt-problem.sym b/src/test/ref/longbranch-interrupt-problem.sym index be8491445..1f565e2c6 100644 --- a/src/test/ref/longbranch-interrupt-problem.sym +++ b/src/test/ref/longbranch-interrupt-problem.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify void()**) KERNEL_IRQ = (void()**) 788 (volatile byte) col loadstore zp[1]:2 139.0 interrupt(KERNEL_MIN)(void()) irq() diff --git a/src/test/ref/loop-problem2.asm b/src/test/ref/loop-problem2.asm index add65bb2f..cffc4e82d 100644 --- a/src/test/ref/loop-problem2.asm +++ b/src/test/ref/loop-problem2.asm @@ -1,7 +1,7 @@ .pc = $801 "Basic" :BasicUpstart(main) .pc = $80d "Program" - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label SCREEN = $400 main: { // print_cls() @@ -13,19 +13,19 @@ main: { } mode_ctrl: { __b1: - // before = *BORDERCOL - lda BORDERCOL + // before = *BORDER_COLOR + lda BORDER_COLOR // if(before==$ff) cmp #$ff beq __b2 - // *BORDERCOL = 3 + // *BORDER_COLOR = 3 lda #3 - sta BORDERCOL + sta BORDER_COLOR jmp __b1 __b2: - // *BORDERCOL = 2 + // *BORDER_COLOR = 2 lda #2 - sta BORDERCOL + sta BORDER_COLOR jmp __b1 } print_cls: { diff --git a/src/test/ref/loop-problem2.cfg b/src/test/ref/loop-problem2.cfg index 0542013b8..79aef796b 100644 --- a/src/test/ref/loop-problem2.cfg +++ b/src/test/ref/loop-problem2.cfg @@ -26,14 +26,14 @@ mode_ctrl: scope:[mode_ctrl] from main::@1 [9] phi() to:mode_ctrl::@1 mode_ctrl::@1: scope:[mode_ctrl] from mode_ctrl mode_ctrl::@2 mode_ctrl::@3 - [10] (byte) mode_ctrl::before#0 ← *((const nomodify byte*) BORDERCOL) + [10] (byte) mode_ctrl::before#0 ← *((const nomodify byte*) BORDER_COLOR) [11] if((byte) mode_ctrl::before#0==(byte) $ff) goto mode_ctrl::@2 to:mode_ctrl::@3 mode_ctrl::@3: scope:[mode_ctrl] from mode_ctrl::@1 - [12] *((const nomodify byte*) BORDERCOL) ← (byte) 3 + [12] *((const nomodify byte*) BORDER_COLOR) ← (byte) 3 to:mode_ctrl::@1 mode_ctrl::@2: scope:[mode_ctrl] from mode_ctrl::@1 - [13] *((const nomodify byte*) BORDERCOL) ← (byte) 2 + [13] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 to:mode_ctrl::@1 (void()) print_cls() diff --git a/src/test/ref/loop-problem2.log b/src/test/ref/loop-problem2.log index 0fafb39c3..d2cb5d4a6 100644 --- a/src/test/ref/loop-problem2.log +++ b/src/test/ref/loop-problem2.log @@ -41,15 +41,15 @@ mode_ctrl::@1: scope:[mode_ctrl] from mode_ctrl mode_ctrl::@3 mode_ctrl::@4 if(true) goto mode_ctrl::@2 to:mode_ctrl::@return mode_ctrl::@2: scope:[mode_ctrl] from mode_ctrl::@1 - (byte) mode_ctrl::before#0 ← *((const nomodify byte*) BORDERCOL) + (byte) mode_ctrl::before#0 ← *((const nomodify byte*) BORDER_COLOR) (bool~) mode_ctrl::$0 ← (byte) mode_ctrl::before#0 == (number) $ff if((bool~) mode_ctrl::$0) goto mode_ctrl::@3 to:mode_ctrl::@4 mode_ctrl::@3: scope:[mode_ctrl] from mode_ctrl::@2 - *((const nomodify byte*) BORDERCOL) ← (number) 2 + *((const nomodify byte*) BORDER_COLOR) ← (number) 2 to:mode_ctrl::@1 mode_ctrl::@4: scope:[mode_ctrl] from mode_ctrl::@2 - *((const nomodify byte*) BORDERCOL) ← (number) 3 + *((const nomodify byte*) BORDER_COLOR) ← (number) 3 to:mode_ctrl::@1 mode_ctrl::@return: scope:[mode_ctrl] from mode_ctrl::@1 return @@ -66,7 +66,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify byte*) SCREEN = (byte*)(number) $400 (void()) main() (label) main::@1 @@ -94,11 +94,11 @@ SYMBOL TABLE SSA Adding number conversion cast (unumber) $3e8 in (bool~) print_cls::$0 ← (byte*) print_cls::sc#2 != (const nomodify byte*) SCREEN+(number) $3e8 Adding number conversion cast (unumber) $ff in (bool~) mode_ctrl::$0 ← (byte) mode_ctrl::before#0 == (number) $ff -Adding number conversion cast (unumber) 2 in *((const nomodify byte*) BORDERCOL) ← (number) 2 -Adding number conversion cast (unumber) 3 in *((const nomodify byte*) BORDERCOL) ← (number) 3 +Adding number conversion cast (unumber) 2 in *((const nomodify byte*) BORDER_COLOR) ← (number) 2 +Adding number conversion cast (unumber) 3 in *((const nomodify byte*) BORDER_COLOR) ← (number) 3 Successful SSA optimization PassNAddNumberTypeConversions -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 2 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 3 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 2 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 3 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 53280 Simplifying constant pointer cast (byte*) 1024 @@ -186,14 +186,14 @@ mode_ctrl: scope:[mode_ctrl] from main::@1 [9] phi() to:mode_ctrl::@1 mode_ctrl::@1: scope:[mode_ctrl] from mode_ctrl mode_ctrl::@2 mode_ctrl::@3 - [10] (byte) mode_ctrl::before#0 ← *((const nomodify byte*) BORDERCOL) + [10] (byte) mode_ctrl::before#0 ← *((const nomodify byte*) BORDER_COLOR) [11] if((byte) mode_ctrl::before#0==(byte) $ff) goto mode_ctrl::@2 to:mode_ctrl::@3 mode_ctrl::@3: scope:[mode_ctrl] from mode_ctrl::@1 - [12] *((const nomodify byte*) BORDERCOL) ← (byte) 3 + [12] *((const nomodify byte*) BORDER_COLOR) ← (byte) 3 to:mode_ctrl::@1 mode_ctrl::@2: scope:[mode_ctrl] from mode_ctrl::@1 - [13] *((const nomodify byte*) BORDERCOL) ← (byte) 2 + [13] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 to:mode_ctrl::@1 (void()) print_cls() @@ -240,7 +240,7 @@ Target platform is c64basic / MOS6502X :BasicUpstart(__bbegin) .pc = $80d "Program" // Global Constants & labels - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label SCREEN = $400 // @begin __bbegin: @@ -285,8 +285,8 @@ mode_ctrl: { jmp __b1 // mode_ctrl::@1 __b1: - // [10] (byte) mode_ctrl::before#0 ← *((const nomodify byte*) BORDERCOL) -- vbuz1=_deref_pbuc1 - lda BORDERCOL + // [10] (byte) mode_ctrl::before#0 ← *((const nomodify byte*) BORDER_COLOR) -- vbuz1=_deref_pbuc1 + lda BORDER_COLOR sta.z before // [11] if((byte) mode_ctrl::before#0==(byte) $ff) goto mode_ctrl::@2 -- vbuz1_eq_vbuc1_then_la1 lda #$ff @@ -295,15 +295,15 @@ mode_ctrl: { jmp __b3 // mode_ctrl::@3 __b3: - // [12] *((const nomodify byte*) BORDERCOL) ← (byte) 3 -- _deref_pbuc1=vbuc2 + // [12] *((const nomodify byte*) BORDER_COLOR) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 - sta BORDERCOL + sta BORDER_COLOR jmp __b1 // mode_ctrl::@2 __b2: - // [13] *((const nomodify byte*) BORDERCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [13] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BORDERCOL + sta BORDER_COLOR jmp __b1 } // print_cls @@ -350,8 +350,8 @@ print_cls: { // File Data REGISTER UPLIFT POTENTIAL REGISTERS -Statement [12] *((const nomodify byte*) BORDERCOL) ← (byte) 3 [ ] ( main:2::mode_ctrl:7 [ ] { } ) always clobbers reg byte a -Statement [13] *((const nomodify byte*) BORDERCOL) ← (byte) 2 [ ] ( main:2::mode_ctrl:7 [ ] { } ) always clobbers reg byte a +Statement [12] *((const nomodify byte*) BORDER_COLOR) ← (byte) 3 [ ] ( main:2::mode_ctrl:7 [ ] { } ) always clobbers reg byte a +Statement [13] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 [ ] ( main:2::mode_ctrl:7 [ ] { } ) always clobbers reg byte a Statement [16] if((byte*) print_cls::sc#2!=(const nomodify byte*) SCREEN+(word) $3e8) goto print_cls::@2 [ print_cls::sc#2 ] ( main:2::print_cls:5 [ print_cls::sc#2 ] { } ) always clobbers reg byte a Statement [18] *((byte*) print_cls::sc#2) ← (byte) ' ' [ print_cls::sc#2 ] ( main:2::print_cls:5 [ print_cls::sc#2 ] { } ) always clobbers reg byte a reg byte y Potential registers zp[2]:2 [ print_cls::sc#2 print_cls::sc#1 ] : zp[2]:2 , @@ -375,7 +375,7 @@ ASSEMBLER BEFORE OPTIMIZATION :BasicUpstart(__bbegin) .pc = $80d "Program" // Global Constants & labels - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label SCREEN = $400 // @begin __bbegin: @@ -419,23 +419,23 @@ mode_ctrl: { jmp __b1 // mode_ctrl::@1 __b1: - // [10] (byte) mode_ctrl::before#0 ← *((const nomodify byte*) BORDERCOL) -- vbuaa=_deref_pbuc1 - lda BORDERCOL + // [10] (byte) mode_ctrl::before#0 ← *((const nomodify byte*) BORDER_COLOR) -- vbuaa=_deref_pbuc1 + lda BORDER_COLOR // [11] if((byte) mode_ctrl::before#0==(byte) $ff) goto mode_ctrl::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #$ff beq __b2 jmp __b3 // mode_ctrl::@3 __b3: - // [12] *((const nomodify byte*) BORDERCOL) ← (byte) 3 -- _deref_pbuc1=vbuc2 + // [12] *((const nomodify byte*) BORDER_COLOR) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 - sta BORDERCOL + sta BORDER_COLOR jmp __b1 // mode_ctrl::@2 __b2: - // [13] *((const nomodify byte*) BORDERCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [13] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BORDERCOL + sta BORDER_COLOR jmp __b1 } // print_cls @@ -517,7 +517,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) SCREEN = (byte*) 1024 (void()) main() (label) main::@1 @@ -549,7 +549,7 @@ Score: 794 :BasicUpstart(main) .pc = $80d "Program" // Global Constants & labels - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label SCREEN = $400 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] @@ -579,25 +579,25 @@ main: { mode_ctrl: { // mode_ctrl::@1 __b1: - // before = *BORDERCOL - // [10] (byte) mode_ctrl::before#0 ← *((const nomodify byte*) BORDERCOL) -- vbuaa=_deref_pbuc1 - lda BORDERCOL + // before = *BORDER_COLOR + // [10] (byte) mode_ctrl::before#0 ← *((const nomodify byte*) BORDER_COLOR) -- vbuaa=_deref_pbuc1 + lda BORDER_COLOR // if(before==$ff) // [11] if((byte) mode_ctrl::before#0==(byte) $ff) goto mode_ctrl::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #$ff beq __b2 // mode_ctrl::@3 - // *BORDERCOL = 3 - // [12] *((const nomodify byte*) BORDERCOL) ← (byte) 3 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 3 + // [12] *((const nomodify byte*) BORDER_COLOR) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 - sta BORDERCOL + sta BORDER_COLOR jmp __b1 // mode_ctrl::@2 __b2: - // *BORDERCOL = 2 - // [13] *((const nomodify byte*) BORDERCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 2 + // [13] *((const nomodify byte*) BORDER_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BORDERCOL + sta BORDER_COLOR jmp __b1 } // print_cls diff --git a/src/test/ref/loop-problem2.sym b/src/test/ref/loop-problem2.sym index 1a9fdd0bb..3565d0fd1 100644 --- a/src/test/ref/loop-problem2.sym +++ b/src/test/ref/loop-problem2.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) SCREEN = (byte*) 1024 (void()) main() (label) main::@1 diff --git a/src/test/ref/loophead-problem-3.asm b/src/test/ref/loophead-problem-3.asm index 591726e05..6d8f816b2 100644 --- a/src/test/ref/loophead-problem-3.asm +++ b/src/test/ref/loophead-problem-3.asm @@ -3,8 +3,8 @@ .pc = $801 "Basic" :BasicUpstart(main) .pc = $80d "Program" - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 main: { .label result = 2 .label kaputt = $a @@ -19,12 +19,12 @@ main: { sta.z kaputt+1 // kaputt lda.z kaputt+1 - // *BGCOL = >kaputt - sta BGCOL + // *BG_COLOR = >kaputt + sta BG_COLOR // } rts } diff --git a/src/test/ref/loophead-problem-3.cfg b/src/test/ref/loophead-problem-3.cfg index bf84f8788..1ed2d6944 100644 --- a/src/test/ref/loophead-problem-3.cfg +++ b/src/test/ref/loophead-problem-3.cfg @@ -18,9 +18,9 @@ main::@1: scope:[main] from main [7] (dword) main::result#0 ← (dword) mul16u::return#2 [8] (word) main::kaputt#0 ← < (dword) main::result#0 [9] (byte~) main::$2 ← < (word) main::kaputt#0 - [10] *((const nomodify byte*) BORDERCOL) ← (byte~) main::$2 + [10] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$2 [11] (byte~) main::$3 ← > (word) main::kaputt#0 - [12] *((const nomodify byte*) BGCOL) ← (byte~) main::$3 + [12] *((const nomodify byte*) BG_COLOR) ← (byte~) main::$3 to:main::@return main::@return: scope:[main] from main::@1 [13] return diff --git a/src/test/ref/loophead-problem-3.log b/src/test/ref/loophead-problem-3.log index f898df2c0..fcabcf7f1 100644 --- a/src/test/ref/loophead-problem-3.log +++ b/src/test/ref/loophead-problem-3.log @@ -67,9 +67,9 @@ main::@1: scope:[main] from main (word~) main::$1 ← < (dword) main::result#0 (word) main::kaputt#0 ← (word~) main::$1 (byte~) main::$2 ← < (word) main::kaputt#0 - *((const nomodify byte*) BORDERCOL) ← (byte~) main::$2 + *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$2 (byte~) main::$3 ← > (word) main::kaputt#0 - *((const nomodify byte*) BGCOL) ← (byte~) main::$3 + *((const nomodify byte*) BG_COLOR) ← (byte~) main::$3 to:main::@return main::@return: scope:[main] from main::@1 return @@ -86,8 +86,8 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (byte) MOS6526_CIA::INTERRUPT (byte) MOS6526_CIA::PORT_A (byte) MOS6526_CIA::PORT_A_DDR @@ -346,9 +346,9 @@ main::@1: scope:[main] from main [7] (dword) main::result#0 ← (dword) mul16u::return#2 [8] (word) main::kaputt#0 ← < (dword) main::result#0 [9] (byte~) main::$2 ← < (word) main::kaputt#0 - [10] *((const nomodify byte*) BORDERCOL) ← (byte~) main::$2 + [10] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$2 [11] (byte~) main::$3 ← > (word) main::kaputt#0 - [12] *((const nomodify byte*) BGCOL) ← (byte~) main::$3 + [12] *((const nomodify byte*) BG_COLOR) ← (byte~) main::$3 to:main::@return main::@return: scope:[main] from main::@1 [13] return @@ -529,8 +529,8 @@ Target platform is c64basic / MOS6502X :BasicUpstart(__bbegin) .pc = $80d "Program" // Global Constants & labels - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -586,15 +586,15 @@ main: { // [9] (byte~) main::$2 ← < (word) main::kaputt#0 -- vbuz1=_lo_vwuz2 lda.z kaputt sta.z __2 - // [10] *((const nomodify byte*) BORDERCOL) ← (byte~) main::$2 -- _deref_pbuc1=vbuz1 + // [10] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$2 -- _deref_pbuc1=vbuz1 lda.z __2 - sta BORDERCOL + sta BORDER_COLOR // [11] (byte~) main::$3 ← > (word) main::kaputt#0 -- vbuz1=_hi_vwuz2 lda.z kaputt+1 sta.z __3 - // [12] *((const nomodify byte*) BGCOL) ← (byte~) main::$3 -- _deref_pbuc1=vbuz1 + // [12] *((const nomodify byte*) BG_COLOR) ← (byte~) main::$3 -- _deref_pbuc1=vbuz1 lda.z __3 - sta BGCOL + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -747,8 +747,8 @@ ASSEMBLER BEFORE OPTIMIZATION :BasicUpstart(__bbegin) .pc = $80d "Program" // Global Constants & labels - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -785,12 +785,12 @@ main: { sta.z kaputt+1 // [9] (byte~) main::$2 ← < (word) main::kaputt#0 -- vbuaa=_lo_vwuz1 lda.z kaputt - // [10] *((const nomodify byte*) BORDERCOL) ← (byte~) main::$2 -- _deref_pbuc1=vbuaa - sta BORDERCOL + // [10] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$2 -- _deref_pbuc1=vbuaa + sta BORDER_COLOR // [11] (byte~) main::$3 ← > (word) main::kaputt#0 -- vbuaa=_hi_vwuz1 lda.z kaputt+1 - // [12] *((const nomodify byte*) BGCOL) ← (byte~) main::$3 -- _deref_pbuc1=vbuaa - sta BGCOL + // [12] *((const nomodify byte*) BG_COLOR) ← (byte~) main::$3 -- _deref_pbuc1=vbuaa + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -932,8 +932,8 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53281 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (byte) MOS6526_CIA::INTERRUPT (byte) MOS6526_CIA::PORT_A (byte) MOS6526_CIA::PORT_A_DDR @@ -1068,8 +1068,8 @@ Score: 1439 :BasicUpstart(main) .pc = $80d "Program" // Global Constants & labels - .label BORDERCOL = $d020 - .label BGCOL = $d021 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] // @1 @@ -1099,15 +1099,15 @@ main: { // kaputt // [11] (byte~) main::$3 ← > (word) main::kaputt#0 -- vbuaa=_hi_vwuz1 lda.z kaputt+1 - // *BGCOL = >kaputt - // [12] *((const nomodify byte*) BGCOL) ← (byte~) main::$3 -- _deref_pbuc1=vbuaa - sta BGCOL + // *BG_COLOR = >kaputt + // [12] *((const nomodify byte*) BG_COLOR) ← (byte~) main::$3 -- _deref_pbuc1=vbuaa + sta BG_COLOR // main::@return // } // [13] return diff --git a/src/test/ref/loophead-problem-3.sym b/src/test/ref/loophead-problem-3.sym index 10559d65e..a92d0ad1b 100644 --- a/src/test/ref/loophead-problem-3.sym +++ b/src/test/ref/loophead-problem-3.sym @@ -1,8 +1,8 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53281 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (byte) MOS6526_CIA::INTERRUPT (byte) MOS6526_CIA::PORT_A (byte) MOS6526_CIA::PORT_A_DDR diff --git a/src/test/ref/min-fmul-16.asm b/src/test/ref/min-fmul-16.asm index eb9955259..95aea1e05 100644 --- a/src/test/ref/min-fmul-16.asm +++ b/src/test/ref/min-fmul-16.asm @@ -2,7 +2,7 @@ :BasicUpstart(main) .pc = $80d "Program" .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label SCREEN = $400 .label print_char_cursor = 2 main: { @@ -22,13 +22,13 @@ main: { lda #$ff cmp RASTER bne __b2 - // (*BORDERCOL)++; - inc BORDERCOL + // (*BORDER_COLOR)++; + inc BORDER_COLOR // mulf16u(a, b) jsr mulf16u // r = mulf16u(a, b) - // (*BORDERCOL)--; - dec BORDERCOL + // (*BORDER_COLOR)--; + dec BORDER_COLOR // print_ulong(r) jsr print_ulong // print_set_screen(SCREEN) diff --git a/src/test/ref/min-fmul-16.cfg b/src/test/ref/min-fmul-16.cfg index 9f635615a..e11b658ac 100644 --- a/src/test/ref/min-fmul-16.cfg +++ b/src/test/ref/min-fmul-16.cfg @@ -23,13 +23,13 @@ main::@2: scope:[main] from main::@1 main::@2 [8] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@2 - [9] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) + [9] *((const byte*) BORDER_COLOR) ← ++ *((const byte*) BORDER_COLOR) [10] call mulf16u [11] (dword) mulf16u::return#0 ← (dword) mulf16u::return#1 to:main::@5 main::@5: scope:[main] from main::@3 [12] (dword) main::r#0 ← (dword) mulf16u::return#0 - [13] *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) + [13] *((const byte*) BORDER_COLOR) ← -- *((const byte*) BORDER_COLOR) [14] (dword) print_ulong::dw#0 ← (dword) main::r#0 [15] call print_ulong to:main::@6 diff --git a/src/test/ref/min-fmul-16.log b/src/test/ref/min-fmul-16.log index 94b1f3cfc..08a6b89e8 100644 --- a/src/test/ref/min-fmul-16.log +++ b/src/test/ref/min-fmul-16.log @@ -146,7 +146,7 @@ main::@3: scope:[main] from main::@2 (byte*) print_line_cursor#16 ← phi( main::@2/(byte*) print_line_cursor#17 ) (byte*) print_screen#16 ← phi( main::@2/(byte*) print_screen#17 ) (byte*) print_char_cursor#41 ← phi( main::@2/(byte*) print_char_cursor#43 ) - *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) + *((const byte*) BORDER_COLOR) ← ++ *((const byte*) BORDER_COLOR) (word) mulf16u::a#0 ← (const word) main::a (word) mulf16u::b#0 ← (const word) main::b call mulf16u @@ -159,7 +159,7 @@ main::@5: scope:[main] from main::@3 (dword) mulf16u::return#3 ← phi( main::@3/(dword) mulf16u::return#0 ) (dword~) main::$3 ← (dword) mulf16u::return#3 (dword) main::r#0 ← (dword~) main::$3 - *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) + *((const byte*) BORDER_COLOR) ← -- *((const byte*) BORDER_COLOR) (dword) print_ulong::dw#0 ← (dword) main::r#0 call print_ulong to:main::@6 @@ -327,7 +327,7 @@ SYMBOL TABLE SSA (label) @3 (label) @begin (label) @end -(const byte*) BORDERCOL = (byte*)(number) $d020 +(const byte*) BORDER_COLOR = (byte*)(number) $d020 (const byte) RADIX::BINARY = (number) 2 (const byte) RADIX::DECIMAL = (number) $a (const byte) RADIX::HEXADECIMAL = (number) $10 @@ -891,13 +891,13 @@ main::@2: scope:[main] from main::@1 main::@2 [8] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@2 - [9] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) + [9] *((const byte*) BORDER_COLOR) ← ++ *((const byte*) BORDER_COLOR) [10] call mulf16u [11] (dword) mulf16u::return#0 ← (dword) mulf16u::return#1 to:main::@5 main::@5: scope:[main] from main::@3 [12] (dword) main::r#0 ← (dword) mulf16u::return#0 - [13] *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) + [13] *((const byte*) BORDER_COLOR) ← -- *((const byte*) BORDER_COLOR) [14] (dword) print_ulong::dw#0 ← (dword) main::r#0 [15] call print_ulong to:main::@6 @@ -1196,7 +1196,7 @@ Target platform is c64basic / MOS6502X .pc = $80d "Program" // Global Constants & labels .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label SCREEN = $400 .label print_char_cursor = 6 // @begin @@ -1249,8 +1249,8 @@ main: { jmp __b3 // main::@3 __b3: - // [9] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // [9] *((const byte*) BORDER_COLOR) ← ++ *((const byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // [10] call mulf16u jsr mulf16u // [11] (dword) mulf16u::return#0 ← (dword) mulf16u::return#1 -- vduz1=vduz2 @@ -1274,8 +1274,8 @@ main: { sta.z r+2 lda.z mulf16u.return+3 sta.z r+3 - // [13] *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BORDERCOL + // [13] *((const byte*) BORDER_COLOR) ← -- *((const byte*) BORDER_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDER_COLOR // [14] (dword) print_ulong::dw#0 ← (dword) main::r#0 -- vduz1=vduz2 lda.z r sta.z print_ulong.dw @@ -1951,7 +1951,7 @@ ASSEMBLER BEFORE OPTIMIZATION .pc = $80d "Program" // Global Constants & labels .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label SCREEN = $400 .label print_char_cursor = 2 // @begin @@ -2004,8 +2004,8 @@ main: { jmp __b3 // main::@3 __b3: - // [9] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // [9] *((const byte*) BORDER_COLOR) ← ++ *((const byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // [10] call mulf16u jsr mulf16u // [11] (dword) mulf16u::return#0 ← (dword) mulf16u::return#1 @@ -2013,8 +2013,8 @@ main: { // main::@5 __b5: // [12] (dword) main::r#0 ← (dword) mulf16u::return#0 - // [13] *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BORDERCOL + // [13] *((const byte*) BORDER_COLOR) ← -- *((const byte*) BORDER_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDER_COLOR // [14] (dword) print_ulong::dw#0 ← (dword) main::r#0 // [15] call print_ulong jsr print_ulong @@ -2610,7 +2610,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const byte*) BORDERCOL = (byte*) 53280 +(const byte*) BORDER_COLOR = (byte*) 53280 (const byte) RADIX::BINARY = (number) 2 (const byte) RADIX::DECIMAL = (number) $a (const byte) RADIX::HEXADECIMAL = (number) $10 @@ -2756,7 +2756,7 @@ Score: 4347 .pc = $80d "Program" // Global Constants & labels .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label SCREEN = $400 .label print_char_cursor = 2 // @begin @@ -2794,9 +2794,9 @@ main: { cmp RASTER bne __b2 // main::@3 - // (*BORDERCOL)++; - // [9] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // (*BORDER_COLOR)++; + // [9] *((const byte*) BORDER_COLOR) ← ++ *((const byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // mulf16u(a, b) // [10] call mulf16u jsr mulf16u @@ -2804,9 +2804,9 @@ main: { // main::@5 // r = mulf16u(a, b) // [12] (dword) main::r#0 ← (dword) mulf16u::return#0 - // (*BORDERCOL)--; - // [13] *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BORDERCOL + // (*BORDER_COLOR)--; + // [13] *((const byte*) BORDER_COLOR) ← -- *((const byte*) BORDER_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDER_COLOR // print_ulong(r) // [14] (dword) print_ulong::dw#0 ← (dword) main::r#0 // [15] call print_ulong diff --git a/src/test/ref/min-fmul-16.sym b/src/test/ref/min-fmul-16.sym index cc347cdae..e64d2517d 100644 --- a/src/test/ref/min-fmul-16.sym +++ b/src/test/ref/min-fmul-16.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const byte*) BORDERCOL = (byte*) 53280 +(const byte*) BORDER_COLOR = (byte*) 53280 (const byte) RADIX::BINARY = (number) 2 (const byte) RADIX::DECIMAL = (number) $a (const byte) RADIX::HEXADECIMAL = (number) $10 diff --git a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.asm b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.asm index 42eb8d378..9f62fb0c0 100644 --- a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.asm +++ b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.asm @@ -17,10 +17,10 @@ .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label VIC_CONTROL = $d011 .label D011 = $d011 // VIC II IRQ Status Register @@ -82,9 +82,9 @@ loop: { bne __b3 jmp __b2 __b3: - // *BORDERCOL = RED + // *BORDER_COLOR = RED lda #RED - sta BORDERCOL + sta BORDER_COLOR ldx.z sin_idx ldy #0 __b4: @@ -100,13 +100,13 @@ loop: { bne __b4 // sin_idx +=1 inc.z sin_idx - // (*BORDERCOL)++; - inc BORDERCOL + // (*BORDER_COLOR)++; + inc BORDER_COLOR // plexSort() jsr plexSort - // *BORDERCOL = GREEN + // *BORDER_COLOR = GREEN lda #GREEN - sta BORDERCOL + sta BORDER_COLOR // framedone = false lda #0 sta.z framedone @@ -234,9 +234,9 @@ init: { sta SPRITES_ENABLE ldx #0 __b3: - // SPRITES_COLS[ss] = GREEN + // SPRITES_COLOR[ss] = GREEN lda #GREEN - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // for(char ss: 0..7) inx cpx #8 @@ -287,9 +287,9 @@ plex_irq: { .label __4 = $d // asm sei - // *BORDERCOL = WHITE + // *BORDER_COLOR = WHITE lda #WHITE - sta BORDERCOL + sta BORDER_COLOR __b3: // plexShowSprite() jsr plexShowSprite @@ -322,9 +322,9 @@ plex_irq: { lda #1 sta.z framedone __b2: - // *BORDERCOL = 0 + // *BORDER_COLOR = 0 lda #0 - sta BORDERCOL + sta BORDER_COLOR // asm cli // } diff --git a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.cfg b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.cfg index d6c5e9193..960c899de 100644 --- a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.cfg +++ b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.cfg @@ -43,7 +43,7 @@ loop::@2: scope:[loop] from loop::@1 loop::@2 [16] if((volatile bool) framedone) goto loop::@3 to:loop::@2 loop::@3: scope:[loop] from loop::@2 - [17] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED + [17] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED [18] (byte) loop::y_idx#3 ← (byte) loop::sin_idx#6 to:loop::@4 loop::@4: scope:[loop] from loop::@3 loop::@4 @@ -56,11 +56,11 @@ loop::@4: scope:[loop] from loop::@3 loop::@4 to:loop::@5 loop::@5: scope:[loop] from loop::@4 [24] (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#6 + (byte) 1 - [25] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [25] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) [26] call plexSort to:loop::@6 loop::@6: scope:[loop] from loop::@5 - [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN + [27] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN [28] (volatile bool) framedone ← false to:loop::@1 @@ -135,7 +135,7 @@ init::@2: scope:[init] from init::@1 to:init::@3 init::@3: scope:[init] from init::@2 init::@3 [64] (byte) init::ss#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::ss#1 ) - [65] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN + [65] *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN [66] (byte) init::ss#1 ← ++ (byte) init::ss#2 [67] if((byte) init::ss#1!=(byte) 8) goto init::@3 to:init::@4 @@ -173,7 +173,7 @@ plexInit::@return: scope:[plexInit] from plexInit::@1 interrupt(KERNEL_MIN)(void()) plex_irq() plex_irq: scope:[plex_irq] from asm { sei } - [85] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) WHITE + [85] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) WHITE to:plex_irq::@3 plex_irq::@3: scope:[plex_irq] from plex_irq plex_irq::@7 [86] phi() @@ -198,7 +198,7 @@ plex_irq::@5: scope:[plex_irq] from plex_irq::@4 [95] (volatile bool) framedone ← true to:plex_irq::@2 plex_irq::@2: scope:[plex_irq] from plex_irq::@1 plex_irq::@5 - [96] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [96] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 asm { cli } to:plex_irq::@return plex_irq::@return: scope:[plex_irq] from plex_irq::@2 diff --git a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log index f6f69c134..4e1976c59 100644 --- a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log +++ b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log @@ -223,7 +223,7 @@ init::@2: scope:[init] from init::@1 init::@3: scope:[init] from init::@2 init::@3 (byte*) PLEX_SCREEN_PTR#24 ← phi( init::@2/(byte*) PLEX_SCREEN_PTR#27 init::@3/(byte*) PLEX_SCREEN_PTR#24 ) (byte) init::ss#2 ← phi( init::@2/(byte) init::ss#0 init::@3/(byte) init::ss#1 ) - *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN + *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN (byte) init::ss#1 ← (byte) init::ss#2 + rangenext(0,7) (bool~) init::$2 ← (byte) init::ss#1 != rangelast(0,7) if((bool~) init::$2) goto init::@3 @@ -253,7 +253,7 @@ interrupt(KERNEL_MIN)(void()) plex_irq() plex_irq: scope:[plex_irq] from (byte*) PLEX_SCREEN_PTR#30 ← phi( @4/(byte*) PLEX_SCREEN_PTR#21 ) asm { sei } - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) WHITE + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) WHITE (byte) plex_irq::rasterY#0 ← (byte) 0 to:plex_irq::@3 plex_irq::@3: scope:[plex_irq] from plex_irq plex_irq::@6 @@ -298,7 +298,7 @@ plex_irq::@5: scope:[plex_irq] from plex_irq::@4 (volatile bool) framedone ← true to:plex_irq::@2 plex_irq::@2: scope:[plex_irq] from plex_irq::@1 plex_irq::@5 - *((const nomodify byte*) BORDERCOL) ← (number) 0 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 asm { cli } to:plex_irq::@return plex_irq::@return: scope:[plex_irq] from plex_irq::@2 @@ -320,7 +320,7 @@ loop::@2: scope:[loop] from loop::@1 loop::@2 to:loop::@3 loop::@3: scope:[loop] from loop::@2 (byte) loop::sin_idx#2 ← phi( loop::@2/(byte) loop::sin_idx#4 ) - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED (byte) loop::y_idx#0 ← (byte) loop::sin_idx#2 (byte) loop::sy#0 ← (byte) 0 to:loop::@4 @@ -337,12 +337,12 @@ loop::@4: scope:[loop] from loop::@3 loop::@4 loop::@5: scope:[loop] from loop::@4 (byte) loop::sin_idx#3 ← phi( loop::@4/(byte) loop::sin_idx#5 ) (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#3 + (number) 1 - *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) call plexSort to:loop::@6 loop::@6: scope:[loop] from loop::@5 (byte) loop::sin_idx#7 ← phi( loop::@5/(byte) loop::sin_idx#1 ) - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN (volatile bool) framedone ← false to:loop::@1 loop::@return: scope:[loop] from loop::@1 @@ -366,7 +366,7 @@ SYMBOL TABLE SSA (label) @5 (label) @begin (label) @end -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*)(number) $dc00 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f (const nomodify byte*) D011 = (byte*)(number) $d011 @@ -511,7 +511,7 @@ SYMBOL TABLE SSA .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }} -(const nomodify byte*) SPRITES_COLS = (byte*)(number) $d027 +(const nomodify byte*) SPRITES_COLOR = (byte*)(number) $d027 (const nomodify byte*) SPRITES_ENABLE = (byte*)(number) $d015 (const nomodify byte*) SPRITES_XMSB = (byte*)(number) $d010 (const nomodify byte*) SPRITES_XPOS = (byte*)(number) $d000 @@ -747,7 +747,7 @@ Adding number conversion cast (unumber) 0 in *((const nomodify byte*) RASTER) Adding number conversion cast (unumber) 2 in (number~) plex_irq::$4 ← *((const nomodify byte*) RASTER) + (number) 2 Adding number conversion cast (unumber) plex_irq::$4 in (number~) plex_irq::$4 ← *((const nomodify byte*) RASTER) + (unumber)(number) 2 Adding number conversion cast (unumber) 0 in *((const nomodify byte*) RASTER) ← (number) 0 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 Adding number conversion cast (unumber) 8 in (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (number) 8 Adding number conversion cast (unumber) 1 in (byte) loop::sy#1 ← (byte) loop::sy#2 + rangenext(0,PLEX_COUNT-1) Adding number conversion cast (unumber) 1 in (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#3 + (number) 1 @@ -762,7 +762,7 @@ Inlining cast *((const nomodify byte*) D011) ← (unumber)(const nomodify byte) Inlining cast *((const nomodify byte*) SPRITES_ENABLE) ← (unumber)(number) $ff Inlining cast *((const nomodify byte*) RASTER) ← (unumber)(number) 0 Inlining cast *((const nomodify byte*) RASTER) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 53248 Simplifying constant pointer cast (byte*) 53249 @@ -1159,7 +1159,7 @@ loop::@2: scope:[loop] from loop::@1 loop::@2 [16] if((volatile bool) framedone) goto loop::@3 to:loop::@2 loop::@3: scope:[loop] from loop::@2 - [17] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED + [17] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED [18] (byte) loop::y_idx#3 ← (byte) loop::sin_idx#6 to:loop::@4 loop::@4: scope:[loop] from loop::@3 loop::@4 @@ -1172,11 +1172,11 @@ loop::@4: scope:[loop] from loop::@3 loop::@4 to:loop::@5 loop::@5: scope:[loop] from loop::@4 [24] (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#6 + (byte) 1 - [25] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [25] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) [26] call plexSort to:loop::@6 loop::@6: scope:[loop] from loop::@5 - [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN + [27] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN [28] (volatile bool) framedone ← false to:loop::@1 @@ -1251,7 +1251,7 @@ init::@2: scope:[init] from init::@1 to:init::@3 init::@3: scope:[init] from init::@2 init::@3 [64] (byte) init::ss#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::ss#1 ) - [65] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN + [65] *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN [66] (byte) init::ss#1 ← ++ (byte) init::ss#2 [67] if((byte) init::ss#1!=(byte) 8) goto init::@3 to:init::@4 @@ -1289,7 +1289,7 @@ plexInit::@return: scope:[plexInit] from plexInit::@1 interrupt(KERNEL_MIN)(void()) plex_irq() plex_irq: scope:[plex_irq] from asm { sei } - [85] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) WHITE + [85] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) WHITE to:plex_irq::@3 plex_irq::@3: scope:[plex_irq] from plex_irq plex_irq::@7 [86] phi() @@ -1314,7 +1314,7 @@ plex_irq::@5: scope:[plex_irq] from plex_irq::@4 [95] (volatile bool) framedone ← true to:plex_irq::@2 plex_irq::@2: scope:[plex_irq] from plex_irq::@1 plex_irq::@5 - [96] *((const nomodify byte*) BORDERCOL) ← (byte) 0 + [96] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 asm { cli } to:plex_irq::@return plex_irq::@return: scope:[plex_irq] from plex_irq::@2 @@ -1654,10 +1654,10 @@ Target platform is c64basic / MOS6502X .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label VIC_CONTROL = $d011 .label D011 = $d011 // VIC II IRQ Status Register @@ -1763,9 +1763,9 @@ loop: { jmp __b2 // loop::@3 __b3: - // [17] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // [17] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BORDERCOL + sta BORDER_COLOR // [18] (byte) loop::y_idx#3 ← (byte) loop::sin_idx#6 -- vbuz1=vbuz2 lda.z sin_idx sta.z y_idx @@ -1803,8 +1803,8 @@ loop: { __b5: // [24] (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#6 + (byte) 1 -- vbuz1=vbuz1_plus_1 inc.z sin_idx - // [25] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // [25] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // [26] call plexSort // [29] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] plexSort_from___b5: @@ -1812,9 +1812,9 @@ loop: { jmp __b6 // loop::@6 __b6: - // [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // [27] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BORDERCOL + sta BORDER_COLOR // [28] (volatile bool) framedone ← false -- vboz1=vboc1 lda #0 sta.z framedone @@ -2051,10 +2051,10 @@ init: { jmp __b3 // init::@3 __b3: - // [65] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuz1=vbuc2 + // [65] *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuz1=vbuc2 lda #GREEN ldy.z ss - sta SPRITES_COLS,y + sta SPRITES_COLOR,y // [66] (byte) init::ss#1 ← ++ (byte) init::ss#2 -- vbuz1=_inc_vbuz1 inc.z ss // [67] if((byte) init::ss#1!=(byte) 8) goto init::@3 -- vbuz1_neq_vbuc1_then_la1 @@ -2140,9 +2140,9 @@ plex_irq: { // entry interrupt(KERNEL_MIN) // asm { sei } sei - // [85] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [85] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BORDERCOL + sta BORDER_COLOR // [86] phi from plex_irq plex_irq::@7 to plex_irq::@3 [phi:plex_irq/plex_irq::@7->plex_irq::@3] __b3_from_plex_irq: __b3_from___b7: @@ -2199,9 +2199,9 @@ plex_irq: { jmp __b2 // plex_irq::@2 __b2: - // [96] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [96] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // asm { cli } cli jmp __breturn @@ -2383,12 +2383,12 @@ Statement [4] (volatile byte) plex_free_next ← (byte) 0 [ ] ( [ ] { } ) alwa Statement [5] (volatile bool) framedone ← true [ framedone ] ( [ framedone ] { } ) always clobbers reg byte a Statement [16] if((volatile bool) framedone) goto loop::@3 [ framedone loop::sin_idx#6 ] ( main:7::loop:12 [ framedone loop::sin_idx#6 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] -Statement [17] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED [ loop::sin_idx#6 ] ( main:7::loop:12 [ loop::sin_idx#6 ] { } ) always clobbers reg byte a +Statement [17] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED [ loop::sin_idx#6 ] ( main:7::loop:12 [ loop::sin_idx#6 ] { } ) always clobbers reg byte a Statement [20] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2) [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] ( main:7::loop:12 [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:3 [ loop::y_idx#2 loop::y_idx#3 loop::y_idx#1 ] Removing always clobbered register reg byte a as potential for zp[1]:4 [ loop::sy#2 loop::sy#1 ] Statement [21] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8 [ loop::sin_idx#6 loop::sy#2 loop::y_idx#1 ] ( main:7::loop:12 [ loop::sin_idx#6 loop::sy#2 loop::y_idx#1 ] { } ) always clobbers reg byte a -Statement [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN [ loop::sin_idx#1 ] ( main:7::loop:12 [ loop::sin_idx#1 ] { } ) always clobbers reg byte a +Statement [27] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN [ loop::sin_idx#1 ] ( main:7::loop:12 [ loop::sin_idx#1 ] { } ) always clobbers reg byte a Statement [28] (volatile bool) framedone ← false [ framedone loop::sin_idx#1 ] ( main:7::loop:12 [ framedone loop::sin_idx#1 ] { } ) always clobbers reg byte a Statement [36] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:5 [ plexSort::m#2 plexSort::m#1 ] @@ -2410,7 +2410,7 @@ Statement [58] (byte~) init::$3 ← (byte) init::sx#2 << (byte) 1 [ init::sx#2 i Statement [59] *((const word*) PLEX_XPOS + (byte~) init::$3) ← (word) init::xp#2 [ init::sx#2 init::xp#2 ] ( main:7::init:10 [ framedone init::sx#2 init::xp#2 ] { } ) always clobbers reg byte a Statement [60] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 [ init::sx#2 init::xp#1 ] ( main:7::init:10 [ framedone init::sx#2 init::xp#1 ] { } ) always clobbers reg byte a Statement [63] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a -Statement [65] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:7::init:10 [ framedone init::ss#2 ] { } ) always clobbers reg byte a +Statement [65] *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:7::init:10 [ framedone init::ss#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:11 [ init::ss#2 init::ss#1 ] Statement [69] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_INTERRUPT) ← (const nomodify byte) CIA_INTERRUPT_CLEAR [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a Statement [70] *((const nomodify byte*) IRQ_ENABLE) ← (const nomodify byte) IRQ_RASTER [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a @@ -2418,7 +2418,7 @@ Statement [71] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IR Statement [72] *((const nomodify void()**) KERNEL_IRQ) ← &interrupt(KERNEL_MIN)(void()) plex_irq() [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a Statement [73] *((const nomodify byte*) VIC_CONTROL) ← *((const nomodify byte*) VIC_CONTROL) & (byte) $7f [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a Statement [74] *((const nomodify byte*) RASTER) ← (byte) 0 [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a -Statement [85] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) WHITE [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [85] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) WHITE [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a Statement [88] (byte) plex_irq::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plex_irq::plexFreeNextYpos1_return#0 ] ( [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plex_irq::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte y Statement [90] if((volatile byte) plex_show_idx>=(const nomodify byte) PLEX_COUNT) goto plex_irq::@4 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plex_irq::plexFreeNextYpos1_return#0 plex_irq::$4 ] ( [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plex_irq::plexFreeNextYpos1_return#0 plex_irq::$4 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:22 [ plex_irq::plexFreeNextYpos1_return#0 ] @@ -2427,7 +2427,7 @@ Statement [92] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IR Statement [93] if((volatile byte) plex_show_idx<(const nomodify byte) PLEX_COUNT) goto plex_irq::@1 [ plex_irq::plexFreeNextYpos1_return#0 ] ( [ plex_irq::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte a Statement [94] *((const nomodify byte*) RASTER) ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [95] (volatile bool) framedone ← true [ ] ( [ ] { } ) always clobbers reg byte a -Statement [96] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [96] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [100] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( plexShowSprite:87 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a Statement [101] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( plexShowSprite:87 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte x reg byte y Removing always clobbered register reg byte x as potential for zp[1]:24 [ plexShowSprite::plex_sprite_idx2#0 ] @@ -2453,10 +2453,10 @@ Statement [3] (volatile byte) plex_sprite_msb ← (byte) 1 [ ] ( [ ] { } ) alw Statement [4] (volatile byte) plex_free_next ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [5] (volatile bool) framedone ← true [ framedone ] ( [ framedone ] { } ) always clobbers reg byte a Statement [16] if((volatile bool) framedone) goto loop::@3 [ framedone loop::sin_idx#6 ] ( main:7::loop:12 [ framedone loop::sin_idx#6 ] { } ) always clobbers reg byte a -Statement [17] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED [ loop::sin_idx#6 ] ( main:7::loop:12 [ loop::sin_idx#6 ] { } ) always clobbers reg byte a +Statement [17] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED [ loop::sin_idx#6 ] ( main:7::loop:12 [ loop::sin_idx#6 ] { } ) always clobbers reg byte a Statement [20] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2) [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] ( main:7::loop:12 [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] { } ) always clobbers reg byte a Statement [21] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8 [ loop::sin_idx#6 loop::sy#2 loop::y_idx#1 ] ( main:7::loop:12 [ loop::sin_idx#6 loop::sy#2 loop::y_idx#1 ] { } ) always clobbers reg byte a -Statement [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN [ loop::sin_idx#1 ] ( main:7::loop:12 [ loop::sin_idx#1 ] { } ) always clobbers reg byte a +Statement [27] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN [ loop::sin_idx#1 ] ( main:7::loop:12 [ loop::sin_idx#1 ] { } ) always clobbers reg byte a Statement [28] (volatile bool) framedone ← false [ framedone loop::sin_idx#1 ] ( main:7::loop:12 [ framedone loop::sin_idx#1 ] { } ) always clobbers reg byte a Statement [33] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 ] { } ) always clobbers reg byte a Statement [36] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] { } ) always clobbers reg byte a @@ -2473,21 +2473,21 @@ Statement [58] (byte~) init::$3 ← (byte) init::sx#2 << (byte) 1 [ init::sx#2 i Statement [59] *((const word*) PLEX_XPOS + (byte~) init::$3) ← (word) init::xp#2 [ init::sx#2 init::xp#2 ] ( main:7::init:10 [ framedone init::sx#2 init::xp#2 ] { } ) always clobbers reg byte a Statement [60] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 [ init::sx#2 init::xp#1 ] ( main:7::init:10 [ framedone init::sx#2 init::xp#1 ] { } ) always clobbers reg byte a Statement [63] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a -Statement [65] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:7::init:10 [ framedone init::ss#2 ] { } ) always clobbers reg byte a +Statement [65] *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:7::init:10 [ framedone init::ss#2 ] { } ) always clobbers reg byte a Statement [69] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_INTERRUPT) ← (const nomodify byte) CIA_INTERRUPT_CLEAR [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a Statement [70] *((const nomodify byte*) IRQ_ENABLE) ← (const nomodify byte) IRQ_RASTER [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a Statement [71] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a Statement [72] *((const nomodify void()**) KERNEL_IRQ) ← &interrupt(KERNEL_MIN)(void()) plex_irq() [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a Statement [73] *((const nomodify byte*) VIC_CONTROL) ← *((const nomodify byte*) VIC_CONTROL) & (byte) $7f [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a Statement [74] *((const nomodify byte*) RASTER) ← (byte) 0 [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a -Statement [85] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) WHITE [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [85] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) WHITE [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a Statement [88] (byte) plex_irq::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plex_irq::plexFreeNextYpos1_return#0 ] ( [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plex_irq::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte y Statement [90] if((volatile byte) plex_show_idx>=(const nomodify byte) PLEX_COUNT) goto plex_irq::@4 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plex_irq::plexFreeNextYpos1_return#0 plex_irq::$4 ] ( [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plex_irq::plexFreeNextYpos1_return#0 plex_irq::$4 ] { } ) always clobbers reg byte a Statement [92] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [ plex_show_idx plex_irq::plexFreeNextYpos1_return#0 ] ( [ plex_show_idx plex_irq::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte a Statement [93] if((volatile byte) plex_show_idx<(const nomodify byte) PLEX_COUNT) goto plex_irq::@1 [ plex_irq::plexFreeNextYpos1_return#0 ] ( [ plex_irq::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte a Statement [94] *((const nomodify byte*) RASTER) ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [95] (volatile bool) framedone ← true [ ] ( [ ] { } ) always clobbers reg byte a -Statement [96] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [96] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [100] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( plexShowSprite:87 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a Statement [101] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( plexShowSprite:87 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte x reg byte y Statement [102] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( plexShowSprite:87 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte y @@ -2510,10 +2510,10 @@ Statement [3] (volatile byte) plex_sprite_msb ← (byte) 1 [ ] ( [ ] { } ) alw Statement [4] (volatile byte) plex_free_next ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [5] (volatile bool) framedone ← true [ framedone ] ( [ framedone ] { } ) always clobbers reg byte a Statement [16] if((volatile bool) framedone) goto loop::@3 [ framedone loop::sin_idx#6 ] ( main:7::loop:12 [ framedone loop::sin_idx#6 ] { } ) always clobbers reg byte a -Statement [17] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED [ loop::sin_idx#6 ] ( main:7::loop:12 [ loop::sin_idx#6 ] { } ) always clobbers reg byte a +Statement [17] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED [ loop::sin_idx#6 ] ( main:7::loop:12 [ loop::sin_idx#6 ] { } ) always clobbers reg byte a Statement [20] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2) [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] ( main:7::loop:12 [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] { } ) always clobbers reg byte a Statement [21] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8 [ loop::sin_idx#6 loop::sy#2 loop::y_idx#1 ] ( main:7::loop:12 [ loop::sin_idx#6 loop::sy#2 loop::y_idx#1 ] { } ) always clobbers reg byte a -Statement [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN [ loop::sin_idx#1 ] ( main:7::loop:12 [ loop::sin_idx#1 ] { } ) always clobbers reg byte a +Statement [27] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN [ loop::sin_idx#1 ] ( main:7::loop:12 [ loop::sin_idx#1 ] { } ) always clobbers reg byte a Statement [28] (volatile bool) framedone ← false [ framedone loop::sin_idx#1 ] ( main:7::loop:12 [ framedone loop::sin_idx#1 ] { } ) always clobbers reg byte a Statement [33] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 ] { } ) always clobbers reg byte a Statement [36] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] { } ) always clobbers reg byte a @@ -2530,21 +2530,21 @@ Statement [58] (byte~) init::$3 ← (byte) init::sx#2 << (byte) 1 [ init::sx#2 i Statement [59] *((const word*) PLEX_XPOS + (byte~) init::$3) ← (word) init::xp#2 [ init::sx#2 init::xp#2 ] ( main:7::init:10 [ framedone init::sx#2 init::xp#2 ] { } ) always clobbers reg byte a Statement [60] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 [ init::sx#2 init::xp#1 ] ( main:7::init:10 [ framedone init::sx#2 init::xp#1 ] { } ) always clobbers reg byte a Statement [63] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a -Statement [65] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:7::init:10 [ framedone init::ss#2 ] { } ) always clobbers reg byte a +Statement [65] *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:7::init:10 [ framedone init::ss#2 ] { } ) always clobbers reg byte a Statement [69] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_INTERRUPT) ← (const nomodify byte) CIA_INTERRUPT_CLEAR [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a Statement [70] *((const nomodify byte*) IRQ_ENABLE) ← (const nomodify byte) IRQ_RASTER [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a Statement [71] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a Statement [72] *((const nomodify void()**) KERNEL_IRQ) ← &interrupt(KERNEL_MIN)(void()) plex_irq() [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a Statement [73] *((const nomodify byte*) VIC_CONTROL) ← *((const nomodify byte*) VIC_CONTROL) & (byte) $7f [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a Statement [74] *((const nomodify byte*) RASTER) ← (byte) 0 [ ] ( main:7::init:10 [ framedone ] { } ) always clobbers reg byte a -Statement [85] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) WHITE [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [85] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) WHITE [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a Statement [88] (byte) plex_irq::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plex_irq::plexFreeNextYpos1_return#0 ] ( [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plex_irq::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte y Statement [90] if((volatile byte) plex_show_idx>=(const nomodify byte) PLEX_COUNT) goto plex_irq::@4 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plex_irq::plexFreeNextYpos1_return#0 plex_irq::$4 ] ( [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plex_irq::plexFreeNextYpos1_return#0 plex_irq::$4 ] { } ) always clobbers reg byte a Statement [92] *((const nomodify byte*) IRQ_STATUS) ← (const nomodify byte) IRQ_RASTER [ plex_show_idx plex_irq::plexFreeNextYpos1_return#0 ] ( [ plex_show_idx plex_irq::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte a Statement [93] if((volatile byte) plex_show_idx<(const nomodify byte) PLEX_COUNT) goto plex_irq::@1 [ plex_irq::plexFreeNextYpos1_return#0 ] ( [ plex_irq::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte a Statement [94] *((const nomodify byte*) RASTER) ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [95] (volatile bool) framedone ← true [ ] ( [ ] { } ) always clobbers reg byte a -Statement [96] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [96] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [100] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( plexShowSprite:87 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a Statement [101] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( plexShowSprite:87 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte x reg byte y Statement [102] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( plexShowSprite:87 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte y @@ -2701,10 +2701,10 @@ ASSEMBLER BEFORE OPTIMIZATION .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label VIC_CONTROL = $d011 .label D011 = $d011 // VIC II IRQ Status Register @@ -2808,9 +2808,9 @@ loop: { jmp __b2 // loop::@3 __b3: - // [17] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // [17] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BORDERCOL + sta BORDER_COLOR // [18] (byte) loop::y_idx#3 ← (byte) loop::sin_idx#6 -- vbuxx=vbuz1 ldx.z sin_idx // [19] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4] @@ -2842,8 +2842,8 @@ loop: { __b5: // [24] (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#6 + (byte) 1 -- vbuz1=vbuz1_plus_1 inc.z sin_idx - // [25] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // [25] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // [26] call plexSort // [29] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] plexSort_from___b5: @@ -2851,9 +2851,9 @@ loop: { jmp __b6 // loop::@6 __b6: - // [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // [27] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BORDERCOL + sta BORDER_COLOR // [28] (volatile bool) framedone ← false -- vboz1=vboc1 lda #0 sta.z framedone @@ -3069,9 +3069,9 @@ init: { jmp __b3 // init::@3 __b3: - // [65] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 + // [65] *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 lda #GREEN - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // [66] (byte) init::ss#1 ← ++ (byte) init::ss#2 -- vbuxx=_inc_vbuxx inx // [67] if((byte) init::ss#1!=(byte) 8) goto init::@3 -- vbuxx_neq_vbuc1_then_la1 @@ -3151,9 +3151,9 @@ plex_irq: { // entry interrupt(KERNEL_MIN) // asm { sei } sei - // [85] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [85] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BORDERCOL + sta BORDER_COLOR // [86] phi from plex_irq plex_irq::@7 to plex_irq::@3 [phi:plex_irq/plex_irq::@7->plex_irq::@3] __b3_from_plex_irq: __b3_from___b7: @@ -3208,9 +3208,9 @@ plex_irq: { jmp __b2 // plex_irq::@2 __b2: - // [96] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [96] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // asm { cli } cli jmp __breturn @@ -3492,7 +3492,7 @@ FINAL SYMBOL TABLE (label) @4 (label) @begin (label) @end -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f (const nomodify byte*) D011 = (byte*) 53265 @@ -3601,7 +3601,7 @@ FINAL SYMBOL TABLE .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }} -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_ENABLE = (byte*) 53269 (const nomodify byte*) SPRITES_XMSB = (byte*) 53264 (const nomodify byte*) SPRITES_XPOS = (byte*) 53248 @@ -3788,10 +3788,10 @@ Score: 43606 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label VIC_CONTROL = $d011 .label D011 = $d011 // VIC II IRQ Status Register @@ -3883,10 +3883,10 @@ loop: { jmp __b2 // loop::@3 __b3: - // *BORDERCOL = RED - // [17] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = RED + // [17] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BORDERCOL + sta BORDER_COLOR // [18] (byte) loop::y_idx#3 ← (byte) loop::sin_idx#6 -- vbuxx=vbuz1 ldx.z sin_idx // [19] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4] @@ -3916,18 +3916,18 @@ loop: { // sin_idx +=1 // [24] (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#6 + (byte) 1 -- vbuz1=vbuz1_plus_1 inc.z sin_idx - // (*BORDERCOL)++; - // [25] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // (*BORDER_COLOR)++; + // [25] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // plexSort() // [26] call plexSort // [29] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] jsr plexSort // loop::@6 - // *BORDERCOL = GREEN - // [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = GREEN + // [27] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BORDERCOL + sta BORDER_COLOR // framedone = false // [28] (volatile bool) framedone ← false -- vboz1=vboc1 lda #0 @@ -4125,10 +4125,10 @@ init: { // [64] phi (byte) init::ss#2 = (byte) init::ss#1 [phi:init::@3->init::@3#0] -- register_copy // init::@3 __b3: - // SPRITES_COLS[ss] = GREEN - // [65] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 + // SPRITES_COLOR[ss] = GREEN + // [65] *((const nomodify byte*) SPRITES_COLOR + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 lda #GREEN - sta SPRITES_COLS,x + sta SPRITES_COLOR,x // for(char ss: 0..7) // [66] (byte) init::ss#1 ← ++ (byte) init::ss#2 -- vbuxx=_inc_vbuxx inx @@ -4208,10 +4208,10 @@ plex_irq: { // asm // asm { sei } sei - // *BORDERCOL = WHITE - // [85] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = WHITE + // [85] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta BORDERCOL + sta BORDER_COLOR // [86] phi from plex_irq plex_irq::@7 to plex_irq::@3 [phi:plex_irq/plex_irq::@7->plex_irq::@3] // plex_irq::@3 __b3: @@ -4261,10 +4261,10 @@ plex_irq: { sta.z framedone // plex_irq::@2 __b2: - // *BORDERCOL = 0 - // [96] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 0 + // [96] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL + sta BORDER_COLOR // asm // asm { cli } cli diff --git a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.sym b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.sym index c0cfced1f..b5b2efd62 100644 --- a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.sym +++ b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.sym @@ -4,7 +4,7 @@ (label) @4 (label) @begin (label) @end -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify byte) CIA_INTERRUPT_CLEAR = (byte) $7f (const nomodify byte*) D011 = (byte*) 53265 @@ -113,7 +113,7 @@ .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }} -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_ENABLE = (byte*) 53269 (const nomodify byte*) SPRITES_XMSB = (byte*) 53264 (const nomodify byte*) SPRITES_XPOS = (byte*) 53248 diff --git a/src/test/ref/number-inference-sum.asm b/src/test/ref/number-inference-sum.asm index 0a2a72dbd..5cf7b7816 100644 --- a/src/test/ref/number-inference-sum.asm +++ b/src/test/ref/number-inference-sum.asm @@ -9,15 +9,15 @@ main: { .const b2 = b1+$fa .const w = b2+1 .label screen = $400 - .label bgcol = $d020 + .label BG_COLOR = $d020 // screen[0] = w lda #w sta screen+1 - // *bgcol = RED + // *BG_COLOR = RED lda #RED - sta bgcol + sta BG_COLOR // } rts } diff --git a/src/test/ref/number-inference-sum.cfg b/src/test/ref/number-inference-sum.cfg index f0aaa1385..be5b64f5b 100644 --- a/src/test/ref/number-inference-sum.cfg +++ b/src/test/ref/number-inference-sum.cfg @@ -13,7 +13,7 @@ main: scope:[main] from @1 [4] *((const nomodify word*) main::screen) ← (const word) main::w#0 to:main::@1 main::@1: scope:[main] from main - [5] *((const nomodify byte*) main::bgcol) ← (const nomodify byte) main::RED + [5] *((const nomodify byte*) main::BG_COLOR) ← (const nomodify byte) main::RED to:main::@return main::@return: scope:[main] from main::@1 [6] return diff --git a/src/test/ref/number-inference-sum.log b/src/test/ref/number-inference-sum.log index 0059405bc..a4093e3e7 100644 --- a/src/test/ref/number-inference-sum.log +++ b/src/test/ref/number-inference-sum.log @@ -16,7 +16,7 @@ main: scope:[main] from @1 if((bool~) main::$3) goto main::@return to:main::@1 main::@1: scope:[main] from main - *((const nomodify byte*) main::bgcol) ← (const nomodify byte) main::RED + *((const nomodify byte*) main::BG_COLOR) ← (const nomodify byte) main::RED to:main::@return main::@return: scope:[main] from main main::@1 return @@ -42,11 +42,11 @@ SYMBOL TABLE SSA (number~) main::$4 (label) main::@1 (label) main::@return +(const nomodify byte*) main::BG_COLOR = (byte*)(number) $d020 (const nomodify byte) main::RED = (byte) 2 (const byte) main::b1 = (byte) $fa (byte) main::b2 (byte) main::b2#0 -(const nomodify byte*) main::bgcol = (byte*)(number) $d020 (const nomodify word*) main::screen = (word*)(number) $400 (word) main::w (word) main::w#0 @@ -130,7 +130,7 @@ main: scope:[main] from @1 [4] *((const nomodify word*) main::screen) ← (const word) main::w#0 to:main::@1 main::@1: scope:[main] from main - [5] *((const nomodify byte*) main::bgcol) ← (const nomodify byte) main::RED + [5] *((const nomodify byte*) main::BG_COLOR) ← (const nomodify byte) main::RED to:main::@return main::@return: scope:[main] from main::@1 [6] return @@ -176,7 +176,7 @@ main: { .const b2 = b1+$fa .const w = b2+1 .label screen = $400 - .label bgcol = $d020 + .label BG_COLOR = $d020 // [4] *((const nomodify word*) main::screen) ← (const word) main::w#0 -- _deref_pwuc1=vwuc2 lda #w sta screen+1 // main::@1 - // *bgcol = RED - // [5] *((const nomodify byte*) main::bgcol) ← (const nomodify byte) main::RED -- _deref_pbuc1=vbuc2 + // *BG_COLOR = RED + // [5] *((const nomodify byte*) main::BG_COLOR) ← (const nomodify byte) main::RED -- _deref_pbuc1=vbuc2 lda #RED - sta bgcol + sta BG_COLOR // main::@return // } // [6] return diff --git a/src/test/ref/number-inference-sum.sym b/src/test/ref/number-inference-sum.sym index 0bb49451b..7d9f95ef4 100644 --- a/src/test/ref/number-inference-sum.sym +++ b/src/test/ref/number-inference-sum.sym @@ -4,11 +4,11 @@ (void()) main() (label) main::@1 (label) main::@return +(const nomodify byte*) main::BG_COLOR = (byte*) 53280 (const nomodify byte) main::RED = (byte) 2 (const byte) main::b1 = (byte) $fa (byte) main::b2 (const byte) main::b2#0 b2 = (const byte) main::b1+(byte) $fa -(const nomodify byte*) main::bgcol = (byte*) 53280 (const nomodify word*) main::screen = (word*) 1024 (word) main::w (const word) main::w#0 w = (const byte) main::b2#0+(byte) 1 diff --git a/src/test/ref/ptr-complex.asm b/src/test/ref/ptr-complex.asm index f6c49395f..fb2dfdb63 100644 --- a/src/test/ref/ptr-complex.asm +++ b/src/test/ref/ptr-complex.asm @@ -6,7 +6,7 @@ main: { // RValue pointer expression (constant) .label screen = $400 // Increment on a const named pointer - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label sc2 = screen+$51 ldx #0 // RValue pointer expression (variable) @@ -39,8 +39,8 @@ main: { inc $d020 // --*(byte*)($d000+$21); dec $d000+$21 - // ++*BGCOL; - inc BGCOL + // ++*BG_COLOR; + inc BG_COLOR // } rts } diff --git a/src/test/ref/ptr-complex.cfg b/src/test/ref/ptr-complex.cfg index f5693ebac..9d4f2065f 100644 --- a/src/test/ref/ptr-complex.cfg +++ b/src/test/ref/ptr-complex.cfg @@ -31,7 +31,7 @@ main::@3: scope:[main] from main::@2 main::@3 main::@4: scope:[main] from main::@3 [15] *((byte*) 53280) ← ++ *((byte*) 53280) [16] *((byte*)(number) $d000+(number) $21) ← -- *((byte*)(number) $d000+(number) $21) - [17] *((const byte*) main::BGCOL) ← ++ *((const byte*) main::BGCOL) + [17] *((const byte*) main::BG_COLOR) ← ++ *((const byte*) main::BG_COLOR) to:main::@return main::@return: scope:[main] from main::@4 [18] return diff --git a/src/test/ref/ptr-complex.log b/src/test/ref/ptr-complex.log index 467fc4e28..7e92ec8a3 100644 --- a/src/test/ref/ptr-complex.log +++ b/src/test/ref/ptr-complex.log @@ -40,7 +40,7 @@ main::@3: scope:[main] from main::@2 main::@3 main::@4: scope:[main] from main::@3 *((byte*)(number) $d020) ← ++ *((byte*)(number) $d020) *((byte*)(number) $d000+(number) $21) ← -- *((byte*)(number) $d000+(number) $21) - *((const byte*) main::BGCOL) ← ++ *((const byte*) main::BGCOL) + *((const byte*) main::BG_COLOR) ← ++ *((const byte*) main::BG_COLOR) to:main::@return main::@return: scope:[main] from main::@4 return @@ -75,7 +75,7 @@ SYMBOL TABLE SSA (label) main::@3 (label) main::@4 (label) main::@return -(const byte*) main::BGCOL = (byte*)(number) $d020 +(const byte*) main::BG_COLOR = (byte*)(number) $d020 (byte) main::i (byte) main::i#0 (byte) main::i#1 @@ -227,7 +227,7 @@ main::@3: scope:[main] from main::@2 main::@3 main::@4: scope:[main] from main::@3 [15] *((byte*) 53280) ← ++ *((byte*) 53280) [16] *((byte*)(number) $d000+(number) $21) ← -- *((byte*)(number) $d000+(number) $21) - [17] *((const byte*) main::BGCOL) ← ++ *((const byte*) main::BGCOL) + [17] *((const byte*) main::BG_COLOR) ← ++ *((const byte*) main::BG_COLOR) to:main::@return main::@return: scope:[main] from main::@4 [18] return @@ -283,7 +283,7 @@ main: { // RValue pointer expression (constant) .label screen = $400 // Increment on a const named pointer - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label sc2 = screen+$51 .label i = 2 .label j = 3 @@ -350,8 +350,8 @@ main: { inc $d020 // [16] *((byte*)(number) $d000+(number) $21) ← -- *((byte*)(number) $d000+(number) $21) -- _deref_pbuc1=_dec__deref_pbuc1 dec $d000+$21 - // [17] *((const byte*) main::BGCOL) ← ++ *((const byte*) main::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [17] *((const byte*) main::BG_COLOR) ← ++ *((const byte*) main::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // main::@return __breturn: @@ -410,7 +410,7 @@ main: { // RValue pointer expression (constant) .label screen = $400 // Increment on a const named pointer - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label sc2 = screen+$51 // [5] phi from main to main::@1 [phi:main->main::@1] __b1_from_main: @@ -469,8 +469,8 @@ main: { inc $d020 // [16] *((byte*)(number) $d000+(number) $21) ← -- *((byte*)(number) $d000+(number) $21) -- _deref_pbuc1=_dec__deref_pbuc1 dec $d000+$21 - // [17] *((const byte*) main::BGCOL) ← ++ *((const byte*) main::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [17] *((const byte*) main::BG_COLOR) ← ++ *((const byte*) main::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR jmp __breturn // main::@return __breturn: @@ -523,7 +523,7 @@ FINAL SYMBOL TABLE (label) main::@3 (label) main::@4 (label) main::@return -(const byte*) main::BGCOL = (byte*) 53280 +(const byte*) main::BG_COLOR = (byte*) 53280 (byte) main::i (byte) main::i#1 reg byte x 151.5 (byte) main::i#2 reg byte x 202.0 @@ -560,7 +560,7 @@ main: { // RValue pointer expression (constant) .label screen = $400 // Increment on a const named pointer - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label sc2 = screen+$51 // [5] phi from main to main::@1 [phi:main->main::@1] // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 @@ -615,9 +615,9 @@ main: { // --*(byte*)($d000+$21); // [16] *((byte*)(number) $d000+(number) $21) ← -- *((byte*)(number) $d000+(number) $21) -- _deref_pbuc1=_dec__deref_pbuc1 dec $d000+$21 - // ++*BGCOL; - // [17] *((const byte*) main::BGCOL) ← ++ *((const byte*) main::BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // ++*BG_COLOR; + // [17] *((const byte*) main::BG_COLOR) ← ++ *((const byte*) main::BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // main::@return // } // [18] return diff --git a/src/test/ref/ptr-complex.sym b/src/test/ref/ptr-complex.sym index a6f3f5c4d..ea5a446df 100644 --- a/src/test/ref/ptr-complex.sym +++ b/src/test/ref/ptr-complex.sym @@ -7,7 +7,7 @@ (label) main::@3 (label) main::@4 (label) main::@return -(const byte*) main::BGCOL = (byte*) 53280 +(const byte*) main::BG_COLOR = (byte*) 53280 (byte) main::i (byte) main::i#1 reg byte x 151.5 (byte) main::i#2 reg byte x 202.0 diff --git a/src/test/ref/scan-desire-problem.asm b/src/test/ref/scan-desire-problem.asm index 46adaf34c..166c7513c 100644 --- a/src/test/ref/scan-desire-problem.asm +++ b/src/test/ref/scan-desire-problem.asm @@ -10,16 +10,16 @@ .const BLUE = 6 .const YELLOW = 7 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_MC = $d01c .label SPRITES_EXPAND_X = $d01d - .label BORDERCOL = $d020 - .label BGCOL1 = $d021 - .label BGCOL2 = $d022 - .label BGCOL3 = $d023 - .label BGCOL4 = $d024 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 + .label BG_COLOR1 = $d022 + .label BG_COLOR2 = $d023 + .label BG_COLOR3 = $d024 .label D018 = $d018 .label screen = $400 .label charset = $2000 @@ -263,20 +263,20 @@ init: { // asm lda #$5b sta $d011 - // *BORDERCOL = BLACK + // *BORDER_COLOR = BLACK lda #BLACK - sta BORDERCOL - // *BGCOL1 = BLACK - sta BGCOL1 - // *BGCOL2 = RED + sta BORDER_COLOR + // *BG_COLOR = BLACK + sta BG_COLOR + // *BG_COLOR1 = RED lda #RED - sta BGCOL2 - // *BGCOL3 = BLUE + sta BG_COLOR1 + // *BG_COLOR2 = BLUE lda #BLUE - sta BGCOL3 - // *BGCOL4 = GREEN + sta BG_COLOR2 + // *BG_COLOR3 = GREEN lda #GREEN - sta BGCOL4 + sta BG_COLOR3 // } rts } @@ -328,9 +328,9 @@ init_sprites: { sta SPRITES_EXPAND_Y // *SPRITES_XMSB = 0 sta SPRITES_XMSB - // *SPRITES_COLS = WHITE + // *SPRITES_COLOR = WHITE lda #WHITE - sta SPRITES_COLS + sta SPRITES_COLOR // *SPRITES_MC = 0 lda #0 sta SPRITES_MC diff --git a/src/test/ref/scan-desire-problem.cfg b/src/test/ref/scan-desire-problem.cfg index e145c92e6..8cd9b775d 100644 --- a/src/test/ref/scan-desire-problem.cfg +++ b/src/test/ref/scan-desire-problem.cfg @@ -118,11 +118,11 @@ init::toD0181: scope:[init] from init::@3 init::@1: scope:[init] from init::toD0181 [62] *((const nomodify byte*) D018) ← (const byte) init::toD0181_return#0 asm { lda#$5b sta$d011 } - [64] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK - [65] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK - [66] *((const nomodify byte*) BGCOL2) ← (const nomodify byte) RED - [67] *((const nomodify byte*) BGCOL3) ← (const nomodify byte) BLUE - [68] *((const nomodify byte*) BGCOL4) ← (const nomodify byte) GREEN + [64] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK + [65] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK + [66] *((const nomodify byte*) BG_COLOR1) ← (const nomodify byte) RED + [67] *((const nomodify byte*) BG_COLOR2) ← (const nomodify byte) BLUE + [68] *((const nomodify byte*) BG_COLOR3) ← (const nomodify byte) GREEN to:init::@return init::@return: scope:[init] from init::@1 [69] return @@ -155,7 +155,7 @@ init_sprites: scope:[init_sprites] from init [79] *((const nomodify byte*) SPRITES_EXPAND_X) ← (byte) 0 [80] *((const nomodify byte*) SPRITES_EXPAND_Y) ← (byte) 0 [81] *((const nomodify byte*) SPRITES_XMSB) ← (byte) 0 - [82] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) WHITE + [82] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) WHITE [83] *((const nomodify byte*) SPRITES_MC) ← (byte) 0 to:init_sprites::@return init_sprites::@return: scope:[init_sprites] from init_sprites diff --git a/src/test/ref/scan-desire-problem.log b/src/test/ref/scan-desire-problem.log index 23c335f07..fb6633702 100644 --- a/src/test/ref/scan-desire-problem.log +++ b/src/test/ref/scan-desire-problem.log @@ -192,11 +192,11 @@ init::@1: scope:[init] from init::toD0181_@return (byte~) init::$3 ← (byte) init::toD0181_return#3 *((const nomodify byte*) D018) ← (byte~) init::$3 asm { lda#$5b sta$d011 } - *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK - *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK - *((const nomodify byte*) BGCOL2) ← (const nomodify byte) RED - *((const nomodify byte*) BGCOL3) ← (const nomodify byte) BLUE - *((const nomodify byte*) BGCOL4) ← (const nomodify byte) GREEN + *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK + *((const nomodify byte*) BG_COLOR1) ← (const nomodify byte) RED + *((const nomodify byte*) BG_COLOR2) ← (const nomodify byte) BLUE + *((const nomodify byte*) BG_COLOR3) ← (const nomodify byte) GREEN to:init::@return init::@return: scope:[init] from init::@1 return @@ -208,7 +208,7 @@ init_sprites: scope:[init_sprites] from init *((const nomodify byte*) SPRITES_EXPAND_X) ← (number) 0 *((const nomodify byte*) SPRITES_EXPAND_Y) ← (number) 0 *((const nomodify byte*) SPRITES_XMSB) ← (number) 0 - *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) WHITE + *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) WHITE *((const nomodify byte*) SPRITES_MC) ← (number) 0 to:init_sprites::@return init_sprites::@return: scope:[init_sprites] from init_sprites @@ -270,13 +270,13 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL1 = (byte*)(number) $d021 -(const nomodify byte*) BGCOL2 = (byte*)(number) $d022 -(const nomodify byte*) BGCOL3 = (byte*)(number) $d023 -(const nomodify byte*) BGCOL4 = (byte*)(number) $d024 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR1 = (byte*)(number) $d022 +(const nomodify byte*) BG_COLOR2 = (byte*)(number) $d023 +(const nomodify byte*) BG_COLOR3 = (byte*)(number) $d024 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte) BLUE = (byte) 6 -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (const nomodify byte*) D018 = (byte*)(number) $d018 (const nomodify byte) GREEN = (byte) 5 (byte) MOS6526_CIA::INTERRUPT @@ -364,7 +364,7 @@ SYMBOL TABLE SSA (byte) MOS6581_SID::POT_Y (byte) MOS6581_SID::VOLUME_FILTER_MODE (const nomodify byte) RED = (byte) 2 -(const nomodify byte*) SPRITES_COLS = (byte*)(number) $d027 +(const nomodify byte*) SPRITES_COLOR = (byte*)(number) $d027 (const nomodify byte*) SPRITES_ENABLE = (byte*)(number) $d015 (const nomodify byte*) SPRITES_EXPAND_X = (byte*)(number) $d01d (const nomodify byte*) SPRITES_EXPAND_Y = (byte*)(number) $d017 @@ -1069,11 +1069,11 @@ init::toD0181: scope:[init] from init::@3 init::@1: scope:[init] from init::toD0181 [62] *((const nomodify byte*) D018) ← (const byte) init::toD0181_return#0 asm { lda#$5b sta$d011 } - [64] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK - [65] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK - [66] *((const nomodify byte*) BGCOL2) ← (const nomodify byte) RED - [67] *((const nomodify byte*) BGCOL3) ← (const nomodify byte) BLUE - [68] *((const nomodify byte*) BGCOL4) ← (const nomodify byte) GREEN + [64] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK + [65] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK + [66] *((const nomodify byte*) BG_COLOR1) ← (const nomodify byte) RED + [67] *((const nomodify byte*) BG_COLOR2) ← (const nomodify byte) BLUE + [68] *((const nomodify byte*) BG_COLOR3) ← (const nomodify byte) GREEN to:init::@return init::@return: scope:[init] from init::@1 [69] return @@ -1106,7 +1106,7 @@ init_sprites: scope:[init_sprites] from init [79] *((const nomodify byte*) SPRITES_EXPAND_X) ← (byte) 0 [80] *((const nomodify byte*) SPRITES_EXPAND_Y) ← (byte) 0 [81] *((const nomodify byte*) SPRITES_XMSB) ← (byte) 0 - [82] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) WHITE + [82] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) WHITE [83] *((const nomodify byte*) SPRITES_MC) ← (byte) 0 to:init_sprites::@return init_sprites::@return: scope:[init_sprites] from init_sprites @@ -1380,16 +1380,16 @@ Target platform is c64basic / MOS6502X .const BLUE = 6 .const YELLOW = 7 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_MC = $d01c .label SPRITES_EXPAND_X = $d01d - .label BORDERCOL = $d020 - .label BGCOL1 = $d021 - .label BGCOL2 = $d022 - .label BGCOL3 = $d023 - .label BGCOL4 = $d024 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 + .label BG_COLOR1 = $d022 + .label BG_COLOR2 = $d023 + .label BG_COLOR3 = $d024 .label D018 = $d018 .label screen = $400 .label charset = $2000 @@ -1792,21 +1792,21 @@ init: { // asm { lda#$5b sta$d011 } lda #$5b sta $d011 - // [64] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [64] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL - // [65] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [65] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL1 - // [66] *((const nomodify byte*) BGCOL2) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [66] *((const nomodify byte*) BG_COLOR1) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BGCOL2 - // [67] *((const nomodify byte*) BGCOL3) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 + sta BG_COLOR1 + // [67] *((const nomodify byte*) BG_COLOR2) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 lda #BLUE - sta BGCOL3 - // [68] *((const nomodify byte*) BGCOL4) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + sta BG_COLOR2 + // [68] *((const nomodify byte*) BG_COLOR3) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BGCOL4 + sta BG_COLOR3 jmp __breturn // init::@return __breturn: @@ -1884,9 +1884,9 @@ init_sprites: { // [81] *((const nomodify byte*) SPRITES_XMSB) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta SPRITES_XMSB - // [82] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [82] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta SPRITES_COLS + sta SPRITES_COLOR // [83] *((const nomodify byte*) SPRITES_MC) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta SPRITES_MC @@ -1934,11 +1934,11 @@ Statement [51] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 Removing always clobbered register reg byte a as potential for zp[1]:4 [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] Statement [62] *((const nomodify byte*) D018) ← (const byte) init::toD0181_return#0 [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a Statement asm { lda#$5b sta$d011 } always clobbers reg byte a -Statement [64] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a -Statement [65] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a -Statement [66] *((const nomodify byte*) BGCOL2) ← (const nomodify byte) RED [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a -Statement [67] *((const nomodify byte*) BGCOL3) ← (const nomodify byte) BLUE [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a -Statement [68] *((const nomodify byte*) BGCOL4) ← (const nomodify byte) GREEN [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a +Statement [64] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a +Statement [65] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a +Statement [66] *((const nomodify byte*) BG_COLOR1) ← (const nomodify byte) RED [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a +Statement [67] *((const nomodify byte*) BG_COLOR2) ← (const nomodify byte) BLUE [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a +Statement [68] *((const nomodify byte*) BG_COLOR3) ← (const nomodify byte) GREEN [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a Statement [71] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) $3e8 [ memset::str#3 memset::c#4 memset::end#0 ] ( main:2::init:5::memset:58 [ memset::str#3 memset::c#4 memset::end#0 ] { } main:2::init:5::memset:60 [ memset::str#3 memset::c#4 memset::end#0 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:11 [ memset::c#4 ] Statement [72] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3 [ memset::c#4 memset::end#0 memset::dst#4 ] ( main:2::init:5::memset:58 [ memset::c#4 memset::end#0 memset::dst#4 ] { } main:2::init:5::memset:60 [ memset::c#4 memset::end#0 memset::dst#4 ] { } ) always clobbers reg byte a @@ -1949,7 +1949,7 @@ Statement [78] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) 1 [ ] ( main: Statement [79] *((const nomodify byte*) SPRITES_EXPAND_X) ← (byte) 0 [ ] ( main:2::init:5::init_sprites:56 [ ] { } ) always clobbers reg byte a Statement [80] *((const nomodify byte*) SPRITES_EXPAND_Y) ← (byte) 0 [ ] ( main:2::init:5::init_sprites:56 [ ] { } ) always clobbers reg byte a Statement [81] *((const nomodify byte*) SPRITES_XMSB) ← (byte) 0 [ ] ( main:2::init:5::init_sprites:56 [ ] { } ) always clobbers reg byte a -Statement [82] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) WHITE [ ] ( main:2::init:5::init_sprites:56 [ ] { } ) always clobbers reg byte a +Statement [82] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) WHITE [ ] ( main:2::init:5::init_sprites:56 [ ] { } ) always clobbers reg byte a Statement [83] *((const nomodify byte*) SPRITES_MC) ← (byte) 0 [ ] ( main:2::init:5::init_sprites:56 [ ] { } ) always clobbers reg byte a Statement [12] (byte) main::z#0 ← (byte) main::x#2 + (byte) main::y#2 [ main::x#2 main::y#2 main::z#0 ] ( main:2 [ main::x#2 main::y#2 main::z#0 ] { { draw_block::tileno#0 = main::tile#0 } { draw_block::x#0 = main::x#2 } { draw_block::y#0 = main::y#2 } } ) always clobbers reg byte a Statement [19] (byte) draw_block::tileno#1 ← (byte) draw_block::tileno#0 << (byte) 2 [ draw_block::x#0 draw_block::y#0 draw_block::tileno#1 ] ( main:2::draw_block:17 [ main::x#2 main::y#2 draw_block::x#0 draw_block::y#0 draw_block::tileno#1 ] { { draw_block::tileno#0 = main::tile#0 } { draw_block::x#0 = main::x#2 } { draw_block::y#0 = main::y#2 } { mul8u::a#1 = draw_block::y#1 } { mul8u::return#2 = mul8u::res#2 } } ) always clobbers reg byte a @@ -1978,11 +1978,11 @@ Statement [49] (byte~) mul8u::$1 ← (byte) mul8u::a#2 & (byte) 1 [ mul8u::res#2 Statement [51] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 [ mul8u::a#2 mul8u::mb#2 mul8u::res#1 ] ( main:2::draw_block:17::mul8u:23 [ main::x#2 main::y#2 draw_block::tileno#1 draw_block::x1#0 mul8u::a#2 mul8u::mb#2 mul8u::res#1 ] { { draw_block::tileno#0 = main::tile#0 } { draw_block::x#0 = main::x#2 } { draw_block::y#0 = main::y#2 } { mul8u::a#1 = draw_block::y#1 } { mul8u::return#2 = mul8u::res#2 } } ) always clobbers reg byte a Statement [62] *((const nomodify byte*) D018) ← (const byte) init::toD0181_return#0 [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a Statement asm { lda#$5b sta$d011 } always clobbers reg byte a -Statement [64] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a -Statement [65] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a -Statement [66] *((const nomodify byte*) BGCOL2) ← (const nomodify byte) RED [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a -Statement [67] *((const nomodify byte*) BGCOL3) ← (const nomodify byte) BLUE [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a -Statement [68] *((const nomodify byte*) BGCOL4) ← (const nomodify byte) GREEN [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a +Statement [64] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a +Statement [65] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a +Statement [66] *((const nomodify byte*) BG_COLOR1) ← (const nomodify byte) RED [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a +Statement [67] *((const nomodify byte*) BG_COLOR2) ← (const nomodify byte) BLUE [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a +Statement [68] *((const nomodify byte*) BG_COLOR3) ← (const nomodify byte) GREEN [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a Statement [71] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) $3e8 [ memset::str#3 memset::c#4 memset::end#0 ] ( main:2::init:5::memset:58 [ memset::str#3 memset::c#4 memset::end#0 ] { } main:2::init:5::memset:60 [ memset::str#3 memset::c#4 memset::end#0 ] { } ) always clobbers reg byte a Statement [72] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3 [ memset::c#4 memset::end#0 memset::dst#4 ] ( main:2::init:5::memset:58 [ memset::c#4 memset::end#0 memset::dst#4 ] { } main:2::init:5::memset:60 [ memset::c#4 memset::end#0 memset::dst#4 ] { } ) always clobbers reg byte a Statement [74] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 [ memset::c#4 memset::end#0 memset::dst#2 ] ( main:2::init:5::memset:58 [ memset::c#4 memset::end#0 memset::dst#2 ] { } main:2::init:5::memset:60 [ memset::c#4 memset::end#0 memset::dst#2 ] { } ) always clobbers reg byte a @@ -1991,7 +1991,7 @@ Statement [78] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) 1 [ ] ( main: Statement [79] *((const nomodify byte*) SPRITES_EXPAND_X) ← (byte) 0 [ ] ( main:2::init:5::init_sprites:56 [ ] { } ) always clobbers reg byte a Statement [80] *((const nomodify byte*) SPRITES_EXPAND_Y) ← (byte) 0 [ ] ( main:2::init:5::init_sprites:56 [ ] { } ) always clobbers reg byte a Statement [81] *((const nomodify byte*) SPRITES_XMSB) ← (byte) 0 [ ] ( main:2::init:5::init_sprites:56 [ ] { } ) always clobbers reg byte a -Statement [82] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) WHITE [ ] ( main:2::init:5::init_sprites:56 [ ] { } ) always clobbers reg byte a +Statement [82] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) WHITE [ ] ( main:2::init:5::init_sprites:56 [ ] { } ) always clobbers reg byte a Statement [83] *((const nomodify byte*) SPRITES_MC) ← (byte) 0 [ ] ( main:2::init:5::init_sprites:56 [ ] { } ) always clobbers reg byte a Potential registers zp[1]:2 [ main::x#2 main::x#1 ] : zp[1]:2 , reg byte x , Potential registers zp[1]:3 [ main::y#2 main::y#1 ] : zp[1]:3 , reg byte x , @@ -2090,16 +2090,16 @@ ASSEMBLER BEFORE OPTIMIZATION .const BLUE = 6 .const YELLOW = 7 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_MC = $d01c .label SPRITES_EXPAND_X = $d01d - .label BORDERCOL = $d020 - .label BGCOL1 = $d021 - .label BGCOL2 = $d022 - .label BGCOL3 = $d023 - .label BGCOL4 = $d024 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 + .label BG_COLOR1 = $d022 + .label BG_COLOR2 = $d023 + .label BG_COLOR3 = $d024 .label D018 = $d018 .label screen = $400 .label charset = $2000 @@ -2471,21 +2471,21 @@ init: { // asm { lda#$5b sta$d011 } lda #$5b sta $d011 - // [64] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [64] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL - // [65] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [65] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BGCOL1 - // [66] *((const nomodify byte*) BGCOL2) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // [66] *((const nomodify byte*) BG_COLOR1) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BGCOL2 - // [67] *((const nomodify byte*) BGCOL3) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 + sta BG_COLOR1 + // [67] *((const nomodify byte*) BG_COLOR2) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 lda #BLUE - sta BGCOL3 - // [68] *((const nomodify byte*) BGCOL4) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + sta BG_COLOR2 + // [68] *((const nomodify byte*) BG_COLOR3) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BGCOL4 + sta BG_COLOR3 jmp __breturn // init::@return __breturn: @@ -2558,9 +2558,9 @@ init_sprites: { // [81] *((const nomodify byte*) SPRITES_XMSB) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta SPRITES_XMSB - // [82] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [82] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta SPRITES_COLS + sta SPRITES_COLOR // [83] *((const nomodify byte*) SPRITES_MC) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta SPRITES_MC @@ -2662,13 +2662,13 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL1 = (byte*) 53281 -(const nomodify byte*) BGCOL2 = (byte*) 53282 -(const nomodify byte*) BGCOL3 = (byte*) 53283 -(const nomodify byte*) BGCOL4 = (byte*) 53284 +(const nomodify byte*) BG_COLOR = (byte*) 53281 +(const nomodify byte*) BG_COLOR1 = (byte*) 53282 +(const nomodify byte*) BG_COLOR2 = (byte*) 53283 +(const nomodify byte*) BG_COLOR3 = (byte*) 53284 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte) BLUE = (byte) 6 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) D018 = (byte*) 53272 (const nomodify byte) GREEN = (byte) 5 (byte) MOS6526_CIA::INTERRUPT @@ -2756,7 +2756,7 @@ FINAL SYMBOL TABLE (byte) MOS6581_SID::POT_Y (byte) MOS6581_SID::VOLUME_FILTER_MODE (const nomodify byte) RED = (byte) 2 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_ENABLE = (byte*) 53269 (const nomodify byte*) SPRITES_EXPAND_X = (byte*) 53277 (const nomodify byte*) SPRITES_EXPAND_Y = (byte*) 53271 @@ -2906,16 +2906,16 @@ Score: 75497 .const BLUE = 6 .const YELLOW = 7 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_MC = $d01c .label SPRITES_EXPAND_X = $d01d - .label BORDERCOL = $d020 - .label BGCOL1 = $d021 - .label BGCOL2 = $d022 - .label BGCOL3 = $d023 - .label BGCOL4 = $d024 + .label BORDER_COLOR = $d020 + .label BG_COLOR = $d021 + .label BG_COLOR1 = $d022 + .label BG_COLOR2 = $d023 + .label BG_COLOR3 = $d024 .label D018 = $d018 .label screen = $400 .label charset = $2000 @@ -3266,25 +3266,25 @@ init: { // asm { lda#$5b sta$d011 } lda #$5b sta $d011 - // *BORDERCOL = BLACK - // [64] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = BLACK + // [64] *((const nomodify byte*) BORDER_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK - sta BORDERCOL - // *BGCOL1 = BLACK - // [65] *((const nomodify byte*) BGCOL1) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 - sta BGCOL1 - // *BGCOL2 = RED - // [66] *((const nomodify byte*) BGCOL2) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // *BG_COLOR = BLACK + // [65] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + sta BG_COLOR + // *BG_COLOR1 = RED + // [66] *((const nomodify byte*) BG_COLOR1) ← (const nomodify byte) RED -- _deref_pbuc1=vbuc2 lda #RED - sta BGCOL2 - // *BGCOL3 = BLUE - // [67] *((const nomodify byte*) BGCOL3) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 + sta BG_COLOR1 + // *BG_COLOR2 = BLUE + // [67] *((const nomodify byte*) BG_COLOR2) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 lda #BLUE - sta BGCOL3 - // *BGCOL4 = GREEN - // [68] *((const nomodify byte*) BGCOL4) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + sta BG_COLOR2 + // *BG_COLOR3 = GREEN + // [68] *((const nomodify byte*) BG_COLOR3) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BGCOL4 + sta BG_COLOR3 // init::@return // } // [69] return @@ -3356,10 +3356,10 @@ init_sprites: { // *SPRITES_XMSB = 0 // [81] *((const nomodify byte*) SPRITES_XMSB) ← (byte) 0 -- _deref_pbuc1=vbuc2 sta SPRITES_XMSB - // *SPRITES_COLS = WHITE - // [82] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // *SPRITES_COLOR = WHITE + // [82] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta SPRITES_COLS + sta SPRITES_COLOR // *SPRITES_MC = 0 // [83] *((const nomodify byte*) SPRITES_MC) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 diff --git a/src/test/ref/scan-desire-problem.sym b/src/test/ref/scan-desire-problem.sym index 2c53072ff..1c16cb93f 100644 --- a/src/test/ref/scan-desire-problem.sym +++ b/src/test/ref/scan-desire-problem.sym @@ -1,13 +1,13 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL1 = (byte*) 53281 -(const nomodify byte*) BGCOL2 = (byte*) 53282 -(const nomodify byte*) BGCOL3 = (byte*) 53283 -(const nomodify byte*) BGCOL4 = (byte*) 53284 +(const nomodify byte*) BG_COLOR = (byte*) 53281 +(const nomodify byte*) BG_COLOR1 = (byte*) 53282 +(const nomodify byte*) BG_COLOR2 = (byte*) 53283 +(const nomodify byte*) BG_COLOR3 = (byte*) 53284 (const nomodify byte) BLACK = (byte) 0 (const nomodify byte) BLUE = (byte) 6 -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (const nomodify byte*) D018 = (byte*) 53272 (const nomodify byte) GREEN = (byte) 5 (byte) MOS6526_CIA::INTERRUPT @@ -95,7 +95,7 @@ (byte) MOS6581_SID::POT_Y (byte) MOS6581_SID::VOLUME_FILTER_MODE (const nomodify byte) RED = (byte) 2 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_ENABLE = (byte*) 53269 (const nomodify byte*) SPRITES_EXPAND_X = (byte*) 53277 (const nomodify byte*) SPRITES_EXPAND_Y = (byte*) 53271 diff --git a/src/test/ref/screen-show-spiral-buckets.asm b/src/test/ref/screen-show-spiral-buckets.asm index 6cbba6b3e..3aeef39e2 100644 --- a/src/test/ref/screen-show-spiral-buckets.asm +++ b/src/test/ref/screen-show-spiral-buckets.asm @@ -15,7 +15,7 @@ // The number of squares to pre-calculate. Limits what values sqr() can calculate and the result of sqrt() .const NUM_SQUARES = $30 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 // Color Ram .label COLS = $d800 // Screen containing angle to center @@ -129,8 +129,8 @@ main: { lda #$ff cmp RASTER bne __b2 - // (*BORDERCOL)++; - inc BORDERCOL + // (*BORDER_COLOR)++; + inc BORDER_COLOR // bucket = BUCKETS[bucket_idx] lda.z bucket_idx asl @@ -178,8 +178,8 @@ main: { lda #FILL_CHAR ldy #0 sta (fill1),y - // (*BORDERCOL)--; - dec BORDERCOL + // (*BORDER_COLOR)--; + dec BORDER_COLOR jmp __b2 __b4: // bucket_idx++; @@ -188,15 +188,15 @@ main: { lda #NUM_BUCKETS cmp.z bucket_idx bne __b12 - // (*BORDERCOL)--; - dec BORDERCOL + // (*BORDER_COLOR)--; + dec BORDER_COLOR __b14: // (*(COLS+999))++; inc COLS+$3e7 jmp __b14 __b12: - // (*BORDERCOL)--; - dec BORDERCOL + // (*BORDER_COLOR)--; + dec BORDER_COLOR jmp __b2 __b6: // offset = bucket[i] diff --git a/src/test/ref/screen-show-spiral-buckets.cfg b/src/test/ref/screen-show-spiral-buckets.cfg index 9fbaa02e1..64438bad2 100644 --- a/src/test/ref/screen-show-spiral-buckets.cfg +++ b/src/test/ref/screen-show-spiral-buckets.cfg @@ -52,7 +52,7 @@ main::@2: scope:[main] from main::@1 main::@2 [23] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@2 - [24] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [24] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) [25] (byte~) main::$23 ← (byte) main::bucket_idx#6 << (byte) 1 [26] (word*) main::bucket#0 ← *((word**)(void*) BUCKETS#0 + (byte~) main::$23) [27] (byte) main::bucket_size#0 ← *((byte*)(void*) BUCKET_SIZES#0 + (byte) main::bucket_idx#6) @@ -70,20 +70,20 @@ main::@7: scope:[main] from main::@5 main::@11: scope:[main] from main::@7 [32] (byte*) main::fill1#0 ← (const nomodify byte*) SCREEN_FILL + (word) main::min_offset#2 [33] *((byte*) main::fill1#0) ← (const nomodify byte) FILL_CHAR - [34] *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) + [34] *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) to:main::@1 main::@4: scope:[main] from main::@3 main::@7 [35] (byte) main::bucket_idx#1 ← ++ (byte) main::bucket_idx#6 [36] if((byte) main::bucket_idx#1!=(const nomodify byte) NUM_BUCKETS) goto main::@12 to:main::@13 main::@13: scope:[main] from main::@4 - [37] *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) + [37] *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) to:main::@14 main::@14: scope:[main] from main::@13 main::@14 [38] *((const nomodify byte*) COLS+(word) $3e7) ← ++ *((const nomodify byte*) COLS+(word) $3e7) to:main::@14 main::@12: scope:[main] from main::@4 - [39] *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) + [39] *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) to:main::@1 main::@6: scope:[main] from main::@5 [40] (byte~) main::$24 ← (byte) main::i#2 << (byte) 1 diff --git a/src/test/ref/screen-show-spiral-buckets.log b/src/test/ref/screen-show-spiral-buckets.log index 8cf5ebde9..afc6a3aa6 100644 --- a/src/test/ref/screen-show-spiral-buckets.log +++ b/src/test/ref/screen-show-spiral-buckets.log @@ -571,7 +571,7 @@ main::@3: scope:[main] from main::@2 (byte*) BUCKET_SIZES#1 ← phi( main::@2/(byte*) BUCKET_SIZES#5 ) (word**) BUCKETS#1 ← phi( main::@2/(word**) BUCKETS#4 ) (byte) main::bucket_idx#2 ← phi( main::@2/(byte) main::bucket_idx#4 ) - *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) (byte~) main::$23 ← (byte) main::bucket_idx#2 * (const byte) SIZEOF_POINTER (word*) main::bucket#0 ← *((word**) BUCKETS#1 + (byte~) main::$23) (byte) main::bucket_size#0 ← *((byte*) BUCKET_SIZES#1 + (byte) main::bucket_idx#2) @@ -719,7 +719,7 @@ main::@12: scope:[main] from main::@8 (byte*~) main::$16 ← (const nomodify byte*) SCREEN_FILL + (word) main::min_offset#3 (byte*) main::fill1#0 ← (byte*~) main::$16 *((byte*) main::fill1#0) ← (const nomodify byte) FILL_CHAR - *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) + *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) to:main::@1 main::@13: scope:[main] from main::@5 (byte*) SCREEN_ANGLE#17 ← phi( main::@5/(byte*) SCREEN_ANGLE#21 ) @@ -729,13 +729,13 @@ main::@13: scope:[main] from main::@5 (byte*) BUCKET_SIZES#14 ← phi( main::@5/(byte*) BUCKET_SIZES#18 ) (word**) BUCKETS#11 ← phi( main::@5/(word**) BUCKETS#17 ) (byte) main::bucket_idx#9 ← phi( main::@5/(byte) main::bucket_idx#1 ) - *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) + *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) to:main::@1 main::@14: scope:[main] from main::@5 (word*) SQUARES#28 ← phi( main::@5/(word*) SQUARES#40 ) (byte*) heap_head#49 ← phi( main::@5/(byte*) heap_head#56 ) (byte) NUM_SQUARES#21 ← phi( main::@5/(byte) NUM_SQUARES#30 ) - *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) + *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) to:main::@15 main::@15: scope:[main] from main::@1 main::@14 main::@16 (word*) SQUARES#22 ← phi( main::@1/(word*) SQUARES#27 main::@14/(word*) SQUARES#28 main::@16/(word*) SQUARES#29 ) @@ -1220,7 +1220,7 @@ SYMBOL TABLE SSA (label) @9 (label) @begin (label) @end -(const nomodify byte*) BORDERCOL = (byte*)(number) $d020 +(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020 (word**) BUCKETS (word**) BUCKETS#0 (word**) BUCKETS#1 @@ -3530,7 +3530,7 @@ main::@2: scope:[main] from main::@1 main::@2 [23] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@2 - [24] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [24] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) [25] (byte~) main::$23 ← (byte) main::bucket_idx#6 << (byte) 1 [26] (word*) main::bucket#0 ← *((word**)(void*) BUCKETS#0 + (byte~) main::$23) [27] (byte) main::bucket_size#0 ← *((byte*)(void*) BUCKET_SIZES#0 + (byte) main::bucket_idx#6) @@ -3548,20 +3548,20 @@ main::@7: scope:[main] from main::@5 main::@11: scope:[main] from main::@7 [32] (byte*) main::fill1#0 ← (const nomodify byte*) SCREEN_FILL + (word) main::min_offset#2 [33] *((byte*) main::fill1#0) ← (const nomodify byte) FILL_CHAR - [34] *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) + [34] *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) to:main::@1 main::@4: scope:[main] from main::@3 main::@7 [35] (byte) main::bucket_idx#1 ← ++ (byte) main::bucket_idx#6 [36] if((byte) main::bucket_idx#1!=(const nomodify byte) NUM_BUCKETS) goto main::@12 to:main::@13 main::@13: scope:[main] from main::@4 - [37] *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) + [37] *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) to:main::@14 main::@14: scope:[main] from main::@13 main::@14 [38] *((const nomodify byte*) COLS+(word) $3e7) ← ++ *((const nomodify byte*) COLS+(word) $3e7) to:main::@14 main::@12: scope:[main] from main::@4 - [39] *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) + [39] *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) to:main::@1 main::@6: scope:[main] from main::@5 [40] (byte~) main::$24 ← (byte) main::i#2 << (byte) 1 @@ -4703,7 +4703,7 @@ Target platform is c64basic / MOS6502X // The number of squares to pre-calculate. Limits what values sqr() can calculate and the result of sqrt() .const NUM_SQUARES = $30 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 // Color Ram .label COLS = $d800 // Screen containing angle to center @@ -4901,8 +4901,8 @@ main: { jmp __b3 // main::@3 __b3: - // [24] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // [24] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // [25] (byte~) main::$23 ← (byte) main::bucket_idx#6 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z bucket_idx asl @@ -4968,8 +4968,8 @@ main: { lda #FILL_CHAR ldy #0 sta (fill1),y - // [34] *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BORDERCOL + // [34] *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDER_COLOR // [22] phi from main::@11 main::@12 to main::@1 [phi:main::@11/main::@12->main::@1] __b1_from___b11: __b1_from___b12: @@ -4986,8 +4986,8 @@ main: { jmp __b13 // main::@13 __b13: - // [37] *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BORDERCOL + // [37] *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDER_COLOR jmp __b14 // main::@14 __b14: @@ -4996,8 +4996,8 @@ main: { jmp __b14 // main::@12 __b12: - // [39] *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BORDERCOL + // [39] *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDER_COLOR jmp __b1_from___b12 // main::@6 __b6: @@ -7270,7 +7270,7 @@ ASSEMBLER BEFORE OPTIMIZATION // The number of squares to pre-calculate. Limits what values sqr() can calculate and the result of sqrt() .const NUM_SQUARES = $30 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 // Color Ram .label COLS = $d800 // Screen containing angle to center @@ -7461,8 +7461,8 @@ main: { jmp __b3 // main::@3 __b3: - // [24] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // [24] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // [25] (byte~) main::$23 ← (byte) main::bucket_idx#6 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda.z bucket_idx asl @@ -7525,8 +7525,8 @@ main: { lda #FILL_CHAR ldy #0 sta (fill1),y - // [34] *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BORDERCOL + // [34] *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDER_COLOR // [22] phi from main::@11 main::@12 to main::@1 [phi:main::@11/main::@12->main::@1] __b1_from___b11: __b1_from___b12: @@ -7543,8 +7543,8 @@ main: { jmp __b13 // main::@13 __b13: - // [37] *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BORDERCOL + // [37] *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDER_COLOR jmp __b14 // main::@14 __b14: @@ -7553,8 +7553,8 @@ main: { jmp __b14 // main::@12 __b12: - // [39] *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BORDERCOL + // [39] *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDER_COLOR jmp __b1_from___b12 // main::@6 __b6: @@ -9240,7 +9240,7 @@ FINAL SYMBOL TABLE (label) @7 (label) @begin (label) @end -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (word**) BUCKETS (void*) BUCKETS#0 BUCKETS zp[2]:22 0.02531645569620253 (byte*) BUCKET_IDX @@ -9791,7 +9791,7 @@ Score: 1116714 // The number of squares to pre-calculate. Limits what values sqr() can calculate and the result of sqrt() .const NUM_SQUARES = $30 .label RASTER = $d012 - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 // Color Ram .label COLS = $d800 // Screen containing angle to center @@ -9961,9 +9961,9 @@ main: { cmp RASTER bne __b2 // main::@3 - // (*BORDERCOL)++; - // [24] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BORDERCOL + // (*BORDER_COLOR)++; + // [24] *((const nomodify byte*) BORDER_COLOR) ← ++ *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDER_COLOR // bucket = BUCKETS[bucket_idx] // [25] (byte~) main::$23 ← (byte) main::bucket_idx#6 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda.z bucket_idx @@ -10026,9 +10026,9 @@ main: { lda #FILL_CHAR ldy #0 sta (fill1),y - // (*BORDERCOL)--; - // [34] *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BORDERCOL + // (*BORDER_COLOR)--; + // [34] *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDER_COLOR // [22] phi from main::@11 main::@12 to main::@1 [phi:main::@11/main::@12->main::@1] // [22] phi (byte) main::bucket_idx#6 = (byte) main::bucket_idx#6 [phi:main::@11/main::@12->main::@1#0] -- register_copy jmp __b2 @@ -10043,9 +10043,9 @@ main: { cmp.z bucket_idx bne __b12 // main::@13 - // (*BORDERCOL)--; - // [37] *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BORDERCOL + // (*BORDER_COLOR)--; + // [37] *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDER_COLOR // main::@14 __b14: // (*(COLS+999))++; @@ -10054,9 +10054,9 @@ main: { jmp __b14 // main::@12 __b12: - // (*BORDERCOL)--; - // [39] *((const nomodify byte*) BORDERCOL) ← -- *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 - dec BORDERCOL + // (*BORDER_COLOR)--; + // [39] *((const nomodify byte*) BORDER_COLOR) ← -- *((const nomodify byte*) BORDER_COLOR) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDER_COLOR jmp __b2 // main::@6 __b6: diff --git a/src/test/ref/screen-show-spiral-buckets.sym b/src/test/ref/screen-show-spiral-buckets.sym index 861cf3cf9..9bd06b2da 100644 --- a/src/test/ref/screen-show-spiral-buckets.sym +++ b/src/test/ref/screen-show-spiral-buckets.sym @@ -7,7 +7,7 @@ (label) @7 (label) @begin (label) @end -(const nomodify byte*) BORDERCOL = (byte*) 53280 +(const nomodify byte*) BORDER_COLOR = (byte*) 53280 (word**) BUCKETS (void*) BUCKETS#0 BUCKETS zp[2]:22 0.02531645569620253 (byte*) BUCKET_IDX diff --git a/src/test/ref/signed-words.asm b/src/test/ref/signed-words.asm index 89235fa4d..bae73834e 100644 --- a/src/test/ref/signed-words.asm +++ b/src/test/ref/signed-words.asm @@ -6,7 +6,7 @@ .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_EXPAND_X = $d01d @@ -202,9 +202,9 @@ init: { sta SPRITES_XPOS // SPRITES_YPOS[0] = 100 sta SPRITES_YPOS - // SPRITES_COLS[0] = WHITE + // SPRITES_COLOR[0] = WHITE lda #WHITE - sta SPRITES_COLS + sta SPRITES_COLOR // SPRITES_PTR[0] = (byte)(SPRITE/$40) lda #SPRITE/$40 sta SPRITES_PTR diff --git a/src/test/ref/signed-words.cfg b/src/test/ref/signed-words.cfg index 45ef395c3..3a123f761 100644 --- a/src/test/ref/signed-words.cfg +++ b/src/test/ref/signed-words.cfg @@ -71,7 +71,7 @@ init: scope:[init] from main [32] *((const nomodify byte*) SPRITES_EXPAND_Y) ← (byte) 0 [33] *((const nomodify byte*) SPRITES_XPOS) ← (byte) $64 [34] *((const nomodify byte*) SPRITES_YPOS) ← (byte) $64 - [35] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) WHITE + [35] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) WHITE [36] *((const nomodify byte*) SPRITES_PTR) ← (byte)(const nomodify byte*) SPRITE/(byte) $40 to:init::@1 init::@1: scope:[init] from init init::@2 diff --git a/src/test/ref/signed-words.log b/src/test/ref/signed-words.log index 91babc664..1d42eccea 100644 --- a/src/test/ref/signed-words.log +++ b/src/test/ref/signed-words.log @@ -71,7 +71,7 @@ init: scope:[init] from main *((const nomodify byte*) SPRITES_EXPAND_Y) ← (number) 0 *((const nomodify byte*) SPRITES_XPOS + (number) 0) ← (number) $64 *((const nomodify byte*) SPRITES_YPOS + (number) 0) ← (number) $64 - *((const nomodify byte*) SPRITES_COLS + (number) 0) ← (const nomodify byte) WHITE + *((const nomodify byte*) SPRITES_COLOR + (number) 0) ← (const nomodify byte) WHITE *((const nomodify byte*) SPRITES_PTR + (number) 0) ← (byte)(const nomodify byte*) SPRITE/(number) $40 (byte*) init::sc#0 ← (const nomodify byte*) SCREEN to:init::@1 @@ -294,7 +294,7 @@ SYMBOL TABLE SSA (const nomodify byte*) RASTER = (byte*)(number) $d012 (const nomodify byte*) SCREEN = (byte*)(number) $400 (const nomodify byte*) SPRITE = (byte*)(number) $2000 -(const nomodify byte*) SPRITES_COLS = (byte*)(number) $d027 +(const nomodify byte*) SPRITES_COLOR = (byte*)(number) $d027 (const nomodify byte*) SPRITES_ENABLE = (byte*)(number) $d015 (const nomodify byte*) SPRITES_EXPAND_X = (byte*)(number) $d01d (const nomodify byte*) SPRITES_EXPAND_Y = (byte*)(number) $d017 @@ -465,7 +465,7 @@ Adding number conversion cast (unumber) $64 in *((const nomodify byte*) SPRITES_ Adding number conversion cast (unumber) 0 in *((const nomodify byte*) SPRITES_XPOS + (number) 0) ← ((unumber)) (number) $64 Adding number conversion cast (unumber) $64 in *((const nomodify byte*) SPRITES_YPOS + (number) 0) ← (number) $64 Adding number conversion cast (unumber) 0 in *((const nomodify byte*) SPRITES_YPOS + (number) 0) ← ((unumber)) (number) $64 -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) SPRITES_COLS + (number) 0) ← (const nomodify byte) WHITE +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) SPRITES_COLOR + (number) 0) ← (const nomodify byte) WHITE Adding number conversion cast (unumber) $40 in *((const nomodify byte*) SPRITES_PTR + (number) 0) ← (byte)(const nomodify byte*) SPRITE/(number) $40 Adding number conversion cast (unumber) 0 in *((const nomodify byte*) SPRITES_PTR + (number) 0) ← (byte)(const nomodify byte*) SPRITE/(unumber)(number) $40 Adding number conversion cast (unumber) $3e8 in (bool~) init::$0 ← (byte*) init::sc#2 != (const nomodify byte*) SCREEN+(number) $3e8 @@ -653,7 +653,7 @@ Resolved ranged next value [25] init::i#1 ← ++ init::i#2 to ++ Resolved ranged comparison value [27] if(init::i#1!=rangelast(0,$3f)) goto init::@4 to (number) $40 Simplifying expression containing zero SPRITES_XPOS in [12] *((const nomodify byte*) SPRITES_XPOS + (byte) 0) ← (byte) $64 Simplifying expression containing zero SPRITES_YPOS in [13] *((const nomodify byte*) SPRITES_YPOS + (byte) 0) ← (byte) $64 -Simplifying expression containing zero SPRITES_COLS in [14] *((const nomodify byte*) SPRITES_COLS + (byte) 0) ← (const nomodify byte) WHITE +Simplifying expression containing zero SPRITES_COLOR in [14] *((const nomodify byte*) SPRITES_COLOR + (byte) 0) ← (const nomodify byte) WHITE Simplifying expression containing zero SPRITES_PTR in [15] *((const nomodify byte*) SPRITES_PTR + (byte) 0) ← (byte)(const nomodify byte*) SPRITE/(byte) $40 Simplifying expression containing zero SPRITES_XPOS in [44] *((const nomodify byte*) SPRITES_XPOS + (byte) 0) ← (byte)(signed word) anim::sprite_x#0 Simplifying expression containing zero SPRITES_YPOS in [45] *((const nomodify byte*) SPRITES_YPOS + (byte) 0) ← (byte)(signed word) anim::sprite_y#0 @@ -820,7 +820,7 @@ init: scope:[init] from main [32] *((const nomodify byte*) SPRITES_EXPAND_Y) ← (byte) 0 [33] *((const nomodify byte*) SPRITES_XPOS) ← (byte) $64 [34] *((const nomodify byte*) SPRITES_YPOS) ← (byte) $64 - [35] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) WHITE + [35] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) WHITE [36] *((const nomodify byte*) SPRITES_PTR) ← (byte)(const nomodify byte*) SPRITE/(byte) $40 to:init::@1 init::@1: scope:[init] from init init::@2 @@ -1018,7 +1018,7 @@ Target platform is c64basic / MOS6502X .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_EXPAND_X = $d01d @@ -1306,9 +1306,9 @@ init: { // [34] *((const nomodify byte*) SPRITES_YPOS) ← (byte) $64 -- _deref_pbuc1=vbuc2 lda #$64 sta SPRITES_YPOS - // [35] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [35] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta SPRITES_COLS + sta SPRITES_COLOR // [36] *((const nomodify byte*) SPRITES_PTR) ← (byte)(const nomodify byte*) SPRITE/(byte) $40 -- _deref_pbuc1=vbuc2 lda #SPRITE/$40 sta SPRITES_PTR @@ -1395,7 +1395,7 @@ Statement [31] *((const nomodify byte*) SPRITES_EXPAND_X) ← (byte) 0 [ ] ( mai Statement [32] *((const nomodify byte*) SPRITES_EXPAND_Y) ← (byte) 0 [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a Statement [33] *((const nomodify byte*) SPRITES_XPOS) ← (byte) $64 [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a Statement [34] *((const nomodify byte*) SPRITES_YPOS) ← (byte) $64 [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a -Statement [35] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) WHITE [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a +Statement [35] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) WHITE [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a Statement [36] *((const nomodify byte*) SPRITES_PTR) ← (byte)(const nomodify byte*) SPRITE/(byte) $40 [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a Statement [38] if((byte*) init::sc#2!=(const nomodify byte*) SCREEN+(word) $3e8) goto init::@2 [ init::sc#2 ] ( main:2::init:5 [ init::sc#2 ] { } ) always clobbers reg byte a Statement [40] *((const nomodify byte*) SPRITE + (byte) init::i#2) ← (byte) $ff [ init::i#2 ] ( main:2::init:5 [ init::i#2 ] { } ) always clobbers reg byte a @@ -1421,7 +1421,7 @@ Statement [31] *((const nomodify byte*) SPRITES_EXPAND_X) ← (byte) 0 [ ] ( mai Statement [32] *((const nomodify byte*) SPRITES_EXPAND_Y) ← (byte) 0 [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a Statement [33] *((const nomodify byte*) SPRITES_XPOS) ← (byte) $64 [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a Statement [34] *((const nomodify byte*) SPRITES_YPOS) ← (byte) $64 [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a -Statement [35] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) WHITE [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a +Statement [35] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) WHITE [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a Statement [36] *((const nomodify byte*) SPRITES_PTR) ← (byte)(const nomodify byte*) SPRITE/(byte) $40 [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a Statement [38] if((byte*) init::sc#2!=(const nomodify byte*) SCREEN+(word) $3e8) goto init::@2 [ init::sc#2 ] ( main:2::init:5 [ init::sc#2 ] { } ) always clobbers reg byte a Statement [40] *((const nomodify byte*) SPRITE + (byte) init::i#2) ← (byte) $ff [ init::i#2 ] ( main:2::init:5 [ init::i#2 ] { } ) always clobbers reg byte a @@ -1473,7 +1473,7 @@ ASSEMBLER BEFORE OPTIMIZATION .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_EXPAND_X = $d01d @@ -1757,9 +1757,9 @@ init: { // [34] *((const nomodify byte*) SPRITES_YPOS) ← (byte) $64 -- _deref_pbuc1=vbuc2 lda #$64 sta SPRITES_YPOS - // [35] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // [35] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta SPRITES_COLS + sta SPRITES_COLOR // [36] *((const nomodify byte*) SPRITES_PTR) ← (byte)(const nomodify byte*) SPRITE/(byte) $40 -- _deref_pbuc1=vbuc2 lda #SPRITE/$40 sta SPRITES_PTR @@ -1977,7 +1977,7 @@ FINAL SYMBOL TABLE (const nomodify byte*) RASTER = (byte*) 53266 (const nomodify byte*) SCREEN = (byte*) 1024 (const nomodify byte*) SPRITE = (byte*) 8192 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_ENABLE = (byte*) 53269 (const nomodify byte*) SPRITES_EXPAND_X = (byte*) 53277 (const nomodify byte*) SPRITES_EXPAND_Y = (byte*) 53271 @@ -2062,7 +2062,7 @@ Score: 6373 .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 .label SPRITES_XMSB = $d010 - .label SPRITES_COLS = $d027 + .label SPRITES_COLOR = $d027 .label SPRITES_ENABLE = $d015 .label SPRITES_EXPAND_Y = $d017 .label SPRITES_EXPAND_X = $d01d @@ -2330,10 +2330,10 @@ init: { // SPRITES_YPOS[0] = 100 // [34] *((const nomodify byte*) SPRITES_YPOS) ← (byte) $64 -- _deref_pbuc1=vbuc2 sta SPRITES_YPOS - // SPRITES_COLS[0] = WHITE - // [35] *((const nomodify byte*) SPRITES_COLS) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 + // SPRITES_COLOR[0] = WHITE + // [35] *((const nomodify byte*) SPRITES_COLOR) ← (const nomodify byte) WHITE -- _deref_pbuc1=vbuc2 lda #WHITE - sta SPRITES_COLS + sta SPRITES_COLOR // SPRITES_PTR[0] = (byte)(SPRITE/$40) // [36] *((const nomodify byte*) SPRITES_PTR) ← (byte)(const nomodify byte*) SPRITE/(byte) $40 -- _deref_pbuc1=vbuc2 lda #SPRITE/$40 diff --git a/src/test/ref/signed-words.sym b/src/test/ref/signed-words.sym index 1b0ad4473..2d9cc8522 100644 --- a/src/test/ref/signed-words.sym +++ b/src/test/ref/signed-words.sym @@ -88,7 +88,7 @@ (const nomodify byte*) RASTER = (byte*) 53266 (const nomodify byte*) SCREEN = (byte*) 1024 (const nomodify byte*) SPRITE = (byte*) 8192 -(const nomodify byte*) SPRITES_COLS = (byte*) 53287 +(const nomodify byte*) SPRITES_COLOR = (byte*) 53287 (const nomodify byte*) SPRITES_ENABLE = (byte*) 53269 (const nomodify byte*) SPRITES_EXPAND_X = (byte*) 53277 (const nomodify byte*) SPRITES_EXPAND_Y = (byte*) 53271 diff --git a/src/test/ref/struct-pointer-to-member-2.asm b/src/test/ref/struct-pointer-to-member-2.asm index 32afa8b90..500f0413b 100644 --- a/src/test/ref/struct-pointer-to-member-2.asm +++ b/src/test/ref/struct-pointer-to-member-2.asm @@ -5,16 +5,16 @@ .const OFFSET_STRUCT_SCREEN_COLORS_BG0 = 1 .const SIZEOF_STRUCT_SCREEN_COLORS = 5 // The border color - .label BORDERCOL = COLORS + .label BORDER_COLOR = COLORS // The background color - .label BGCOL = COLORS+OFFSET_STRUCT_SCREEN_COLORS_BG0 + .label BG_COLOR = COLORS+OFFSET_STRUCT_SCREEN_COLORS_BG0 main: { - // *BORDERCOL = 0 + // *BORDER_COLOR = 0 lda #0 - sta BORDERCOL - // *BGCOL = 6 + sta BORDER_COLOR + // *BG_COLOR = 6 lda #6 - sta BGCOL + sta BG_COLOR // } rts } diff --git a/src/test/ref/struct-pointer-to-member-2.cfg b/src/test/ref/struct-pointer-to-member-2.cfg index 26c327ec3..84ffd3ce5 100644 --- a/src/test/ref/struct-pointer-to-member-2.cfg +++ b/src/test/ref/struct-pointer-to-member-2.cfg @@ -10,8 +10,8 @@ (void()) main() main: scope:[main] from @1 - [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 - [5] *((const nomodify byte*) BGCOL) ← (byte) 6 + [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 + [5] *((const nomodify byte*) BG_COLOR) ← (byte) 6 to:main::@return main::@return: scope:[main] from main [6] return diff --git a/src/test/ref/struct-pointer-to-member-2.log b/src/test/ref/struct-pointer-to-member-2.log index 985c1ae99..6eb2592c8 100644 --- a/src/test/ref/struct-pointer-to-member-2.log +++ b/src/test/ref/struct-pointer-to-member-2.log @@ -7,8 +7,8 @@ CONTROL FLOW GRAPH SSA (void()) main() main: scope:[main] from @1 - *((const nomodify byte*) BORDERCOL) ← (number) 0 - *((const nomodify byte*) BGCOL) ← (number) 6 + *((const nomodify byte*) BORDER_COLOR) ← (number) 0 + *((const nomodify byte*) BG_COLOR) ← (number) 6 to:main::@return main::@return: scope:[main] from main return @@ -25,8 +25,8 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(byte*)&(struct SCREEN_COLORS) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 -(const nomodify byte*) BORDERCOL = (byte*)(byte*)&(struct SCREEN_COLORS) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BORDER +(const nomodify byte*) BG_COLOR = (byte*)(byte*)&(struct SCREEN_COLORS) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 +(const nomodify byte*) BORDER_COLOR = (byte*)(byte*)&(struct SCREEN_COLORS) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BORDER (struct SCREEN_COLORS) COLORS loadstore = {} (const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 = (byte) 1 (const byte) OFFSET_STRUCT_SCREEN_COLORS_BORDER = (byte) 0 @@ -38,11 +38,11 @@ SYMBOL TABLE SSA (void()) main() (label) main::@return -Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDERCOL) ← (number) 0 -Adding number conversion cast (unumber) 6 in *((const nomodify byte*) BGCOL) ← (number) 6 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0 +Adding number conversion cast (unumber) 6 in *((const nomodify byte*) BG_COLOR) ← (number) 6 Successful SSA optimization PassNAddNumberTypeConversions -Inlining cast *((const nomodify byte*) BORDERCOL) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BGCOL) ← (unumber)(number) 6 +Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) BG_COLOR) ← (unumber)(number) 6 Successful SSA optimization Pass2InlineCast Simplifying constant integer cast (byte*)&(struct SCREEN_COLORS) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BORDER Simplifying constant integer cast (byte*)&(struct SCREEN_COLORS) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 @@ -83,8 +83,8 @@ FINAL CONTROL FLOW GRAPH (void()) main() main: scope:[main] from @1 - [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 - [5] *((const nomodify byte*) BGCOL) ← (byte) 6 + [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 + [5] *((const nomodify byte*) BG_COLOR) ← (byte) 6 to:main::@return main::@return: scope:[main] from main [6] return @@ -117,9 +117,9 @@ Target platform is c64basic / MOS6502X // Global Constants & labels .const OFFSET_STRUCT_SCREEN_COLORS_BG0 = 1 // The border color - .label BORDERCOL = COLORS + .label BORDER_COLOR = COLORS // The background color - .label BGCOL = COLORS+OFFSET_STRUCT_SCREEN_COLORS_BG0 + .label BG_COLOR = COLORS+OFFSET_STRUCT_SCREEN_COLORS_BG0 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -136,12 +136,12 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL - // [5] *((const nomodify byte*) BGCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [5] *((const nomodify byte*) BG_COLOR) ← (byte) 6 -- _deref_pbuc1=vbuc2 lda #6 - sta BGCOL + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -153,8 +153,8 @@ main: { COLORS: .fill SIZEOF_STRUCT_SCREEN_COLORS, 0 REGISTER UPLIFT POTENTIAL REGISTERS -Statement [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [5] *((const nomodify byte*) BGCOL) ← (byte) 6 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [5] *((const nomodify byte*) BG_COLOR) ← (byte) 6 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Potential registers mem[5] [ COLORS ] : mem[5] , REGISTER UPLIFT SCOPES @@ -177,9 +177,9 @@ ASSEMBLER BEFORE OPTIMIZATION .const OFFSET_STRUCT_SCREEN_COLORS_BG0 = 1 .const SIZEOF_STRUCT_SCREEN_COLORS = 5 // The border color - .label BORDERCOL = COLORS + .label BORDER_COLOR = COLORS // The background color - .label BGCOL = COLORS+OFFSET_STRUCT_SCREEN_COLORS_BG0 + .label BG_COLOR = COLORS+OFFSET_STRUCT_SCREEN_COLORS_BG0 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -196,12 +196,12 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL - // [5] *((const nomodify byte*) BGCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // [5] *((const nomodify byte*) BG_COLOR) ← (byte) 6 -- _deref_pbuc1=vbuc2 lda #6 - sta BGCOL + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -234,8 +234,8 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)&(struct SCREEN_COLORS) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 -(const nomodify byte*) BORDERCOL = (byte*)&(struct SCREEN_COLORS) COLORS +(const nomodify byte*) BG_COLOR = (byte*)&(struct SCREEN_COLORS) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 +(const nomodify byte*) BORDER_COLOR = (byte*)&(struct SCREEN_COLORS) COLORS (struct SCREEN_COLORS) COLORS loadstore mem[5] = {} (const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 = (byte) 1 (byte) SCREEN_COLORS::BG0 @@ -263,9 +263,9 @@ Score: 18 .const OFFSET_STRUCT_SCREEN_COLORS_BG0 = 1 .const SIZEOF_STRUCT_SCREEN_COLORS = 5 // The border color - .label BORDERCOL = COLORS + .label BORDER_COLOR = COLORS // The background color - .label BGCOL = COLORS+OFFSET_STRUCT_SCREEN_COLORS_BG0 + .label BG_COLOR = COLORS+OFFSET_STRUCT_SCREEN_COLORS_BG0 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] // @1 @@ -274,14 +274,14 @@ Score: 18 // @end // main main: { - // *BORDERCOL = 0 - // [4] *((const nomodify byte*) BORDERCOL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // *BORDER_COLOR = 0 + // [4] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 - sta BORDERCOL - // *BGCOL = 6 - // [5] *((const nomodify byte*) BGCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 + sta BORDER_COLOR + // *BG_COLOR = 6 + // [5] *((const nomodify byte*) BG_COLOR) ← (byte) 6 -- _deref_pbuc1=vbuc2 lda #6 - sta BGCOL + sta BG_COLOR // main::@return // } // [6] return diff --git a/src/test/ref/struct-pointer-to-member-2.sym b/src/test/ref/struct-pointer-to-member-2.sym index e93b7f9fa..0cb3eeacc 100644 --- a/src/test/ref/struct-pointer-to-member-2.sym +++ b/src/test/ref/struct-pointer-to-member-2.sym @@ -1,8 +1,8 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)&(struct SCREEN_COLORS) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 -(const nomodify byte*) BORDERCOL = (byte*)&(struct SCREEN_COLORS) COLORS +(const nomodify byte*) BG_COLOR = (byte*)&(struct SCREEN_COLORS) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 +(const nomodify byte*) BORDER_COLOR = (byte*)&(struct SCREEN_COLORS) COLORS (struct SCREEN_COLORS) COLORS loadstore mem[5] = {} (const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 = (byte) 1 (byte) SCREEN_COLORS::BG0 diff --git a/src/test/ref/struct-pointer-to-member.asm b/src/test/ref/struct-pointer-to-member.asm index 868831b79..3cc777d7a 100644 --- a/src/test/ref/struct-pointer-to-member.asm +++ b/src/test/ref/struct-pointer-to-member.asm @@ -6,14 +6,14 @@ // Commodore 64 processor port .label COLORS = $d020 // The background color - .label BGCOL = COLORS+OFFSET_STRUCT_SCREEN_COLORS_BG0 + .label BG_COLOR = COLORS+OFFSET_STRUCT_SCREEN_COLORS_BG0 main: { // COLORS->BORDER = 0 lda #0 sta COLORS - // *BGCOL = 6 + // *BG_COLOR = 6 lda #6 - sta BGCOL + sta BG_COLOR // } rts } diff --git a/src/test/ref/struct-pointer-to-member.cfg b/src/test/ref/struct-pointer-to-member.cfg index 3069db6b4..c91c88027 100644 --- a/src/test/ref/struct-pointer-to-member.cfg +++ b/src/test/ref/struct-pointer-to-member.cfg @@ -11,7 +11,7 @@ (void()) main() main: scope:[main] from @1 [4] *((byte*)(const nomodify struct SCREEN_COLORS*) COLORS) ← (byte) 0 - [5] *((const nomodify byte*) BGCOL) ← (byte) 6 + [5] *((const nomodify byte*) BG_COLOR) ← (byte) 6 to:main::@return main::@return: scope:[main] from main [6] return diff --git a/src/test/ref/struct-pointer-to-member.log b/src/test/ref/struct-pointer-to-member.log index 088b8da90..b5f76bd74 100644 --- a/src/test/ref/struct-pointer-to-member.log +++ b/src/test/ref/struct-pointer-to-member.log @@ -6,7 +6,7 @@ CONTROL FLOW GRAPH SSA (void()) main() main: scope:[main] from @1 *((byte*)(const nomodify struct SCREEN_COLORS*) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BORDER) ← (number) 0 - *((const nomodify byte*) BGCOL) ← (number) 6 + *((const nomodify byte*) BG_COLOR) ← (number) 6 to:main::@return main::@return: scope:[main] from main return @@ -23,7 +23,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(byte*)(const nomodify struct SCREEN_COLORS*) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 +(const nomodify byte*) BG_COLOR = (byte*)(byte*)(const nomodify struct SCREEN_COLORS*) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 (const nomodify struct SCREEN_COLORS*) COLORS = (struct SCREEN_COLORS*)(number) $d020 (const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 = (byte) 1 (const byte) OFFSET_STRUCT_SCREEN_COLORS_BORDER = (byte) 0 @@ -36,10 +36,10 @@ SYMBOL TABLE SSA (label) main::@return Adding number conversion cast (unumber) 0 in *((byte*)(const nomodify struct SCREEN_COLORS*) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BORDER) ← (number) 0 -Adding number conversion cast (unumber) 6 in *((const nomodify byte*) BGCOL) ← (number) 6 +Adding number conversion cast (unumber) 6 in *((const nomodify byte*) BG_COLOR) ← (number) 6 Successful SSA optimization PassNAddNumberTypeConversions Inlining cast *((byte*)(const nomodify struct SCREEN_COLORS*) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BORDER) ← (unumber)(number) 0 -Inlining cast *((const nomodify byte*) BGCOL) ← (unumber)(number) 6 +Inlining cast *((const nomodify byte*) BG_COLOR) ← (unumber)(number) 6 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (struct SCREEN_COLORS*) 53280 Simplifying constant integer cast (byte*)(const nomodify struct SCREEN_COLORS*) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 @@ -81,7 +81,7 @@ FINAL CONTROL FLOW GRAPH (void()) main() main: scope:[main] from @1 [4] *((byte*)(const nomodify struct SCREEN_COLORS*) COLORS) ← (byte) 0 - [5] *((const nomodify byte*) BGCOL) ← (byte) 6 + [5] *((const nomodify byte*) BG_COLOR) ← (byte) 6 to:main::@return main::@return: scope:[main] from main [6] return @@ -112,7 +112,7 @@ Target platform is c64basic / MOS6502X // Commodore 64 processor port .label COLORS = $d020 // The background color - .label BGCOL = COLORS+OFFSET_STRUCT_SCREEN_COLORS_BG0 + .label BG_COLOR = COLORS+OFFSET_STRUCT_SCREEN_COLORS_BG0 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -132,9 +132,9 @@ main: { // [4] *((byte*)(const nomodify struct SCREEN_COLORS*) COLORS) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta COLORS - // [5] *((const nomodify byte*) BGCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 + // [5] *((const nomodify byte*) BG_COLOR) ← (byte) 6 -- _deref_pbuc1=vbuc2 lda #6 - sta BGCOL + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -145,7 +145,7 @@ main: { REGISTER UPLIFT POTENTIAL REGISTERS Statement [4] *((byte*)(const nomodify struct SCREEN_COLORS*) COLORS) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [5] *((const nomodify byte*) BGCOL) ← (byte) 6 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [5] *((const nomodify byte*) BG_COLOR) ← (byte) 6 [ ] ( main:2 [ ] { } ) always clobbers reg byte a REGISTER UPLIFT SCOPES Uplift Scope [SCREEN_COLORS] @@ -168,7 +168,7 @@ ASSEMBLER BEFORE OPTIMIZATION // Commodore 64 processor port .label COLORS = $d020 // The background color - .label BGCOL = COLORS+OFFSET_STRUCT_SCREEN_COLORS_BG0 + .label BG_COLOR = COLORS+OFFSET_STRUCT_SCREEN_COLORS_BG0 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -188,9 +188,9 @@ main: { // [4] *((byte*)(const nomodify struct SCREEN_COLORS*) COLORS) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta COLORS - // [5] *((const nomodify byte*) BGCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 + // [5] *((const nomodify byte*) BG_COLOR) ← (byte) 6 -- _deref_pbuc1=vbuc2 lda #6 - sta BGCOL + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -221,7 +221,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(const nomodify struct SCREEN_COLORS*) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 +(const nomodify byte*) BG_COLOR = (byte*)(const nomodify struct SCREEN_COLORS*) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 (const nomodify struct SCREEN_COLORS*) COLORS = (struct SCREEN_COLORS*) 53280 (const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 = (byte) 1 (byte) SCREEN_COLORS::BG0 @@ -248,7 +248,7 @@ Score: 18 // Commodore 64 processor port .label COLORS = $d020 // The background color - .label BGCOL = COLORS+OFFSET_STRUCT_SCREEN_COLORS_BG0 + .label BG_COLOR = COLORS+OFFSET_STRUCT_SCREEN_COLORS_BG0 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] // @1 @@ -261,10 +261,10 @@ main: { // [4] *((byte*)(const nomodify struct SCREEN_COLORS*) COLORS) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta COLORS - // *BGCOL = 6 - // [5] *((const nomodify byte*) BGCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 6 + // [5] *((const nomodify byte*) BG_COLOR) ← (byte) 6 -- _deref_pbuc1=vbuc2 lda #6 - sta BGCOL + sta BG_COLOR // main::@return // } // [6] return diff --git a/src/test/ref/struct-pointer-to-member.sym b/src/test/ref/struct-pointer-to-member.sym index 124f81d1b..7d4780cd3 100644 --- a/src/test/ref/struct-pointer-to-member.sym +++ b/src/test/ref/struct-pointer-to-member.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(const nomodify struct SCREEN_COLORS*) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 +(const nomodify byte*) BG_COLOR = (byte*)(const nomodify struct SCREEN_COLORS*) COLORS+(const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 (const nomodify struct SCREEN_COLORS*) COLORS = (struct SCREEN_COLORS*) 53280 (const byte) OFFSET_STRUCT_SCREEN_COLORS_BG0 = (byte) 1 (byte) SCREEN_COLORS::BG0 diff --git a/src/test/ref/test-interrupt-notype.asm b/src/test/ref/test-interrupt-notype.asm index c2673359f..0bf909fc3 100644 --- a/src/test/ref/test-interrupt-notype.asm +++ b/src/test/ref/test-interrupt-notype.asm @@ -2,7 +2,7 @@ :BasicUpstart(main) .pc = $80d "Program" .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 main: { // *KERNEL_IRQ = &irq @@ -16,8 +16,8 @@ main: { jmp __b1 } irq: { - // (*BGCOL)++; - inc BGCOL + // (*BG_COLOR)++; + inc BG_COLOR // asm lda $dc0d // } diff --git a/src/test/ref/test-interrupt-notype.cfg b/src/test/ref/test-interrupt-notype.cfg index 1dbf4aae9..350224cc5 100644 --- a/src/test/ref/test-interrupt-notype.cfg +++ b/src/test/ref/test-interrupt-notype.cfg @@ -18,7 +18,7 @@ main::@1: scope:[main] from main main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from - [6] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + [6] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) asm { lda$dc0d } to:irq::@return irq::@return: scope:[irq] from irq diff --git a/src/test/ref/test-interrupt-notype.log b/src/test/ref/test-interrupt-notype.log index 2b79c0af9..f220267fd 100644 --- a/src/test/ref/test-interrupt-notype.log +++ b/src/test/ref/test-interrupt-notype.log @@ -20,7 +20,7 @@ main::@return: scope:[main] from main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from - *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) asm { lda$dc0d } to:irq::@return irq::@return: scope:[irq] from irq @@ -38,7 +38,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d020 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d020 (const nomodify byte*) FGCOL = (byte*)(number) $d021 (const nomodify void()**) KERNEL_IRQ = (void()**)(number) $314 interrupt(KERNEL_MIN)(void()) irq() @@ -94,7 +94,7 @@ main::@1: scope:[main] from main main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from - [6] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + [6] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) asm { lda$dc0d } to:irq::@return irq::@return: scope:[irq] from irq @@ -118,7 +118,7 @@ Target platform is c64basic / MOS6502X .pc = $80d "Program" // Global Constants & labels .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 // @begin __bbegin: @@ -151,8 +151,8 @@ main: { // irq irq: { // entry interrupt(KERNEL_MIN) - // [6] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [6] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // asm { lda$dc0d } lda $dc0d jmp __breturn @@ -184,7 +184,7 @@ ASSEMBLER BEFORE OPTIMIZATION .pc = $80d "Program" // Global Constants & labels .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 // @begin __bbegin: @@ -217,8 +217,8 @@ main: { // irq irq: { // entry interrupt(KERNEL_MIN) - // [6] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [6] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // asm { lda$dc0d } lda $dc0d jmp __breturn @@ -252,7 +252,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte*) FGCOL = (byte*) 53281 (const nomodify void()**) KERNEL_IRQ = (void()**) 788 interrupt(KERNEL_MIN)(void()) irq() @@ -272,7 +272,7 @@ Score: 115 .pc = $80d "Program" // Global Constants & labels .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] @@ -298,9 +298,9 @@ main: { // irq irq: { // entry interrupt(KERNEL_MIN) - // (*BGCOL)++; - // [6] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // (*BG_COLOR)++; + // [6] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // asm // asm { lda$dc0d } lda $dc0d diff --git a/src/test/ref/test-interrupt-notype.sym b/src/test/ref/test-interrupt-notype.sym index 40f779cd1..af782adbc 100644 --- a/src/test/ref/test-interrupt-notype.sym +++ b/src/test/ref/test-interrupt-notype.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte*) FGCOL = (byte*) 53281 (const nomodify void()**) KERNEL_IRQ = (void()**) 788 interrupt(KERNEL_MIN)(void()) irq() diff --git a/src/test/ref/test-interrupt-volatile-write.asm b/src/test/ref/test-interrupt-volatile-write.asm index 6d492d83b..f7fcbb141 100644 --- a/src/test/ref/test-interrupt-volatile-write.asm +++ b/src/test/ref/test-interrupt-volatile-write.asm @@ -4,7 +4,7 @@ :BasicUpstart(__bbegin) .pc = $80d "Program" .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label col = 2 __bbegin: // col = 0 @@ -31,9 +31,9 @@ main: { irq: { // asm lda $dc0d - // *BGCOL = col + // *BG_COLOR = col lda.z col - sta BGCOL + sta BG_COLOR // if(col!=0) lda.z col cmp #0 diff --git a/src/test/ref/test-interrupt-volatile-write.cfg b/src/test/ref/test-interrupt-volatile-write.cfg index ecd146093..dc98a18d4 100644 --- a/src/test/ref/test-interrupt-volatile-write.cfg +++ b/src/test/ref/test-interrupt-volatile-write.cfg @@ -22,7 +22,7 @@ main::@2: scope:[main] from main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from asm { lda$dc0d } - [8] *((const nomodify byte*) BGCOL) ← (volatile byte) col + [8] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col [9] if((volatile byte) col!=(byte) 0) goto irq::@1 to:irq::@2 irq::@2: scope:[irq] from irq diff --git a/src/test/ref/test-interrupt-volatile-write.log b/src/test/ref/test-interrupt-volatile-write.log index d493b70a7..577f9e0b7 100644 --- a/src/test/ref/test-interrupt-volatile-write.log +++ b/src/test/ref/test-interrupt-volatile-write.log @@ -27,7 +27,7 @@ main::@return: scope:[main] from main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from asm { lda$dc0d } - *((const nomodify byte*) BGCOL) ← (volatile byte) col + *((const nomodify byte*) BG_COLOR) ← (volatile byte) col (bool~) irq::$0 ← (volatile byte) col != (number) 0 if((bool~) irq::$0) goto irq::@1 to:irq::@2 @@ -52,7 +52,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d020 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d020 (const nomodify void()**) KERNEL_IRQ = (void()**)(number) $314 (volatile byte) col loadstore interrupt(KERNEL_MIN)(void()) irq() @@ -146,7 +146,7 @@ main::@2: scope:[main] from main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from asm { lda$dc0d } - [8] *((const nomodify byte*) BGCOL) ← (volatile byte) col + [8] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col [9] if((volatile byte) col!=(byte) 0) goto irq::@1 to:irq::@2 irq::@2: scope:[irq] from irq @@ -182,7 +182,7 @@ Target platform is c64basic / MOS6502X .pc = $80d "Program" // Global Constants & labels .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label col = 2 // @begin __bbegin: @@ -228,9 +228,9 @@ irq: { // entry interrupt(KERNEL_MIN) // asm { lda$dc0d } lda $dc0d - // [8] *((const nomodify byte*) BGCOL) ← (volatile byte) col -- _deref_pbuc1=vbuz1 + // [8] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col -- _deref_pbuc1=vbuz1 lda.z col - sta BGCOL + sta BG_COLOR // [9] if((volatile byte) col!=(byte) 0) goto irq::@1 -- vbuz1_neq_0_then_la1 lda.z col cmp #0 @@ -262,7 +262,7 @@ Statement [4] *((const nomodify void()**) KERNEL_IRQ) ← &interrupt(KERNEL_MIN) Statement [5] if((volatile byte) col<(byte) $a+(byte) 1) goto main::@1 [ col ] ( main:2 [ col ] { } ) always clobbers reg byte a Statement [6] (volatile byte) col ← (byte) 0 [ col ] ( main:2 [ col ] { } ) always clobbers reg byte a Statement asm { lda$dc0d } always clobbers reg byte a -Statement [8] *((const nomodify byte*) BGCOL) ← (volatile byte) col [ col ] ( [ col ] { } ) always clobbers reg byte a +Statement [8] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col [ col ] ( [ col ] { } ) always clobbers reg byte a Statement [9] if((volatile byte) col!=(byte) 0) goto irq::@1 [ col ] ( [ col ] { } ) always clobbers reg byte a Statement [10] (volatile byte) col ← (volatile byte) col + (byte) 2 [ ] ( [ ] { } ) always clobbers reg byte a Potential registers zp[1]:2 [ col ] : zp[1]:2 , @@ -288,7 +288,7 @@ ASSEMBLER BEFORE OPTIMIZATION .pc = $80d "Program" // Global Constants & labels .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label col = 2 // @begin __bbegin: @@ -334,9 +334,9 @@ irq: { // entry interrupt(KERNEL_MIN) // asm { lda$dc0d } lda $dc0d - // [8] *((const nomodify byte*) BGCOL) ← (volatile byte) col -- _deref_pbuc1=vbuz1 + // [8] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col -- _deref_pbuc1=vbuz1 lda.z col - sta BGCOL + sta BG_COLOR // [9] if((volatile byte) col!=(byte) 0) goto irq::@1 -- vbuz1_neq_0_then_la1 lda.z col cmp #0 @@ -391,7 +391,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify void()**) KERNEL_IRQ = (void()**) 788 (volatile byte) col loadstore zp[1]:2 139.5 interrupt(KERNEL_MIN)(void()) irq() @@ -417,7 +417,7 @@ Score: 895 .pc = $80d "Program" // Global Constants & labels .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label col = 2 // @begin __bbegin: @@ -460,10 +460,10 @@ irq: { // asm // asm { lda$dc0d } lda $dc0d - // *BGCOL = col - // [8] *((const nomodify byte*) BGCOL) ← (volatile byte) col -- _deref_pbuc1=vbuz1 + // *BG_COLOR = col + // [8] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col -- _deref_pbuc1=vbuz1 lda.z col - sta BGCOL + sta BG_COLOR // if(col!=0) // [9] if((volatile byte) col!=(byte) 0) goto irq::@1 -- vbuz1_neq_0_then_la1 lda.z col diff --git a/src/test/ref/test-interrupt-volatile-write.sym b/src/test/ref/test-interrupt-volatile-write.sym index 9125ada17..f7fb4ebc9 100644 --- a/src/test/ref/test-interrupt-volatile-write.sym +++ b/src/test/ref/test-interrupt-volatile-write.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify void()**) KERNEL_IRQ = (void()**) 788 (volatile byte) col loadstore zp[1]:2 139.5 interrupt(KERNEL_MIN)(void()) irq() diff --git a/src/test/ref/test-interrupt-volatile.asm b/src/test/ref/test-interrupt-volatile.asm index 506bfa91f..4f3624ecc 100644 --- a/src/test/ref/test-interrupt-volatile.asm +++ b/src/test/ref/test-interrupt-volatile.asm @@ -2,7 +2,7 @@ :BasicUpstart(__bbegin) .pc = $80d "Program" .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label col = 2 __bbegin: // col = 0 @@ -24,9 +24,9 @@ main: { irq: { // asm lda $dc0d - // *BGCOL = col + // *BG_COLOR = col lda.z col - sta BGCOL + sta BG_COLOR // } jmp $ea81 } diff --git a/src/test/ref/test-interrupt-volatile.cfg b/src/test/ref/test-interrupt-volatile.cfg index fbe10d182..79d13f11a 100644 --- a/src/test/ref/test-interrupt-volatile.cfg +++ b/src/test/ref/test-interrupt-volatile.cfg @@ -19,7 +19,7 @@ main::@1: scope:[main] from main main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from asm { lda$dc0d } - [7] *((const nomodify byte*) BGCOL) ← (volatile byte) col + [7] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col to:irq::@return irq::@return: scope:[irq] from irq [8] return diff --git a/src/test/ref/test-interrupt-volatile.log b/src/test/ref/test-interrupt-volatile.log index bc2f7aba9..df1c42a78 100644 --- a/src/test/ref/test-interrupt-volatile.log +++ b/src/test/ref/test-interrupt-volatile.log @@ -22,7 +22,7 @@ main::@return: scope:[main] from main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from asm { lda$dc0d } - *((const nomodify byte*) BGCOL) ← (volatile byte) col + *((const nomodify byte*) BG_COLOR) ← (volatile byte) col to:irq::@return irq::@return: scope:[irq] from irq return @@ -39,7 +39,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d020 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d020 (const nomodify void()**) KERNEL_IRQ = (void()**)(number) $314 (volatile byte) col loadstore interrupt(KERNEL_MIN)(void()) irq() @@ -93,7 +93,7 @@ main::@1: scope:[main] from main main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from asm { lda$dc0d } - [7] *((const nomodify byte*) BGCOL) ← (volatile byte) col + [7] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col to:irq::@return irq::@return: scope:[irq] from irq [8] return @@ -120,7 +120,7 @@ Target platform is c64basic / MOS6502X .pc = $80d "Program" // Global Constants & labels .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label col = 2 // @begin __bbegin: @@ -158,9 +158,9 @@ irq: { // entry interrupt(KERNEL_MIN) // asm { lda$dc0d } lda $dc0d - // [7] *((const nomodify byte*) BGCOL) ← (volatile byte) col -- _deref_pbuc1=vbuz1 + // [7] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col -- _deref_pbuc1=vbuz1 lda.z col - sta BGCOL + sta BG_COLOR jmp __breturn // irq::@return __breturn: @@ -173,7 +173,7 @@ REGISTER UPLIFT POTENTIAL REGISTERS Statement [0] (volatile byte) col ← (byte) 0 [ col ] ( [ col ] { } ) always clobbers reg byte a Statement [4] *((const nomodify void()**) KERNEL_IRQ) ← &interrupt(KERNEL_MIN)(void()) irq() [ col ] ( main:2 [ col ] { } ) always clobbers reg byte a Statement asm { lda$dc0d } always clobbers reg byte a -Statement [7] *((const nomodify byte*) BGCOL) ← (volatile byte) col [ ] ( [ ] { } ) always clobbers reg byte a +Statement [7] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col [ ] ( [ ] { } ) always clobbers reg byte a Potential registers zp[1]:2 [ col ] : zp[1]:2 , REGISTER UPLIFT SCOPES @@ -195,7 +195,7 @@ ASSEMBLER BEFORE OPTIMIZATION .pc = $80d "Program" // Global Constants & labels .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label col = 2 // @begin __bbegin: @@ -233,9 +233,9 @@ irq: { // entry interrupt(KERNEL_MIN) // asm { lda$dc0d } lda $dc0d - // [7] *((const nomodify byte*) BGCOL) ← (volatile byte) col -- _deref_pbuc1=vbuz1 + // [7] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col -- _deref_pbuc1=vbuz1 lda.z col - sta BGCOL + sta BG_COLOR jmp __breturn // irq::@return __breturn: @@ -264,7 +264,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify void()**) KERNEL_IRQ = (void()**) 788 (volatile byte) col loadstore zp[1]:2 41.199999999999996 interrupt(KERNEL_MIN)(void()) irq() @@ -285,7 +285,7 @@ Score: 123 .pc = $80d "Program" // Global Constants & labels .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label col = 2 // @begin __bbegin: @@ -321,10 +321,10 @@ irq: { // asm // asm { lda$dc0d } lda $dc0d - // *BGCOL = col - // [7] *((const nomodify byte*) BGCOL) ← (volatile byte) col -- _deref_pbuc1=vbuz1 + // *BG_COLOR = col + // [7] *((const nomodify byte*) BG_COLOR) ← (volatile byte) col -- _deref_pbuc1=vbuz1 lda.z col - sta BGCOL + sta BG_COLOR // irq::@return // } // [8] return - exit interrupt(KERNEL_MIN) diff --git a/src/test/ref/test-interrupt-volatile.sym b/src/test/ref/test-interrupt-volatile.sym index 477d75206..c95cb7dc2 100644 --- a/src/test/ref/test-interrupt-volatile.sym +++ b/src/test/ref/test-interrupt-volatile.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify void()**) KERNEL_IRQ = (void()**) 788 (volatile byte) col loadstore zp[1]:2 41.199999999999996 interrupt(KERNEL_MIN)(void()) irq() diff --git a/src/test/ref/test-interrupt.asm b/src/test/ref/test-interrupt.asm index c2673359f..0bf909fc3 100644 --- a/src/test/ref/test-interrupt.asm +++ b/src/test/ref/test-interrupt.asm @@ -2,7 +2,7 @@ :BasicUpstart(main) .pc = $80d "Program" .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 main: { // *KERNEL_IRQ = &irq @@ -16,8 +16,8 @@ main: { jmp __b1 } irq: { - // (*BGCOL)++; - inc BGCOL + // (*BG_COLOR)++; + inc BG_COLOR // asm lda $dc0d // } diff --git a/src/test/ref/test-interrupt.cfg b/src/test/ref/test-interrupt.cfg index 1dbf4aae9..350224cc5 100644 --- a/src/test/ref/test-interrupt.cfg +++ b/src/test/ref/test-interrupt.cfg @@ -18,7 +18,7 @@ main::@1: scope:[main] from main main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from - [6] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + [6] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) asm { lda$dc0d } to:irq::@return irq::@return: scope:[irq] from irq diff --git a/src/test/ref/test-interrupt.log b/src/test/ref/test-interrupt.log index 2b79c0af9..f220267fd 100644 --- a/src/test/ref/test-interrupt.log +++ b/src/test/ref/test-interrupt.log @@ -20,7 +20,7 @@ main::@return: scope:[main] from main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from - *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) asm { lda$dc0d } to:irq::@return irq::@return: scope:[irq] from irq @@ -38,7 +38,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d020 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d020 (const nomodify byte*) FGCOL = (byte*)(number) $d021 (const nomodify void()**) KERNEL_IRQ = (void()**)(number) $314 interrupt(KERNEL_MIN)(void()) irq() @@ -94,7 +94,7 @@ main::@1: scope:[main] from main main::@1 interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from - [6] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) + [6] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) asm { lda$dc0d } to:irq::@return irq::@return: scope:[irq] from irq @@ -118,7 +118,7 @@ Target platform is c64basic / MOS6502X .pc = $80d "Program" // Global Constants & labels .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 // @begin __bbegin: @@ -151,8 +151,8 @@ main: { // irq irq: { // entry interrupt(KERNEL_MIN) - // [6] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [6] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // asm { lda$dc0d } lda $dc0d jmp __breturn @@ -184,7 +184,7 @@ ASSEMBLER BEFORE OPTIMIZATION .pc = $80d "Program" // Global Constants & labels .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 // @begin __bbegin: @@ -217,8 +217,8 @@ main: { // irq irq: { // entry interrupt(KERNEL_MIN) - // [6] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // [6] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // asm { lda$dc0d } lda $dc0d jmp __breturn @@ -252,7 +252,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte*) FGCOL = (byte*) 53281 (const nomodify void()**) KERNEL_IRQ = (void()**) 788 interrupt(KERNEL_MIN)(void()) irq() @@ -272,7 +272,7 @@ Score: 115 .pc = $80d "Program" // Global Constants & labels .label KERNEL_IRQ = $314 - .label BGCOL = $d020 + .label BG_COLOR = $d020 .label FGCOL = $d021 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] @@ -298,9 +298,9 @@ main: { // irq irq: { // entry interrupt(KERNEL_MIN) - // (*BGCOL)++; - // [6] *((const nomodify byte*) BGCOL) ← ++ *((const nomodify byte*) BGCOL) -- _deref_pbuc1=_inc__deref_pbuc1 - inc BGCOL + // (*BG_COLOR)++; + // [6] *((const nomodify byte*) BG_COLOR) ← ++ *((const nomodify byte*) BG_COLOR) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BG_COLOR // asm // asm { lda$dc0d } lda $dc0d diff --git a/src/test/ref/test-interrupt.sym b/src/test/ref/test-interrupt.sym index 40f779cd1..af782adbc 100644 --- a/src/test/ref/test-interrupt.sym +++ b/src/test/ref/test-interrupt.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53280 +(const nomodify byte*) BG_COLOR = (byte*) 53280 (const nomodify byte*) FGCOL = (byte*) 53281 (const nomodify void()**) KERNEL_IRQ = (void()**) 788 interrupt(KERNEL_MIN)(void()) irq() diff --git a/src/test/ref/test-kasm-pc.asm b/src/test/ref/test-kasm-pc.asm index a8f96394d..fc88b1612 100644 --- a/src/test/ref/test-kasm-pc.asm +++ b/src/test/ref/test-kasm-pc.asm @@ -5,13 +5,13 @@ .label TABLE = $2000 // kickasm main: { - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 ldx #0 __b2: - // *BORDERCOL = TABLE[i++] + // *BORDER_COLOR = TABLE[i++] lda TABLE,x - sta BORDERCOL - // *BORDERCOL = TABLE[i++]; + sta BORDER_COLOR + // *BORDER_COLOR = TABLE[i++]; inx jmp __b2 } diff --git a/src/test/ref/test-kasm-pc.cfg b/src/test/ref/test-kasm-pc.cfg index d40962909..c5f363087 100644 --- a/src/test/ref/test-kasm-pc.cfg +++ b/src/test/ref/test-kasm-pc.cfg @@ -17,6 +17,6 @@ main::@1: scope:[main] from main main::@2 [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@2/(byte) main::i#1 ) to:main::@2 main::@2: scope:[main] from main::@1 - [6] *((const byte*) main::BORDERCOL) ← *((const byte*) TABLE + (byte) main::i#2) + [6] *((const byte*) main::BORDER_COLOR) ← *((const byte*) TABLE + (byte) main::i#2) [7] (byte) main::i#1 ← ++ (byte) main::i#2 to:main::@1 diff --git a/src/test/ref/test-kasm-pc.log b/src/test/ref/test-kasm-pc.log index aad130dab..ba97d4126 100644 --- a/src/test/ref/test-kasm-pc.log +++ b/src/test/ref/test-kasm-pc.log @@ -13,7 +13,7 @@ main::@1: scope:[main] from main main::@2 to:main::@return main::@2: scope:[main] from main::@1 (byte) main::i#2 ← phi( main::@1/(byte) main::i#3 ) - *((const byte*) main::BORDERCOL) ← *((const byte*) TABLE + (byte) main::i#2) + *((const byte*) main::BORDER_COLOR) ← *((const byte*) TABLE + (byte) main::i#2) (byte) main::i#1 ← ++ (byte) main::i#2 to:main::@1 main::@return: scope:[main] from main::@1 @@ -38,7 +38,7 @@ SYMBOL TABLE SSA (label) main::@1 (label) main::@2 (label) main::@return -(const byte*) main::BORDERCOL = (byte*)(number) $d020 +(const byte*) main::BORDER_COLOR = (byte*)(number) $d020 (byte) main::i (byte) main::i#0 (byte) main::i#1 @@ -94,7 +94,7 @@ main::@1: scope:[main] from main main::@2 [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@2/(byte) main::i#1 ) to:main::@2 main::@2: scope:[main] from main::@1 - [6] *((const byte*) main::BORDERCOL) ← *((const byte*) TABLE + (byte) main::i#2) + [6] *((const byte*) main::BORDER_COLOR) ← *((const byte*) TABLE + (byte) main::i#2) [7] (byte) main::i#1 ← ++ (byte) main::i#2 to:main::@1 @@ -138,7 +138,7 @@ __bend_from___b1: __bend: // main main: { - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 .label i = 2 // [5] phi from main to main::@1 [phi:main->main::@1] __b1_from_main: @@ -151,10 +151,10 @@ main: { jmp __b2 // main::@2 __b2: - // [6] *((const byte*) main::BORDERCOL) ← *((const byte*) TABLE + (byte) main::i#2) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [6] *((const byte*) main::BORDER_COLOR) ← *((const byte*) TABLE + (byte) main::i#2) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy.z i lda TABLE,y - sta BORDERCOL + sta BORDER_COLOR // [7] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 inc.z i // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] @@ -168,9 +168,9 @@ main: { REGISTER UPLIFT POTENTIAL REGISTERS -Statement [6] *((const byte*) main::BORDERCOL) ← *((const byte*) TABLE + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a +Statement [6] *((const byte*) main::BORDER_COLOR) ← *((const byte*) TABLE + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::i#2 main::i#1 ] -Statement [6] *((const byte*) main::BORDERCOL) ← *((const byte*) TABLE + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a +Statement [6] *((const byte*) main::BORDER_COLOR) ← *((const byte*) TABLE + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a Potential registers zp[1]:2 [ main::i#2 main::i#1 ] : zp[1]:2 , reg byte x , reg byte y , REGISTER UPLIFT SCOPES @@ -206,7 +206,7 @@ __bend_from___b1: __bend: // main main: { - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 // [5] phi from main to main::@1 [phi:main->main::@1] __b1_from_main: // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 @@ -217,9 +217,9 @@ main: { jmp __b2 // main::@2 __b2: - // [6] *((const byte*) main::BORDERCOL) ← *((const byte*) TABLE + (byte) main::i#2) -- _deref_pbuc1=pbuc2_derefidx_vbuxx + // [6] *((const byte*) main::BORDER_COLOR) ← *((const byte*) TABLE + (byte) main::i#2) -- _deref_pbuc1=pbuc2_derefidx_vbuxx lda TABLE,x - sta BORDERCOL + sta BORDER_COLOR // [7] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx inx // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] @@ -262,7 +262,7 @@ FINAL SYMBOL TABLE (void()) main() (label) main::@1 (label) main::@2 -(const byte*) main::BORDERCOL = (byte*) 53280 +(const byte*) main::BORDER_COLOR = (byte*) 53280 (byte) main::i (byte) main::i#1 reg byte x 202.0 (byte) main::i#2 reg byte x 151.5 @@ -291,18 +291,18 @@ Score: 2715 // @end // main main: { - .label BORDERCOL = $d020 + .label BORDER_COLOR = $d020 // [5] phi from main to main::@1 [phi:main->main::@1] // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 ldx #0 // main::@1 // main::@2 __b2: - // *BORDERCOL = TABLE[i++] - // [6] *((const byte*) main::BORDERCOL) ← *((const byte*) TABLE + (byte) main::i#2) -- _deref_pbuc1=pbuc2_derefidx_vbuxx + // *BORDER_COLOR = TABLE[i++] + // [6] *((const byte*) main::BORDER_COLOR) ← *((const byte*) TABLE + (byte) main::i#2) -- _deref_pbuc1=pbuc2_derefidx_vbuxx lda TABLE,x - sta BORDERCOL - // *BORDERCOL = TABLE[i++]; + sta BORDER_COLOR + // *BORDER_COLOR = TABLE[i++]; // [7] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx inx // [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1] diff --git a/src/test/ref/test-kasm-pc.sym b/src/test/ref/test-kasm-pc.sym index cf5edb0f0..9d9ea6094 100644 --- a/src/test/ref/test-kasm-pc.sym +++ b/src/test/ref/test-kasm-pc.sym @@ -5,7 +5,7 @@ (void()) main() (label) main::@1 (label) main::@2 -(const byte*) main::BORDERCOL = (byte*) 53280 +(const byte*) main::BORDER_COLOR = (byte*) 53280 (byte) main::i (byte) main::i#1 reg byte x 202.0 (byte) main::i#2 reg byte x 151.5 diff --git a/src/test/ref/test-keyboard-space.asm b/src/test/ref/test-keyboard-space.asm index 6a6a2ca89..c721e7423 100644 --- a/src/test/ref/test-keyboard-space.asm +++ b/src/test/ref/test-keyboard-space.asm @@ -9,7 +9,7 @@ .const OFFSET_STRUCT_MOS6526_CIA_PORT_B_DDR = 3 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 .label RASTER = $d012 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 main: { @@ -26,14 +26,14 @@ main: { // if(keyboard_key_pressed(KEY_SPACE)!=0) cmp #0 bne __b4 - // *BGCOL = BLUE + // *BG_COLOR = BLUE lda #BLUE - sta BGCOL + sta BG_COLOR jmp __b1 __b4: - // *BGCOL = GREEN + // *BG_COLOR = GREEN lda #GREEN - sta BGCOL + sta BG_COLOR jmp __b1 } // Determines whether a specific key is currently pressed by accessing the matrix directly diff --git a/src/test/ref/test-keyboard-space.cfg b/src/test/ref/test-keyboard-space.cfg index 407f09904..c63631ebc 100644 --- a/src/test/ref/test-keyboard-space.cfg +++ b/src/test/ref/test-keyboard-space.cfg @@ -26,10 +26,10 @@ main::@5: scope:[main] from main::@2 [11] if((byte~) main::$2!=(byte) 0) goto main::@4 to:main::@3 main::@3: scope:[main] from main::@5 - [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLUE + [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLUE to:main::@1 main::@4: scope:[main] from main::@5 - [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) GREEN + [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) GREEN to:main::@1 (byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) diff --git a/src/test/ref/test-keyboard-space.log b/src/test/ref/test-keyboard-space.log index 90179888e..31bc7d698 100644 --- a/src/test/ref/test-keyboard-space.log +++ b/src/test/ref/test-keyboard-space.log @@ -76,10 +76,10 @@ main::@7: scope:[main] from main::@3 if((bool~) main::$3) goto main::@5 to:main::@4 main::@5: scope:[main] from main::@7 - *((const nomodify byte*) BGCOL) ← (const nomodify byte) GREEN + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) GREEN to:main::@1 main::@4: scope:[main] from main::@7 - *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLUE + *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLUE to:main::@1 main::@return: scope:[main] from main::@1 return @@ -96,7 +96,7 @@ SYMBOL TABLE SSA (label) @2 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*)(number) $d021 +(const nomodify byte*) BG_COLOR = (byte*)(number) $d021 (const nomodify byte) BLUE = (byte) 6 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*)(number) $dc00 (const nomodify byte) GREEN = (byte) 5 @@ -368,10 +368,10 @@ main::@5: scope:[main] from main::@2 [11] if((byte~) main::$2!=(byte) 0) goto main::@4 to:main::@3 main::@3: scope:[main] from main::@5 - [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLUE + [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLUE to:main::@1 main::@4: scope:[main] from main::@5 - [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) GREEN + [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) GREEN to:main::@1 (byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) @@ -547,7 +547,7 @@ Target platform is c64basic / MOS6502X .const OFFSET_STRUCT_MOS6526_CIA_PORT_B_DDR = 3 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 .label RASTER = $d012 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 // @begin @@ -603,15 +603,15 @@ main: { jmp __b3 // main::@3 __b3: - // [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 + // [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 lda #BLUE - sta BGCOL + sta BG_COLOR jmp __b1 // main::@4 __b4: - // [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BGCOL + sta BG_COLOR jmp __b1 } // keyboard_key_pressed @@ -693,8 +693,8 @@ keyboard_init: { REGISTER UPLIFT POTENTIAL REGISTERS Statement [6] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto main::@1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLUE [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) GREEN [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLUE [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) GREEN [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [20] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) [ ] ( main:2::keyboard_key_pressed:8::keyboard_matrix_read:15 [ ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Statement [21] (byte) keyboard_matrix_read::return#0 ← ~ *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:2::keyboard_key_pressed:8::keyboard_matrix_read:15 [ keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Statement [23] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (byte) $ff [ ] ( main:2::keyboard_init:5 [ ] { } ) always clobbers reg byte a @@ -740,7 +740,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const OFFSET_STRUCT_MOS6526_CIA_PORT_B_DDR = 3 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 .label RASTER = $d012 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 // @begin @@ -790,15 +790,15 @@ main: { jmp __b3 // main::@3 __b3: - // [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 + // [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 lda #BLUE - sta BGCOL + sta BG_COLOR jmp __b1 // main::@4 __b4: - // [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BGCOL + sta BG_COLOR jmp __b1 } // keyboard_key_pressed @@ -904,7 +904,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) BLUE = (byte) 6 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify byte) GREEN = (byte) 5 @@ -1053,7 +1053,7 @@ Score: 1141 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B_DDR = 3 .const OFFSET_STRUCT_MOS6526_CIA_PORT_B = 1 .label RASTER = $d012 - .label BGCOL = $d021 + .label BG_COLOR = $d021 // The CIA#1: keyboard matrix, joystick #1/#2 .label CIA1 = $dc00 // @begin @@ -1090,17 +1090,17 @@ main: { cmp #0 bne __b4 // main::@3 - // *BGCOL = BLUE - // [12] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 + // *BG_COLOR = BLUE + // [12] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) BLUE -- _deref_pbuc1=vbuc2 lda #BLUE - sta BGCOL + sta BG_COLOR jmp __b1 // main::@4 __b4: - // *BGCOL = GREEN - // [13] *((const nomodify byte*) BGCOL) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 + // *BG_COLOR = GREEN + // [13] *((const nomodify byte*) BG_COLOR) ← (const nomodify byte) GREEN -- _deref_pbuc1=vbuc2 lda #GREEN - sta BGCOL + sta BG_COLOR jmp __b1 } // keyboard_key_pressed diff --git a/src/test/ref/test-keyboard-space.sym b/src/test/ref/test-keyboard-space.sym index 0bfea3939..4fba03a4e 100644 --- a/src/test/ref/test-keyboard-space.sym +++ b/src/test/ref/test-keyboard-space.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const nomodify byte*) BGCOL = (byte*) 53281 +(const nomodify byte*) BG_COLOR = (byte*) 53281 (const nomodify byte) BLUE = (byte) 6 (const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320 (const nomodify byte) GREEN = (byte) 5 diff --git a/src/test/ref/test-multiply-16bit.asm b/src/test/ref/test-multiply-16bit.asm index b1ff1c1a7..3b9fda382 100644 --- a/src/test/ref/test-multiply-16bit.asm +++ b/src/test/ref/test-multiply-16bit.asm @@ -2,13 +2,13 @@ .pc = $801 "Basic" :BasicUpstart(main) .pc = $80d "Program" - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label print_line_cursor = 2 .label print_char_cursor = 8 main: { - // *BGCOL = 5 + // *BG_COLOR = 5 lda #5 - sta BGCOL + sta BG_COLOR // print_cls() jsr print_cls // mulf_init() @@ -114,9 +114,9 @@ mul16s_compare: { // if(ok==0) cpx #0 bne __b5 - // *BGCOL = 2 + // *BG_COLOR = 2 lda #2 - sta BGCOL + sta BG_COLOR // mul16s_error(a,b, ms, mn, mf) jsr mul16s_error // } @@ -956,9 +956,9 @@ mul16u_compare: { // if(ok==0) cpx #0 bne __b5 - // *BGCOL = 2 + // *BG_COLOR = 2 lda #2 - sta BGCOL + sta BG_COLOR // mul16u_error(a,b, ms, mn, mf) lda.z a sta.z mul16u_error.a diff --git a/src/test/ref/test-multiply-16bit.cfg b/src/test/ref/test-multiply-16bit.cfg index 32129a6dc..e09a80ac7 100644 --- a/src/test/ref/test-multiply-16bit.cfg +++ b/src/test/ref/test-multiply-16bit.cfg @@ -10,7 +10,7 @@ (void()) main() main: scope:[main] from @1 - [4] *((const byte*) BGCOL) ← (byte) 5 + [4] *((const byte*) BG_COLOR) ← (byte) 5 [5] call print_cls to:main::@1 main::@1: scope:[main] from main @@ -84,7 +84,7 @@ mul16s_compare::@4: scope:[mul16s_compare] from mul16s_compare::@15 mul16s_comp [40] if((byte) mul16s_compare::ok#3!=(byte) 0) goto mul16s_compare::@5 to:mul16s_compare::@7 mul16s_compare::@7: scope:[mul16s_compare] from mul16s_compare::@4 - [41] *((const byte*) BGCOL) ← (byte) 2 + [41] *((const byte*) BG_COLOR) ← (byte) 2 [42] (signed word) mul16s_error::a#0 ← (signed word) mul16s_compare::a#1 [43] (signed word) mul16s_error::b#0 ← (signed word) mul16s_compare::b#1 [44] (signed dword) mul16s_error::ms#0 ← (signed dword) mul16s_compare::ms#0 @@ -502,7 +502,7 @@ mul16u_compare::@4: scope:[mul16u_compare] from mul16u_compare::@15 mul16u_comp [230] if((byte) mul16u_compare::ok#3!=(byte) 0) goto mul16u_compare::@5 to:mul16u_compare::@7 mul16u_compare::@7: scope:[mul16u_compare] from mul16u_compare::@4 - [231] *((const byte*) BGCOL) ← (byte) 2 + [231] *((const byte*) BG_COLOR) ← (byte) 2 [232] (word) mul16u_error::a#0 ← (word) mul16u_compare::a#1 [233] (word) mul16u_error::b#0 ← (word) mul16u_compare::b#1 [234] (dword) mul16u_error::ms#0 ← (dword) mul16u_compare::ms#0 diff --git a/src/test/ref/test-multiply-16bit.log b/src/test/ref/test-multiply-16bit.log index a4c825673..fd8f4d054 100644 --- a/src/test/ref/test-multiply-16bit.log +++ b/src/test/ref/test-multiply-16bit.log @@ -597,7 +597,7 @@ main: scope:[main] from @2 (byte*) print_char_cursor#144 ← phi( @2/(byte*) print_char_cursor#154 ) (byte*) print_line_cursor#44 ← phi( @2/(byte*) print_line_cursor#54 ) (byte*) print_screen#3 ← phi( @2/(byte*) print_screen#4 ) - *((const byte*) BGCOL) ← (number) 5 + *((const byte*) BG_COLOR) ← (number) 5 call print_cls to:main::@1 main::@1: scope:[main] from main @@ -910,7 +910,7 @@ mul16u_compare::@8: scope:[mul16u_compare] from mul16u_compare::@4 (dword) mul16u_compare::ms#3 ← phi( mul16u_compare::@4/(dword) mul16u_compare::ms#6 ) (word) mul16u_compare::b#5 ← phi( mul16u_compare::@4/(word) mul16u_compare::b#8 ) (word) mul16u_compare::a#5 ← phi( mul16u_compare::@4/(word) mul16u_compare::a#8 ) - *((const byte*) BGCOL) ← (number) 2 + *((const byte*) BG_COLOR) ← (number) 2 (word) mul16u_error::a#0 ← (word) mul16u_compare::a#5 (word) mul16u_error::b#0 ← (word) mul16u_compare::b#5 (dword) mul16u_error::ms#0 ← (dword) mul16u_compare::ms#3 @@ -1250,7 +1250,7 @@ mul16s_compare::@8: scope:[mul16s_compare] from mul16s_compare::@4 (signed dword) mul16s_compare::ms#3 ← phi( mul16s_compare::@4/(signed dword) mul16s_compare::ms#6 ) (signed word) mul16s_compare::b#5 ← phi( mul16s_compare::@4/(signed word) mul16s_compare::b#8 ) (signed word) mul16s_compare::a#5 ← phi( mul16s_compare::@4/(signed word) mul16s_compare::a#8 ) - *((const byte*) BGCOL) ← (number) 2 + *((const byte*) BG_COLOR) ← (number) 2 (signed word) mul16s_error::a#0 ← (signed word) mul16s_compare::a#5 (signed word) mul16s_error::b#0 ← (signed word) mul16s_compare::b#5 (signed dword) mul16s_error::ms#0 ← (signed dword) mul16s_compare::ms#3 @@ -1446,7 +1446,7 @@ SYMBOL TABLE SSA (label) @3 (label) @begin (label) @end -(const byte*) BGCOL = (byte*)(number) $d021 +(const byte*) BG_COLOR = (byte*)(number) $d021 (const byte) RADIX::BINARY = (number) 2 (const byte) RADIX::DECIMAL = (number) $a (const byte) RADIX::HEXADECIMAL = (number) $10 @@ -2671,7 +2671,7 @@ Adding number conversion cast (unumber) $1ff in *((const byte*) mulf_sqr2_hi+(nu Adding number conversion cast (unumber) 1 in (byte) mulf_init::dir#1 ← (number) 1 Adding number conversion cast (snumber) 0 in (bool~) mulf16s::$1 ← (signed word) mulf16s::a#2 < (number) 0 Adding number conversion cast (snumber) 0 in (bool~) mulf16s::$3 ← (signed word) mulf16s::b#2 < (number) 0 -Adding number conversion cast (unumber) 5 in *((const byte*) BGCOL) ← (number) 5 +Adding number conversion cast (unumber) 5 in *((const byte*) BG_COLOR) ← (number) 5 Adding number conversion cast (unumber) 0 in (bool~) muls16u::$0 ← (word) muls16u::a#1 != (number) 0 Adding number conversion cast (snumber) 0 in (bool~) muls16s::$0 ← (signed word) muls16s::a#1 < (number) 0 Adding number conversion cast (snumber) 0 in (bool~) muls16s::$1 ← (signed word) muls16s::a#2 > (number) 0 @@ -2682,7 +2682,7 @@ Adding number conversion cast (unumber) mul16u_compare::$5 in (number~) mul16u_c Adding number conversion cast (unumber) 0 in (byte) mul16u_compare::ok#1 ← (number) 0 Adding number conversion cast (unumber) 0 in (bool~) mul16u_compare::$13 ← (byte) mul16u_compare::ok#3 == (number) 0 Adding number conversion cast (unumber) 0 in (byte) mul16u_compare::ok#2 ← (number) 0 -Adding number conversion cast (unumber) 2 in *((const byte*) BGCOL) ← (number) 2 +Adding number conversion cast (unumber) 2 in *((const byte*) BG_COLOR) ← (number) 2 Adding number conversion cast (snumber) $d2b in (number~) mul16s_compare::$4 ← (signed word) mul16s_compare::a#2 + (number) $d2b Adding number conversion cast (snumber) mul16s_compare::$4 in (number~) mul16s_compare::$4 ← (signed word) mul16s_compare::a#2 + (snumber)(number) $d2b Adding number conversion cast (snumber) $ffd in (number~) mul16s_compare::$5 ← (signed word) mul16s_compare::b#2 + (number) $ffd @@ -2690,18 +2690,18 @@ Adding number conversion cast (snumber) mul16s_compare::$5 in (number~) mul16s_c Adding number conversion cast (unumber) 0 in (byte) mul16s_compare::ok#1 ← (number) 0 Adding number conversion cast (unumber) 0 in (bool~) mul16s_compare::$13 ← (byte) mul16s_compare::ok#3 == (number) 0 Adding number conversion cast (unumber) 0 in (byte) mul16s_compare::ok#2 ← (number) 0 -Adding number conversion cast (unumber) 2 in *((const byte*) BGCOL) ← (number) 2 +Adding number conversion cast (unumber) 2 in *((const byte*) BG_COLOR) ← (number) 2 Successful SSA optimization PassNAddNumberTypeConversions Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 Inlining cast (word) memset::num#0 ← (unumber)(number) $3e8 Inlining cast (byte) mulf_init::dir#1 ← (unumber)(number) 1 -Inlining cast *((const byte*) BGCOL) ← (unumber)(number) 5 +Inlining cast *((const byte*) BG_COLOR) ← (unumber)(number) 5 Inlining cast (byte) mul16u_compare::ok#1 ← (unumber)(number) 0 Inlining cast (byte) mul16u_compare::ok#2 ← (unumber)(number) 0 -Inlining cast *((const byte*) BGCOL) ← (unumber)(number) 2 +Inlining cast *((const byte*) BG_COLOR) ← (unumber)(number) 2 Inlining cast (byte) mul16s_compare::ok#1 ← (unumber)(number) 0 Inlining cast (byte) mul16s_compare::ok#2 ← (unumber)(number) 0 -Inlining cast *((const byte*) BGCOL) ← (unumber)(number) 2 +Inlining cast *((const byte*) BG_COLOR) ← (unumber)(number) 2 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (word*) 248 Simplifying constant pointer cast (word*) 250 @@ -3803,7 +3803,7 @@ FINAL CONTROL FLOW GRAPH (void()) main() main: scope:[main] from @1 - [4] *((const byte*) BGCOL) ← (byte) 5 + [4] *((const byte*) BG_COLOR) ← (byte) 5 [5] call print_cls to:main::@1 main::@1: scope:[main] from main @@ -3877,7 +3877,7 @@ mul16s_compare::@4: scope:[mul16s_compare] from mul16s_compare::@15 mul16s_comp [40] if((byte) mul16s_compare::ok#3!=(byte) 0) goto mul16s_compare::@5 to:mul16s_compare::@7 mul16s_compare::@7: scope:[mul16s_compare] from mul16s_compare::@4 - [41] *((const byte*) BGCOL) ← (byte) 2 + [41] *((const byte*) BG_COLOR) ← (byte) 2 [42] (signed word) mul16s_error::a#0 ← (signed word) mul16s_compare::a#1 [43] (signed word) mul16s_error::b#0 ← (signed word) mul16s_compare::b#1 [44] (signed dword) mul16s_error::ms#0 ← (signed dword) mul16s_compare::ms#0 @@ -4295,7 +4295,7 @@ mul16u_compare::@4: scope:[mul16u_compare] from mul16u_compare::@15 mul16u_comp [230] if((byte) mul16u_compare::ok#3!=(byte) 0) goto mul16u_compare::@5 to:mul16u_compare::@7 mul16u_compare::@7: scope:[mul16u_compare] from mul16u_compare::@4 - [231] *((const byte*) BGCOL) ← (byte) 2 + [231] *((const byte*) BG_COLOR) ← (byte) 2 [232] (word) mul16u_error::a#0 ← (word) mul16u_compare::a#1 [233] (word) mul16u_error::b#0 ← (word) mul16u_compare::b#1 [234] (dword) mul16u_error::ms#0 ← (dword) mul16u_compare::ms#0 @@ -5058,7 +5058,7 @@ Target platform is c64basic / MOS6502X :BasicUpstart(__bbegin) .pc = $80d "Program" // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label print_line_cursor = 9 .label print_char_cursor = $18 // @begin @@ -5077,9 +5077,9 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const byte*) BGCOL) ← (byte) 5 -- _deref_pbuc1=vbuc2 + // [4] *((const byte*) BG_COLOR) ← (byte) 5 -- _deref_pbuc1=vbuc2 lda #5 - sta BGCOL + sta BG_COLOR // [5] call print_cls // [308] phi from main to print_cls [phi:main->print_cls] print_cls_from_main: @@ -5369,9 +5369,9 @@ mul16s_compare: { jmp __b7 // mul16s_compare::@7 __b7: - // [41] *((const byte*) BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [41] *((const byte*) BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR // [42] (signed word) mul16s_error::a#0 ← (signed word) mul16s_compare::a#1 -- vwsz1=vwsz2 lda.z a sta.z mul16s_error.a @@ -6931,9 +6931,9 @@ mul16u_compare: { jmp __b7 // mul16u_compare::@7 __b7: - // [231] *((const byte*) BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [231] *((const byte*) BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR // [232] (word) mul16u_error::a#0 ← (word) mul16u_compare::a#1 -- vwuz1=vwuz2 lda.z a sta.z mul16u_error.a @@ -7632,7 +7632,7 @@ memset: { .byte 0 REGISTER UPLIFT POTENTIAL REGISTERS -Statement [4] *((const byte*) BGCOL) ← (byte) 5 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [4] *((const byte*) BG_COLOR) ← (byte) 5 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [13] (byte*) print_char_cursor#221 ← (byte*) print_line_cursor#1 [ print_char_cursor#221 print_line_cursor#1 ] ( main:2::mul16s_compare:11 [ print_char_cursor#221 print_line_cursor#1 ] { } ) always clobbers reg byte a Statement [17] (signed word) mul16s_compare::a#1 ← (signed word) mul16s_compare::a#2 + (signed word) $d2b [ print_line_cursor#1 mul16s_compare::i#12 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#2 mul16s_compare::j#10 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 mul16s_compare::i#12 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#2 mul16s_compare::j#10 ] { { muls16s::a#0 = mul16s_compare::a#1 } { muls16s::b#0 = mul16s_compare::b#1 } { muls16s::return#0 = muls16s::return#2 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:2 [ mul16s_compare::i#12 mul16s_compare::i#1 ] @@ -7653,7 +7653,7 @@ Statement [33] (signed dword) mul16s_compare::mf#0 ← (signed dword) mulf16s::r Statement [34] if((signed dword) mul16s_compare::ms#0==(signed dword) mul16s_compare::mf#0) goto mul16s_compare::@3 [ print_line_cursor#1 mul16s_compare::i#12 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::j#10 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 mul16s_compare::i#12 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::j#10 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 ] { } ) always clobbers reg byte a Statement [37] if((signed dword) mul16s_compare::ms#0==(signed dword) mul16s_compare::mn#0) goto mul16s_compare::@15 [ print_line_cursor#1 mul16s_compare::i#12 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::j#10 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 mul16s_compare::ok#4 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 mul16s_compare::i#12 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::j#10 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 mul16s_compare::ok#4 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:8 [ mul16s_compare::ok#3 mul16s_compare::ok#4 ] -Statement [41] *((const byte*) BGCOL) ← (byte) 2 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 ] { { mul16s_error::a#0 = mul16s_compare::a#1 } { mul16s_error::b#0 = mul16s_compare::b#1 } { mul16s_error::ms#0 = mul16s_compare::ms#0 } { mul16s_error::mn#0 = mul16s_compare::mn#0 } { mul16s_error::mf#0 = mul16s_compare::mf#0 } } ) always clobbers reg byte a +Statement [41] *((const byte*) BG_COLOR) ← (byte) 2 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 ] { { mul16s_error::a#0 = mul16s_compare::a#1 } { mul16s_error::b#0 = mul16s_compare::b#1 } { mul16s_error::ms#0 = mul16s_compare::ms#0 } { mul16s_error::mn#0 = mul16s_compare::mn#0 } { mul16s_error::mf#0 = mul16s_compare::mf#0 } } ) always clobbers reg byte a Statement [42] (signed word) mul16s_error::a#0 ← (signed word) mul16s_compare::a#1 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::b#1 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 mul16s_error::a#0 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::b#1 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 mul16s_error::a#0 ] { { mul16s_error::a#0 = mul16s_compare::a#1 } { mul16s_error::b#0 = mul16s_compare::b#1 } { mul16s_error::ms#0 = mul16s_compare::ms#0 } { mul16s_error::mn#0 = mul16s_compare::mn#0 } { mul16s_error::mf#0 = mul16s_compare::mf#0 } } ) always clobbers reg byte a Statement [43] (signed word) mul16s_error::b#0 ← (signed word) mul16s_compare::b#1 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 mul16s_error::a#0 mul16s_error::b#0 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 mul16s_error::a#0 mul16s_error::b#0 ] { { mul16s_error::a#0 = mul16s_compare::a#1 } { mul16s_error::b#0 = mul16s_compare::b#1 } { mul16s_error::ms#0 = mul16s_compare::ms#0 } { mul16s_error::mn#0 = mul16s_compare::mn#0 } { mul16s_error::mf#0 = mul16s_compare::mf#0 } } ) always clobbers reg byte a Statement [44] (signed dword) mul16s_error::ms#0 ← (signed dword) mul16s_compare::ms#0 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::mn#0 mul16s_compare::mf#0 mul16s_error::a#0 mul16s_error::b#0 mul16s_error::ms#0 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::mn#0 mul16s_compare::mf#0 mul16s_error::a#0 mul16s_error::b#0 mul16s_error::ms#0 ] { { mul16s_error::a#0 = mul16s_compare::a#1 } { mul16s_error::b#0 = mul16s_compare::b#1 } { mul16s_error::ms#0 = mul16s_compare::ms#0 } { mul16s_error::mn#0 = mul16s_compare::mn#0 } { mul16s_error::mf#0 = mul16s_compare::mf#0 } } ) always clobbers reg byte a @@ -7748,7 +7748,7 @@ Statement [223] (dword) mul16u_compare::mf#0 ← (dword) mulf16u::return#3 [ pri Statement [224] if((dword) mul16u_compare::ms#0==(dword) mul16u_compare::mf#0) goto mul16u_compare::@3 [ print_char_cursor#132 mul16u_compare::i#12 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::j#10 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 ] ( main:2::mul16u_compare:9 [ print_char_cursor#132 mul16u_compare::i#12 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::j#10 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 ] { } ) always clobbers reg byte a Statement [227] if((dword) mul16u_compare::ms#0==(dword) mul16u_compare::mn#0) goto mul16u_compare::@15 [ print_char_cursor#132 mul16u_compare::i#12 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::j#10 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 mul16u_compare::ok#4 ] ( main:2::mul16u_compare:9 [ print_char_cursor#132 mul16u_compare::i#12 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::j#10 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 mul16u_compare::ok#4 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:67 [ mul16u_compare::ok#3 mul16u_compare::ok#4 ] -Statement [231] *((const byte*) BGCOL) ← (byte) 2 [ print_char_cursor#132 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 ] ( main:2::mul16u_compare:9 [ print_char_cursor#132 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 ] { { mul16u_error::a#0 = mul16u_compare::a#1 } { mul16u_error::b#0 = mul16u_compare::b#1 } { mul16u_error::ms#0 = mul16u_compare::ms#0 } { mul16u_error::mn#0 = mul16u_compare::mn#0 } { mul16u_error::mf#0 = mul16u_compare::mf#0 } } ) always clobbers reg byte a +Statement [231] *((const byte*) BG_COLOR) ← (byte) 2 [ print_char_cursor#132 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 ] ( main:2::mul16u_compare:9 [ print_char_cursor#132 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 ] { { mul16u_error::a#0 = mul16u_compare::a#1 } { mul16u_error::b#0 = mul16u_compare::b#1 } { mul16u_error::ms#0 = mul16u_compare::ms#0 } { mul16u_error::mn#0 = mul16u_compare::mn#0 } { mul16u_error::mf#0 = mul16u_compare::mf#0 } } ) always clobbers reg byte a Statement [232] (word) mul16u_error::a#0 ← (word) mul16u_compare::a#1 [ print_char_cursor#132 mul16u_compare::b#1 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 mul16u_error::a#0 ] ( main:2::mul16u_compare:9 [ print_char_cursor#132 mul16u_compare::b#1 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 mul16u_error::a#0 ] { { mul16u_error::a#0 = mul16u_compare::a#1 } { mul16u_error::b#0 = mul16u_compare::b#1 } { mul16u_error::ms#0 = mul16u_compare::ms#0 } { mul16u_error::mn#0 = mul16u_compare::mn#0 } { mul16u_error::mf#0 = mul16u_compare::mf#0 } } ) always clobbers reg byte a Statement [233] (word) mul16u_error::b#0 ← (word) mul16u_compare::b#1 [ print_char_cursor#132 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 mul16u_error::a#0 mul16u_error::b#0 ] ( main:2::mul16u_compare:9 [ print_char_cursor#132 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 mul16u_error::a#0 mul16u_error::b#0 ] { { mul16u_error::a#0 = mul16u_compare::a#1 } { mul16u_error::b#0 = mul16u_compare::b#1 } { mul16u_error::ms#0 = mul16u_compare::ms#0 } { mul16u_error::mn#0 = mul16u_compare::mn#0 } { mul16u_error::mf#0 = mul16u_compare::mf#0 } } ) always clobbers reg byte a Statement [234] (dword) mul16u_error::ms#0 ← (dword) mul16u_compare::ms#0 [ print_char_cursor#132 mul16u_compare::mn#0 mul16u_compare::mf#0 mul16u_error::a#0 mul16u_error::b#0 mul16u_error::ms#0 ] ( main:2::mul16u_compare:9 [ print_char_cursor#132 mul16u_compare::mn#0 mul16u_compare::mf#0 mul16u_error::a#0 mul16u_error::b#0 mul16u_error::ms#0 ] { { mul16u_error::a#0 = mul16u_compare::a#1 } { mul16u_error::b#0 = mul16u_compare::b#1 } { mul16u_error::ms#0 = mul16u_compare::ms#0 } { mul16u_error::mn#0 = mul16u_compare::mn#0 } { mul16u_error::mf#0 = mul16u_compare::mf#0 } } ) always clobbers reg byte a @@ -7785,7 +7785,7 @@ Statement [304] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 [ mulf Statement [306] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] ( main:2::mulf_init:7 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] { } ) always clobbers reg byte a Statement [313] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:2::print_cls:5::memset:309 [ memset::dst#2 ] { } ) always clobbers reg byte a Statement [315] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::print_cls:5::memset:309 [ memset::dst#2 ] { } ) always clobbers reg byte a reg byte y -Statement [4] *((const byte*) BGCOL) ← (byte) 5 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [4] *((const byte*) BG_COLOR) ← (byte) 5 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [13] (byte*) print_char_cursor#221 ← (byte*) print_line_cursor#1 [ print_char_cursor#221 print_line_cursor#1 ] ( main:2::mul16s_compare:11 [ print_char_cursor#221 print_line_cursor#1 ] { } ) always clobbers reg byte a Statement [17] (signed word) mul16s_compare::a#1 ← (signed word) mul16s_compare::a#2 + (signed word) $d2b [ print_line_cursor#1 mul16s_compare::i#12 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#2 mul16s_compare::j#10 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 mul16s_compare::i#12 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#2 mul16s_compare::j#10 ] { { muls16s::a#0 = mul16s_compare::a#1 } { muls16s::b#0 = mul16s_compare::b#1 } { muls16s::return#0 = muls16s::return#2 } } ) always clobbers reg byte a Statement [18] (signed word) mul16s_compare::b#1 ← (signed word) mul16s_compare::b#2 + (signed word) $ffd [ print_line_cursor#1 mul16s_compare::i#12 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::j#10 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 mul16s_compare::i#12 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::j#10 ] { { muls16s::a#0 = mul16s_compare::a#1 } { muls16s::b#0 = mul16s_compare::b#1 } { muls16s::return#0 = muls16s::return#2 } } ) always clobbers reg byte a @@ -7803,7 +7803,7 @@ Statement [32] (signed dword) mulf16s::return#2 ← (signed dword) mulf16s::retu Statement [33] (signed dword) mul16s_compare::mf#0 ← (signed dword) mulf16s::return#2 [ print_line_cursor#1 mul16s_compare::i#12 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::j#10 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 mul16s_compare::i#12 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::j#10 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 ] { } ) always clobbers reg byte a Statement [34] if((signed dword) mul16s_compare::ms#0==(signed dword) mul16s_compare::mf#0) goto mul16s_compare::@3 [ print_line_cursor#1 mul16s_compare::i#12 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::j#10 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 mul16s_compare::i#12 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::j#10 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 ] { } ) always clobbers reg byte a Statement [37] if((signed dword) mul16s_compare::ms#0==(signed dword) mul16s_compare::mn#0) goto mul16s_compare::@15 [ print_line_cursor#1 mul16s_compare::i#12 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::j#10 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 mul16s_compare::ok#4 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 mul16s_compare::i#12 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::j#10 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 mul16s_compare::ok#4 ] { } ) always clobbers reg byte a -Statement [41] *((const byte*) BGCOL) ← (byte) 2 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 ] { { mul16s_error::a#0 = mul16s_compare::a#1 } { mul16s_error::b#0 = mul16s_compare::b#1 } { mul16s_error::ms#0 = mul16s_compare::ms#0 } { mul16s_error::mn#0 = mul16s_compare::mn#0 } { mul16s_error::mf#0 = mul16s_compare::mf#0 } } ) always clobbers reg byte a +Statement [41] *((const byte*) BG_COLOR) ← (byte) 2 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::a#1 mul16s_compare::b#1 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 ] { { mul16s_error::a#0 = mul16s_compare::a#1 } { mul16s_error::b#0 = mul16s_compare::b#1 } { mul16s_error::ms#0 = mul16s_compare::ms#0 } { mul16s_error::mn#0 = mul16s_compare::mn#0 } { mul16s_error::mf#0 = mul16s_compare::mf#0 } } ) always clobbers reg byte a Statement [42] (signed word) mul16s_error::a#0 ← (signed word) mul16s_compare::a#1 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::b#1 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 mul16s_error::a#0 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::b#1 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 mul16s_error::a#0 ] { { mul16s_error::a#0 = mul16s_compare::a#1 } { mul16s_error::b#0 = mul16s_compare::b#1 } { mul16s_error::ms#0 = mul16s_compare::ms#0 } { mul16s_error::mn#0 = mul16s_compare::mn#0 } { mul16s_error::mf#0 = mul16s_compare::mf#0 } } ) always clobbers reg byte a Statement [43] (signed word) mul16s_error::b#0 ← (signed word) mul16s_compare::b#1 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 mul16s_error::a#0 mul16s_error::b#0 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::ms#0 mul16s_compare::mn#0 mul16s_compare::mf#0 mul16s_error::a#0 mul16s_error::b#0 ] { { mul16s_error::a#0 = mul16s_compare::a#1 } { mul16s_error::b#0 = mul16s_compare::b#1 } { mul16s_error::ms#0 = mul16s_compare::ms#0 } { mul16s_error::mn#0 = mul16s_compare::mn#0 } { mul16s_error::mf#0 = mul16s_compare::mf#0 } } ) always clobbers reg byte a Statement [44] (signed dword) mul16s_error::ms#0 ← (signed dword) mul16s_compare::ms#0 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::mn#0 mul16s_compare::mf#0 mul16s_error::a#0 mul16s_error::b#0 mul16s_error::ms#0 ] ( main:2::mul16s_compare:11 [ print_line_cursor#1 print_char_cursor#132 mul16s_compare::mn#0 mul16s_compare::mf#0 mul16s_error::a#0 mul16s_error::b#0 mul16s_error::ms#0 ] { { mul16s_error::a#0 = mul16s_compare::a#1 } { mul16s_error::b#0 = mul16s_compare::b#1 } { mul16s_error::ms#0 = mul16s_compare::ms#0 } { mul16s_error::mn#0 = mul16s_compare::mn#0 } { mul16s_error::mf#0 = mul16s_compare::mf#0 } } ) always clobbers reg byte a @@ -7888,7 +7888,7 @@ Statement [222] (dword) mulf16u::return#3 ← (dword) mulf16u::return#0 [ print_ Statement [223] (dword) mul16u_compare::mf#0 ← (dword) mulf16u::return#3 [ print_char_cursor#132 mul16u_compare::i#12 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::j#10 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 ] ( main:2::mul16u_compare:9 [ print_char_cursor#132 mul16u_compare::i#12 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::j#10 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 ] { } ) always clobbers reg byte a Statement [224] if((dword) mul16u_compare::ms#0==(dword) mul16u_compare::mf#0) goto mul16u_compare::@3 [ print_char_cursor#132 mul16u_compare::i#12 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::j#10 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 ] ( main:2::mul16u_compare:9 [ print_char_cursor#132 mul16u_compare::i#12 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::j#10 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 ] { } ) always clobbers reg byte a Statement [227] if((dword) mul16u_compare::ms#0==(dword) mul16u_compare::mn#0) goto mul16u_compare::@15 [ print_char_cursor#132 mul16u_compare::i#12 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::j#10 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 mul16u_compare::ok#4 ] ( main:2::mul16u_compare:9 [ print_char_cursor#132 mul16u_compare::i#12 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::j#10 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 mul16u_compare::ok#4 ] { } ) always clobbers reg byte a -Statement [231] *((const byte*) BGCOL) ← (byte) 2 [ print_char_cursor#132 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 ] ( main:2::mul16u_compare:9 [ print_char_cursor#132 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 ] { { mul16u_error::a#0 = mul16u_compare::a#1 } { mul16u_error::b#0 = mul16u_compare::b#1 } { mul16u_error::ms#0 = mul16u_compare::ms#0 } { mul16u_error::mn#0 = mul16u_compare::mn#0 } { mul16u_error::mf#0 = mul16u_compare::mf#0 } } ) always clobbers reg byte a +Statement [231] *((const byte*) BG_COLOR) ← (byte) 2 [ print_char_cursor#132 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 ] ( main:2::mul16u_compare:9 [ print_char_cursor#132 mul16u_compare::a#1 mul16u_compare::b#1 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 ] { { mul16u_error::a#0 = mul16u_compare::a#1 } { mul16u_error::b#0 = mul16u_compare::b#1 } { mul16u_error::ms#0 = mul16u_compare::ms#0 } { mul16u_error::mn#0 = mul16u_compare::mn#0 } { mul16u_error::mf#0 = mul16u_compare::mf#0 } } ) always clobbers reg byte a Statement [232] (word) mul16u_error::a#0 ← (word) mul16u_compare::a#1 [ print_char_cursor#132 mul16u_compare::b#1 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 mul16u_error::a#0 ] ( main:2::mul16u_compare:9 [ print_char_cursor#132 mul16u_compare::b#1 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 mul16u_error::a#0 ] { { mul16u_error::a#0 = mul16u_compare::a#1 } { mul16u_error::b#0 = mul16u_compare::b#1 } { mul16u_error::ms#0 = mul16u_compare::ms#0 } { mul16u_error::mn#0 = mul16u_compare::mn#0 } { mul16u_error::mf#0 = mul16u_compare::mf#0 } } ) always clobbers reg byte a Statement [233] (word) mul16u_error::b#0 ← (word) mul16u_compare::b#1 [ print_char_cursor#132 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 mul16u_error::a#0 mul16u_error::b#0 ] ( main:2::mul16u_compare:9 [ print_char_cursor#132 mul16u_compare::ms#0 mul16u_compare::mn#0 mul16u_compare::mf#0 mul16u_error::a#0 mul16u_error::b#0 ] { { mul16u_error::a#0 = mul16u_compare::a#1 } { mul16u_error::b#0 = mul16u_compare::b#1 } { mul16u_error::ms#0 = mul16u_compare::ms#0 } { mul16u_error::mn#0 = mul16u_compare::mn#0 } { mul16u_error::mf#0 = mul16u_compare::mf#0 } } ) always clobbers reg byte a Statement [234] (dword) mul16u_error::ms#0 ← (dword) mul16u_compare::ms#0 [ print_char_cursor#132 mul16u_compare::mn#0 mul16u_compare::mf#0 mul16u_error::a#0 mul16u_error::b#0 mul16u_error::ms#0 ] ( main:2::mul16u_compare:9 [ print_char_cursor#132 mul16u_compare::mn#0 mul16u_compare::mf#0 mul16u_error::a#0 mul16u_error::b#0 mul16u_error::ms#0 ] { { mul16u_error::a#0 = mul16u_compare::a#1 } { mul16u_error::b#0 = mul16u_compare::b#1 } { mul16u_error::ms#0 = mul16u_compare::ms#0 } { mul16u_error::mn#0 = mul16u_compare::mn#0 } { mul16u_error::mf#0 = mul16u_compare::mf#0 } } ) always clobbers reg byte a @@ -8156,7 +8156,7 @@ ASSEMBLER BEFORE OPTIMIZATION :BasicUpstart(__bbegin) .pc = $80d "Program" // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label print_line_cursor = 2 .label print_char_cursor = 8 // @begin @@ -8175,9 +8175,9 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const byte*) BGCOL) ← (byte) 5 -- _deref_pbuc1=vbuc2 + // [4] *((const byte*) BG_COLOR) ← (byte) 5 -- _deref_pbuc1=vbuc2 lda #5 - sta BGCOL + sta BG_COLOR // [5] call print_cls // [308] phi from main to print_cls [phi:main->print_cls] print_cls_from_main: @@ -8388,9 +8388,9 @@ mul16s_compare: { jmp __b7 // mul16s_compare::@7 __b7: - // [41] *((const byte*) BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [41] *((const byte*) BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR // [42] (signed word) mul16s_error::a#0 ← (signed word) mul16s_compare::a#1 // [43] (signed word) mul16s_error::b#0 ← (signed word) mul16s_compare::b#1 // [44] (signed dword) mul16s_error::ms#0 ← (signed dword) mul16s_compare::ms#0 @@ -9744,9 +9744,9 @@ mul16u_compare: { jmp __b7 // mul16u_compare::@7 __b7: - // [231] *((const byte*) BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [231] *((const byte*) BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR // [232] (word) mul16u_error::a#0 ← (word) mul16u_compare::a#1 -- vwuz1=vwuz2 lda.z a sta.z mul16u_error.a @@ -10802,7 +10802,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const byte*) BGCOL = (byte*) 53281 +(const byte*) BG_COLOR = (byte*) 53281 (const byte) RADIX::BINARY = (number) 2 (const byte) RADIX::DECIMAL = (number) $a (const byte) RADIX::HEXADECIMAL = (number) $10 @@ -11281,7 +11281,7 @@ Score: 467180 :BasicUpstart(main) .pc = $80d "Program" // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label print_line_cursor = 2 .label print_char_cursor = 8 // @begin @@ -11292,10 +11292,10 @@ Score: 467180 // @end // main main: { - // *BGCOL = 5 - // [4] *((const byte*) BGCOL) ← (byte) 5 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 5 + // [4] *((const byte*) BG_COLOR) ← (byte) 5 -- _deref_pbuc1=vbuc2 lda #5 - sta BGCOL + sta BG_COLOR // print_cls() // [5] call print_cls // [308] phi from main to print_cls [phi:main->print_cls] @@ -11480,10 +11480,10 @@ mul16s_compare: { cpx #0 bne __b5 // mul16s_compare::@7 - // *BGCOL = 2 - // [41] *((const byte*) BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 2 + // [41] *((const byte*) BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR // mul16s_error(a,b, ms, mn, mf) // [42] (signed word) mul16s_error::a#0 ← (signed word) mul16s_compare::a#1 // [43] (signed word) mul16s_error::b#0 ← (signed word) mul16s_compare::b#1 @@ -12734,10 +12734,10 @@ mul16u_compare: { cpx #0 bne __b5 // mul16u_compare::@7 - // *BGCOL = 2 - // [231] *((const byte*) BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 2 + // [231] *((const byte*) BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR // mul16u_error(a,b, ms, mn, mf) // [232] (word) mul16u_error::a#0 ← (word) mul16u_compare::a#1 -- vwuz1=vwuz2 lda.z a diff --git a/src/test/ref/test-multiply-16bit.sym b/src/test/ref/test-multiply-16bit.sym index 5bb730029..999d77880 100644 --- a/src/test/ref/test-multiply-16bit.sym +++ b/src/test/ref/test-multiply-16bit.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const byte*) BGCOL = (byte*) 53281 +(const byte*) BG_COLOR = (byte*) 53281 (const byte) RADIX::BINARY = (number) 2 (const byte) RADIX::DECIMAL = (number) $a (const byte) RADIX::HEXADECIMAL = (number) $10 diff --git a/src/test/ref/test-multiply-8bit.asm b/src/test/ref/test-multiply-8bit.asm index 49850a6f2..2043cb3d3 100644 --- a/src/test/ref/test-multiply-8bit.asm +++ b/src/test/ref/test-multiply-8bit.asm @@ -2,13 +2,13 @@ .pc = $801 "Basic" :BasicUpstart(main) .pc = $80d "Program" - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label print_line_cursor = 2 .label print_char_cursor = 4 main: { - // *BGCOL = 5 + // *BG_COLOR = 5 lda #5 - sta BGCOL + sta BG_COLOR // print_cls() jsr print_cls // mulf_init() @@ -104,9 +104,9 @@ mul8s_compare: { // if(ok==0) cpx #0 bne __b8 - // *BGCOL = 2 + // *BG_COLOR = 2 lda #2 - sta BGCOL + sta BG_COLOR // mul8s_error(a,b, ms, mn, mf) ldx.z a jsr mul8s_error @@ -641,9 +641,9 @@ mul8u_compare: { // if(ok==0) cpx #0 bne __b5 - // *BGCOL = 2 + // *BG_COLOR = 2 lda #2 - sta BGCOL + sta BG_COLOR // mul8u_error(a,b, ms, mn, mf) ldx.z a jsr mul8u_error @@ -837,9 +837,9 @@ mulf_tables_cmp: { lda (kc_sqr),y cmp (asm_sqr),y beq __b4 - // *BGCOL = 2 + // *BG_COLOR = 2 lda #2 - sta BGCOL + sta BG_COLOR // print_str("multiply table mismatch at ") lda #<$400 sta.z print_char_cursor diff --git a/src/test/ref/test-multiply-8bit.cfg b/src/test/ref/test-multiply-8bit.cfg index 7f23f8200..432bb5248 100644 --- a/src/test/ref/test-multiply-8bit.cfg +++ b/src/test/ref/test-multiply-8bit.cfg @@ -10,7 +10,7 @@ (void()) main() main: scope:[main] from @1 - [4] *((const byte*) BGCOL) ← (byte) 5 + [4] *((const byte*) BG_COLOR) ← (byte) 5 [5] call print_cls to:main::@1 main::@1: scope:[main] from main @@ -101,7 +101,7 @@ mul8s_compare::@7: scope:[mul8s_compare] from mul8s_compare::@15 mul8s_compare: [48] if((byte) mul8s_compare::ok#3!=(byte) 0) goto mul8s_compare::@8 to:mul8s_compare::@10 mul8s_compare::@10: scope:[mul8s_compare] from mul8s_compare::@7 - [49] *((const byte*) BGCOL) ← (byte) 2 + [49] *((const byte*) BG_COLOR) ← (byte) 2 [50] (signed byte) mul8s_error::a#0 ← (signed byte) mul8s_compare::a#10 [51] (signed byte) mul8s_error::b#0 ← (signed byte) mul8s_compare::b#10 [52] (signed word) mul8s_error::ms#0 ← (signed word) mul8s_compare::ms#0 @@ -500,7 +500,7 @@ mul8u_compare::@4: scope:[mul8u_compare] from mul8u_compare::@14 mul8u_compare: [226] if((byte) mul8u_compare::ok#3!=(byte) 0) goto mul8u_compare::@5 to:mul8u_compare::@7 mul8u_compare::@7: scope:[mul8u_compare] from mul8u_compare::@4 - [227] *((const byte*) BGCOL) ← (byte) 2 + [227] *((const byte*) BG_COLOR) ← (byte) 2 [228] (byte) mul8u_error::a#0 ← (byte) mul8u_compare::a#7 [229] (byte) mul8u_error::b#0 ← (byte) mul8u_compare::b#10 [230] (word) mul8u_error::ms#0 ← (word) mul8u_compare::ms#0 @@ -643,7 +643,7 @@ mulf_tables_cmp::@2: scope:[mulf_tables_cmp] from mulf_tables_cmp::@1 [290] if(*((byte*) mulf_tables_cmp::kc_sqr#2)==*((byte*) mulf_tables_cmp::asm_sqr#2)) goto mulf_tables_cmp::@4 to:mulf_tables_cmp::@5 mulf_tables_cmp::@5: scope:[mulf_tables_cmp] from mulf_tables_cmp::@2 - [291] *((const byte*) BGCOL) ← (byte) 2 + [291] *((const byte*) BG_COLOR) ← (byte) 2 [292] call print_str to:mulf_tables_cmp::@8 mulf_tables_cmp::@8: scope:[mulf_tables_cmp] from mulf_tables_cmp::@5 diff --git a/src/test/ref/test-multiply-8bit.log b/src/test/ref/test-multiply-8bit.log index 9b9e2889f..f4287becd 100644 --- a/src/test/ref/test-multiply-8bit.log +++ b/src/test/ref/test-multiply-8bit.log @@ -629,7 +629,7 @@ main: scope:[main] from @2 (byte*) print_char_cursor#145 ← phi( @2/(byte*) print_char_cursor#155 ) (byte*) print_line_cursor#46 ← phi( @2/(byte*) print_line_cursor#56 ) (byte*) print_screen#3 ← phi( @2/(byte*) print_screen#4 ) - *((const byte*) BGCOL) ← (number) 5 + *((const byte*) BG_COLOR) ← (number) 5 call print_cls to:main::@1 main::@1: scope:[main] from main @@ -858,7 +858,7 @@ mulf_tables_cmp::@5: scope:[mulf_tables_cmp] from mulf_tables_cmp::@2 (byte*) mulf_tables_cmp::kc_sqr#8 ← phi( mulf_tables_cmp::@2/(byte*) mulf_tables_cmp::kc_sqr#3 ) (byte*) mulf_tables_cmp::asm_sqr#6 ← phi( mulf_tables_cmp::@2/(byte*) mulf_tables_cmp::asm_sqr#2 ) (byte*) print_char_cursor#148 ← phi( mulf_tables_cmp::@2/(byte*) print_char_cursor#161 ) - *((const byte*) BGCOL) ← (number) 2 + *((const byte*) BG_COLOR) ← (number) 2 (byte*) print_str::str#2 ← (const byte*) mulf_tables_cmp::str1 call print_str to:mulf_tables_cmp::@8 @@ -1027,7 +1027,7 @@ mul8u_compare::@8: scope:[mul8u_compare] from mul8u_compare::@4 (word) mul8u_compare::ms#3 ← phi( mul8u_compare::@4/(word) mul8u_compare::ms#6 ) (byte) mul8u_compare::b#6 ← phi( mul8u_compare::@4/(byte) mul8u_compare::b#7 ) (byte) mul8u_compare::a#5 ← phi( mul8u_compare::@4/(byte) mul8u_compare::a#9 ) - *((const byte*) BGCOL) ← (number) 2 + *((const byte*) BG_COLOR) ← (number) 2 (byte) mul8u_error::a#0 ← (byte) mul8u_compare::a#5 (byte) mul8u_error::b#0 ← (byte) mul8u_compare::b#6 (word) mul8u_error::ms#0 ← (word) mul8u_compare::ms#3 @@ -1359,7 +1359,7 @@ mul8s_compare::@12: scope:[mul8s_compare] from mul8s_compare::@8 (signed word) mul8s_compare::ms#3 ← phi( mul8s_compare::@8/(signed word) mul8s_compare::ms#6 ) (signed byte) mul8s_compare::b#7 ← phi( mul8s_compare::@8/(signed byte) mul8s_compare::b#8 ) (signed byte) mul8s_compare::a#7 ← phi( mul8s_compare::@8/(signed byte) mul8s_compare::a#9 ) - *((const byte*) BGCOL) ← (number) 2 + *((const byte*) BG_COLOR) ← (number) 2 (signed byte) mul8s_error::a#0 ← (signed byte) mul8s_compare::a#7 (signed byte) mul8s_error::b#0 ← (signed byte) mul8s_compare::b#7 (signed word) mul8s_error::ms#0 ← (signed word) mul8s_compare::ms#3 @@ -1520,7 +1520,7 @@ SYMBOL TABLE SSA (label) @3 (label) @begin (label) @end -(const byte*) BGCOL = (byte*)(number) $d021 +(const byte*) BG_COLOR = (byte*)(number) $d021 (const byte) RADIX::BINARY = (number) 2 (const byte) RADIX::DECIMAL = (number) $a (const byte) RADIX::HEXADECIMAL = (number) $10 @@ -2781,34 +2781,34 @@ Adding number conversion cast (unumber) $1ff in *((const byte*) mulf_sqr2_hi+(nu Adding number conversion cast (unumber) 1 in (byte) mulf_init::dir#1 ← (number) 1 Adding number conversion cast (snumber) 0 in (bool~) mulf8s_prepared::$1 ← *((const nomodify signed byte*) mulf8s_prepared::memA) < (number) 0 Adding number conversion cast (snumber) 0 in (bool~) mulf8s_prepared::$3 ← (signed byte) mulf8s_prepared::b#2 < (number) 0 -Adding number conversion cast (unumber) 5 in *((const byte*) BGCOL) ← (number) 5 +Adding number conversion cast (unumber) 5 in *((const byte*) BG_COLOR) ← (number) 5 Adding number conversion cast (unumber) 0 in (bool~) muls8u::$0 ← (byte) muls8u::a#1 != (number) 0 Adding number conversion cast (snumber) 0 in (bool~) muls8s::$0 ← (signed byte) muls8s::a#1 < (number) 0 Adding number conversion cast (snumber) 0 in (bool~) muls8s::$1 ← (signed byte) muls8s::a#2 > (number) 0 Adding number conversion cast (unumber) $200*4 in (bool~) mulf_tables_cmp::$2 ← (byte*) mulf_tables_cmp::kc_sqr#2 < (const byte*) mulf_sqr1_lo+(number) $200*(number) 4 -Adding number conversion cast (unumber) 2 in *((const byte*) BGCOL) ← (number) 2 +Adding number conversion cast (unumber) 2 in *((const byte*) BG_COLOR) ← (number) 2 Adding number conversion cast (unumber) 0 in (byte) mul8u_compare::ok#1 ← (number) 0 Adding number conversion cast (unumber) 0 in (bool~) mul8u_compare::$9 ← (byte) mul8u_compare::ok#3 == (number) 0 Adding number conversion cast (unumber) 0 in (byte) mul8u_compare::ok#2 ← (number) 0 -Adding number conversion cast (unumber) 2 in *((const byte*) BGCOL) ← (number) 2 +Adding number conversion cast (unumber) 2 in *((const byte*) BG_COLOR) ← (number) 2 Adding number conversion cast (snumber) -$80 in (bool~) mul8s_compare::$2 ← (signed byte) mul8s_compare::a#2 != (number) -$80 Adding number conversion cast (snumber) -$80 in (bool~) mul8s_compare::$3 ← (signed byte) mul8s_compare::b#2 != (number) -$80 Adding number conversion cast (unumber) 0 in (byte) mul8s_compare::ok#1 ← (number) 0 Adding number conversion cast (unumber) 0 in (bool~) mul8s_compare::$11 ← (byte) mul8s_compare::ok#3 == (number) 0 Adding number conversion cast (unumber) 0 in (byte) mul8s_compare::ok#2 ← (number) 0 -Adding number conversion cast (unumber) 2 in *((const byte*) BGCOL) ← (number) 2 +Adding number conversion cast (unumber) 2 in *((const byte*) BG_COLOR) ← (number) 2 Successful SSA optimization PassNAddNumberTypeConversions Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 Inlining cast (word) memset::num#0 ← (unumber)(number) $3e8 Inlining cast (byte) mulf_init::dir#1 ← (unumber)(number) 1 -Inlining cast *((const byte*) BGCOL) ← (unumber)(number) 5 -Inlining cast *((const byte*) BGCOL) ← (unumber)(number) 2 +Inlining cast *((const byte*) BG_COLOR) ← (unumber)(number) 5 +Inlining cast *((const byte*) BG_COLOR) ← (unumber)(number) 2 Inlining cast (byte) mul8u_compare::ok#1 ← (unumber)(number) 0 Inlining cast (byte) mul8u_compare::ok#2 ← (unumber)(number) 0 -Inlining cast *((const byte*) BGCOL) ← (unumber)(number) 2 +Inlining cast *((const byte*) BG_COLOR) ← (unumber)(number) 2 Inlining cast (byte) mul8s_compare::ok#1 ← (unumber)(number) 0 Inlining cast (byte) mul8s_compare::ok#2 ← (unumber)(number) 0 -Inlining cast *((const byte*) BGCOL) ← (unumber)(number) 2 +Inlining cast *((const byte*) BG_COLOR) ← (unumber)(number) 2 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 253 Simplifying constant pointer cast (byte*) 254 @@ -3901,7 +3901,7 @@ FINAL CONTROL FLOW GRAPH (void()) main() main: scope:[main] from @1 - [4] *((const byte*) BGCOL) ← (byte) 5 + [4] *((const byte*) BG_COLOR) ← (byte) 5 [5] call print_cls to:main::@1 main::@1: scope:[main] from main @@ -3992,7 +3992,7 @@ mul8s_compare::@7: scope:[mul8s_compare] from mul8s_compare::@15 mul8s_compare: [48] if((byte) mul8s_compare::ok#3!=(byte) 0) goto mul8s_compare::@8 to:mul8s_compare::@10 mul8s_compare::@10: scope:[mul8s_compare] from mul8s_compare::@7 - [49] *((const byte*) BGCOL) ← (byte) 2 + [49] *((const byte*) BG_COLOR) ← (byte) 2 [50] (signed byte) mul8s_error::a#0 ← (signed byte) mul8s_compare::a#10 [51] (signed byte) mul8s_error::b#0 ← (signed byte) mul8s_compare::b#10 [52] (signed word) mul8s_error::ms#0 ← (signed word) mul8s_compare::ms#0 @@ -4391,7 +4391,7 @@ mul8u_compare::@4: scope:[mul8u_compare] from mul8u_compare::@14 mul8u_compare: [226] if((byte) mul8u_compare::ok#3!=(byte) 0) goto mul8u_compare::@5 to:mul8u_compare::@7 mul8u_compare::@7: scope:[mul8u_compare] from mul8u_compare::@4 - [227] *((const byte*) BGCOL) ← (byte) 2 + [227] *((const byte*) BG_COLOR) ← (byte) 2 [228] (byte) mul8u_error::a#0 ← (byte) mul8u_compare::a#7 [229] (byte) mul8u_error::b#0 ← (byte) mul8u_compare::b#10 [230] (word) mul8u_error::ms#0 ← (word) mul8u_compare::ms#0 @@ -4534,7 +4534,7 @@ mulf_tables_cmp::@2: scope:[mulf_tables_cmp] from mulf_tables_cmp::@1 [290] if(*((byte*) mulf_tables_cmp::kc_sqr#2)==*((byte*) mulf_tables_cmp::asm_sqr#2)) goto mulf_tables_cmp::@4 to:mulf_tables_cmp::@5 mulf_tables_cmp::@5: scope:[mulf_tables_cmp] from mulf_tables_cmp::@2 - [291] *((const byte*) BGCOL) ← (byte) 2 + [291] *((const byte*) BG_COLOR) ← (byte) 2 [292] call print_str to:mulf_tables_cmp::@8 mulf_tables_cmp::@8: scope:[mulf_tables_cmp] from mulf_tables_cmp::@5 @@ -5228,7 +5228,7 @@ Target platform is c64basic / MOS6502X :BasicUpstart(__bbegin) .pc = $80d "Program" // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label print_line_cursor = 5 .label print_char_cursor = $d // @begin @@ -5247,9 +5247,9 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const byte*) BGCOL) ← (byte) 5 -- _deref_pbuc1=vbuc2 + // [4] *((const byte*) BG_COLOR) ← (byte) 5 -- _deref_pbuc1=vbuc2 lda #5 - sta BGCOL + sta BG_COLOR // [5] call print_cls // [336] phi from main to print_cls [phi:main->print_cls] print_cls_from_main: @@ -5500,9 +5500,9 @@ mul8s_compare: { jmp __b10 // mul8s_compare::@10 __b10: - // [49] *((const byte*) BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [49] *((const byte*) BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR // [50] (signed byte) mul8s_error::a#0 ← (signed byte) mul8s_compare::a#10 -- vbsz1=vbsz2 lda.z a sta.z mul8s_error.a @@ -6660,9 +6660,9 @@ mul8u_compare: { jmp __b7 // mul8u_compare::@7 __b7: - // [227] *((const byte*) BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [227] *((const byte*) BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR // [228] (byte) mul8u_error::a#0 ← (byte) mul8u_compare::a#7 -- vbuz1=vbuz2 lda.z a sta.z mul8u_error.a @@ -7110,9 +7110,9 @@ mulf_tables_cmp: { jmp __b5 // mulf_tables_cmp::@5 __b5: - // [291] *((const byte*) BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [291] *((const byte*) BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR // [292] call print_str // [114] phi from mulf_tables_cmp::@5 to print_str [phi:mulf_tables_cmp::@5->print_str] print_str_from___b5: @@ -7588,7 +7588,7 @@ memset: { .byte 0 REGISTER UPLIFT POTENTIAL REGISTERS -Statement [4] *((const byte*) BGCOL) ← (byte) 5 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [4] *((const byte*) BG_COLOR) ← (byte) 5 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [20] (byte*) print_char_cursor#190 ← (byte*) print_line_cursor#1 [ print_char_cursor#190 print_line_cursor#1 ] ( main:2::mul8s_compare:15 [ print_char_cursor#190 print_line_cursor#1 ] { { print_char_cursor#156 = print_char_cursor#190 } } ) always clobbers reg byte a Statement [31] (signed word) muls8s::return#2 ← (signed word) muls8s::return#0 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 muls8s::return#2 ] ( main:2::mul8s_compare:15 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 muls8s::return#2 ] { { muls8s::a#0 = mul8s_compare::a#10 } { muls8s::b#0 = mul8s_compare::b#10 } { muls8s::return#0 = muls8s::return#2 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:2 [ mul8s_compare::a#10 mul8s_compare::a#1 ] @@ -7600,7 +7600,7 @@ Statement [41] (signed word) mul8s_compare::mn#0 ← (signed word)(word) mul8s:: Statement [42] if((signed word) mul8s_compare::ms#0==(signed word) mul8s_compare::mf#0) goto mul8s_compare::@6 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 ] ( main:2::mul8s_compare:15 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 ] { } ) always clobbers reg byte a Statement [45] if((signed word) mul8s_compare::ms#0==(signed word) mul8s_compare::mn#0) goto mul8s_compare::@15 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 mul8s_compare::ok#4 ] ( main:2::mul8s_compare:15 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 mul8s_compare::ok#4 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:4 [ mul8s_compare::ok#3 mul8s_compare::ok#4 ] -Statement [49] *((const byte*) BGCOL) ← (byte) 2 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 ] ( main:2::mul8s_compare:15 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 ] { { mul8s_error::a#0 = mul8s_compare::a#10 } { mul8s_error::b#0 = mul8s_compare::b#10 } { mul8s_error::ms#0 = mul8s_compare::ms#0 } { mul8s_error::mn#0 = mul8s_compare::mn#0 } { mul8s_error::mf#0 = mul8s_compare::mf#0 } } ) always clobbers reg byte a +Statement [49] *((const byte*) BG_COLOR) ← (byte) 2 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 ] ( main:2::mul8s_compare:15 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 ] { { mul8s_error::a#0 = mul8s_compare::a#10 } { mul8s_error::b#0 = mul8s_compare::b#10 } { mul8s_error::ms#0 = mul8s_compare::ms#0 } { mul8s_error::mn#0 = mul8s_compare::mn#0 } { mul8s_error::mf#0 = mul8s_compare::mf#0 } } ) always clobbers reg byte a Statement [52] (signed word) mul8s_error::ms#0 ← (signed word) mul8s_compare::ms#0 [ print_line_cursor#1 mul8s_compare::mf#0 mul8s_compare::mn#0 mul8s_error::a#0 mul8s_error::b#0 mul8s_error::ms#0 ] ( main:2::mul8s_compare:15 [ print_line_cursor#1 mul8s_compare::mf#0 mul8s_compare::mn#0 mul8s_error::a#0 mul8s_error::b#0 mul8s_error::ms#0 ] { { mul8s_error::a#0 = mul8s_compare::a#10 } { mul8s_error::b#0 = mul8s_compare::b#10 } { mul8s_error::ms#0 = mul8s_compare::ms#0 } { mul8s_error::mn#0 = mul8s_compare::mn#0 } { mul8s_error::mf#0 = mul8s_compare::mf#0 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:76 [ mul8s_error::a#0 ] Removing always clobbered register reg byte a as potential for zp[1]:77 [ mul8s_error::b#0 ] @@ -7674,7 +7674,7 @@ Statement [219] (word) mul8u_compare::mn#0 ← (word) mul8u::return#3 [ print_li Statement [220] if((word) mul8u_compare::ms#0==(word) mul8u_compare::mf#0) goto mul8u_compare::@3 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 ] ( main:2::mul8u_compare:13 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 ] { } ) always clobbers reg byte a Statement [223] if((word) mul8u_compare::ms#0==(word) mul8u_compare::mn#0) goto mul8u_compare::@14 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 mul8u_compare::ok#4 ] ( main:2::mul8u_compare:13 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 mul8u_compare::ok#4 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:36 [ mul8u_compare::ok#3 mul8u_compare::ok#4 ] -Statement [227] *((const byte*) BGCOL) ← (byte) 2 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 ] ( main:2::mul8u_compare:13 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 ] { { mul8u_error::a#0 = mul8u_compare::a#7 } { mul8u_error::b#0 = mul8u_compare::b#10 } { mul8u_error::ms#0 = mul8u_compare::ms#0 } { mul8u_error::mn#0 = mul8u_compare::mn#0 } { mul8u_error::mf#0 = mul8u_compare::mf#0 } } ) always clobbers reg byte a +Statement [227] *((const byte*) BG_COLOR) ← (byte) 2 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 ] ( main:2::mul8u_compare:13 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 ] { { mul8u_error::a#0 = mul8u_compare::a#7 } { mul8u_error::b#0 = mul8u_compare::b#10 } { mul8u_error::ms#0 = mul8u_compare::ms#0 } { mul8u_error::mn#0 = mul8u_compare::mn#0 } { mul8u_error::mf#0 = mul8u_compare::mf#0 } } ) always clobbers reg byte a Statement [230] (word) mul8u_error::ms#0 ← (word) mul8u_compare::ms#0 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::mf#0 mul8u_compare::mn#0 mul8u_error::a#0 mul8u_error::b#0 mul8u_error::ms#0 ] ( main:2::mul8u_compare:13 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::mf#0 mul8u_compare::mn#0 mul8u_error::a#0 mul8u_error::b#0 mul8u_error::ms#0 ] { { mul8u_error::a#0 = mul8u_compare::a#7 } { mul8u_error::b#0 = mul8u_compare::b#10 } { mul8u_error::ms#0 = mul8u_compare::ms#0 } { mul8u_error::mn#0 = mul8u_compare::mn#0 } { mul8u_error::mf#0 = mul8u_compare::mf#0 } } ) always clobbers reg byte a Statement [231] (word) mul8u_error::mn#0 ← (word) mul8u_compare::mn#0 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::mf#0 mul8u_error::a#0 mul8u_error::b#0 mul8u_error::ms#0 mul8u_error::mn#0 ] ( main:2::mul8u_compare:13 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::mf#0 mul8u_error::a#0 mul8u_error::b#0 mul8u_error::ms#0 mul8u_error::mn#0 ] { { mul8u_error::a#0 = mul8u_compare::a#7 } { mul8u_error::b#0 = mul8u_compare::b#10 } { mul8u_error::ms#0 = mul8u_compare::ms#0 } { mul8u_error::mn#0 = mul8u_compare::mn#0 } { mul8u_error::mf#0 = mul8u_compare::mf#0 } } ) always clobbers reg byte a Statement [232] (word) mul8u_error::mf#0 ← (word) mul8u_compare::mf#0 [ print_line_cursor#11 print_char_cursor#100 mul8u_error::a#0 mul8u_error::b#0 mul8u_error::ms#0 mul8u_error::mn#0 mul8u_error::mf#0 ] ( main:2::mul8u_compare:13 [ print_line_cursor#11 print_char_cursor#100 mul8u_error::a#0 mul8u_error::b#0 mul8u_error::ms#0 mul8u_error::mn#0 mul8u_error::mf#0 ] { { mul8u_error::a#0 = mul8u_compare::a#7 } { mul8u_error::b#0 = mul8u_compare::b#10 } { mul8u_error::ms#0 = mul8u_compare::ms#0 } { mul8u_error::mn#0 = mul8u_compare::mn#0 } { mul8u_error::mf#0 = mul8u_compare::mf#0 } } ) always clobbers reg byte a @@ -7690,7 +7690,7 @@ Removing always clobbered register reg byte a as potential for zp[1]:37 [ muls8u Statement [282] if((byte*) mulf_tables_cmp::kc_sqr#2<(const byte*) mulf_sqr1_lo+(word)(number) $200*(number) 4) goto mulf_tables_cmp::@2 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::asm_sqr#2 ] ( main:2::mulf_tables_cmp:11 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::asm_sqr#2 ] { } ) always clobbers reg byte a Statement [287] (byte*) print_char_cursor#229 ← (byte*) print_line_cursor#1 [ print_line_cursor#1 print_char_cursor#229 ] ( main:2::mulf_tables_cmp:11 [ print_line_cursor#1 print_char_cursor#229 ] { } ) always clobbers reg byte a Statement [290] if(*((byte*) mulf_tables_cmp::kc_sqr#2)==*((byte*) mulf_tables_cmp::asm_sqr#2)) goto mulf_tables_cmp::@4 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::asm_sqr#2 ] ( main:2::mulf_tables_cmp:11 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::asm_sqr#2 ] { } ) always clobbers reg byte a reg byte y -Statement [291] *((const byte*) BGCOL) ← (byte) 2 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::asm_sqr#2 ] ( main:2::mulf_tables_cmp:11 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::asm_sqr#2 ] { } ) always clobbers reg byte a +Statement [291] *((const byte*) BG_COLOR) ← (byte) 2 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::asm_sqr#2 ] ( main:2::mulf_tables_cmp:11 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::asm_sqr#2 ] { } ) always clobbers reg byte a Statement [293] (word) print_uint::w#1 ← (word)(byte*) mulf_tables_cmp::asm_sqr#2 [ print_char_cursor#134 print_uint::w#1 mulf_tables_cmp::kc_sqr#2 ] ( main:2::mulf_tables_cmp:11 [ print_char_cursor#134 print_uint::w#1 mulf_tables_cmp::kc_sqr#2 ] { { print_uint::w#1 = print_uint::w#6 } { print_char_cursor#134 = print_char_cursor#143 } } ) always clobbers reg byte a Statement [297] (word) print_uint::w#2 ← (word)(byte*) mulf_tables_cmp::kc_sqr#2 [ print_char_cursor#134 print_uint::w#2 ] ( main:2::mulf_tables_cmp:11 [ print_char_cursor#134 print_uint::w#2 ] { { print_uint::w#2 = print_uint::w#6 } { print_char_cursor#134 = print_char_cursor#143 } } ) always clobbers reg byte a Statement asm { ldx#$00 txa .byte$c9 lb1: tya adc#$00 ml1: stamula_sqr1_hi,x tay cmp#$40 txa ror ml9: adc#$00 staml9+1 inx ml0: stamula_sqr1_lo,x bnelb1 incml0+2 incml1+2 clc iny bnelb1 ldx#$00 ldy#$ff !: ldamula_sqr1_hi+1,x stamula_sqr2_hi+$100,x ldamula_sqr1_hi,x stamula_sqr2_hi,y ldamula_sqr1_lo+1,x stamula_sqr2_lo+$100,x ldamula_sqr1_lo,x stamula_sqr2_lo,y dey inx bne!- } always clobbers reg byte a reg byte x reg byte y @@ -7719,7 +7719,7 @@ Statement [332] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 [ mulf Statement [334] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] ( main:2::mulf_init:7 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] { } ) always clobbers reg byte a Statement [341] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:2::print_cls:5::memset:337 [ memset::dst#2 ] { } ) always clobbers reg byte a Statement [343] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::print_cls:5::memset:337 [ memset::dst#2 ] { } ) always clobbers reg byte a reg byte y -Statement [4] *((const byte*) BGCOL) ← (byte) 5 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [4] *((const byte*) BG_COLOR) ← (byte) 5 [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [20] (byte*) print_char_cursor#190 ← (byte*) print_line_cursor#1 [ print_char_cursor#190 print_line_cursor#1 ] ( main:2::mul8s_compare:15 [ print_char_cursor#190 print_line_cursor#1 ] { { print_char_cursor#156 = print_char_cursor#190 } } ) always clobbers reg byte a Statement [31] (signed word) muls8s::return#2 ← (signed word) muls8s::return#0 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 muls8s::return#2 ] ( main:2::mul8s_compare:15 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 muls8s::return#2 ] { { muls8s::a#0 = mul8s_compare::a#10 } { muls8s::b#0 = mul8s_compare::b#10 } { muls8s::return#0 = muls8s::return#2 } } ) always clobbers reg byte a Statement [32] (signed word) mul8s_compare::ms#0 ← (signed word) muls8s::return#2 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 ] ( main:2::mul8s_compare:15 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 ] { { mulf8s::a#0 = mul8s_compare::a#10 } { mulf8s::b#0 = mul8s_compare::b#10 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a @@ -7728,7 +7728,7 @@ Statement [37] (signed word) mul8s_compare::mf#0 ← (signed word) mulf8s::retur Statement [41] (signed word) mul8s_compare::mn#0 ← (signed word)(word) mul8s::m#4 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 ] ( main:2::mul8s_compare:15 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 ] { } ) always clobbers reg byte a Statement [42] if((signed word) mul8s_compare::ms#0==(signed word) mul8s_compare::mf#0) goto mul8s_compare::@6 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 ] ( main:2::mul8s_compare:15 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 ] { } ) always clobbers reg byte a Statement [45] if((signed word) mul8s_compare::ms#0==(signed word) mul8s_compare::mn#0) goto mul8s_compare::@15 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 mul8s_compare::ok#4 ] ( main:2::mul8s_compare:15 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 mul8s_compare::ok#4 ] { } ) always clobbers reg byte a -Statement [49] *((const byte*) BGCOL) ← (byte) 2 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 ] ( main:2::mul8s_compare:15 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 ] { { mul8s_error::a#0 = mul8s_compare::a#10 } { mul8s_error::b#0 = mul8s_compare::b#10 } { mul8s_error::ms#0 = mul8s_compare::ms#0 } { mul8s_error::mn#0 = mul8s_compare::mn#0 } { mul8s_error::mf#0 = mul8s_compare::mf#0 } } ) always clobbers reg byte a +Statement [49] *((const byte*) BG_COLOR) ← (byte) 2 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 ] ( main:2::mul8s_compare:15 [ mul8s_compare::a#10 print_line_cursor#1 mul8s_compare::b#10 mul8s_compare::ms#0 mul8s_compare::mf#0 mul8s_compare::mn#0 ] { { mul8s_error::a#0 = mul8s_compare::a#10 } { mul8s_error::b#0 = mul8s_compare::b#10 } { mul8s_error::ms#0 = mul8s_compare::ms#0 } { mul8s_error::mn#0 = mul8s_compare::mn#0 } { mul8s_error::mf#0 = mul8s_compare::mf#0 } } ) always clobbers reg byte a Statement [52] (signed word) mul8s_error::ms#0 ← (signed word) mul8s_compare::ms#0 [ print_line_cursor#1 mul8s_compare::mf#0 mul8s_compare::mn#0 mul8s_error::a#0 mul8s_error::b#0 mul8s_error::ms#0 ] ( main:2::mul8s_compare:15 [ print_line_cursor#1 mul8s_compare::mf#0 mul8s_compare::mn#0 mul8s_error::a#0 mul8s_error::b#0 mul8s_error::ms#0 ] { { mul8s_error::a#0 = mul8s_compare::a#10 } { mul8s_error::b#0 = mul8s_compare::b#10 } { mul8s_error::ms#0 = mul8s_compare::ms#0 } { mul8s_error::mn#0 = mul8s_compare::mn#0 } { mul8s_error::mf#0 = mul8s_compare::mf#0 } } ) always clobbers reg byte a Statement [53] (signed word) mul8s_error::mn#0 ← (signed word) mul8s_compare::mn#0 [ print_line_cursor#1 mul8s_compare::mf#0 mul8s_error::a#0 mul8s_error::b#0 mul8s_error::ms#0 mul8s_error::mn#0 ] ( main:2::mul8s_compare:15 [ print_line_cursor#1 mul8s_compare::mf#0 mul8s_error::a#0 mul8s_error::b#0 mul8s_error::ms#0 mul8s_error::mn#0 ] { { mul8s_error::a#0 = mul8s_compare::a#10 } { mul8s_error::b#0 = mul8s_compare::b#10 } { mul8s_error::ms#0 = mul8s_compare::ms#0 } { mul8s_error::mn#0 = mul8s_compare::mn#0 } { mul8s_error::mf#0 = mul8s_compare::mf#0 } } ) always clobbers reg byte a Statement [54] (signed word) mul8s_error::mf#0 ← (signed word) mul8s_compare::mf#0 [ print_line_cursor#1 mul8s_error::a#0 mul8s_error::b#0 mul8s_error::ms#0 mul8s_error::mn#0 mul8s_error::mf#0 ] ( main:2::mul8s_compare:15 [ print_line_cursor#1 mul8s_error::a#0 mul8s_error::b#0 mul8s_error::ms#0 mul8s_error::mn#0 mul8s_error::mf#0 ] { { mul8s_error::a#0 = mul8s_compare::a#10 } { mul8s_error::b#0 = mul8s_compare::b#10 } { mul8s_error::ms#0 = mul8s_compare::ms#0 } { mul8s_error::mn#0 = mul8s_compare::mn#0 } { mul8s_error::mf#0 = mul8s_compare::mf#0 } } ) always clobbers reg byte a @@ -7773,7 +7773,7 @@ Statement [218] (word) mul8u::return#3 ← (word) mul8u::res#2 [ print_line_curs Statement [219] (word) mul8u_compare::mn#0 ← (word) mul8u::return#3 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 ] ( main:2::mul8u_compare:13 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 ] { } ) always clobbers reg byte a Statement [220] if((word) mul8u_compare::ms#0==(word) mul8u_compare::mf#0) goto mul8u_compare::@3 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 ] ( main:2::mul8u_compare:13 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 ] { } ) always clobbers reg byte a Statement [223] if((word) mul8u_compare::ms#0==(word) mul8u_compare::mn#0) goto mul8u_compare::@14 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 mul8u_compare::ok#4 ] ( main:2::mul8u_compare:13 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 mul8u_compare::ok#4 ] { } ) always clobbers reg byte a -Statement [227] *((const byte*) BGCOL) ← (byte) 2 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 ] ( main:2::mul8u_compare:13 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 ] { { mul8u_error::a#0 = mul8u_compare::a#7 } { mul8u_error::b#0 = mul8u_compare::b#10 } { mul8u_error::ms#0 = mul8u_compare::ms#0 } { mul8u_error::mn#0 = mul8u_compare::mn#0 } { mul8u_error::mf#0 = mul8u_compare::mf#0 } } ) always clobbers reg byte a +Statement [227] *((const byte*) BG_COLOR) ← (byte) 2 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 ] ( main:2::mul8u_compare:13 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::a#7 mul8u_compare::b#10 mul8u_compare::ms#0 mul8u_compare::mf#0 mul8u_compare::mn#0 ] { { mul8u_error::a#0 = mul8u_compare::a#7 } { mul8u_error::b#0 = mul8u_compare::b#10 } { mul8u_error::ms#0 = mul8u_compare::ms#0 } { mul8u_error::mn#0 = mul8u_compare::mn#0 } { mul8u_error::mf#0 = mul8u_compare::mf#0 } } ) always clobbers reg byte a Statement [230] (word) mul8u_error::ms#0 ← (word) mul8u_compare::ms#0 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::mf#0 mul8u_compare::mn#0 mul8u_error::a#0 mul8u_error::b#0 mul8u_error::ms#0 ] ( main:2::mul8u_compare:13 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::mf#0 mul8u_compare::mn#0 mul8u_error::a#0 mul8u_error::b#0 mul8u_error::ms#0 ] { { mul8u_error::a#0 = mul8u_compare::a#7 } { mul8u_error::b#0 = mul8u_compare::b#10 } { mul8u_error::ms#0 = mul8u_compare::ms#0 } { mul8u_error::mn#0 = mul8u_compare::mn#0 } { mul8u_error::mf#0 = mul8u_compare::mf#0 } } ) always clobbers reg byte a Statement [231] (word) mul8u_error::mn#0 ← (word) mul8u_compare::mn#0 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::mf#0 mul8u_error::a#0 mul8u_error::b#0 mul8u_error::ms#0 mul8u_error::mn#0 ] ( main:2::mul8u_compare:13 [ print_line_cursor#11 print_char_cursor#100 mul8u_compare::mf#0 mul8u_error::a#0 mul8u_error::b#0 mul8u_error::ms#0 mul8u_error::mn#0 ] { { mul8u_error::a#0 = mul8u_compare::a#7 } { mul8u_error::b#0 = mul8u_compare::b#10 } { mul8u_error::ms#0 = mul8u_compare::ms#0 } { mul8u_error::mn#0 = mul8u_compare::mn#0 } { mul8u_error::mf#0 = mul8u_compare::mf#0 } } ) always clobbers reg byte a Statement [232] (word) mul8u_error::mf#0 ← (word) mul8u_compare::mf#0 [ print_line_cursor#11 print_char_cursor#100 mul8u_error::a#0 mul8u_error::b#0 mul8u_error::ms#0 mul8u_error::mn#0 mul8u_error::mf#0 ] ( main:2::mul8u_compare:13 [ print_line_cursor#11 print_char_cursor#100 mul8u_error::a#0 mul8u_error::b#0 mul8u_error::ms#0 mul8u_error::mn#0 mul8u_error::mf#0 ] { { mul8u_error::a#0 = mul8u_compare::a#7 } { mul8u_error::b#0 = mul8u_compare::b#10 } { mul8u_error::ms#0 = mul8u_compare::ms#0 } { mul8u_error::mn#0 = mul8u_compare::mn#0 } { mul8u_error::mf#0 = mul8u_compare::mf#0 } } ) always clobbers reg byte a @@ -7786,7 +7786,7 @@ Statement [278] (word) muls8u::m#1 ← (word) muls8u::m#3 + (byte) muls8u::b#0 [ Statement [282] if((byte*) mulf_tables_cmp::kc_sqr#2<(const byte*) mulf_sqr1_lo+(word)(number) $200*(number) 4) goto mulf_tables_cmp::@2 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::asm_sqr#2 ] ( main:2::mulf_tables_cmp:11 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::asm_sqr#2 ] { } ) always clobbers reg byte a Statement [287] (byte*) print_char_cursor#229 ← (byte*) print_line_cursor#1 [ print_line_cursor#1 print_char_cursor#229 ] ( main:2::mulf_tables_cmp:11 [ print_line_cursor#1 print_char_cursor#229 ] { } ) always clobbers reg byte a Statement [290] if(*((byte*) mulf_tables_cmp::kc_sqr#2)==*((byte*) mulf_tables_cmp::asm_sqr#2)) goto mulf_tables_cmp::@4 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::asm_sqr#2 ] ( main:2::mulf_tables_cmp:11 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::asm_sqr#2 ] { } ) always clobbers reg byte a reg byte y -Statement [291] *((const byte*) BGCOL) ← (byte) 2 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::asm_sqr#2 ] ( main:2::mulf_tables_cmp:11 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::asm_sqr#2 ] { } ) always clobbers reg byte a +Statement [291] *((const byte*) BG_COLOR) ← (byte) 2 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::asm_sqr#2 ] ( main:2::mulf_tables_cmp:11 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::asm_sqr#2 ] { } ) always clobbers reg byte a Statement [293] (word) print_uint::w#1 ← (word)(byte*) mulf_tables_cmp::asm_sqr#2 [ print_char_cursor#134 print_uint::w#1 mulf_tables_cmp::kc_sqr#2 ] ( main:2::mulf_tables_cmp:11 [ print_char_cursor#134 print_uint::w#1 mulf_tables_cmp::kc_sqr#2 ] { { print_uint::w#1 = print_uint::w#6 } { print_char_cursor#134 = print_char_cursor#143 } } ) always clobbers reg byte a Statement [297] (word) print_uint::w#2 ← (word)(byte*) mulf_tables_cmp::kc_sqr#2 [ print_char_cursor#134 print_uint::w#2 ] ( main:2::mulf_tables_cmp:11 [ print_char_cursor#134 print_uint::w#2 ] { { print_uint::w#2 = print_uint::w#6 } { print_char_cursor#134 = print_char_cursor#143 } } ) always clobbers reg byte a Statement asm { ldx#$00 txa .byte$c9 lb1: tya adc#$00 ml1: stamula_sqr1_hi,x tay cmp#$40 txa ror ml9: adc#$00 staml9+1 inx ml0: stamula_sqr1_lo,x bnelb1 incml0+2 incml1+2 clc iny bnelb1 ldx#$00 ldy#$ff !: ldamula_sqr1_hi+1,x stamula_sqr2_hi+$100,x ldamula_sqr1_hi,x stamula_sqr2_hi,y ldamula_sqr1_lo+1,x stamula_sqr2_lo+$100,x ldamula_sqr1_lo,x stamula_sqr2_lo,y dey inx bne!- } always clobbers reg byte a reg byte x reg byte y @@ -8051,7 +8051,7 @@ ASSEMBLER BEFORE OPTIMIZATION :BasicUpstart(__bbegin) .pc = $80d "Program" // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label print_line_cursor = 2 .label print_char_cursor = 4 // @begin @@ -8070,9 +8070,9 @@ __bend_from___b1: __bend: // main main: { - // [4] *((const byte*) BGCOL) ← (byte) 5 -- _deref_pbuc1=vbuc2 + // [4] *((const byte*) BG_COLOR) ← (byte) 5 -- _deref_pbuc1=vbuc2 lda #5 - sta BGCOL + sta BG_COLOR // [5] call print_cls // [336] phi from main to print_cls [phi:main->print_cls] print_cls_from_main: @@ -8290,9 +8290,9 @@ mul8s_compare: { jmp __b10 // mul8s_compare::@10 __b10: - // [49] *((const byte*) BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [49] *((const byte*) BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR // [50] (signed byte) mul8s_error::a#0 ← (signed byte) mul8s_compare::a#10 -- vbsxx=vbsz1 ldx.z a // [51] (signed byte) mul8s_error::b#0 ← (signed byte) mul8s_compare::b#10 @@ -9293,9 +9293,9 @@ mul8u_compare: { jmp __b7 // mul8u_compare::@7 __b7: - // [227] *((const byte*) BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [227] *((const byte*) BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR // [228] (byte) mul8u_error::a#0 ← (byte) mul8u_compare::a#7 -- vbuxx=vbuz1 ldx.z a // [229] (byte) mul8u_error::b#0 ← (byte) mul8u_compare::b#10 @@ -9701,9 +9701,9 @@ mulf_tables_cmp: { jmp __b5 // mulf_tables_cmp::@5 __b5: - // [291] *((const byte*) BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [291] *((const byte*) BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR // [292] call print_str // [114] phi from mulf_tables_cmp::@5 to print_str [phi:mulf_tables_cmp::@5->print_str] print_str_from___b5: @@ -10611,7 +10611,7 @@ FINAL SYMBOL TABLE (label) @1 (label) @begin (label) @end -(const byte*) BGCOL = (byte*) 53281 +(const byte*) BG_COLOR = (byte*) 53281 (const byte) RADIX::BINARY = (number) 2 (const byte) RADIX::DECIMAL = (number) $a (const byte) RADIX::HEXADECIMAL = (number) $10 @@ -11136,7 +11136,7 @@ Score: 236672 :BasicUpstart(main) .pc = $80d "Program" // Global Constants & labels - .label BGCOL = $d021 + .label BG_COLOR = $d021 .label print_line_cursor = 2 .label print_char_cursor = 4 // @begin @@ -11147,10 +11147,10 @@ Score: 236672 // @end // main main: { - // *BGCOL = 5 - // [4] *((const byte*) BGCOL) ← (byte) 5 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 5 + // [4] *((const byte*) BG_COLOR) ← (byte) 5 -- _deref_pbuc1=vbuc2 lda #5 - sta BGCOL + sta BG_COLOR // print_cls() // [5] call print_cls // [336] phi from main to print_cls [phi:main->print_cls] @@ -11333,10 +11333,10 @@ mul8s_compare: { cpx #0 bne __b8 // mul8s_compare::@10 - // *BGCOL = 2 - // [49] *((const byte*) BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 2 + // [49] *((const byte*) BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR // mul8s_error(a,b, ms, mn, mf) // [50] (signed byte) mul8s_error::a#0 ← (signed byte) mul8s_compare::a#10 -- vbsxx=vbsz1 ldx.z a @@ -12240,10 +12240,10 @@ mul8u_compare: { cpx #0 bne __b5 // mul8u_compare::@7 - // *BGCOL = 2 - // [227] *((const byte*) BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 2 + // [227] *((const byte*) BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR // mul8u_error(a,b, ms, mn, mf) // [228] (byte) mul8u_error::a#0 ← (byte) mul8u_compare::a#7 -- vbuxx=vbuz1 ldx.z a @@ -12594,10 +12594,10 @@ mulf_tables_cmp: { cmp (asm_sqr),y beq __b4 // mulf_tables_cmp::@5 - // *BGCOL = 2 - // [291] *((const byte*) BGCOL) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 2 + // [291] *((const byte*) BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta BGCOL + sta BG_COLOR // print_str("multiply table mismatch at ") // [292] call print_str // [114] phi from mulf_tables_cmp::@5 to print_str [phi:mulf_tables_cmp::@5->print_str] diff --git a/src/test/ref/test-multiply-8bit.sym b/src/test/ref/test-multiply-8bit.sym index 3c9bcd219..588f65b65 100644 --- a/src/test/ref/test-multiply-8bit.sym +++ b/src/test/ref/test-multiply-8bit.sym @@ -1,7 +1,7 @@ (label) @1 (label) @begin (label) @end -(const byte*) BGCOL = (byte*) 53281 +(const byte*) BG_COLOR = (byte*) 53281 (const byte) RADIX::BINARY = (number) 2 (const byte) RADIX::DECIMAL = (number) $a (const byte) RADIX::HEXADECIMAL = (number) $10 diff --git a/src/test/ref/true-inline-words.asm b/src/test/ref/true-inline-words.asm index 439207231..4ee6fe3cb 100644 --- a/src/test/ref/true-inline-words.asm +++ b/src/test/ref/true-inline-words.asm @@ -8,7 +8,7 @@ main: { .const w2 = 1*$100+1+w // Test the result .label pos = $501 - .label bgcol = $d021 + .label BG_COLOR = $d021 // constant inline words inside expression .label sc = w2 // *sc = bs[1] @@ -19,15 +19,15 @@ main: { lda #'m' cmp pos beq __b1 - // *bgcol = 2 + // *BG_COLOR = 2 lda #2 - sta bgcol + sta BG_COLOR // } rts __b1: - // *bgcol = 5 + // *BG_COLOR = 5 lda #5 - sta bgcol + sta BG_COLOR rts bs: .byte 'c', 'm' } diff --git a/src/test/ref/true-inline-words.cfg b/src/test/ref/true-inline-words.cfg index 64b4ac4d9..fc45fc575 100644 --- a/src/test/ref/true-inline-words.cfg +++ b/src/test/ref/true-inline-words.cfg @@ -14,11 +14,11 @@ main: scope:[main] from @1 [5] if(*((const byte*) main::pos)==(byte) 'm') goto main::@1 to:main::@2 main::@2: scope:[main] from main - [6] *((const byte*) main::bgcol) ← (byte) 2 + [6] *((const byte*) main::BG_COLOR) ← (byte) 2 to:main::@return main::@return: scope:[main] from main::@1 main::@2 [7] return to:@return main::@1: scope:[main] from main - [8] *((const byte*) main::bgcol) ← (byte) 5 + [8] *((const byte*) main::BG_COLOR) ← (byte) 5 to:main::@return diff --git a/src/test/ref/true-inline-words.log b/src/test/ref/true-inline-words.log index f7664550e..8dc446b9f 100644 --- a/src/test/ref/true-inline-words.log +++ b/src/test/ref/true-inline-words.log @@ -17,10 +17,10 @@ main: scope:[main] from @1 if((bool~) main::$2) goto main::@1 to:main::@2 main::@1: scope:[main] from main - *((const byte*) main::bgcol) ← (number) 5 + *((const byte*) main::BG_COLOR) ← (number) 5 to:main::@return main::@2: scope:[main] from main - *((const byte*) main::bgcol) ← (number) 2 + *((const byte*) main::BG_COLOR) ← (number) 2 to:main::@return main::@return: scope:[main] from main::@1 main::@2 return @@ -46,8 +46,8 @@ SYMBOL TABLE SSA (label) main::@1 (label) main::@2 (label) main::@return +(const byte*) main::BG_COLOR = (byte*)(number) $d021 (const byte) main::b = (byte) 4 -(const byte*) main::bgcol = (byte*)(number) $d021 (const byte*) main::bs[] = { (byte) 'c', (byte) 'm' } (const byte*) main::pos = (byte*)(number) $501 (byte*) main::sc @@ -62,12 +62,12 @@ Fixing inline constructor with main::$6 ← (byte)1 w= (byte)1 Fixing inline constructor with main::$7 ← (byte)0 w= (byte)0 Successful SSA optimization Pass2FixInlineConstructors Adding number conversion cast (unumber) 1 in *((byte*) main::sc#0) ← *((const byte*) main::bs + (number) 1) -Adding number conversion cast (unumber) 5 in *((const byte*) main::bgcol) ← (number) 5 -Adding number conversion cast (unumber) 2 in *((const byte*) main::bgcol) ← (number) 2 +Adding number conversion cast (unumber) 5 in *((const byte*) main::BG_COLOR) ← (number) 5 +Adding number conversion cast (unumber) 2 in *((const byte*) main::BG_COLOR) ← (number) 2 Successful SSA optimization PassNAddNumberTypeConversions Inlining cast (byte*) main::sc#0 ← (byte*)(word) main::w2#0 -Inlining cast *((const byte*) main::bgcol) ← (unumber)(number) 5 -Inlining cast *((const byte*) main::bgcol) ← (unumber)(number) 2 +Inlining cast *((const byte*) main::BG_COLOR) ← (unumber)(number) 5 +Inlining cast *((const byte*) main::BG_COLOR) ← (unumber)(number) 2 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 1281 Simplifying constant pointer cast (byte*) 53281 @@ -173,13 +173,13 @@ main: scope:[main] from @1 [5] if(*((const byte*) main::pos)==(byte) 'm') goto main::@1 to:main::@2 main::@2: scope:[main] from main - [6] *((const byte*) main::bgcol) ← (byte) 2 + [6] *((const byte*) main::BG_COLOR) ← (byte) 2 to:main::@return main::@return: scope:[main] from main::@1 main::@2 [7] return to:@return main::@1: scope:[main] from main - [8] *((const byte*) main::bgcol) ← (byte) 5 + [8] *((const byte*) main::BG_COLOR) ← (byte) 5 to:main::@return @@ -222,7 +222,7 @@ main: { .const w2 = 1*$100+1+w // Test the result .label pos = $501 - .label bgcol = $d021 + .label BG_COLOR = $d021 // constant inline words inside expression .label sc = w2 // [4] *((const byte*) main::sc#0) ← *((const byte*) main::bs+(byte) 1) -- _deref_pbuc1=_deref_pbuc2 @@ -236,9 +236,9 @@ main: { jmp __b2 // main::@2 __b2: - // [6] *((const byte*) main::bgcol) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [6] *((const byte*) main::BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta bgcol + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -246,9 +246,9 @@ main: { rts // main::@1 __b1: - // [8] *((const byte*) main::bgcol) ← (byte) 5 -- _deref_pbuc1=vbuc2 + // [8] *((const byte*) main::BG_COLOR) ← (byte) 5 -- _deref_pbuc1=vbuc2 lda #5 - sta bgcol + sta BG_COLOR jmp __breturn bs: .byte 'c', 'm' } @@ -257,8 +257,8 @@ main: { REGISTER UPLIFT POTENTIAL REGISTERS Statement [4] *((const byte*) main::sc#0) ← *((const byte*) main::bs+(byte) 1) [ ] ( main:2 [ ] { } ) always clobbers reg byte a Statement [5] if(*((const byte*) main::pos)==(byte) 'm') goto main::@1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [6] *((const byte*) main::bgcol) ← (byte) 2 [ ] ( main:2 [ ] { } ) always clobbers reg byte a -Statement [8] *((const byte*) main::bgcol) ← (byte) 5 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [6] *((const byte*) main::BG_COLOR) ← (byte) 2 [ ] ( main:2 [ ] { } ) always clobbers reg byte a +Statement [8] *((const byte*) main::BG_COLOR) ← (byte) 5 [ ] ( main:2 [ ] { } ) always clobbers reg byte a REGISTER UPLIFT SCOPES Uplift Scope [main] @@ -296,7 +296,7 @@ main: { .const w2 = 1*$100+1+w // Test the result .label pos = $501 - .label bgcol = $d021 + .label BG_COLOR = $d021 // constant inline words inside expression .label sc = w2 // [4] *((const byte*) main::sc#0) ← *((const byte*) main::bs+(byte) 1) -- _deref_pbuc1=_deref_pbuc2 @@ -310,9 +310,9 @@ main: { jmp __b2 // main::@2 __b2: - // [6] *((const byte*) main::bgcol) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // [6] *((const byte*) main::BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta bgcol + sta BG_COLOR jmp __breturn // main::@return __breturn: @@ -320,9 +320,9 @@ main: { rts // main::@1 __b1: - // [8] *((const byte*) main::bgcol) ← (byte) 5 -- _deref_pbuc1=vbuc2 + // [8] *((const byte*) main::BG_COLOR) ← (byte) 5 -- _deref_pbuc1=vbuc2 lda #5 - sta bgcol + sta BG_COLOR jmp __breturn bs: .byte 'c', 'm' } @@ -358,8 +358,8 @@ FINAL SYMBOL TABLE (label) main::@1 (label) main::@2 (label) main::@return +(const byte*) main::BG_COLOR = (byte*) 53281 (const byte) main::b = (byte) 4 -(const byte*) main::bgcol = (byte*) 53281 (const byte*) main::bs[] = { (byte) 'c', (byte) 'm' } (const byte*) main::pos = (byte*) 1281 (byte*) main::sc @@ -394,7 +394,7 @@ main: { .const w2 = 1*$100+1+w // Test the result .label pos = $501 - .label bgcol = $d021 + .label BG_COLOR = $d021 // constant inline words inside expression .label sc = w2 // *sc = bs[1] @@ -408,20 +408,20 @@ main: { cmp pos beq __b1 // main::@2 - // *bgcol = 2 - // [6] *((const byte*) main::bgcol) ← (byte) 2 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 2 + // [6] *((const byte*) main::BG_COLOR) ← (byte) 2 -- _deref_pbuc1=vbuc2 lda #2 - sta bgcol + sta BG_COLOR // main::@return // } // [7] return rts // main::@1 __b1: - // *bgcol = 5 - // [8] *((const byte*) main::bgcol) ← (byte) 5 -- _deref_pbuc1=vbuc2 + // *BG_COLOR = 5 + // [8] *((const byte*) main::BG_COLOR) ← (byte) 5 -- _deref_pbuc1=vbuc2 lda #5 - sta bgcol + sta BG_COLOR rts bs: .byte 'c', 'm' } diff --git a/src/test/ref/true-inline-words.sym b/src/test/ref/true-inline-words.sym index b54455330..befb33cc9 100644 --- a/src/test/ref/true-inline-words.sym +++ b/src/test/ref/true-inline-words.sym @@ -5,8 +5,8 @@ (label) main::@1 (label) main::@2 (label) main::@return +(const byte*) main::BG_COLOR = (byte*) 53281 (const byte) main::b = (byte) 4 -(const byte*) main::bgcol = (byte*) 53281 (const byte*) main::bs[] = { (byte) 'c', (byte) 'm' } (const byte*) main::pos = (byte*) 1281 (byte*) main::sc