SBASIC Programming

Anything QL Software or Programming Related.
User avatar
tofro
Font of All Knowledge
Posts: 3087
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: SBASIC Programming

Post by tofro »

pjw wrote: Mon Jan 13, 2025 8:37 pm
8) Programs without an author name (or nom de plume at least,) a version
number or a date risk growing increasingly useless as they age!
It is not vanity to add this vital information to the code or associated
documentation; its necessary!
Something I think I saw first in Albin Hessler's (of EasyPtr fame) code and have adopted:

Put a bit of text regarding program name, version and author to the beginning of your assembly program (I have a macro doing that which inserts that after the obligatory header). This allows people to view (albeit with a lot of glibberish around the text) what they have actually installed even if the file has been renamed.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
swensont
Forum Moderator
Posts: 324
Joined: Tue Dec 06, 2011 3:30 am
Location: SF Bay Area
Contact:

Re: SBASIC Programming

Post by swensont »

>4) Why, in this day and age, presume everyone uses 512x256a0x0 mode 4/8 without any particular reason?

Oh, I think I'm guilty of that one. I only run 512x256 because anything else is too small on the screen for these aging eyes to comfortably read.
I rarely test things at a higher resolution. Granted my most recent work was curses based, so that sort of defined how large the screen is.

Tim


User avatar
bwinkel67
QL Wafer Drive
Posts: 1519
Joined: Thu Oct 03, 2019 2:09 am

Re: SBASIC Programming

Post by bwinkel67 »

swensont wrote: Mon Jan 13, 2025 9:12 pm >4) Why, in this day and age, presume everyone uses 512x256a0x0 mode 4/8 without any particular reason?

Oh, I think I'm guilty of that one. I only run 512x256 because anything else is too small on the screen for these aging eyes to comfortably read.
I rarely test things at a higher resolution. Granted my most recent work was curses based, so that sort of defined how large the screen is.

Tim
I'm actually of the small, underrepresented subset of QLers who, in the 80s/90s had to live with the fact that unless you had a monitor, most software wouldn't display properly. US QLs connected via RF or Composite could only work in TV mode and only display 512x192 resolution. Once you put it in monitor mode, the screen would just roll for ever. I think the Amiga had similar issues but software authors cared a bit more about the US market. The QL US market was so small that most never gave it a thought, except for software houses like Psion, who created a nice working version of Exchange that looked almost identically in both NTSC and PAL and gives the same amount of info.

For those writing in BASIC, you can check ver$ and/or use the existing channel dimensions for #0, #1, and #2.


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

Re: SBASIC Programming

Post by pjw »

swensont wrote: Mon Jan 13, 2025 9:12 pm >4) Why, in this day and age, presume everyone uses 512x256a0x0 mode 4/8 without any particular reason?

Oh, I think I'm guilty of that one. I only run 512x256 because anything else is too small on the screen for these aging eyes to comfortably read.
I rarely test things at a higher resolution. Granted my most recent work was curses based, so that sort of defined how large the screen is.
If you mean to say that you need to view the 512x256 across the full HDMI, then I understand. However, I prefer 960x540 using the full HDMI because the is no interpolation or dithering at that resolution and it is large enough even for my ageing eyes.


Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
swensont
Forum Moderator
Posts: 324
Joined: Tue Dec 06, 2011 3:30 am
Location: SF Bay Area
Contact:

Re: SBASIC Programming

Post by swensont »

I don't do 512x256 full screen (that's a little too big), but in a larger window. This makes it easy to see other windows and switch to them. Plus I do most of my work in a netbook with a 11" screen (where I can kip back in my recliner).

Tim


Derek_Stewart
Font of All Knowledge
Posts: 4679
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: SBASIC Programming

Post by Derek_Stewart »

If I write a program and it opens it's own channels, I use Toolkit 2 FOP_xxxx functions to open the console or window.

This is okay?


Regards,

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

Re: SBASIC Programming

Post by pjw »

pjw wrote: Sun Jan 05, 2025 11:51 am
RalfR wrote: Wed Dec 18, 2024 7:01 pm
pjw wrote: Wed Dec 18, 2024 6:48 pmWhat might have been nice is a sort of "standard window" in Qmenu - or a la Qmenu, which you could use as you please, but which had the basic functions of Move, Resize, Sleep,, Wake, etc. Just enough to knock up some simple programs with a minimum of fuss.
Oliver Fink has written such a program.....but for QPTR:

https://dilwyn.theqlforum.com/program/space.zip
I am aware of Oliver's SPACE project and just retested it now. Its a good
attempt (a bit long in the tooth now,) but to my mind Im not sure the
balance of simplicity over flexibility is entirely worth it. Might as well
go directly to Qptr.. After writing one or two simple programs oneself
one would have a flexible, reusable template of one's own.
<>
I was just looking at some stuff yesterday and found this, which may be of interest to anyone who followed this discussion:

Code: Select all

100 dim item$(4, 10)
102 for i% = 0 to dimn(item$): item$(i%) = 'item ' & i%
104 :
106 rem No window here..
108 sp_jobpal -1, 2:        rem Choose your palette
110 no% = LIST_SELECT('Choose', item$)
112 :
114 rem     Depending on program, no other window needed
116 rem But for this demo, just to show the result:
118 :
120 print no%: pause: quit
Needs a recent Menu_rext (QMenu).
In SMSQ/E just EXecute this program (It should be possible to do the some in Qdos if compiled).
Surely, this is one of the simplest PE "programs" around! Had this concept been extended, it might have made PE programs easy to write.
For QD aficionados, this is exactly how PickQD was made (Knoware/utils/PickQD).


Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
Post Reply