QPTR demo Paint.bas

Anything QL Software or Programming Related.
Post Reply
User avatar
Andrew
QL Wafer Drive
Posts: 1033
Joined: Tue Jul 17, 2018 9:10 pm

QPTR demo Paint.bas

Post by Andrew »

I try to learn a bit more PE programming - and hit a snag.
Demo program PAINT_bas from QPTR runs ok on QEMULATOR QDOS + PE but does not run on QPC SMSQE
On QPC II program starts, interface is displayed. But click on menu does nothing. The program is not frozen and can be stopped by Ctrl - Space.
The compiled version (from QPTR demos) runs both on QEmulator and QPC II
So question is: What generates this strange behaviour?


ones' complement
Trump Card
Posts: 162
Joined: Tue Nov 30, 2021 1:19 am

Re: QPTR demo Paint.bas

Post by ones' complement »

Vaguely I seem to recall it may have something to do with OUTLN (https://www.theqlforum.com/viewtopic.php ... tln#p28202)


User avatar
Andrew
QL Wafer Drive
Posts: 1033
Joined: Tue Jul 17, 2018 9:10 pm

Re: QPTR demo Paint.bas

Post by Andrew »

ones' complement wrote:Vaguely I seem to recall it may have something to do with OUTLN (https://www.theqlforum.com/viewtopic.php ... tln#p28202)
Thank you - that was the problem!
paint_bas needs OUTLN also when it's not compiled.
Added line 1115 OUTLN #0 ,512,256,0,0 and now it works.

Still wondering why it was working on QDOS+PE without having OUTLN ...


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

Re: QPTR demo Paint.bas

Post by Derek_Stewart »

Hi,

I was rewriting the Paint program, but never got it completed, I wiĺl have a look into what stage I am at.

There is another issue with the QPTR PAINT_BAS program, it uses the variable compiled to detect wether it is compiled. But if Turbo Toolkit is loaded, there is a COMPIKED keyword added to the interpreter, so that fails as well.


Regards,

Derek
User avatar
Andrew
QL Wafer Drive
Posts: 1033
Joined: Tue Jul 17, 2018 9:10 pm

Re: QPTR demo Paint.bas

Post by Andrew »

Derek_Stewart wrote:There is another issue with the QPTR PAINT_BAS program, it uses the variable compiled to detect wether it is compiled. But if Turbo Toolkit is loaded, there is a COMPIKED keyword added to the interpreter, so that fails as well.
Yes, but that was easy to spot, even for me. I changed it to isCompiled as soon as I loaded the program.
Please, can you send me you modified Paint_bas code?


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

Re: QPTR demo Paint.bas

Post by Derek_Stewart »

Hi,

Did you rename all the compiled variables?

I have not done much on the updated version, I check it out and get back to you.


Regards,

Derek
User avatar
Andrew
QL Wafer Drive
Posts: 1033
Joined: Tue Jul 17, 2018 9:10 pm

Re: QPTR demo Paint.bas

Post by Andrew »

Derek_Stewart wrote:Did you rename all the compiled variables?
Yes, all of them.


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

Re: QPTR demo Paint.bas

Post by Derek_Stewart »

Andrew wrote:
Derek_Stewart wrote:There is another issue with the QPTR PAINT_BAS program, it uses the variable compiled to detect wether it is compiled. But if Turbo Toolkit is loaded, there is a COMPIKED keyword added to the interpreter, so that fails as well.
Yes, but that was easy to spot, even for me. I changed it to isCompiled as soon as I loaded the program.
Please, can you send me you modified Paint_bas code?
HI Andrew,

I looked a my attempts to modify Paint, which looks like what you have already done, I was also trying to add Config Blocks to the code, which was the point I stopped, as I did not know how.

I was reading the documentation.


Regards,

Derek
Post Reply