flashjazzcat Posted April 16, 2016 Share Posted April 16, 2016 (edited) Just stumbled into a bug with MADS' built-in ADW macro when used with (ZP),Y: LDY #$04 ADW (OBSPEC),Y PTR2 PTR4 A334: A0 04 LDY #$04 A336: 18 CLC A337: B1 C1 LIMITCLIP.OFFSCREEN LDA (OBSPEC),Y A339: 65 E2 LIMITCLIP.139@ ADC PTR2 A33B: 85 E6 STA PTR4 A33D: C8 INY A33E: B1 C1 LDA (OBSPEC),Y A340: 65 E3 ADC $E3 A342: 85 E6 STA PTR4 ; <<<<<<< should be $E7, not $E6 LDY #$04 MWA (OBSPEC),Y PTR4 A334: A0 04 LDY #$04 A336: B1 C1 LDA (OBSPEC),Y A338: 85 E6 STA PTR4 A33A: C8 INY A33B: B1 C1 LDA (OBSPEC),Y A33D: 85 E7 STA $E7 ; <<<<<<<<<<<<< $E7 = correct Using the latest build here, and I'm sure ADW used to store the MSB correctly in older versions. Haven't looked to see if the bug exists in SBW as well. Edited April 16, 2016 by flashjazzcat Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted April 30, 2016 Author Share Posted April 30, 2016 Bump. Quote Link to comment Share on other sites More sharing options...
tebe Posted May 1, 2016 Share Posted May 1, 2016 adw (zp),y bug fix mads204b11.zip 2 Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted May 1, 2016 Author Share Posted May 1, 2016 (edited) adw (zp),y bug fix Great - many thanks. This fixes the issue described but (ZP),Y support is still very inconsistent in the ADW and SBW macros: ptr1 equ $80 ptr2 equ $82 ptr3 equ $84 org $2000 Start ldy #0 adw Num1 #2 ldy #0 adw (ptr1),y #2 ; error - extra characters on line ldy #0 adw (ptr1),y #2 Num1 ldy #0 adw (ptr1),y Num1 Num2 ldy #0 adw (ptr1),y #2 (ptr2),y ; error - extra characters on line ldy #0 adw Num1 Num2 Num3 ldy #0 adw (ptr1),y (ptr2),y (ptr3),y ; error - extra characters on line rts Num1 .word 0 Num2 .word 0 Num3 .word 0 end start The exact same errors appear for SBW. These seem like potentially common scenarios and they work with absolute references. Edited May 1, 2016 by flashjazzcat Quote Link to comment Share on other sites More sharing options...
tebe Posted May 1, 2016 Share Posted May 1, 2016 correct version (',y' -> ',Y') mads204b12.zip 2 Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted May 1, 2016 Author Share Posted May 1, 2016 correct version (',y' -> ',Y') Wow - that was fast. Thanks. I'll test this thoroughly over the coming days. The example appears to compile perfectly. Quote Link to comment Share on other sites More sharing options...
+Stephen Posted May 1, 2016 Share Posted May 1, 2016 Wow - talk about customer service! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.