IOP.OUTL Bug?

Anything QL Software or Programming Related.
User avatar
NormanDunbar
Forum Moderator
Posts: 1792
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

IOP.OUTL Bug?

Postby NormanDunbar » Thu Nov 25, 2021 9:33 pm

I was playing with the assembly trap call for OUTLN as part of Tinfpga's "challenge" on another thread, to show him how to open a console, set the colours and border, OUTLN it, CLS it etc.

I misunderstood the meaning of D2 on entry to the trap:

  • If 1, preserve window contents;
  • If zero, don't preserve.

I thought this meant CLS if zero! Silly me. However, in testing with non-zero values, I always get an "invalid parameter" error, only zero seems to work. For what it's worth, the code is running in a job, not as a CALLed routine or a S*BASIC extension.

I think it's D2, I'm typing this in the bath, but it's the register which does or doesn't preserve the contents.

Is this a known bug? Am I doing something wrong -- again! Am I talking bollox -- again.

This is using QPC2_5.02 (but not today's patched version), on Linux, under Wine. SMSQ/E is 3.38 as supplied with QPC.

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals - https://www.amazon.co.uk/Arduino-Softwa ... 1484257898, https://www.apress.com/gb/book/9781484257890
User avatar
mk79
QL Wafer Drive
Posts: 1133
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: IOP.OUTL Bug?

Postby mk79 » Thu Nov 25, 2021 9:57 pm

"Preserve windows contents" means "move the window, including its contents". That can only be done on a window that is already "well behaved", i.e. had a successful outline call done on it (with D2 = 0).


User avatar
NormanDunbar
Forum Moderator
Posts: 1792
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: IOP.OUTL Bug?

Postby NormanDunbar » Thu Nov 25, 2021 10:06 pm

Thanks Marcel. I didn't see that in themanual. I must go and read it again.

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals - https://www.amazon.co.uk/Arduino-Softwa ... 1484257898, https://www.apress.com/gb/book/9781484257890
User avatar
mk79
QL Wafer Drive
Posts: 1133
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: IOP.OUTL Bug?

Postby mk79 » Fri Nov 26, 2021 9:12 am

I have no idea what's written in the manual, I've deducted this from the source code. Not sure if that tells you more about me or about the state of the manual... ;-)


User avatar
tofro
Font of All Knowledge
Posts: 2229
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: IOP.OUTL Bug?

Postby tofro » Fri Nov 26, 2021 10:50 am

mk79 wrote:I have no idea what's written in the manual,


I actully can't find a description of IOP.OUTL in either the most recent SMSQ/E reference manual nor in the QPTR manual on Wolfgang's site.

But it's somewhat obvious that you can't ask the system to preserve window contents that it hasn't saved (because there's no outline set on the window and it's thus unmanaged).


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
mk79
QL Wafer Drive
Posts: 1133
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: IOP.OUTL Bug?

Postby mk79 » Fri Nov 26, 2021 11:02 am

tofro wrote:I actully can't find a description of IOP.OUTL in either the most recent SMSQ/E reference manual nor in the QPTR manual on Wolfgang's site.
It's on page 84 of the QPtr manual. And I think the description is pretty clear if you already know what is meant :-D
QPtr manual wrote:If the key in D2 is set to 1 then the contents of the window will be preserved, allowing
applications to move a window with one call to IOP.OUTL: note that the size must stay the
same for this to work properly!

tofro wrote:But it's somewhat obvious that you can't ask the system to preserve window contents that it hasn't saved (because there's no outline set on the window and it's thus unmanaged).
I think Norman's misunderstanding was that "preserved" just means "window will not be cleared".


User avatar
NormanDunbar
Forum Moderator
Posts: 1792
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: IOP.OUTL Bug?

Postby NormanDunbar » Fri Nov 26, 2021 6:57 pm

At first, Norman thought that preserving the contents of the newly OUTLN'd meant "do not CLS"!

Then, in a moment of clarity, I thought that it saved the contents in case the job was CTRL-C'd away and then back, so the screen contents could be restored.

It never occurred to me that it was allowing an already OUTLN'd window to be moved, with its contents.

I'm getting too old.

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals - https://www.amazon.co.uk/Arduino-Softwa ... 1484257898, https://www.apress.com/gb/book/9781484257890

Who is online

Users browsing this forum: No registered users and 4 guests