Knoware.no

Anything QL Software or Programming Related.
User avatar
Popopo
Gold Card
Posts: 443
Joined: Wed Apr 07, 2021 10:37 am

Re: Knoware.no

Post by Popopo »

pjw wrote: Tue May 27, 2025 10:33 am Im sorry my manuals are so obtuse! I will try harder to make them clearer.
...
Hi!
Thank you very much for such detailed answer :)
Your manual is not obtuse, it is my mind some days :) ... and lack of experience :)

Again, thank you :)


User avatar
Popopo
Gold Card
Posts: 443
Joined: Wed Apr 07, 2021 10:37 am

Re: Knoware.no

Post by Popopo »

Derek_Stewart wrote: Wed May 28, 2025 7:32 am When there is no microdrive cartridge in the the drive, there should be a system error generated: ERR_NF (-7) file or device not found. See QDOS Technical Manual Chapter 18.1 Page 158 and SMSQ/E calls the error code: err.fdnf (-7) file or device not found, see SMSQDOS Reference Manual section 18.1

The error can be caught using a WHEN ERRor clause, see QL User manual or online Superbasic manual for details and Toolkit 2 and Qliberator manuals for updates.

Note pre-JS Roms the WHEN ERRor did not work, so, JS, Minerva, SMSQ/E are the only versions that will work.
Hi Derek,
Really? wauuuu, I want to try it out this weekend.
I was looking for it and even I opened a thread about it with lot of activity but the answer was about to trap or to use C.
So it is new for me. I will check it out.

Thank you :)


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

Re: Knoware.no

Post by Derek_Stewart »

Hi,

Toolkit 2 introduced some extensions to the Error reporting. Instead of using the minus error numbers, which all forget. there are ERR_xxx for each error condition, for example:

Error: File not found = -7

or Toolkit 2 gives a function called: ERR_NF

the current error code is returned in the function: ERNUM

So using Per's extension

PRINT ERRM$(ERNUM)

should give the description of the error code.

Puttin the When Error clause that the start of the programme will error trap the finding of files:

WHEN_ERRor
IF ERNUM=ERR_NF : PRINT "No file or device found"
END_WHEN


Regards,

Derek
User avatar
ql_freak
Gold Card
Posts: 498
Joined: Sun Jan 18, 2015 1:29 am

Re: Knoware.no

Post by ql_freak »

 
Just "played" with Per's PlotLine, nice. I always wanted "graphics" for the pixel coordinate system.

Wish: Someone should port it to assembler.

Here my (as an owner of "The C Programming Language") "hello world" example:
 
pjwPlotLine01.png
pjwPlotLine01.png (10.72 KiB) Viewed 138 times


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
tofro
Font of All Knowledge
Posts: 3108
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Knoware.no

Post by tofro »

ql_freak wrote: Thu May 29, 2025 12:47 am Wish: Someone should port it to assembler.
Have a look at DIY Toolkit's graphics functions. They provide pixel coordinate plot and draw functions in assembly language.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
pjw
QL Wafer Drive
Posts: 1622
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Knoware.no

Post by pjw »

tofro wrote: Thu May 29, 2025 7:47 am
ql_freak wrote: Thu May 29, 2025 12:47 am Wish: Someone should port it to assembler.
Have a look at DIY Toolkit's graphics functions. They provide pixel coordinate plot and draw functions in assembly language.
I had intended to convert the plotline algorithm to assembler, but then I got stuck on the high colour modes and the whole project became too complicated for what was intended as a leisurely walk in the park.

Even simplifying to use the internal block drawing routines rather than plotting coloured pixels of my own didnt yield to my repeated attempts. All I ever got were black lines.

So while figuring out how to get the block routines to produce the desired colour is still somewhere on my ToDo list, plotline, with the shapes I had planned to go with it (rectangles, triangles, circles, etc) are off the menu.

I wasnt aware of the DIY version before, but on checking it out now it seems it is rather out of date. It may work fine on QL-like machines (512x256, modes 0 and 4, and Thor mode 12) but no high colour. A later update seems to be able to work with larger screens, but due to some design decisions, Im not sure these routines will work with very large screens.

No doubt they could be updated by some knowledgable and dedicated enthusiast. But personally, I wouldnt have used two step instructions to draw a line, and therefore the need to "remember" values between calls. It might be a lot simpler and better to start afresh..


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