Turbo Toolkit (bug, which version)

Anything QL Software or Programming Related.
User avatar
ql_freak
Gold Card
Posts: 427
Joined: Sun Jan 18, 2015 1:29 am

Turbo Toolkit (bug, which version)

Post by ql_freak »

The test for my SuperBASIC hps_openOver%() function fails on uQLx with Minerva. The problem is, that DEVICE_STATUS() from Turbo Toolkit is faulty. I have written a short test for that (fits in #2) and as soon as you are using DEVICE_STATUS(0,'FILENAME') FILENAME will be open and you can only close the (QDOS) channel via Qpac2s Channel app. On QPC2 this program is working correctly.
testDEVICE_STATUS_bas.png
I have confirmed that my version of Turbo Toolkit is the same, as that from Dilwyns site. But this Archive contains 4 files. On QPC2 I'm using "Turbo_newsms_code" (don't know where I have got it) on uQLx the version from the archive called "turbo_tk_code" (the archive also contains turbo_sms_code and turbo_rem_code). What version should be used for Minerva and does anyone know, what version Turbo_newsms_code is, where to obtain it and if it can be used with Minerva (perphaps I have patched it myself, can't remember).


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
swensont
Forum Moderator
Posts: 311
Joined: Tue Dec 06, 2011 3:30 am
Location: SF Bay Area
Contact:

Re: Turbo Toolkit (bug, which version)

Post by swensont »

Interesting issue. I decided to run a few tests myself.

The key line is the DEVICE_STATUS(0,filename) line. I wondered why you were adding in single quotes instead of using just the file name, so I tested the following:

- DEVICE_STATUS(0,"ram1_del_me") - double quotes
output was -6 and the next delete failed with "in use"

- DEVICE_STATUS(0,'ram1_del_me') - single quotes
output was -6 and the next delete failed with "in use"

- DEVICE_STATUS(0,ram1_del_me) - no quotes
output was -7 and the next delete worked.

The above results were found with both JSU, Minerva and JS-4m roms (all available from Dilwyn's site).

Tim


User avatar
RalfR
QL Wafer Drive
Posts: 1140
Joined: Fri Jun 15, 2018 8:58 pm

Re: Turbo Toolkit (bug, which version)

Post by RalfR »

swensont wrote: Sat Feb 22, 2025 5:57 pm - DEVICE_STATUS(0,ram1_del_me) - no quotes
output was -7 and the next delete worked.
This surprises me a lot, because Turbo in particular always recommends putting all variables (and this would be one of them here) in quotation marks.


7000 4E75
User avatar
ql_freak
Gold Card
Posts: 427
Joined: Sun Jan 18, 2015 1:29 am

Re: Turbo Toolkit (bug, which version)

Post by ql_freak »

This is no wonder, cause -7 is the error for "not found", i.e. DEVICE_STATUS() has not found the file and so it has not opened it, so the DELETE will work. It seems DEVICE_STATUS() does not close the QDOS channel it has opened in its code.


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
pjw
QL Wafer Drive
Posts: 1588
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Turbo Toolkit (bug, which version)

Post by pjw »

ql_freak wrote: Sat Feb 22, 2025 6:17 pm This is no wonder, cause -7 is the error for "not found", i.e. DEVICE_STATUS() has not found the file and so it has not opened it, so the DELETE will work. It seems DEVICE_STATUS() does not close the QDOS channel it has opened in its code.
If youre happy to load a toolkit, there is FDEL at Knoware/toolkits/Compatibility. It is a delete function that doesnt error if the file you want to delete isnt present. I believe I also added this function to TK2, although it might not appear in all versions (like the ROM one due to space constraints).


Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
User avatar
pjw
QL Wafer Drive
Posts: 1588
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Turbo Toolkit (bug, which version)

Post by pjw »

It seems someone clobbered the version I did for SMSQ/E as it returns 0, rather than the intended -7 if the file is not found. However, it does return -9 if the file is in use, which is something, I suppose. I dont know about the TK2 one (V2.33+)


Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
jobdone
Forum Moderator
Posts: 93
Joined: Wed Aug 07, 2019 4:59 am

Re: Turbo Toolkit (bug, which version)

Post by jobdone »

I am seeing this error with version 3.44. I have version 3.22 which does not give this error.


jobdone
Forum Moderator
Posts: 93
Joined: Wed Aug 07, 2019 4:59 am

Re: Turbo Toolkit (bug, which version)

Post by jobdone »

I am also getting -6 with Qemulator


User avatar
Andrew
Aurora
Posts: 984
Joined: Tue Jul 17, 2018 9:10 pm

Re: Turbo Toolkit (bug, which version)

Post by Andrew »

swensont wrote: Sat Feb 22, 2025 5:57 pm Interesting issue. I decided to run a few tests myself.

The key line is the DEVICE_STATUS(0,filename) line. I wondered why you were adding in single quotes instead of using just the file name, so I tested the following:

- DEVICE_STATUS(0,"ram1_del_me") - double quotes
output was -6 and the next delete failed with "in use"
Out of curiosity I also tested
- DEVICE_STATUS(0,"ram1_del_me") - double quotes
output was -7
Both on QPC with turbo_sms_code v3.44 and QEmulator (Minerva+PE) with turbo_tk_code v3.44


jobdone
Forum Moderator
Posts: 93
Joined: Wed Aug 07, 2019 4:59 am

Re: Turbo Toolkit (bug, which version)

Post by jobdone »

Andrew, AS ql_freak pointed out above the -7 is a not found error, so if there is no ram disk set up first, you get a -7. on q-emulator this is in the menu under QL Configuration>Devices and checking the Ram disk box, or just setting one up in software first, the same way on QPC.I actually booted QPC2 with the stock *.WIN file, which has a desktop and ram disk set up. this particular ram disk seems to return the number it should?


Post Reply