In my program PAUSE doesn't seem to work. Is that normal? I would find it useful to delay execution a bit while my program prints an error on screen when the result of an INPUT isn't compliant. I can't see any mention of PAUSE in the wiki. I mean I can use a FOR loop to count to 10,000 instead, but I thought the aim of Boriel BASIC is to be a faster superset of Sinclair BASIC so it's surprising this seems to be missing.
PAUSE not working (*solved*)
|
For the time being I have copied a Sub from the Berks Man source code which does the job using the CPU's HALT instruction:
Code: SUB Wait(w AS uInteger) (12-29-2020, 03:56 AM)patters Wrote: In my program PAUSE doesn't seem to work. Is that normal? I would find it useful to delay execution a bit while my program prints an error on screen when the result of an INPUT isn't compliant. I can't see any mention of PAUSE in the wiki. I mean I can use a FOR loop to count to 10,000 instead, but I thought the aim of Boriel BASIC is to be a faster superset of Sinclair BASIC so it's surprising this seems to be missing. PAUSE is implemented and it's just a call to the ROM pause (which basically does what your sub does). Are you disabling the interruptions with DI or something? I've just tested it and it works: Code: PAUSE 50 Will wait for 50 frames and then print the message. Remember that pause can be cancelled by pressing a key
12-29-2020, 05:11 PM
No, the only other bit of ASM is some DEFBs to define UDGs. I am using the input.bas library, could that be impacting things?
12-29-2020, 05:20 PM
That's it!!
Apparently INPUT does something that makes the next PAUSE to be ignored (further PAUSE's will be taking into account). Thanks for the report. Will investigate this!
12-29-2020, 05:37 PM
Ok. Seems I got it.
I will fix it in the next release. In the mean time, you can avoid the bug but doing: Code: POKE 23611, PEEK 23611 bAND 0xEF
Wow, so fast to fix!
I also spotted another issue with Input. If you try to delete a character entered during the INPUT the cursor jumps to the line above (at least in my program which prints the INPUT question on line 22).
Ok, Let's fix that. Can you post a little example?
In the meantime, if you want to try with a beta with the fix mentioned above, you can download from here: Windows: http://www.boriel.com/files/zxb/zxbasic-...-win32.zip Linux: http://www.boriel.com/files/zxb/zxbasic-...x64.tar.gz Mac OS: http://www.boriel.com/files/zxb/zxbasic-...cos.tar.gz Source (Python): http://www.boriel.com/files/zxb/zxbasic-...ta1.tar.gz http://www.boriel.com/files/zxb/zxbasic-...-beta1.zip
Sure. During the INPUT prompt, enter a character, then delete it and you'll see the cursor jump up to the line above.
Code: #include <input.bas> I just tried beta 1.14 in Mac OS and it doesn't seem to have fixed the INPUT/PAUSE issue. The code I posted above still isn't PAUSEing properly even when compiled using 1.14.
12-29-2020, 07:18 PM
Can you try with this version, please?
Tell me if it's fixed: http://www.boriel.com/files/zxb/zxbasic-...ta2.tar.gz http://www.boriel.com/files/zxb/zxbasic-...-beta2.zip http://www.boriel.com/files/zxb/zxbasic-...-win32.zip http://www.boriel.com/files/zxb/zxbasic-...x64.tar.gz http://www.boriel.com/files/zxb/zxbasic-...cos.tar.gz This one is harder to fix, as it's related to the PRINT + SCROLL management.
I can confirm that 1.14beta2 build has fixed my specific issue with the delete spoiling the INPUT cursor. However, PAUSE still isn't working. Your reponse wasn't entirely clear - do I need to add that code workaround, or was your intention to fix the compiler so that wouldn't be necessary? Thanks.
12-29-2020, 08:13 PM
Both errors should have gone.
Please try this new beta3, and tell me: http://www.boriel.com/files/zxb/zxbasic-...ta3.tar.gz http://www.boriel.com/files/zxb/zxbasic-...-beta3.zip http://www.boriel.com/files/zxb/zxbasic-...-win32.zip http://www.boriel.com/files/zxb/zxbasic-...x64.tar.gz http://www.boriel.com/files/zxb/zxbasic-...cos.tar.gz
12-29-2020, 11:52 PM
Yes, that last beta build has fixed both of the issues. Did you see my other new post in this subforum? I'm guessing it's something simple, but it's driving me a bit crazy
01-02-2021, 02:20 PM
(12-29-2020, 11:52 PM)patters Wrote: Yes, that last beta build has fixed both of the issues. Did you see my other new post in this subforum? I'm guessing it's something simple, but it's driving me a bit crazy Please check the thread about the TAB bug, because I did a "regression" of this one and it should all be fixed now. I'm waiting for your confirmation to include the change in the official release.
01-03-2021, 12:52 AM
Yes I can confirm that 1.14beta6 and beta9 have fixed this issue.
|
« Next Oldest | Next Newest »
|
Users browsing this thread: 2 Guest(s)