From 80ab552ad878bc03c653663127cbe07b686b8df7 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sun, 17 Jul 2022 19:01:47 +0200 Subject: [PATCH] fix wrong code for signed word >= 0 --- compiler/res/prog8lib/prog8_lib.asm | 7 ++----- docs/source/todo.rst | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/compiler/res/prog8lib/prog8_lib.asm b/compiler/res/prog8lib/prog8_lib.asm index 1928b3491..579e1080b 100644 --- a/compiler/res/prog8lib/prog8_lib.asm +++ b/compiler/res/prog8lib/prog8_lib.asm @@ -665,13 +665,10 @@ greaterequalzero_sb .proc greaterequalzero_sw .proc lda P8ESTACK_HI+1,x - bmi equalzero_b._false - ora P8ESTACK_LO+1,x - beq equalzero_b._true - bne equalzero_b._false + bpl equalzero_b._true + bmi equalzero_b._false .pend - memcopy16_up .proc ; -- copy memory UP from (P8ZP_SCRATCH_W1) to (P8ZP_SCRATCH_W2) of length X/Y (16-bit, X=lo, Y=hi) ; clobbers register A,X,Y diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 92d7f4365..f38f56b5d 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -3,7 +3,6 @@ TODO For next release ^^^^^^^^^^^^^^^^ -- uword x, ubyte radius; (x as word - radius) > 0 is ok , but (x as word - radius) >=0 is incorrect? - add item to XZeropage that enables an option that if zeropage=FULL or KERNALSAFE, moves the cx16 virtual registers to ZP, same location as on x16 (can be done on C64 only for now) Remove those addresses from the ZP free pool = allocate them in ZP like Cx16Zeropage does Adapt the code in AstPreprocessor that relocates the registers as well.