From 90271d0dcdaa782297a904ec2ef10f7c630fc0e9 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sat, 23 Jan 2021 18:55:25 +0100 Subject: [PATCH] textelite was okay --- docs/source/todo.rst | 7 +++++-- examples/test.p8 | 27 ++++++++++++++++++++------- examples/textelite.p8 | 3 --- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 264876880..28551b145 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -2,14 +2,17 @@ TODO ==== -- why is fibonacci example (and others) generating larger code now? fix? -- fix textelite saving (and loading?) +- fix sys.memcopy() - allow uwordpointer[index] syntax -> transform into @(uwordpointer+index) allow index to be >255! +- add offsetof() to get the byte offset of struct members - add any2(), all2(), max2(), min2(), reverse2(), sum2(), sort2() that take (array, startindex, length) arguments - optimize for loop iterations better to allow proper inx, cpx #value, bne loop instructions (like repeat loop) - why is there a beq _prog8_label_2_repeatend at the end of repeat loops? seems unused - optimize swap of two memread values with index, using the same pointer expression/variable, like swap(@(ptr+1), @(ptr+2)) +- implement the linked_list millfork benchmark +- implement highres 4 color mode in gfx2 +- make a retro amiga workbench 1.3 and/or 2.0 workbench "simulator" using that new gfx mode - can we get rid of the --longOptionName command line options and only keep the short versions? https://github.com/Kotlin/kotlinx-cli/issues/50 - add a f_seek() routine for the Cx16 that uses its seek dos api? - optimizer: detect variables that are written but never read - mark those as unused too and remove them, such as uword unused = memory("unused222", 20) - also remove the memory slab allocation diff --git a/examples/test.p8 b/examples/test.p8 index cecebdf79..cac481529 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -8,13 +8,26 @@ main { sub start() { - diskio.directory(8) - diskio.save(8, "blabla", $2000, 1024) - diskio.directory(8) - diskio.rename(8, "blabla", "newname") - diskio.directory(8) - diskio.delete(8, "newname") - diskio.directory(8) + ubyte[] sarray = [11,22,33] + ubyte[] tarray = [0,0,0] + + uword target = &tarray + uword source = &sarray + ubyte bb + @(target) = @(source) + target++ + source++ + @(target) = @(source) + target++ + source++ + @(target) = @(source) + target++ + source++ + + for bb in tarray { + txt.print_ub(bb) + txt.chrout('\n') + } } } diff --git a/examples/textelite.p8 b/examples/textelite.p8 index b1068aa24..26ee5865a 100644 --- a/examples/textelite.p8 +++ b/examples/textelite.p8 @@ -11,9 +11,6 @@ ; Note: this program is compatible with C64 and CX16. -; TODO fix save (and load?) crash bug - - main { const ubyte numforLave = 7 ; Lave is 7th generated planet in galaxy one