Is SBASIC programming on SMSQE difficult?
Posted: Mon Jan 10, 2022 12:13 pm
The very short answer according to google is yes. I agree with this, whereas tofro and Norm do not.
For some time I have been trying to learn to write programs in Qliberated BASIC on/in? SMSQE because as mk79 wrote "I actually like to do this stuff" or as he also wrote, its like doing "a 10000 pieces puzzle", or In my case a 100 piece puzzle.
I have to say that if I had the skills of mk I might have (if it had been possible) been tempted to carry on developing Stella et al.
I was not surprised to see that the internauts have a fair amount to say on the general question "is programming difficult". I found the following article a fair read:- https://www.thinkful.com/blog/why-learn ... damn-hard/. According to this article's first graph, I have probably reached "The Cliff of Confusion"
Recently Norm asked:- "what's bugging you? What are you trying to do? What's going wrong? What's working? What advice do you need?", which is kind of him. The answer to all those questions is, a lot.
I have in the past asked questions in a rather oblique manner and have received some useful replies, but I have delayed asking more detailed questions because I felt that I should do so only after having read as many manuals as I could bear.
I have so much to ask that I run the grave risk of being boring, so to start with I will just state that I was, still am, an SMS2 user. Programming on SMS2 is not quite the same as on SMSQE. I also program on SMSQE with a modified PEROM-SMS2 setup that runs on an a MIST FPGA.
I have three SMSQE setups:- QPC2, SMSQmuator and Q68.
I have two SMS2 setups:- On PC via Steem and on MIST.
I write my programs in an ancient version of QD linked to the SMS2 BASIC Parser so that they run on all of the above at resolutions >= 1024x768 without modification. I do not use line numbers, GOTOs, PEEKs, POKEs, 16bit colours, Easyptr or anything else that might cause problems.
As this is a QL and not an SMS2 forum I am not surprised that I regularly have to modify SBASIC source code so that it will compile on my setup. Much of the software I download from Dilwyn's site does not run properly or run at all on my SMSQE configuration. I have no idea why this is and in reality most of the stuff I like I can get to work well enough.
The only exception to this is unZIPing. I use an SMS2 unZIP thing which works really well but cannot ZIP. Instead I post small zipped QPC win files.
Anyway;
1. I am currently struggling to understand OPERATORS. In particular I cannot the understand the bitwise operators &&, ||, ^^ and ~. What does bitwise mean, for example?
I have written a program to test various operators and I would like an explanation for the the expression n&&2 with n=0 to 9
eg. O&&2 =0
For 1 it is 0 : 2 is 2 : 3 is 2 : 4 is 0 : 5 is 0 : 6 is 2 : 7 is 2 : 8 is 0 : 9 is 0
2. What is the maximum no. of parameters that can be passed to a Procedure in Qlib.
3. Sometimes, actually nearly always, a free running loop writing to the screen brings SMSQE to its knees until it is
partially or fully covered by another program. Why?
By free running I mean something such as:-
Open #1,con_ : Outln #1,300,300,50,50 etc.
Rep p
n=n+1
At #1,4,4 : Print #1,n
End rep p
4. I use a WAIT (from SMS2), PAUSE or INKEY$ instruction to solve 3. but the minimum delay for these instructions is
20 msecs. This is often much too long. Is there not an instruction that delays the program flow in micro seconds?
I have used wasted loops to create delays but they are not really satisfactory.
5. Is it true that the maximum number of channels that can be open at the same time in an Qlib SBASIC program is 16?
6. Can anyone provide me with a coded example of the use of the History device?
For some time I have been trying to learn to write programs in Qliberated BASIC on/in? SMSQE because as mk79 wrote "I actually like to do this stuff" or as he also wrote, its like doing "a 10000 pieces puzzle", or In my case a 100 piece puzzle.
I have to say that if I had the skills of mk I might have (if it had been possible) been tempted to carry on developing Stella et al.
I was not surprised to see that the internauts have a fair amount to say on the general question "is programming difficult". I found the following article a fair read:- https://www.thinkful.com/blog/why-learn ... damn-hard/. According to this article's first graph, I have probably reached "The Cliff of Confusion"
Recently Norm asked:- "what's bugging you? What are you trying to do? What's going wrong? What's working? What advice do you need?", which is kind of him. The answer to all those questions is, a lot.
I have in the past asked questions in a rather oblique manner and have received some useful replies, but I have delayed asking more detailed questions because I felt that I should do so only after having read as many manuals as I could bear.
I have so much to ask that I run the grave risk of being boring, so to start with I will just state that I was, still am, an SMS2 user. Programming on SMS2 is not quite the same as on SMSQE. I also program on SMSQE with a modified PEROM-SMS2 setup that runs on an a MIST FPGA.
I have three SMSQE setups:- QPC2, SMSQmuator and Q68.
I have two SMS2 setups:- On PC via Steem and on MIST.
I write my programs in an ancient version of QD linked to the SMS2 BASIC Parser so that they run on all of the above at resolutions >= 1024x768 without modification. I do not use line numbers, GOTOs, PEEKs, POKEs, 16bit colours, Easyptr or anything else that might cause problems.
As this is a QL and not an SMS2 forum I am not surprised that I regularly have to modify SBASIC source code so that it will compile on my setup. Much of the software I download from Dilwyn's site does not run properly or run at all on my SMSQE configuration. I have no idea why this is and in reality most of the stuff I like I can get to work well enough.
The only exception to this is unZIPing. I use an SMS2 unZIP thing which works really well but cannot ZIP. Instead I post small zipped QPC win files.
Anyway;
1. I am currently struggling to understand OPERATORS. In particular I cannot the understand the bitwise operators &&, ||, ^^ and ~. What does bitwise mean, for example?
I have written a program to test various operators and I would like an explanation for the the expression n&&2 with n=0 to 9
eg. O&&2 =0
For 1 it is 0 : 2 is 2 : 3 is 2 : 4 is 0 : 5 is 0 : 6 is 2 : 7 is 2 : 8 is 0 : 9 is 0
2. What is the maximum no. of parameters that can be passed to a Procedure in Qlib.
3. Sometimes, actually nearly always, a free running loop writing to the screen brings SMSQE to its knees until it is
partially or fully covered by another program. Why?
By free running I mean something such as:-
Open #1,con_ : Outln #1,300,300,50,50 etc.
Rep p
n=n+1
At #1,4,4 : Print #1,n
End rep p
4. I use a WAIT (from SMS2), PAUSE or INKEY$ instruction to solve 3. but the minimum delay for these instructions is
20 msecs. This is often much too long. Is there not an instruction that delays the program flow in micro seconds?
I have used wasted loops to create delays but they are not really satisfactory.
5. Is it true that the maximum number of channels that can be open at the same time in an Qlib SBASIC program is 16?
6. Can anyone provide me with a coded example of the use of the History device?