QLCOMMANDER - testers and help needed

Anything QL Software or Programming Related.
Post Reply
User avatar
Andrew
Aurora
Posts: 786
Joined: Tue Jul 17, 2018 9:10 pm

QLCOMMANDER - testers and help needed

Post by Andrew »

Hi all
After 29 years without a QL, i wrote a small program just to remember Superbasic :) It is in beta phase now - and I know that many procedures and functions could be written more efficiently.
It seems to run just fine in Basic - but it is painfully slow on an unexpanded QL and also I have not fully tested it.
So please play a bit with it and see if you find any bugs.
Also I need help to compile it !! - I did not managed to do it by myself in Turbo :( - so I am counting on you guys to show me how it should be done.

QLC.zip - unzip it on QL, not on windows
Attachments
qlc.zip
(65.12 KiB) Downloaded 628 times
QLC_Manual.pdf
(1.39 MiB) Downloaded 673 times


martyn_hill
Aurora
Posts: 909
Joined: Sat Oct 25, 2014 9:53 am

Re: QLCOMMANDER - testers and help needed

Post by martyn_hill »

Hi Andrew

I have yet to try running your file-manager, but have been successful in compiling with Turbo - at least as far as no compilation errors.

One of the more confusing topics when moving from interpreted to Turbo'd SB is how Arrays are passed as parameters.

Turbo can't handle passing Arrays 'by value' which is how it handles all other parameters by default - unless explicitly flagged as 'by reference' using the REFERENCE directive immediately before the DEFine with the formal parameter list including the array.

I count 10 such instances in your source-code all referencing FileList$, and by adding the following directive in front of each PROC/FN, Turbo happily compiles without error:

Code: Select all

REFERENCE FileList$(0,0,0)
As you'll read in the Turbo manual, the three '0' indices are just place-holders, indicating the dimensions of the expected array-parameter - the actual values are ignored and only the number of indices are counted.

Nice manual - I look forward to trying out the program later.
====
Another tip when preparing your SB program for Turbo is to add standard directives at the beginning - the following are examples:

Code: Select all

1000 REMark *** TURBO Directives...
1010 TURBO_locstr "R"
1020 TURBO_windo 2
1030 TURBO_optim "B"
1040 TURBO_model 1
1050 TURBO_struct "S"
1060 TURBO_diags "I"
1070 TURBO_list "YES"
1080 TURBO_sound "YES"
1090 TURBO_objdat 16
1100 TURBO_buffersz 16
1110 TURBO_objstk 512
1120 TURBO_taskn "QLC v0.9a"
1130 TURBO_objfil "ram1_QLC_QLC_v09a_exe"
1140 TURBO_repfil "dos2_QLC_QLC_v09a_rpt.txt"
The 'windo' directive of zero can be useful when you intend to OPEN and define all your own windows (rather than copying Job-0's three standard windows). Also, if you typically prepare your programs in an emulator (QPC, for example) and compile there with larger windows, you will likely hit problems running the compiled job in another environment (e.g. a real QL) with smaller displays unless you choose NOT to copy SB windows (with windo 0) or else first reduce the emulator's windows to be within the standard sizes before CHARGE'ing.

God luck!


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

Re: QLCOMMANDER - testers and help needed

Post by Andrew »

Thank you Martin !
My mistake - I misread the Turbo manual. I read that "You can pass arrays by reference, but not by value." so I presumed that Turbo will automatically pass them by reference :(
I will have to read the Turbo manual again and try to understand what all those directives do - at this moment I don't have a clue.

I have added the REFERENCE FileList$(0,0,0) - now it compiles but it does not run :( There is something I am doing wrong - probably with those directives
I compiled it in Liberator and it runs ok - but still I would like to use Turbo - it is faster and it doesn't need the a runtime.
(I am compiling in QEmulator - and testing on a real QL and then in QPCII)

I made some small changes in the code - but I still have 2 issues:
1. How can I disable Break when program in waiting for input ? (without using TinyTookit or BTools - I do not want to load them only for 1 function)
2. How can pass a command to Superbasic Job 0 ? I would like to have the option to Load a basic file to Superbasic - and Load does not compile in Liberator. An example would help.


swensont
Forum Moderator
Posts: 252
Joined: Tue Dec 06, 2011 3:30 am
Location: SF Bay Area
Contact:

Re: QLCOMMANDER - testers and help needed

Post by swensont »

> 2. How can pass a command to Superbasic Job 0 ? I would like to have the option to Load a basic file to Superbasic - and Load does not compile in Liberator. An example would help.

Here is how I did it with my SSBGO program:

cmd$ = "LOAD "&filename$&outputext$&CHR$(10)
TYPE_IN cmd$

TYPE_IN (IIRC) is part of the Hot Key system (or TKII, or something common).

Tim


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

Re: QLCOMMANDER - testers and help needed

Post by Andrew »

I tried Type_IN and Queue% - but the string is consumed by by program, not by Job 0 - Sbasic


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: QLCOMMANDER - testers and help needed

Post by pjw »

In SMSQ/E (and Qdos with Hotkey loaded) you might be able to do something with HOT_CMD. If any SBASIC will do (not only job 0) then EXEP 'SBASIC'; command$ could also work. Or you could write a small toolkit in assembler to PICK job 0 to the top (requires the Pointer Environment, so SMSQ/E or Qdos with ptr_gen) and then use TYPE_IN (which is a Turbo TK command).
BTW, I took QLC for a quick spin. (Nice manual!) Its seems to be a competent file manager for a BBQL+memory :) But IMHO you need to choose whether you want it strictly for Qdos/Minerva, or want to include the PE and/or SMSQ/E as well. If the former, you may find it hard to do some of the things you seem to want to do. If the latter you need to get rid of ALT selection keys, as these are often already in use for the Hotkey system. Then youll want to be able to move the window around (and ideally make it re-sizable) Also your fount doesnt display on SMSQ/E (QPC2).
Just my penny's worth..


Per
dont be happy. worry
- ?
martyn_hill
Aurora
Posts: 909
Joined: Sat Oct 25, 2014 9:53 am

Re: QLCOMMANDER - testers and help needed

Post by martyn_hill »

Hi again Andrew

I've tinkered with your source a bit more and managed to get it compiled and running (on QPC for now). There are a couple more places that REFERENCE <variable> will be needed - in addition to FileList$ - as well as an adjustment to the very first OUTLN. Also, Turbo compiled jobs have any command-string passed in OPTION_CMD$ and not 'Cmd$'.

I'll share a modified version after I test a bit more.

It's a tidy little file-manager - well done!


Jack_Free
ROM Dongle
Posts: 42
Joined: Sun Aug 30, 2015 3:31 pm

Re: QLCOMMANDER - testers and help needed

Post by Jack_Free »

Hello,

I try to test the Qlcommander program.
I set the paths in qlconfig_bas
I will modify qlc_boot
but for some time, a bad name error will occur
and a red bluff at the top of the screen
Is there any help for me?


Sinclair QL + SGC, Sinclair QL+QL-SD.
Excuse my English, I use google translator :-)
User avatar
Andrew
Aurora
Posts: 786
Joined: Tue Jul 17, 2018 9:10 pm

Re: QLCOMMANDER - testers and help needed

Post by Andrew »

Hi Jack_Free
I forgot to mention that you also will have to modify the ConfigDrv$ variable at line 1040 in the basic program, and point it to the directory where you saved QLC
You also need Toolkit 2 installed and PE - but I guessed that everybody has them these days

Hi pjw
I do not use SMSQ/E - never got the hang of it. I tried both QL/E and Black Phoenix distributions, and for some reason neither seem to work well on my computer (well, probably the bug is in the chair :) - i do not know how to use them and never spared more than 15 minutes to play with them).
I plan to modify the program for use with PE - with resizeable and movable windows and mouse use, but for now I want to make it run ok on bbQL+memory.
Moving to PE will be a challenge, as I find the QPTR documentation very badly written and I could not find any programming examples - so probably I will go with TurboPTR
Speaking about QPTR - the manual mentions some programming examples: some DEMO programs as well as a PAINT and ESPR programs. I could not find them on Dilwyn's site. Does anybody have them ?


Jack_Free
ROM Dongle
Posts: 42
Joined: Sun Aug 30, 2015 3:31 pm

Re: QLCOMMANDER - testers and help needed

Post by Jack_Free »

hello Andrew

thanks for your advice, I'm sorry but it still does not work.
the program still does not work.
TK2 and PE are installed
Are you using PE components PTR_GEN, WMAN, HOT_REXT (English) for some additional components?

Edit:
the program will end with an error at line 130


Sinclair QL + SGC, Sinclair QL+QL-SD.
Excuse my English, I use google translator :-)
Post Reply