DusanStrakl Posted April 27, 2020 Share Posted April 27, 2020 Does anybody knows how where might the last cursor position on screen when the program was started be stored (Assembly or Basic)? Thanks, Dusan 1 Quote Link to comment Share on other sites More sharing options...
0 StephenHorn Posted April 29, 2020 Share Posted April 29, 2020 1 hour ago, DusanStrakl said: I tried it before and it looked like it was not working, now I tried it again and it works but it puts positions in opposite registers, Y returns column and X returns row number. That confused me before. It does the same thing when setting the coordinates. 16 minutes ago, SlithyMatt said: Sounds like a bug. You should report it on the ROM repo: https://github.com/commanderx16/x16-rom/issues No bug, that's actually how that's supposed to work, apparently. https://www.c64-wiki.com/wiki/PLOT_(KERNAL) Quote Link to comment Share on other sites More sharing options...
0 SlithyMatt Posted April 28, 2020 Share Posted April 28, 2020 Have you tried the PLOT function in the Kernal ($FFF0)? If you set the carry bit, it should put the cursor position in the X and Y registers: sec jsr $FFF0 That's what the C64 kernal would do, but I haven't had a need to do it with the X16. 2 Quote Link to comment Share on other sites More sharing options...
0 DusanStrakl Posted April 29, 2020 Author Share Posted April 29, 2020 I tried it before and it looked like it was not working, now I tried it again and it works but it puts positions in opposite registers, Y returns column and X returns row number. That confused me before. It does the same thing when setting the coordinates. Quote Link to comment Share on other sites More sharing options...
0 SlithyMatt Posted April 29, 2020 Share Posted April 29, 2020 56 minutes ago, DusanStrakl said: I tried it before and it looked like it was not working, now I tried it again and it works but it puts positions in opposite registers, Y returns column and X returns row number. That confused me before. It does the same thing when setting the coordinates. Sounds like a bug. You should report it on the ROM repo: https://github.com/commanderx16/x16-rom/issues Quote Link to comment Share on other sites More sharing options...
0 SlithyMatt Posted April 29, 2020 Share Posted April 29, 2020 Hmm... seems something is amiss, because the Kernal reference that I usually use says the opposite: https://sta.c64.org/cbm64krnfunc.html I wonder which way the C64 (or VIC-20) does it? Quote Link to comment Share on other sites More sharing options...
0 DusanStrakl Posted April 29, 2020 Author Share Posted April 29, 2020 (edited) I was just looking into it and this document says opposite: https://sta.c64.org/cbm64krnfunc.html Also function SCREEN returns width in X and height in Y I just posted it as bug and will see what dev will say. Edited April 29, 2020 by DusanStrakl Quote Link to comment Share on other sites More sharing options...
0 SlithyMatt Posted April 29, 2020 Share Posted April 29, 2020 (edited) This tutorial says they are supposed to be switched, too: http://retro64.altervista.org/blog/very-basic-basic-plotting-characters-screen-c64-and-vic-20/ I guess that means that my usual reference is not 100% correct. This OCR scan of an original CBM programming guide also says they should be switched, so it looks like there is no bug, for sure. Edited April 29, 2020 by SlithyMatt Quote Link to comment Share on other sites More sharing options...
0 Super Administrators Perifractic Posted April 29, 2020 Super Administrators Share Posted April 29, 2020 1 hour ago, DusanStrakl said: I just posted it as bug and will see what dev will say. This reminded me to add a bug report link to the GitHub (for now) in the Help & Support forum here. Thanks. Quote Link to comment Share on other sites More sharing options...
0 Super Administrators Perifractic Posted April 29, 2020 Super Administrators Share Posted April 29, 2020 21 hours ago, StephenHorn said: No bug, that's actually how that's supposed to work, apparently. https://www.c64-wiki.com/wiki/PLOT_(KERNAL) (This is a test reply to the "best answer") Quote Link to comment Share on other sites More sharing options...
0 StephenHorn Posted April 29, 2020 Share Posted April 29, 2020 9 minutes ago, Perifractic said: (This is a test reply to the "best answer") And I pretty much got the push notification from that immediately, even though I'd left the site open and idle for some hours. So that seems to work well. Quote Link to comment Share on other sites More sharing options...
0 Super Administrators Perifractic Posted April 29, 2020 Super Administrators Share Posted April 29, 2020 43 minutes ago, StephenHorn said: And I pretty much got the push notification from that immediately, even though I'd left the site open and idle for some hours. So that seems to work well. That's good. It also supports push on mobile. 1 Quote Link to comment Share on other sites More sharing options...
Question
DusanStrakl
Does anybody knows how where might the last cursor position on screen when the program was started be stored (Assembly or Basic)?
Thanks,
Dusan
Link to comment
Share on other sites
11 answers to this question
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.