42bs Posted November 28, 2018 Share Posted November 28, 2018 There seems to be a bug related Z bit evaluation. I have this code lda y2 sbc y1 sta MATHE_B stz MATHE_B+1 beq .1 inc .1: If the sbc results in zero the branch is not taken. If I move the "stz MATHE_B+1", the branch is taken. Quote Link to comment Share on other sites More sharing options...
sage Posted November 29, 2018 Share Posted November 29, 2018 (edited) dont get it yet: what is the problem: stz is setting the Z bit or its resetting it? what is the problem: sta is setting the Z bit or its resetting it? Edited November 29, 2018 by sage Quote Link to comment Share on other sites More sharing options...
42bs Posted November 29, 2018 Author Share Posted November 29, 2018 (edited) "stz" does not modify the Z bit => correct handled. But after "stz" the "beq" is not emultated correctly, as if the Z bit was negated. But I have'nt yet made a real test case. Edit: *hmpf* I cannot reproduce the issue (or better :-), since we do not want a bug in handy) Edited November 29, 2018 by 42bs Quote Link to comment Share on other sites More sharing options...
enthusi Posted November 29, 2018 Share Posted November 29, 2018 STZ seems to reset the Z flag (and not set it, which is correct at least) in your example. However, I do not see it in my version Handy GCC/SDL Portable Atari Lynx Emulator v0.5Based upon Handy 0.95 WIN32 by Keith Wilkins. This works as expected, also with other addresses for STZ. lda #0 stz $fc61 beq cont rti cont Quote Link to comment Share on other sites More sharing options...
42bs Posted November 29, 2018 Author Share Posted November 29, 2018 Yepp, "stz" should not alter any flags. I tried again the code which made me think it is a bug. But now it works correctly?! Quote Link to comment Share on other sites More sharing options...
enthusi Posted November 29, 2018 Share Posted November 29, 2018 None of us is getting any younger 1 Quote Link to comment Share on other sites More sharing options...
42bs Posted November 29, 2018 Author Share Posted November 29, 2018 None of us is getting any younger And still 20 years to work 'till retirement ... Quote Link to comment Share on other sites More sharing options...
sage Posted November 29, 2018 Share Posted November 29, 2018 ... unless they increased the retirement age ... 1 Quote Link to comment Share on other sites More sharing options...
+karri Posted November 29, 2018 Share Posted November 29, 2018 ... as they did here ... 1 Quote Link to comment Share on other sites More sharing options...
+bhall408 Posted February 16, 2019 Share Posted February 16, 2019 So did this end up getting considered a reproducible bug? Sounds like no... However I have noticed an odd rendering bug with Robotron in some emulators based on the original/sourceforge version of Handy... I'll start another topic for that. 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.