From 60a9209a145587f7129fd51d0dc59f77f1d06bc0 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Tue, 25 Aug 2020 01:48:23 +0200 Subject: [PATCH] plasma --- docs/source/todo.rst | 1 + examples/plasma.p8 | 4 +--- examples/test.p8 | 5 ++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 9f1800b25..ebde311bc 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -2,6 +2,7 @@ TODO ==== +- allocate sub params in zeropage as well (it already allows @zp tag on them!) - optimize assignment codegeneration - get rid of all TODO's ;-) - make it possible to use cpu opcodes such as 'nop' as variable names by prefixing all asm vars with something such as '_' diff --git a/examples/plasma.p8 b/examples/plasma.p8 index 68e3b02df..9465cbcaf 100644 --- a/examples/plasma.p8 +++ b/examples/plasma.p8 @@ -74,9 +74,7 @@ main { uword @zp scrptr = screen for y in 24 downto 0 { for x in 39 downto 0 { - @(scrptr) = xbuf[x] - @(scrptr) += ybuf[y] - ;@(scrptr) = xbuf[x] + ybuf[y] + @(scrptr) = xbuf[x] + ybuf[y] ; %asm {{ ; ldy x ; lda xbuf,y diff --git a/examples/test.p8 b/examples/test.p8 index 78b291f53..e15d02d8d 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -4,10 +4,9 @@ main { sub start() { - ubyte bb = 1 uword addr=$d020 - @(addr) = bb - bb = @(addr) + ubyte q =2 + @(addr) += q } }