[Ql-Users] Large turbo tasks
I am developing a program in SuperBASIC, and compiling with Turbo. The size of the compiled code is around 133k at the moment but I still have quite a lot to add. The problem is I am getting reports of Code too large to compile, etc. What I have decided to do is to remove some parts of my code, and down-grade the program slightly. I can also move some parts to another separate task, but overall this is some problem. What I was wondering is if perhaps new versions of the parser and codegen tasks could be produced to increase the limits to allow larger sizes to be compiled. It is so easy nowadays to write large programs without having to worry about program size or the amount of dataspace used. Michael Bulford ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] Large turbo tasks
Thanks for the idea. I can split my program up into two or more modules, and then use LINK_LOAD. Variables, procedures and functions can then be shared. This is a great idea. Michael From: George Gwilt grggw...@gmail.com To: ql-us...@q-v-d.com Sent: Tuesday, 14 February 2012, 10:10 Subject: Re: [Ql-Users] Large turbo tasks On 13 Feb 2012, at 22:05, Tobias Fröschle wrote: Am 13.02.2012 22:45, schrieb Dilwyn Jones: I'm not sure if this has changed in recent versions of Turbo, but there used to be a setting which allowed you to produce smaller programs by limiting the compiled size to 64K (word length addressing etc I suppose). There is a setting on the control panel (the green screen started by the CHARGE command) which lets you select 64K or 64K in one of the boxes. There's also a equivalent compiler directive which I can't remember from memory (one of the TURBO_nnn commands, possibly TURBO_MODEL - see Turbo Toolkit manual) which lets you tell the compiler which settings to use to control over the reduced file sizes - remember Turbo was originally conceived when we didn't all have as much memory on our systems as today! Dilwyn Jones -Original Message- From: Michael Bulford Sent: Monday, February 13, 2012 9:28 PM To: ql-us...@q-v-d.com Subject: [Ql-Users] Large turbo tasks I am developing a program in SuperBASIC, and compiling with Turbo. The size of the compiled code is around 133k at the moment but I still have quite a lot to add. The problem is I am getting reports of Code too large to compile, etc. What I have decided to do is to remove some parts of my code, and down-grade the program slightly. I can also move some parts to another separate task, but overall this is some problem. What I was wondering is if perhaps new versions of the parser and codegen tasks could be produced to increase the limits to allow larger sizes to be compiled. It is so easy nowadays to write large programs without having to worry about program size or the amount of dataspace used. Michael Bulford ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm - No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.1913 / Virus Database: 2112/4807 - Release Date: 02/13/12 ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm Michael, If you're mentioning 133k compiled, that's definitely large. The largest SB program I know is Editor, with about 100k code size. I guess you should also run out of line numbers shortly. Have a look at LINK_LOAD et al - This allows you to off-load parts of your code into external libraries. Cheers, Tobias Yes. LINK_LOAD ought to work. George ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
[Ql-Users] DEBUG
There is some code in my program that I do not want compiled: this is only used when the SuperBASIC version is running. So, I use DEBUG 1 before the code and DEBUG 0 afterwards. When compiling the parser stops with the report of Task Turbo 5.06 halted, after line 0. Reason: out of range The display panel reads: Pass: 1 Line 22300, which is a few lines after the DEBUG 1 statement. Can anyone please tell me what I am doing wrong? The program will compile successfully if the DEBUG command is not used. I have tried using DEBUG_LEVEL but this makes no difference. Michael Bulford ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] DEBUG
Hi George On Saturday 18 February 2012, 9:56George Gwilt wrote: I use DEBUG 0 and 1 for the same reasons as you and have never had the fault you mention. If you could send me, privately, a copy of your program I'll try to locate the problem. Thanks for your offer of help, this is really appreciated. However, I believe I have solved the problem. I tried moving the piece of code to near the beginning of the program, and this solved the puzzle. My guess is that because my program is over 64k, the DEBUG mechanism could not cope, so that the fault is actually with Turbo. DEBUG must be using unsigned integers, when it should be using floating point variables. That is my guess. The piece of code under question is: 22268 REMark DEBUG 1 22276 DEFine PROCedure how 22284 LOCal p, scan_rt 22292 CLS 2 : PRINT 22300 p = BASIC_L(56) 22308 REPeat scan_rt 22316 p = p + 24 22324 IF p BASIC_L(60)-24 : EXIT scan_rt 22332 IF BASIC_W%(p+18)0 22340 PRINT Call at ;BASIC_W%(p+18); in ; 22348 ELSE 22356 PRINT Stop at ;BASIC_W%(146); in ; 22364 END IF 22372 IF BASIC_W%(p-12) 0 : IF NOT COMPILED : LIST #1; BASIC_W%(p-12) 22380 END REPeat scan_rt 22388 END DEFine how 22396 REMark DEBUG 0 This piece was copied from the Turbo Toolkit Demos file, the original procedure name being How_COME. My idea of using DEBUG was to try and save a little bit of code, because my program is so large. Hi Malcolm On Friday 17 February 2012, 21:35 Malcolm Cadman wrote: Also useful to use and declare integer values, wherever you can, at the start of the BASIC program - which is value% rather than value. Yes, I agree. There is a particular reason for this. Suppose the compiled program stops somewhere with an out of range error. The SuperBASIC version could then be run using the same input data, duplicate the error and stop at exactly same place. The procedure how would then be run to discover the call hierarchies that got the program to that point. Variable values could then be examined with the view to pin-point the cause of the error. However, if using IMPLICIT% value, then the SuperBASIC version would be using floating point variables and the same error would not be produced and so would not stop at the same place. Michael Bulford ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] DEBUG
On 19 Feb 2012, at 15:07, George Gwilt wrote: I use DEBUG 0 and 1 for the same reasons as you and have never had the fault you mention. If you could send me, privately, a copy of your program I'll try to locate the problem. Thanks for your offer of help, this is really appreciated. However, I believe I have solved the problem. I tried moving the piece of code to near the beginning of the program, and this solved the puzzle. My guess is that because my program is over 64k, the DEBUG mechanism could not cope, so that the fault is actually with Turbo. DEBUG must be using unsigned integers, when it should be using floating point variables. That is my guess. The piece of code under question is: DEBUG is trapped by PARSER_TASK to see whether code is to be ignored or compiled. If fact in PARSER_TASK the values 0 to 9 (which is the allowed range of DEBUG) are held in an fp variable. 22268 REMark DEBUG 1 22276 DEFine PROCedure how 22284 LOCal p, scan_rt 22292 CLS 2 : PRINT 22300 p = BASIC_L(56) 22308 REPeat scan_rt 22316 p = p + 24 22324 IF p BASIC_L(60)-24 : EXIT scan_rt 22332 IF BASIC_W%(p+18)0 22340 PRINT Call at ;BASIC_W%(p+18); in ; 22348 ELSE 22356 PRINT Stop at ;BASIC_W%(146); in ; 22364 END IF 22372 IF BASIC_W%(p-12) 0 : IF NOT COMPILED : LIST #1; BASIC_W%(p-12) 22380 END REPeat scan_rt 22388 END DEFine how 22396 REMark DEBUG 0 With the DEBUG commands REMarked out TURBO will ignore them. With the DEBUG commands not REMarked out the IF NOT COMPILED is, of course, not needed. This piece was copied from the Turbo Toolkit Demos file, the original procedure name being How_COME. My idea of using DEBUG was to try and save a little bit of code, because my program is so large. I have a copy of parser506_bas and have managed to compile this with line numbers included. Trying this on my program the parser stops at line 14490, which is in the middle of ignoring code. I then inserted the following line 14488 PRINT #log%, BASIC_NAME$(value%) ! var% After recompiling and running, this produced the following output CLS 216 PRINT 144 p -3 At line 14490, where the parser stops, struct% is an array and so the -3 has caused this to go out of range. Michael ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] DEBUG
Hi George There is an error in the Turbo parser at line 14490. Here is this line: 14490 IF var%0 AND (struct%(var%)directive_mask%)=directive_mask% Both sides of the AND get to be evaluated. Although var% is tested for being non negative on the left hand side, the right hand side will be evaluated in any event. Should var% happen to be negative, then struct%(var%) would be outside of the array bounds and will crash SuperBASIC. The above line needs to be re written so that the right hand side will only be evaluated if the left hand side evaluates to true. Here is my suggested work-around: 1 LOCal both : REMark (if needed) 14488 both = 0 14489 IF var%0:IF (struct%(var%)directive_mask%)=directive_mask% : both = 1 14490 IF both Michael ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] DEBUG
Hi George On Wednesday, 22 February 2012, 14:24 George Gwilt wrote: You are quite right. But how did you get var%=-3? Does this imply another mistake in Parser? No, I don't think so. -3 comes from for_flag% for an earlier occurence of p Your solution looks the best - it's neater. Michael ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
[Ql-Users] Printing numbers in non exponent form
Some weeks ago someone enquired as to how to print numbers in non exponent form. I believe it was George Gwilt who suggested using CDEC$. Here is a function that I use ... 750 DEFine FuNction comma$(num) 760 LOCal t, fra 770 IF num 0 : RETurn - comma$(ABS(num)) 780 IF num 1000 : RETurn num 790 IF num/1000 2^31-2 : RETurn num : REMark otherwise INT(num/1000) will fail 800 t = INT(num/1000) 810 fra = num – t * 1000 : IF e- INSTR fra : fra = 0 820 RETurn comma$((t)) , FILL$(0,(fra100)+(fra10)+(fra1 AND fra0)) fra 830 END DEFine comma$ This only works properly for whole numbers, and if the number cannot be converted then the exponent form is returned. PRINT comma$(2^31) gives 2,147,483,648 PRINT comma$(1000.753) gives 1,000.7529998 Michael Bulford ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] Printing numbers in non exponent form
- Original Message - From: Malcolm Lear malc...@essex.ac.uk To: ql-us...@q-v-d.com Cc: Sent: Monday, 5 March 2012, 11:28 Subject: Re: [Ql-Users] Printing numbers in non exponent form It was I who required a way to do this. Thanks for this. Very well timed since I now need to print unsigned 32 bit integers and unfortunately none of the DEC$ functions can do this. Hopefully a few changes to this will provide a solution. On 05/03/2012 09:59, Michael Bulford wrote: Some weeks ago someone enquired as to how to print numbers in non exponent form. I believe it was George Gwilt who suggested using CDEC$. Here is a function that I use ... 750 DEFine FuNction comma$(num) 760 LOCal t, fra 770 IF num 0 : RETurn - comma$(ABS(num)) 780 IF num 1000 : RETurn num 790 IF num/1000 2^31-2 : RETurn num : REMark otherwise INT(num/1000) will fail 800 t = INT(num/1000) 810 fra = num – t * 1000 : IF e- INSTR fra : fra = 0 820 RETurn comma$((t)) , FILL$(0,(fra100)+(fra10)+(fra1 AND fra0)) fra 830 END DEFine comma$ This only works properly for whole numbers, and if the number cannot be converted then the exponent form is returned. PRINT comma$(2^31) gives 2,147,483,648 PRINT comma$(1000.753) gives 1,000.7529998 Michael Bulford I have been having problems with my browser, but have now blocked addons. Hopefully, the newlines being inserted into my text will not happen. The text should have read as follows ... Printing numbers in non exponent form Some weeks ago someone enquired as to how to print numbers in non exponent form. I believe it was George Gwilt who suggested using CDEC$. Here is a function that I use ... 750 DEFine FuNction comma$(num) 760 LOCal t, fra 770 IF num 0 : RETurn - comma$(ABS(num)) 780 IF num 1000 : RETurn num 790 IF num/1000 2^31-2 : RETurn num : REMark otherwise INT(num/1000) will fail 800 t = INT(num/1000) 810 fra = num – t * 1000 : IF e- INSTR fra : fra = 0 820 RETurn comma$((t)) , FILL$(0,(fra100)+(fra10)+(fra1 AND fra0)) fra 830 END DEFine comma$ This only works properly for whole numbers, and if the number cannot be converted then the exponent form is returned. PRINT comma$(2^31) gives 2,147,483,648 PRINT comma$(1000.753) gives 1,000.7529998 The CDEC$ function range is +/- up to only 1E9 and is difficult to use as it has 3 parameters. It is however, highly accurate when printing numbers between zero and one! Michael Bulford ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] Jan Jones
- Original Message - From: Norman Dunbar nor...@dunbar-it.co.uk To: ql-users@lists.q-v-d.com Cc: Sent: Wednesday, 28 March 2012, 20:13 Subject: Re: [Ql-Users] Jan Jones On 28/03/12 16:29, Dave Park wrote: I managed to contact her and asked for permission. They said they would think about it and get back to me and never did. I did not receive a response to a followup two weeks later. I didn't want to follow up too hard and appear all pestilential and harrassy and maybe turn them against what we were trying to do, so I dropped it. Dave Ok, thanks Dave. Maybe one day Cheers, Norm. Here is Jan Jones' website: http://www.jan-jones.co.uk/index.html She says ... Hi, I'm Jan Jones. Welcome to my website. I am, first and foremost, a writer of romance. I believe that everybody, no matter how stressful their life, is entitled to at least one happy ending. She has apparently written quite a number of books since writing QL SuperBASIC The Definitive Handbook. Michael Bulford ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
[Ql-Users] Finding the line number in QPC2
Hi all I’m sorry about my previous message – I had forgotten to use plain text, and this appeared garbled. Hopefully, with any luck, this should now be transmitted correctly. Here is how the message should have been ... Sometimes my programs will stop with a nice friendly error message, giving me the line number where the error occurred and a short description of what went wrong. I can then list the program, test the values of variables, and try to fathom out why my code is not doing what it should. It can also be helpful to know from what line number the current procedure/function was called from. This can be found with ... foo = BASIC_L(60)-24 : Lnum = BASIC_W%(foo+18). Additionally, there is a short routine in the Turbo Demos file called How_COME which lists the call hierarchies up to the current point. However, all of this is only available under QDOS. What I was wondering is can something like this be done in QPC2? Michael ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
[Ql-Users] Re: Final call for QL Today V17 + DVD orders
Dave Park schrieb: Any chance you could offer the disk by itself? I'm sure many people might want that who don't need the four magazines and expenses that go with that? Mmmmh, I don't think so. First of all I do not want to upset all the people who already paid - and who got a lot to read and play with for little money... If people were not willing to spend less than what QPC2 on its own cost, then so be it. I so much agree! For so many years I had been putting off getting QPC2 simply because Q-emuLator was satisfying my every need! I did eventually start to use QPC2, but that was less than a year ago, with version 3.34. I have now upgraded to this latest version 4.00. To be totally honest, I can now say that all of my programs now work flawlessly with QPC2! There are no longer any fatal errors. There have been so many bug fixes. QPC version 4.00 just simply has to be the very best version of the QL S*Basic language there ever is! Let us consider some of the advantages that QPC2 has to offer over QDOS ... * Bug improvements: QPC2 performs better the QDOS * Qdos is limited to 25 lines. I can now get up to 35 lines or even more! * colours : QPC2 can produce eight colours even in mode 4! * Speed: QPC2 is astronomically fast: Only Turbo compiled programs are faster! * QPC2 has a dos device – you can explore your entire PC drive! * QPC2 can call up PC programs with the QPC_EXEC command If, like me, you have been delaying getting QPC2, then now is the time to get it. If, like me, you are a Q-emuLator fan, then I can only advise you to get QPC2 version 4.00, as well. This simply has to be the very best QL software available at the present time. Michael ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] Finding the line number in QPC2
Hi since there seems to be no way to get at this with Peek and Poke, I've made a small SBasic extension to tget the value on the return stack, called RET_STK and RET_STK2: You can download this extension from www.wlenerz.com/QLStuff I’ve tried this. From inside a function it prints/returns the line number from where it was called, and inside a procedure either the same or the next line number, depending on whether there is any more code on the calling line. Thanks very much for this. This is just what I wanted and is a useful addition to my debugging tools. Michael ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] QL-SD What is it?
On Thursday, 5 December 2013, Colin Mckay Wrote: Please describe the hardware software which forms it, sufficiently for us to know what you are talking about. On Wednesday, 04 December 2013, Peter pg...@q40.de Wrote: the restriction that a QL memory expansion is madatory for QL-SD has been removed. If a QL-SD filesystem of 3 MB size (and Groupsize 8) is attached, there still remains 62.5 KB free memory on an unexpanded QL. Not very much, but enough to load TK2 and still be able do useful things. This way, even an unexpanded QL has more mass storage than the ED floppy interface of a (Super) Gold Card offers, and that at harddisk speed without moving mechanical parts. (Larger filesystems, like the 64 MB default, can not be used on an unexpanded QL at all. This won't change.) We are talking state of the art technology. Surely, a size of 3 Gigabytes would seem to be more appropriate. Why has there to be any restrictions? If this is down to software, then can anything be done about it? Michael ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
[Ql-Users] RET_STK and debugging SBASIC code
Hi all, I believe I have discovered a very good way of using the RET_STK function DEFine FuNction bug(p1$, p2$, p3$, p4$, p5$) LOCal n, x$ PRINT #0,PAUSEd at line ! RET_STK ! FOR n = 1 TO 5 x$ = PICK$(n, p1$, p2$, p3$, p4$, p5$) IF PARNAM$(n) OR x$: PRINT #0,!! PARNAM$(n) = x$ ! END FOR n CURSEN #0 : PAUSE : CURDIS #0 PRINT #0, : RETurn 0 END DEFine bug Note that PICK$ is from DIY Toolkit VolE_CONTROL_code. A function is used rather than a procedure so that RET_STK will always produce the correct line number. Suppose I wanted to stop my program under some condition at line 2885 and print out the values of the variables row, col and count. The following line could be inserted 2885 IF some_condition : ERT bug(row,col,count) Then what could appear in #0 is PAUSEd at line 2885 row = 19 col = 20 count = 156 All the parameters are optional. You can even supply expressions, although only their values would get printed. I have found this to be so useful. There is no need to type in any line numbers – RET_STK is doing all the work. Since using this, my debugging has become so much easier and less time-consuming. Michael ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
[Ql-Users] RET_STK and debugging SBASIC code
Hi Wolfgang, PICK$ will select the nth item from the list that follows the n. Consider PICK$(n, aaa, bbb, ccc, ddd, etc) If n is 1 then PICK$ will return aaa because it is the 1st item in the list. If n is 5 then etc would be returned because it is the 5th item. The parameters of PICK$ can be of any type: they will be coerced into strings. Expressions can be supplied, for example, dev$ file$. There is a particular problem that PICK$ may help us to solve. Occasionally, we may want to iterate through a list of items. If these items are strings, then we may well reach for a FOR loop and do something like . . . FOR x$ = aaa, bbb, ccc, ddd, etc Unfortunately, this is not allowed. The identifier for a FOR loop has to be numeric, either floating point or integer. This leaves us with a problem: how to do the above? There is a way to do this. A normal numeric FOR loop could be used, and then assign values to x$ depending on the FOR loop index, like this . . . FOR n = 1 TO 5 SELect ON n = 1 : x$ = aaa : = 2 : x$ = bbb : = 3 : x$ = ccc : = 4 : x$ = ddd : = 5 : x$ = etc This can also be done using PICK$ . . . FOR n = 1 TO 5 X$ = PICK$(n, aaa, bbb, ccc, ddd, etc) Which version do you prefer? The version using PICK$ may be more readable, but please bear in mind the following. PICK$ will evaluate all of its parameters before deciding which value to return, so, in terms of efficiency, this would not be the best choice. If outright execution speed is top priority, then the Select version should be chosen. What I like about PICK$ is the readability factor. I use PICK$ in my own programs and can recommend it. Michael ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
[Ql-Users] QPC2 and Qliberator externals
Hi All, There are a couple of patches with QPC2 that allows Qliberator externals to be LRESPRd. The qlib.run patch seems to work, but the qlib.obj patch does not, and I get the message of Unknown Version. Has anyone else come across this? Michael ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
[Ql-Users] Recovering deleted files from a QXL
Hi everybody, Does anyone know whether there is any software around that can recover a deleted file from a QXL? Assuming not, could a program be written to do so? I assume it cannot be done in S*BASIC, but how about machine code? Would anyone like to try? The format of how the data is stored would have to be known. I would imagine this could be an interesting program to write. Michael ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] QLis30 dinner - urgent
On 13/08/2014 17:45, John Gilpin wrote: Hi all intended diners at QL is 30 Dinner. QUANTA has, today added an extra page to it's Web Site containing two new PayPal Payment buttons which can be used to pay for the dinner at the QL is 30 event. In an effort to limit the possibility of misuse by the general public who have general access to this site, this new page has not been added to the navigation details and will therefore be difficult for anyone to find without the following info:- Please enter (or Copy) the FULL URL into your browser. The URL is https://quanta.org.uk/ql-30/ any problems, please let me know. Kind Regards, John Gilpin. QUANTA Membership Secretary and QUANTA Treasurer membership @quanta.org.uk treasurer @quanta.org.uk I cannot find the above link mentioned anywhere on the Forum. This means that for those QLers who only read the Forum and do not read these pages, they will be unable to order their dinner. Do you think the above link should be advertised on the Forum? Michael ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
[Ql-Users] QLis30 - has anyone found my glasses, please?
I seem to have mislaid my glasses somehow, and this would have happened at the QLis30 workshop. These glasses only get used occasionally, and I keep them in a black case. I would guess that I might have placed the case down on a table, afterwards someone could have absent-mindedly picked this case up, believing it to be theirs, and put it in their own pocket, then forgot about it. These things can easily happen. I hope this is the case, because I would like to have these specs back. They are a prescription and tinted pair, and I have had them for many years. So, if anyone does have them, can you please let me know. Kind regards, Michael Bulford ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
[Ql-Users] Toolkit 3
Hi, In the latest Quanta magazine, Toolkit 3 is now advertised as freeware. After downloading and unzipping the file, it wouldn't work, it just freezes the QL. I've tried using LRESPR with both QPC2 and Q-emuLator, both without joy. There's no instructions in the user manual. Has anyone tried this? Michael ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] QPC2 and Win 8
Hi Peter, can you help me on the other matter of increasing the size of QXL.win partitions, please? I've had this problem myself. What I did was to create another QXL.win file, formatted it to a much higher capacity, then copied all the files across. To preserve the original dates, I used ... COPY a$ TO b$ SET_FUPDT \b$, FUPDT(\a$) Michael ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
[Ql-Users] C68 arrays
Hi all, I am developing a program in Cee which uses several arrays, and which is crashing. Eg. .. int array[101]; and using elements from 0 up to 100. I have discovered that by declaring the array with one extra element cures the problem, Eg. .. int array[102]; and again using only elements up to 100. This seems to happen with both global arrays, or arrays created from malloc, although the crash is different in either case. I was wondering if anyone has experienced this as well. Kind regards, Michael Bulford ___ QL-Users Mailing List
[Ql-Users] Q_Liberator externals
Hi everyone, One of the features I like about Q_Liberator is that resident procedures and functions can be written in Basic, and compiled into machine code, to be lrespr-ed in a boot file. These functions can even have parameters. This works well with Q-emuLator. With QPC2 there seems to be a problem, and I have been unable to compile such code. This very problem with Q_Liberator externals has been mentioned in the QPC Manual, and a patch program written in SBASIC is provided. However, I have been unable to get this to complete successfully. I’m hoping that Marcel will have some ideas on this. Kind regards, Michael ___ QL-Users Mailing List
[Ql-Users] Qxlwin
Hi Norman, A feature I would like to see in Qxlwin is this: When re opening Qxlwin, it resumes exactly where it was the last time it was used. This means the last used .win file would be re opened and displayed exactly at it was before, and also any text file being displayed also re opened and displayed at the same position as before, etc. I use Notepad++, and this does this - very nice. The windows installer works fine, but the existing files have to be manually removed, else it complains and asks for another directory to install to. Kind regards, Michael ___ QL-Users Mailing List
Re: [Ql-Users] More Help Please
Hi Peter, I believe I may have had the same problem myself. Let me explain. I use QPC2 regularly, and have an elaborate boot file, which gets occasionally modified. Some time ago, I made some changes, and saved the boot file. The very next time I started QPC2, it crashed, and was totally unusable. What I then needed to do to recover the situation was to re edit my boot file to reverse the changes. But how could I do this, when every time I started QPC2, it crashed. That was the problem. If this is the problem you are having, there is a way around this. On QPC2s front panel, select the devices button, which is at the bottom left corner. Under Boot options, there is the choice of selecting either from floppy disk, if one is loaded, or choosing a win directory, in which to look for a boot file. There is a choice of eight of them. And even if all that fails, you could always blank out the win1_ entry under Win/Dos connections. Once QPC2 starts, you then have access to everything, and can sort out all your files from everywhere. I hope that helps. Kind regards, Michael >- Original Message - >From: peterfox>To: ql-us...@q-v-d.com >Sent: Thursday, 16 June 2016, 17:15 >Subject: Re: [Ql-Users] More Help Please > >Tobias, > >Thank you for coming back to me. I did not know that attachments did >not go through so apologies. > >What I have managed to do is find a much better boot file which solve >all my problems provided that I can get it into QPC2 which is not >working at the moment and without a floppy drive available.> > >Have you any ideas? > >TIA & Regards, > >Peter > > > > >On 16.06.2016 12:47, tobias.froesc...@t-online.de wrote: >> Peter, >> >> I assume you are talking about an attachment you were adding to your >> post - Note the list does _not_ forward attachments, so we cannot see >> it. >> >> I am a bit at loss why you would want to explicitely want to load >> SMSQE.BIN (or SMSQR, which could well be a re-configured one) in your >> boot. QPC2 loads SMSQ/E without being asked for it, after all it's >> the >> only OS it has and that must be already running before BOOT time . >> You >> do not need that and it seems to be a sign of very responsible >> programming by the original authors that this used to work at all. >> >> What IPCEXTUK is supposed to do escapes me as well - I'm afraid we'd >> need the BOOT embedded as text into an e-mail to further look into >> this. >> >> Regards, >> Tobias >> >> >> >> -Original-Nachricht- >> Betreff: [Ql-Users] More Help Please >> Datum: 2016-06-16T10:51:07+0200 >> Von: "Peter Fox" >> An: "ql-us...@q-v-d.com" >> >> Hi there, >> >> In an effort to change a few things in my boot file in QPC2, I have >> run into a very large >> number of problems. >> >> Firstly I have SMSQR dated 2003 and 65K bytes. My boot file working >> perfectly well until >> I disturbed it. SMSQE was in the boot file but now it does not find >> either SMSQE or >> SMSQR. I have REMarked it out at the moment. Will this give me any >> problems? >> >> In addition, I have been having problems with IPCEXTUK which is in >> line 180. The calls >> are in line 200 and are shewn in the screen shot to have the wrong >> parameters. >> >> These parameters did work but what please should I do next? >> >> TIA & Regards, >> >> Peter >> >> p.s. I have a nasty feeling that these problems may well continue but >> I will have to try >> and deal with them one at a time. ___ QL-Users Mailing List
Re: [Ql-Users] More Help Please
Hi Norm, I think I'll wait .. there appears to be something wrong with this download.The file seems much bigger than advertised. Michael From: Norman DunbarTo: ql-us...@q-v-d.com Sent: Friday, 17 June 2016, 20:24 Subject: Re: [Ql-Users] More Help Please Alternatively, this might work...If you can't wait! ;-) http://api.256file.com/qwindows.dll/en-download-59653.html Save it in the same folder as the rest of the files. But for goodness sake, virus scan it first. This is Windows after all! Cheers, Norm. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ___ QL-Users Mailing List ___ QL-Users Mailing List
Re: [Ql-Users] More Help Please
Norm, I've followed your instructions down to Double click the exercise file to run. Then the following messages appear ... This application failed to start because it could not find or load the Qt platform plugin "windows" in "". Reinstalling the application may fix this problem. This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Michael - Original Message - From: Norman DunbarTo: ql-us...@q-v-d.com Sent: Friday, 17 June 2016, 14:03 Subject: Re: [Ql-Users] More Help Please OK, lunchtime! I've uploaded a 32 bit windows binary to https://sourceforge.net/projects/qxlwin/. 1. Click on the files tab. 2. Click on Windows 32-64bit. 3. Click on Qxlwin.Zip to download. 4. Click parent folder. 5. Click QT5SupportFiles. 6. Click QR5SUPPORTFILES.zip to download. Create a folder, call it c:\qxlwin. Extract both zip files into that location. Double click the exercise file to run. File->Open and select your qxlwin file. The Header tab displays details of the file. Numbers are in hex or decimal. Change with the two buttons at the bottom. Map displays the map. Not likely to be helpful. Files displays the entire structure of the directory tree. It's windows explorer for qxlwin files. File Viewer is just that. Double click file in the Files tab to display it here. I haven't looked at this utility since 2012 but I'm sure you can copy the text of a file in the viewer to save it as a PC file. Beware of ql to PC character conversion though. HTH. Cheers, Norm. On 17 June 2016 09:20:18 BST, Norman Dunbar wrote: >I have a utility on https://sourceforge.net/projects/qxlwin/ which >should allow anyone to extract any file from a QXL win file. > >However, I've just checked and it appears I've never uploaded a >compiled version. Oops! > >Like qstripper, it runs on Linux, Windows and if you have QT, on Mac if >you compile the source yourself. > >I'll try to get a compiled version uploaded ASAP. > > >Cheers, >Norm. >-- >Sent from my Android device with K-9 Mail. Please excuse my brevity. >___ >QL-Users Mailing List -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ___ QL-Users Mailing List ___ QL-Users Mailing List
[Ql-Users] Romance
Hi all, On 29/04/2016, Rich Mellor wrote: >The link to the ebook on Amazon is: > >*http://tinyurl.com/zhnmhfd > >*Rich >> On 29/04/2016 14:59, Caroline Mathieson wrote: >> there was an email recently about jan jones ebook. Can anyone remind me of >> the amazon details please? Jan Jones is now a prolific author of romantic novels. I wonder if there have ever been any romantic get-togethers from people through the QL. This could always be possible. Michael ___ QL-Users Mailing List
[Ql-Users] Software Preservation Project - Tasks
On Thursday 7 July 2016, 21:29:04, Rich Mellor (RWAP) wrote : > Shirley Butler (C-Fix program for use with SuperBASIC C-Port) - not sure if > she > had any more involvement in C-Port. I also emailed Dave Walker, but no > response > from either Hi Rich, I also wrote to Shirley, but had no response. This morning, I tried ringing her on the number she gave in the C-Fix user manual from 1992, but this was unobtainable. Are you still in contact with Freddy Vaccha? Perhaps he might know something. What I would like to do is to get a copy of the source SuperBASIC code for both C-Port and C-Fix. The idea being to update them so that they can work fully with modern day emulators, and also to cure some bugs and generally improve them. I have actually managed to use C-Port with some success. Recently I have C-Ported a 58k SBASIC program into Cee without any problems. I did of course have to keep on changing the code until it finally Cported. The resulting Cee code certainly needed some tinkering with before it would C68 compile. The program was a version of the Travelling Salesman program, which I have been working on with Steve Poole. In my opinion, C-Port is far better than its reputation, but is certainly in need of some improvement. The C-Fix addition is very useful, however it is not complete. The numeric array bases have not been treated. If however the source is unavailable, then how about reverse engineering?Derek, have you thought any more about your idea of reverse engineering Turbo? I would be willing to work with you jointly on this. I am well acquainted with the Turbo parser and understand how it works. If you can regenerate the pseudo-code for C-Port, I am sure I could regenerate the SuperBASIC code from there. What we could end up with is a SuperBASIC program that perhaps works, but would be totally unreadable, since we would not know the original variable names used. We would just have to guess at how it works. But this would be a start. This may take some while to complete, but the more time spent on it, the better it would become. About the legal aspect, I would agree this may be illegal - if we go by the letter of the law. But if we go by the spirit of the law, this may be another matter. We would be producing something that would be of benefit to the whole QL community. I am certain the authors of Turbo / Cport / C-Fix would welcome our contributions. We may not have to go down this road. Who knows - perhaps Freddy Vaccha can come up with the goods - and supply the SuperBASIC sources. If anybody knows him, can you please contact him and ask. Michael ___ QL-Users Mailing List
Re: [Ql-Users] More Help Please
Hi Norm, I downloaded the file and installed it in c:\Qxlwin\plugins\platforms.The same error messages appear, as before. All of the .dll files have the type of Free Viewer association.Would that make a difference? Michael From: Norman Dunbar <nor...@dunbar-it.co.uk> To: ql-users@lists.q-v-d.com Sent: Sunday, 19 June 2016, 19:28 Subject: Re: [Ql-Users] More Help Please On 18/06/16 12:37, Michael Bulford wrote: > Hi Norm, > I think I'll wait .. there appears to be something wrong with this > download.The file seems much bigger than advertised. Right then it seems that this is more complicated on Windows than it needs to be. I've uploaded the correct qwindows.dll to https://sourceforge.net/projects/qxlwin/files/Windows%2032-64bit/so you will need to go there and fetch it. In your QxlWin application directory, create a new directory called plugins. Within this new directory, create a new directory called platforms. Save the qwindows.dll in there. Now it should work. The problem I have in testing with a completely bare CMD session, is that no matter whet I did, with or without that file present or not, it simply worked. There's no Windows around here that has not got Qt installed (I only have it in a VM these days) so I'm unable to test this. From the docs on the Qt web site, it needs to be in the application/plugins/platforms folder. Why they make this complicated I don't know, it was never like this on the previous versions. Good luck. Let me know how you get on. Cheers, Norm. -- Norman Dunbar Dunbar IT Consultants Ltd Registered address: 27a Lidget Hill Pudsey West Yorkshire United Kingdom LS28 7LG Company Number: 05132767 ___ QL-Users Mailing List ___ QL-Users Mailing List
Re: [Ql-Users] Qxlwin
I finally got this to start, however my security software decided to remove the application. Michael From: Norman DunbarTo: ql-us...@q-v-d.com Sent: Sunday, 19 June 2016, 22:14 Subject: [Ql-Users] Qxlwin The qwindows.dll that was uploaded earlier should, contrary to what I said Earley, go into a "platforms" folder located beneath the one where the application and the other dlls go. Let me know how you get on and I'll update the docs, thanks. Cheers, Norm. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ___ QL-Users Mailing List ___ QL-Users Mailing List
Re: [Ql-Users] WXQT2 alternative?
On Tuesday, 21 Feb 2017 12:49:18, Norman Dunbarwrote: > Afternoon all, > The QXLWIN tool never updates a qxl.win file. It can read and extract files > from a qxl.win, to Windows or Linux (or Mac?) > But not the other way around. > Cheers,> Norm. Hi Norm, Any chance of adding an UNDELETE feature to the QXLWIN tooL? This could be a welcome addition. Kind regards, Michael ___ QL-Users Mailing List
Re: [Ql-Users] toolkit-ii-the-sequel
On 2017-03-19 22:28, Marcel Kilgus wrote: > Why? Because I can. > > Read the details here: > > https://www.kilgus.net/2017/03/19/toolkit-ii-the-sequel/ >>Michael Bulford wrote: >> I have installed the bin version on Q-emulator. My initial thoughts >> were that this is fantastic, since it noticeably improves the >> performance of my programs - they start up quicker! >> However... when I enter WSTAT win5_, the output is garbled. STAT win5_ gives >> 0/0 sectors. >Ah yes, I fixed that bug in the ROM but forgot to update the _link for >the RESPR version. Please download again. >Marcel Thanks for fixing this, but the STAT bug remains. Also, ALTKEY doesn't work. ALT ENTER does work. Michael ___ QL-Users Mailing List
Re: [Ql-Users] toolkit-ii-the-sequel
Marcel Kilgus wrote: > Michael Bulford wrote: >> Thanks for fixing this, but the STAT bug remains. > > Do you use QemuLator by any chance? It returns allocation size as "1 > bytes" for attached directories, which the TK2 code can't handle > never could). It expects multiples of 256 bytes. Other devices work > fine here. If QemuLator is used with SMSQ_QEM, then both STAT and DIR will work with RAM, but it still won't work with WIN directories. It has been working correctly before. Michael ___ QL-Users Mailing List
Re: [Ql-Users] toolkit-ii-the-sequel and CDEC$
There seems to be a problem with CDEC$. CDEC$(123,4,0) should give " 123", but gives instead 4 asterisks. Michael ___ QL-Users Mailing List
[Ql-Users] Subject: Re: New TK II version 2.30
On 2017-03-19 22:28, Marcel Kilgus wrote: > Why? Because I can. > > Read the details here: > > https://www.kilgus.net/2017/03/19/toolkit-ii-the-sequel/ I have installed the bin version on Q-emulator. My initial thoughts were that this is fantastic, since it noticeably improves the performance of my programs - they start up quicker! However... when I enter WSTAT win5_, the output is garbled. STAT win5_ gives 0/0 sectors. Michael ___ QL-Users Mailing List
Re: [Ql-Users] SMSQ/E and unset variables
Hi all, Thanks for your comments. I will look into both XREF and QREF which I have on my system. My latest thoughts are that perhaps we can combine the best of both worlds. We can continue to have default values of zero in the case of locals, while at the same time give an error if no value is available. Any global variables used will need to be initialised. Locals do get initialised and so are seen as bona fide variables. Looking at the SB name table, this is easy to see, even using SBASIC. Using Turbo toolkit, a "type" function can be defined as ... DEFine FuNction type(var) LOCal var$(127) var$ = PARNAM$(1) RETurn BASIC_B%(BASIC_L(24)+BASIC_INDEX%(var$)*8) END DEFine type This function returns 2 if var has a value, else zero. By giving an error, this will trap both spelling mistakes and also variables accessed out of scope. Michael Bulford ___ QL-Users Mailing List
[Ql-Users] SMSQ/E and unset variables
Hi all, When QDOS evaluates an expression and encounters a variable with no value assigned, it STOPs with “error in expression” and reports the line number. The programmer may well have made some spelling mistake, and can immediately make a correction. QDOS is doing exactly what the programmer wants. Can SMSQ/E be upgraded to follow suit? Currently, in the above-mentioned case, SMSQ/E will use a zero value and will carry on blindly with no error reported. The assumption is made that any new variable will have a default value of zero. This behaviour does not take account of the fact that people are human and will sometimes make spelling mistakes. The unintentional mistake gets buried and lost in the middle of the code. I can spend a great deal of time and effort composing a program; I can type it all in, and can even double check it, but I can still overlook things. After writing a program in SMSQ/E, I can never be certain that it is free of typos. There is this constant anxiety in the mind. Programming can be difficult, even without the additional workload required of having to track down possible spelling mistakes, when there might be none at all - one can never tell. QDOS is much friendlier in this respect. This is why I would like for SMSQ/E to be upgraded to act like QDOS. If this would entail a slight loss of efficiency, then that would be acceptable. For me, the most important aspect of programming is to be able to write code that is going to work as intended. If SMSQ/E could be upgraded, then this would mean that all new variables would need to be initialised with values before they are used. This would apply to both global and local variables in procedure/functions. However, this is a recognised good practice in any case. It is good practice because these initialisations are being documented. We have to remember that others will want to look at and understand the code we write. SMSQ/E would be enforcing this desirable state of affairs, as QDOS does. Michael Bulford ___ QL-Users Mailing List
[Ql-Users] EXEP_W
Hi, I am wanting to use EXEP some_turbo_task; arg$, "i", "u" and then wait until that job completes before continuing. Is there such a command that does this? If not, then how can this be implemented? Any ideas please Michael ___ QL-Users Mailing List
[Ql-Users] Function type error
Hi all, I've no idea whether this has been mentioned before, but consider this … 100 :110 PRINT #0, Min_Int%(330.7, 440.7)120 PAUSE -1130 STOP140 :150 DEFine FuNction Min_Int%(x%,i)160 IF x% < i : RETurn x% : ELSE : RETurn i170 END DEFine The correct result should be 331, sincethis is an integer function.On QPC2, SBASIC gives the result as 330.7QLiberator likewise also gives 330.7 Can anything be done? Michael ___ QL-Users Mailing List
Re: [Ql-Users] Function type error
Thanks for your explanations. This is all specific to SBASIC. Tobias gives an example with a LOCal name the same as the function name. Although this is possible, it cannot be recommended. You will not be able to call the function recursively. And it won't compile with either QLiberator or Turbo! Michael On Thu, 10 Aug 2017 20:33:58, Tobias Fr?schle via Ql-Userswrote: The type of a function is not determined by the function name ending in a $ or % sign, but rather by what it returns - You can even write a function STRING% that returns a string or a function a$ that returns an integer value. The name you give your function is simply a hint to yourselves on what it might return. What you actually return in your original function is the result of an /expression/ - and numerical expressions in S*BASIC are of type floating point. If you assign the value to the expression to a LOCal integer value and return that, you will actually get your desired result. 1000 DEFine FuNction x% (param) 1010 LOCal x% 1020 x% = param / 10 1025 REMark assign to integer variable x% to make sure INT is returned 1030 RETurn x% 1040 END DEFine x% ___ QL-Users Mailing List
[Ql-Users] Turbo Parser
I’ve been working on a new proposed update to the Turbo parser. Here is what it can do: Warn of duplicated parameters/locals, locals overwriting parameters, names used again in nested FOR/REPeat loops; locals not used - or used but not assigned. If MANIFEST or IMPLICIT statements are made too late, then Turbo will now be able to give the line number where they need to be placed. Any missing REFERENCE statements are now warned of with a by-ref/by-value conflict check. REMarks can now be attached to the top of IF/SELect/FOR/REPeat structures. Besides the above additions, some existing parts of the code have been improved upon. Warnings of "LOCALs must follow DEFinitions." and "Meaningless command ignored." have not been working. This is now fixed. Some bugs are extremely minor - On Turbo's front panel, it is possible to overflow the report file window. This is now fixed. May I ask everyone please, if you are aware of any problems in using Turbo, can you please inform me. I’m quite familiar with Turbo's code, having studied this for some while, so should be able to investigate. The parser will increase in size by 11k to 91k. I presume this will be acceptable. I need to check my code first, before submitting this to George. Michael ___ QL-Users Mailing List
Re: [Ql-Users] PCB Design v7.52
Hi, Wolf wrote: > In the boot all file separators are "." (eg. "tk.bin"), but when > dezipped, the file separators are "_" as they should be, so the boot > can't find them. There is the -Q1 option in unzip to reverse the "_" <-> "." Eg. EX unzip,#1; "-Q1 dos7_PCBDesign752.zip -d ram6_" and they all come out with dots in them ! I have run the code and this does work well using QPC2, in extended screen size. As a matter of interest, I tried my new Turbo parser on the BASIC code, and this was the result .. ERROR at 32210: Variable assignment expected. Warning at 2570: Not assigned: global WinW2 Warning at 2570: Not assigned: global WinH2 Warning at 2570: Not assigned: global WinX2 Warning at 2570: Not assigned: global WinY2 Warning at 15290: Not assigned: global GScale TURBO: Parsing done, at 197440 statements per minute. 1 error and 5 warnings. The 1 ERROR refers to "CD" which presumably is CHANGE_DIR, or DATA_USE The 5 variables would have been initialised to zero, which may be acceptable, unless you are using "AH" or "JM", in which case you'll get an "error in expression". Michael ___ QL-Users Mailing List
Re: [Ql-Users] Quanta Magazine
I've received two issues this year, up to the Feb/March issue. None received since then. I did email John Gilpin last week, but no reply as yet. Michael Dilwyn wrote: > I've forwarded this to committee members (don't know the answer myself), > hopefully a reply soon. > > Dilwyn > > -Original Message- > From: sba1derson via Ql-Users > Sent: Sunday, July 23, 2017 9:08 AM > To: ql-us...@q-v-d.com > Subject: [Ql-Users] Quanta Magazine > > Has anyone received an electronic copy of Quanta magazine since the > January/February 2017 issue? I've not received one since. I've contacted > Quanta via their website but so far have had no response. ___ QL-Users Mailing List
[Ql-Users] Subject: Re: PCB Design v7.52
Whenever I try to run any new SBASIC code, there is this overlapping problem of some variable names used are possibly already installed as resident procedures. The code then either does not work as intended, or can stop with an error message. In these circumstances, I usually have to go through the code and rename the variables. Compiling into machine code can solve the above mentioned problem. I first of all compiled using Turbo. There was one REFERENCE statement that had to be inserted for the procedure Rotation, which passes back the values x and y to the caller, FreeRotate, which by the way is not even called. There was just one expression at line 1230 that had to be re-written, to avoid Turbo using integer arithmetic and stopping with an overflow error. The resulting task seems to work as well as the SBASIC version. Next I tried Q-Liberator, which compiled the code easily enough. The resulting object file fails to display the x and y coordinates at the bottom of the screen. Both Turbo and Q-Liberator issued a Warning at line 23030 of .. END IF without an IF. A few weeks back I made mention about a new proposed update to the Turbo parser, which I have almost finished tweaking. I tried this new version on the code, and this did not warn of the above condition. It did however, give information messages about how variables are being used - being the difference between Interpreted code and Turbo code. It transpires that if one wants the SBASIC code to match exactly what the Turbo version does, then a great deal of changes will need to be made. I only have one criticism of the program so far. When the program ends it does a NEW. I may have made some changes or added some REMarks, and before closing down I would SAVE the code. But after a NEW, all the code has gone! The existing file is replaced with a blank one. Michael ___ QL-Users Mailing List
Re: [Ql-Users] EXEP_W
On Wed, 16 Aug 2017, Duncan wrote: Question : are you using QDOS or smsqe? with smsqe it should be possible to create a wrapper basic executable program that will EXEP "task; parameters" then continue to run and check the jobs list (you will know the task name) until the task it EXEP has finished before continuing with what you want to do next. Hi Duncan, Thanks for your suggestion, I did think of that idea. Also, I have found FEP(...) which returns the id of the job created. So, I'm guessing I could do something along these lines ... id = FEP(etc) REPeat wait SUSPEND_TASK 25 IF PJOB(id)=0 : IF OJOB(id)=0 : IF JOB$(id)="" : EXIT wait END REPeat wait I haven't tried this yet. Doing it this way, the task name would not need to be known. Michael ___ QL-Users Mailing List
Re: [Ql-Users] TURBO and testing it exists
On Thu, 17 Aug 2017 21:08:31, Per Wittewrote: > Thats a nice solution. Not sufficient for all manner of keywords, though. A > more general solution for checking for relevant toolkits in boot programs, > without having to load a toolkit to do so can be found in this article: > http://www.hunggartorino.it/ql/findkey/ (also available in Italian!) Hi Per, I cannot get the above link to work. It says not found. On Thu, 17 Aug 2017, 16:54:32, Duncan wrote: Hi Lee, If booting from a Win drive on the first instance of needing to load the Turbo toolkit check for the existence of a file on the boot device called "TTKLoaded", or similar. If the file does not exist create it and load TurboTK. If the file is found to exist do not load the toolkit. At the end of the session tidy up the boot device by deleting this file. Not elegant but practical. Hi Duncan, But what if during the session the QL crashes? The TTKLoaded file will remain on the Win drive, and the next time the QL session is started, it won't work properly. A nice idea though. Another way of doing this is to use environment variables, which I use myself. The details are here: http://www.dilwyn.me.uk/tk/env.zip Michael ___ QL-Users Mailing List
Re: [Ql-Users] Lear PCB Design v7.55
On Mon, 18 Sep 2017 at 14:26, Dilwyn Joneswrote: > A new update of Malcolm Lear's PCB Design is available from the Graphics page > on my website. Details of the little bug fix in the REVISIONS.TXT file. > > version 7.55 Fixed 1 mil offset correction for snake shape with odd offset. > > download free of charge from http://www.dilwyn.me.uk/graphics/index.html > > Dilwyn I have noticed that the procedure FreeRotate, defined at line 1850, is never called. - Just thought I'd point this out. Michael ___ QL-Users Mailing List
Re: [Ql-Users] Lear PCB Design v7.55
On Mon, 18 Sep 2017 at 14:26, Dilwyn Joneswrote: > A new update of Malcolm Lear's PCB Design is available from the Graphics page > on my website. Details of the little bug fix in the REVISIONS.TXT file. > > version 7.55 Fixed 1 mil offset correction for snake shape with odd offset. > > download free of charge from http://www.dilwyn.me.uk/graphics/index.html > > Dilwyn Sorry - I meant line 31850, this hasn't been called - the procedure FreeRotate. Michael ___ QL-Users Mailing List
Re: [Ql-Users] TYPE_IN
Hi all, I am hoping now to explain what is going on. First, here is some code that does work .. 100 DIM Top$ (100) : Top$ = "REMark " & FILL$( "*" ,20) 110 DIM Final$(100) : Final$ = "REMark " & FILL$("text",20) 120 An = 2 1920 TYPE_IN An&":"$(10) 1930 TYPE_IN (An+1)$$(10) 1932 TYPE_IN (An+2)$$(10) 1940 TYPE_IN (An+3)$$(10) 1950 TYPE_IN "CLS#2:LIST"$(10) 1960 PRINT #0,"Program completed successfully" After running the above code, you may notice that the “completed” message does not appear. To explain why, we have to consider how this code works. If this code is compiled, then SuperBASIC will act immediately upon each of the TYPED_IN commands. Under the Interpreter, they will not be acted upon, but will get to be stored in #0’s buffer. After the “completed” message gets printed to #0, the code comes to an end, and the SuperBASIC cursor comes back to life. The contents of the #0 buffer then gets entered into the command line, and will be acted upon, scrolling the “completed” message out of the way. Now consider what can happen if we change the first line to read FILL$(“*”,60). Running the code again with this larger figure will lead to it “locking up”, with nothing apparently happening. What has happened is that #0’s buffer has become full, and it is waiting there for some characters to be removed, which never happens. The only thing to do is to press Ctrl-SPACE and Ctrl-c to abort. As long as the buffer length of 128 bytes is not exceeded during a TYPE_IN, all should be well. Each TYPE_IN will need to be made separately, with the QL stopping, then continuing. The need to STOP is necessary to force the #0 buffer to empty its contents. Notice that we do not STOP if COMPILED, as doing that would remove the task. Here is the same code as above with these amendments … 100 DIM Top$ (100) : Top$ = "REMark " & FILL$( "*" ,60) 110 DIM Final$(100) : Final$ = "REMark " & FILL$("text",60) 120 An = 2 1920 TYPE_IN An&":"$(10) :IF NOT COMPILED:TYPE_IN "CONTINUE"$(10):STOP 1930 TYPE_IN (An+1)$$(10) :IF NOT COMPILED:TYPE_IN "CONTINUE"$(10):STOP 1932 TYPE_IN (An+2)$$(10):IF NOT COMPILED:TYPE_IN "CONTINUE"$(10):STOP 1940 TYPE_IN (An+3)$$(10) :IF NOT COMPILED:TYPE_IN "CONTINUE"$(10):STOP 1950 TYPE_IN "CLS#2:LIST"$(10) :IF NOT COMPILED:TYPE_IN "CONTINUE"$(10):STOP 1960 PRINT #0,"Program completed successfully" The above code works as expected in SMSQ/E. It should not work under QDOS as after entering any new line in the code, QDOS will lose its place and would not be able to continue. For QDOS it is best to compile the code. Another point to bear in mind is that any line TYPED_IN with invalid syntax will lead to the SuperBASIC cursor being re-entered to enable the faulty line to be edited. There is a simple way to cope with this condition, by starting each TYPE_IN with a CHR$(27) - the Escape key. This kind of code can be far easier to write and get working if it is compiled with Turbo. After any TYPE_IN to SuperBASIC, Turbo could wait in the background, in a loop, monitoring the SuperBASIC cursor position, and determining whether the typed-in line was successful or not. This arrangement would allow the user to correct the command line and press ENTER. Only when everything is okay could Turbo decide to exit the loop and continue. If the 128-character limit is too restrictive, one could use a temporary MERGE file instead of using TYPE_IN. This discussion would be more entertaining if we had more details of what is trying to be achieved. What is being used? - The QL, Q-emuLator or QPC2? - also is this compiled? I notice that each TYPE_IN starts with an integer, which would mean that lines are being added to SuperBASIC. This is indeed intriguing! Michael ___ QL-Users Mailing List
Re: [Ql-Users] Function type error
> > On 7 Sep 2017 at 15:15, George Gwilt <ql-us...@q-v-d.com> wrote: > > > > Subject: Re: [Ql-Users] Function type error > > > > On 10 Aug 2017, at 22:49, Michael Bulford via Ql-Users > > <ql-users@lists.q-v-d.com> wrote: > > > > Thanks for your explanations. This is all specific to SBASIC. > > Tobias gives an example with a LOCal name the same as the function name. > > Although this is possible, it cannot be recommended. You will not be able > > to call the function recursively. And it won't compile with either > > QLiberator or Turbo! > > Actually TURBO does compile the program and gives the answer 331. > > George Indeed, yes. I've also tested this with Minerva on Q-emuLator. Both under the Interpreter and Turbo, the result is again 331. However, Q-Liberator gives only 330.7 With both compilers now free, and with more and more people using them, it should follow that these functions need to be written with greater care in the future. Michael ___ QL-Users Mailing List
Re: [Ql-Users] TYPE_IN
> Fellow QL'ers > > I have a slight problem with TYPE_IN > > Using it to put some commands in #0, works well in an instance until I > reach what appears to be a maximum set of characters, where the QL just > hangs. > > e.g. > > 1920 TYPE_IN An&":"$(10) > 1930 TYPE_IN (An+1)$$(10) > 1932 TYPE_IN (An+2)$$(10) > 1940 TYPE_IN (An+3)$$(10) > > > An is an integer > Final$ is just text > Top$ is a string of asterisks > > it locks up displaying halfway through 1940 > > Is there a buffer I can clear after using TYPE_IN? > > or can I increase the length of the number of characters TYPE_IN can use? > > Many thanks in anticipation > > Lee If this is a compiled Turbo program, then there should be no problems as each of the typed-in commands would be processed separately. Running this under the Interpreter is slightly different. Each of the typed-in commands will only get to be processed once the SuperBASIC program has come to a stop. Before this stop happens, everything typed in to SuperBASIC's #0 will be stored in #0's buffer. If there are many commands to be processed, then this buffer could be exceeded, resulting in one of the commands being truncated and the remainder being lost. There is a simple way to overcome this problem. The program can be deliberately stopped after each of the TYPE_INs, and then be made to continue afterwards. To get the program to stop, use the STOP command, and to get the program to continue, use the CONTINUE command. This idea can be implemented by extending each of the TYPE_IN commands in the program, as follows .. : IF NOT COMPILED : TYPE_IN "CONTINUE" & CHR$(10) : STOP Notice the STOP command at the end. This is important and is the secret. The STOP command stops the program and allows the typed_in command to execute, after which the CONTINUE command causes the program to continue. By doing it this way, all commands will be executed separately, similar to how a compiled program would work. Lee, can you please try the above suggestion and let us know how you get on. Best wishes, Michael ___ QL-Users Mailing List
Re: [Ql-Users] CPORT
Hi Norman, I have both CPORT and CFIX. I find that CFIX doesn't work correctly in QPC2, so to get around that problem, I use Q-emulator for that one. CPORT does work well in QPC2, provided that memory is limited to 16M. There's also some other related files. I'll dig them out. How can I get them to you? Kind regards, Michael ___ QL-Users Mailing List
Re: [Ql-Users] EXT_PROC
On Wed, 8 Nov 2017 21:05:55, Per Wittewrote: > I was just made aware of a number of features in Q-Lberator that I havent > seen documented anywhere: EXT_PROC, EXT_FN, GLOBAL, and possibly others. I > believe I have a general idea of what theyre about, but should like to see > some documentation. Ive been told there is a chapter 14 in some manuals? > The two pdf manuals I found online, one of them claiming to be of V3.36, > dont mention these keywords, and my printed one is altogether of an older > vintage. Hi Per, See this link .. http://www.dilwyn.me.uk/qlib/index.html There are a couple of v3.36 manuals that clearly document these EXT_FN, EXT_PROC and GLOBAL keywords. They might not work as expected on QPC2, as SMSQ/E is being used. But these should work on Q-emulator. Michael ___ QL-Users Mailing List
Re: [Ql-Users] QPC2 4.04 BUG (RWAP Software)
> Does anyone know why the following in QPC2 reports "Invalid Channel ID" > > WINDOW 448,200,32,16 > PAPER #1,3 >> In fact, any attempt to change #1 after the WINDOW command reports an > invalid channel.>> I also found some of the character combinations were not > working in > v4.04 (eg CTRL SHIFT - did not produce a down arrow). > That also now works in v4.05 but CTRL \ does not produce the left arrow > still. Hi, I am using both QPC2 4.04 SMSQE/E 3.26 and also QPC2 4.05 > SMSQE/E 3.31.They both seem to work the same.I cannot replicate any of the > errors mentioned, except that I cannot produce the left arrow. As Dilwyn > points out, doing an OPEN #1, would do an automatic CLOSE #1 first, and > perhaps that has caused the problems. > On QPC2 v4.04 here I didn't have > to close anything - I just entered the > two commands above as soon as it started Perhaps there is something in > the Boot file causing the issue? Michael ___ QL-Users Mailing List
Re: [Ql-Users] QED v2.01 released!
* TAB compression and expansion supported * Raw and cooked LOADing and SAVing of files for CR/LF conversion Hi Jan, Many thanks, this is highly welcome.I use your software quite a lot. Michael ___ QL-Users Mailing List
Re: [Ql-Users] Select on
If we are talking about Selecting on single-character strings, such as when coding actions depending on some keypress, I would like to tell you about how I get around this problem. At the very beginning, I would declare some constants of the codes of all the alphabetical characters, all 52 of them. Underscores are used in the names to highlight these vars are constants and their initial values should not change. I will give what the code would look like under Minerva, and then how this would look in SMSQ/E. Note that when Selecting on strings, both cases, capitals and lower case letters are considered equivalent. This has to be taken into account. 100 : 110 : 120 REMark In Minerva SuperBASIC 130 case$ = "" : REMark "a" == "A" - both cases 140 SELect ON case$ 150 = "a" : PRINT 'Choice is "A"' 160 = "b" : PRINT 'Choice is "B"' 170 = "c" : PRINT 'Choice is "C"' 180 = "d" : PRINT 'Choice is "D"' 190 = "e" : PRINT 'Choice is "E"' 200 = "f" : PRINT 'Choice is "F"' 210 = CHR$(27) : PRINT 'Esc pressed' 220 END SELect 230 : 2000 REMark In SMSQ/E S*BASIC 2010 REMark Note: MANIFEST is optional TURBO command for extra constant checking 2020 : 2030 MANIFEST : _a = 97 : A_ = 65 2040 MANIFEST : _b = 98 : B_ = 66 2050 MANIFEST : _c = 99 : C_ = 67 2060 MANIFEST : _d = 100 : D_ = 68 2070 MANIFEST : _e = 101 : E_ = 69 2080 MANIFEST : _f = 102 : F_ = 70 2090 MANIFEST : ENTER = 10 : Esc = 27 2100 CLS 2110 REPeat loop 2120 PRINT 'Choose case: Press a letter between "a" and "F" '; 2130 case = CODE(INKEY$(#1,-1)) : IF case <> ENTER : PRINT CHR$(case); " "; 2140 SELect ON case 2150 = _a,A_ : PRINT 'Choice is "A"' 2160 = _b,B_ : PRINT 'Choice is "B"' 2170 = _c,C_ : PRINT 'Choice is "C"' 2180 = _d,D_ : PRINT 'Choice is "D"' 2190 = _e,E_ : PRINT 'Choice is "E"' 2200 = _f,F_ : PRINT 'Choice is "F"' 2210 = Esc : PRINT 'Esc pressed' : EXIT loop 2220 = REMAINDER : PRINT 'Try again' 2230 END SELect 2240 END REPeat loop 2250 PRINT 'Test complete' 2260 PRINT #0,'Test complete' Michael ___ QL-Users Mailing List
Re: [Ql-Users] Select on
If we are talking about Selecting on single-character strings, such as when coding actions depending on some keypress, I would like to tell you about how I get around this problem. At the very beginning, I would declare some constants of the codes of all the alphabetical characters, all 52 of them. Underscores are used in the names to highlight these vars are constants and their initial values should not change. I will give what the code would look like under Minerva, and then how this would look in SMSQ/E. Note that when Selecting on strings, both cases, capitals and lower case letters are considered equivalent. This has to be taken into account. 100 : 110 :120 REMark In Minerva SuperBASIC130 case$ = "" : REMark "a" == "A" - both cases140 SELect ON case$150 = "a" : PRINT 'Choice is "A"'160 = "b" : PRINT 'Choice is "B"'170 = "c" : PRINT 'Choice is "C"'180 = "d" : PRINT 'Choice is "D"'190 = "e" : PRINT 'Choice is "E"'200 = "f" : PRINT 'Choice is "F"'210 = CHR$(27) : PRINT 'Esc pressed'220 END SELect230 :2000 REMark In SMSQ/E S*BASIC2010 REMark Note: MANIFEST is optional TURBO command for extra constant checking2020 :2030 MANIFEST : _a = 97 : A_ = 652040 MANIFEST : _b = 98 : B_ = 662050 MANIFEST : _c = 99 : C_ = 672060 MANIFEST : _d = 100 : D_ = 682070 MANIFEST : _e = 101 : E_ = 692080 MANIFEST : _f = 102 : F_ = 702090 MANIFEST : ENTER = 10 : Esc = 272100 CLS2110 REPeat loop2120 PRINT 'Choose case: Press a letter between "a" and "F" ';2130 case = CODE(INKEY$(#1,-1)) : IF case <> ENTER : PRINT CHR$(case); " ";2140 SELect ON case2150 = _a,A_ : PRINT 'Choice is "A"'2160 = _b,B_ : PRINT 'Choice is "B"'2170 = _c,C_ : PRINT 'Choice is "C"'2180 = _d,D_ : PRINT 'Choice is "D"'2190 = _e,E_ : PRINT 'Choice is "E"'2200 = _f,F_ : PRINT 'Choice is "F"'2210 = Esc : PRINT 'Esc pressed' : EXIT loop2220 = REMAINDER : PRINT 'Try again'2230 END SELect2240 END REPeat loop2250 PRINT 'Test complete'2260 PRINT #0,'Test complete' Michael ___ QL-Users Mailing List
[Ql-Users] (no subject)
Ql    https://bitly.com/3v6iFgH     Michael Bulford  ___ QL-Users Mailing List