QL Tinkering
QL Tinkering
Hi to all those who like me have returned to the fold and maybe on a mission to complete those early attempt at programming. Not to overlook any new to the QL scene, I hope my postings, the advice and suggestions received from others will benefit us all.
For WRAP and Dilywn any programs uploaded, warts and all, I have no objection for them to be added to your growing collection as QBITS free downloads on the understanding that for whatever reason that may arise there is no public liability attached to me.
Well now that’s said and done, over the coming weeks, months I hope to share more of my QBITS journey the early programs and updates as I return to enhance my skills in SuperBASIC programming.
An early necessity I found of great benefit while experimenting with programming code was to have a helping hand managing all the small files I produced. The QBITS File Tidy began its life soon after I bought my first QL see attached.
Qbits
Edit 1 04/01/2017
Apologies error with QBFTidy version I uploaded [copy command] now been changed.
Edit 2 05/01/2017
My original FTidy had a few lines of code that had an additional MOVE command an extension of Copy and Delete. In removing the extra bit of code I left a variable which caused an error. I also then realised the Copy command should not try to Copy from source to target if they were the same device. So I’ve added a block to this happening - see code change below.
QBFTidy DEF PROC F_copy
301 IF TDR$=SDR$:F_clear:RETurn (added following lines renumbered)
302 CURSOR #5,px%,py%:PRINT #5,TDR$&' Overwrite <y/n>'
303 px%=84:py%=6:Fnum%=n:k$=INKEY$(#5,-1)
304 IF k$=='y' OR k$=CHR$(10)
305 FOR n=1 TO ftot%
306 IF Sett(n)=7
307 CURSOR #5,px%,py%:PRINT #5,file$(n)&' TO '&TDR$:CLS #5,4
308 DELETE TDR$&file$(n):COPY SDR$&file$(n) TO TDR$&file$(n)
308 IF chg>0:DELETE SDR$&file$(n) (Deleted line)
The Uploaded files have been update
For WRAP and Dilywn any programs uploaded, warts and all, I have no objection for them to be added to your growing collection as QBITS free downloads on the understanding that for whatever reason that may arise there is no public liability attached to me.
Well now that’s said and done, over the coming weeks, months I hope to share more of my QBITS journey the early programs and updates as I return to enhance my skills in SuperBASIC programming.
An early necessity I found of great benefit while experimenting with programming code was to have a helping hand managing all the small files I produced. The QBITS File Tidy began its life soon after I bought my first QL see attached.
Qbits
Edit 1 04/01/2017
Apologies error with QBFTidy version I uploaded [copy command] now been changed.
Edit 2 05/01/2017
My original FTidy had a few lines of code that had an additional MOVE command an extension of Copy and Delete. In removing the extra bit of code I left a variable which caused an error. I also then realised the Copy command should not try to Copy from source to target if they were the same device. So I’ve added a block to this happening - see code change below.
QBFTidy DEF PROC F_copy
301 IF TDR$=SDR$:F_clear:RETurn (added following lines renumbered)
302 CURSOR #5,px%,py%:PRINT #5,TDR$&' Overwrite <y/n>'
303 px%=84:py%=6:Fnum%=n:k$=INKEY$(#5,-1)
304 IF k$=='y' OR k$=CHR$(10)
305 FOR n=1 TO ftot%
306 IF Sett(n)=7
307 CURSOR #5,px%,py%:PRINT #5,file$(n)&' TO '&TDR$:CLS #5,4
308 DELETE TDR$&file$(n):COPY SDR$&file$(n) TO TDR$&file$(n)
308 IF chg>0:DELETE SDR$&file$(n) (Deleted line)
The Uploaded files have been update
- Attachments
-
- QBFTidy201701.pdf
- (1.06 MiB) Downloaded 606 times
-
- QBFTidy.zip
- (5.97 KiB) Downloaded 592 times
Re: QL Tinkering
Hi,
Checking through my old files I found my 1992 QBITS version of a mine sweeper style of game. An almost direct copy of the code I wrote in 1987 and my earliest attempt at programming of a game.
Qbits
Checking through my old files I found my 1992 QBITS version of a mine sweeper style of game. An almost direct copy of the code I wrote in 1987 and my earliest attempt at programming of a game.
Qbits
- Attachments
-
- QBMD_bas.zip
- (3.19 KiB) Downloaded 562 times
Re: QL Tinkering
Continuing the journey of my QL Programming this was my Early Learning Phase as I call it.
See attached.
Qbits
See attached.
Qbits
- Attachments
-
- QBConundrum.pdf
- (994.15 KiB) Downloaded 566 times
-
- QBConundrum.zip
- (20.83 KiB) Downloaded 582 times
Re: QL Tinkering
QBDarts has been a long drawn out process from conception in the eighties to hopefully fulfilling most of my early aspirations. Working the code for QBDarts I came across what I can only describe as an intriguing abnormality.
100 REMark Score_Test
102 REMark score=runnimg score dp=dart points
104 :
106 PAPER 7:CLS:INK 0:PRINT 'n score - dp <=1 RED score<dp GREEN'
108 FOR n=1 TO 18
110 score=10:dp=6+n:INK 0:PRINT n,score,dp
112 INK 4:IF score<dp:CURSOR 120,10*n:PRINT score,dp;' '
114 INK 2:IF score-dp<=1:dp=0:CURSOR 120,10*n:PRINT score,dp;' '
116 END FOR n
If you check this out it will show the IF statement of line 114 does not hold true for 10-12, 10-14 and 10-18.
Can anyone explain this!!!
I’ve included this short prog with the QBDarts.zip
Qbits
100 REMark Score_Test
102 REMark score=runnimg score dp=dart points
104 :
106 PAPER 7:CLS:INK 0:PRINT 'n score - dp <=1 RED score<dp GREEN'
108 FOR n=1 TO 18
110 score=10:dp=6+n:INK 0:PRINT n,score,dp
112 INK 4:IF score<dp:CURSOR 120,10*n:PRINT score,dp;' '
114 INK 2:IF score-dp<=1:dp=0:CURSOR 120,10*n:PRINT score,dp;' '
116 END FOR n
If you check this out it will show the IF statement of line 114 does not hold true for 10-12, 10-14 and 10-18.
Can anyone explain this!!!
I’ve included this short prog with the QBDarts.zip
Qbits
- Attachments
-
- QBDarts ext.pdf
- (1.34 MiB) Downloaded 510 times
-
- QBDarts.zip
- (3.33 KiB) Downloaded 530 times
Last edited by qbits on Tue Mar 28, 2017 1:55 pm, edited 1 time in total.
Re: QL Tinkering
I have been reviewing the QBITS Golf code and updated it with some of your suggestion. One problem I encountered was that running under the SMSQemulator was that the Bunkers not being recognised.
DEF PROC test
This checks the getcolor results to see if they match with any hazard.
The line:- IF c1=2 AND c3=5 OR C1=5 AND c4=2: bunkered – for some reason did not work!
The check on c1, c2, c3,c4 give 2 2 5 5 or 5 5 2 2 this works with the QL2K emulator as expected but not with the SMSQmulator. Another combination for c1,c2,c3,c4 giving 1 1 6 6 or 6 6 6 1 1 also does not work.
However if I use the c1,c2,c3,c4 combination of 3 3 7 7 or 7 7 3 3 which gives the Bunkers a pinkish look this does appear to function. The attached .zip file contains updated versions for the QL2K and SMSQmulator.
Qbits
The progs uploaded so far shown running on the QMSQmulator:-
DEF PROC test
This checks the getcolor results to see if they match with any hazard.
The line:- IF c1=2 AND c3=5 OR C1=5 AND c4=2: bunkered – for some reason did not work!
The check on c1, c2, c3,c4 give 2 2 5 5 or 5 5 2 2 this works with the QL2K emulator as expected but not with the SMSQmulator. Another combination for c1,c2,c3,c4 giving 1 1 6 6 or 6 6 6 1 1 also does not work.
However if I use the c1,c2,c3,c4 combination of 3 3 7 7 or 7 7 3 3 which gives the Bunkers a pinkish look this does appear to function. The attached .zip file contains updated versions for the QL2K and SMSQmulator.
Qbits
The progs uploaded so far shown running on the QMSQmulator:-
- Attachments
-
- QBGolf 2017 01.pdf
- (1.76 MiB) Downloaded 591 times
-
- QBGolf 2017.zip
- (13.56 KiB) Downloaded 502 times
Re: QL Tinkering
Hi Qbits,
I like your progs, it simply demonstrates good stuff can be coded just in BASIC on a plain QL.
I wonder about other titles of yours, you did share yet, but are shown in the screen preview?
Tomas
I like your progs, it simply demonstrates good stuff can be coded just in BASIC on a plain QL.
I wonder about other titles of yours, you did share yet, but are shown in the screen preview?
Tomas
Re: QL Tinkering
Hi,
So over the Christmas period I managed to get access to some of my QL goodies in our loft space. Among which was a folder with sketches, notes and a number of QBITS programs I had printed out. One caught my eye ASRS - Automatic Storage and Retrieval System. Searching my QL floppies, I discovered STOREMAN_SAM and WAREHOUSE_SAM. But also various files that implied a third generation I’ve dubbed QBITs Warehouses (QBWH for short). It’s taken a few hours to relearn my SuperBASIC and get the bits of code together and hopefully fulfil my earlier aspirations!
I’ve also added a small prog my attempt to gain some incite to the use of random numbers.
Let me know what you think and any help with tweaks to the code will be appreciated.
Qbits
Note: Tried it on Qemulator (original QL Mode - obviously a bit slow) QL2K and SMSQumlator.
So over the Christmas period I managed to get access to some of my QL goodies in our loft space. Among which was a folder with sketches, notes and a number of QBITS programs I had printed out. One caught my eye ASRS - Automatic Storage and Retrieval System. Searching my QL floppies, I discovered STOREMAN_SAM and WAREHOUSE_SAM. But also various files that implied a third generation I’ve dubbed QBITs Warehouses (QBWH for short). It’s taken a few hours to relearn my SuperBASIC and get the bits of code together and hopefully fulfil my earlier aspirations!
I’ve also added a small prog my attempt to gain some incite to the use of random numbers.
Let me know what you think and any help with tweaks to the code will be appreciated.
Qbits
Note: Tried it on Qemulator (original QL Mode - obviously a bit slow) QL2K and SMSQumlator.
- Attachments
-
- QBWH_Game.pdf
- (1.59 MiB) Downloaded 560 times
-
- QBWH_Game.zip
- (20.15 KiB) Downloaded 553 times
Re: QL Tinkering
Thank you Steve, I've added these to the QL Home Page.
--
All things QL - https://dilwyn.qlforum.co.uk/index.html
All things QL - https://dilwyn.qlforum.co.uk/index.html
Re: QL Tinkering
Qbits,qbits wrote: Let me know what you think and any help with tweaks to the code will be appreciated.
your programs are great but their manuals are fantastic!