From 30bee8e26804cd3ff02ff13648f66792391b0a45 Mon Sep 17 00:00:00 2001 From: mrdudz Date: Mon, 23 Jun 2025 14:54:05 +0200 Subject: [PATCH 01/29] test for #2208 --- test/asm/listing/666-bug2208.s | 28 +++++++++++++++++++++++ test/asm/listing/ref/666-bug2208.bin-ref | Bin 0 -> 6 bytes 2 files changed, 28 insertions(+) create mode 100644 test/asm/listing/666-bug2208.s create mode 100644 test/asm/listing/ref/666-bug2208.bin-ref diff --git a/test/asm/listing/666-bug2208.s b/test/asm/listing/666-bug2208.s new file mode 100644 index 000000000..9b83e95b0 --- /dev/null +++ b/test/asm/listing/666-bug2208.s @@ -0,0 +1,28 @@ + +; #2208 - Current ca65 generates different code for msbasic + +.setcpu "6502" + +ZP_START2 = $04 + +INPUTBUFFERX = INPUTBUFFER & $FF00 + +;------------------------------------------------------------------------------ + +;.feature org_per_seg +.zeropage + +; if not present, both 2.18 and head produce a absolute,x instruction +; if present, 2.18 produces a zp,x instruction - but head uses abs,x! +.org ZP_START2 + +INPUTBUFFER: + +;------------------------------------------------------------------------------ + +.segment "CODE" + + .byte $f0, $f1, $f2, $f3 ; just some data to search for + ; BUG: this will wrongly assembly into a 3-byte instruction + ; under certain conditions + lda INPUTBUFFERX,x diff --git a/test/asm/listing/ref/666-bug2208.bin-ref b/test/asm/listing/ref/666-bug2208.bin-ref new file mode 100644 index 0000000000000000000000000000000000000000..cab72bbd3a011f5d730fd182df046139a8e101b8 GIT binary patch literal 6 NcmezH@zdw63;+^l1bhGh literal 0 HcmV?d00001 From aba0b6b439b5e1c3cd168916c76230c19f368588 Mon Sep 17 00:00:00 2001 From: mrdudz Date: Fri, 11 Jul 2025 17:52:03 +0200 Subject: [PATCH 02/29] add missing command line details, sort options --- doc/ca65.sgml | 68 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/doc/ca65.sgml b/doc/ca65.sgml index c34b14398..5e53fb002 100644 --- a/doc/ca65.sgml +++ b/doc/ca65.sgml @@ -208,6 +208,16 @@ Here is a description of all the command line options: mortals:-) +