Page 1 of 1

IOP.OUTL Bug?

Posted: Thu Nov 25, 2021 9:33 pm
by NormanDunbar
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.

Re: IOP.OUTL Bug?

Posted: Thu Nov 25, 2021 9:57 pm
by mk79
"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).

Re: IOP.OUTL Bug?

Posted: Thu Nov 25, 2021 10:06 pm
by NormanDunbar
Thanks Marcel. I didn't see that in themanual. I must go and read it again.

Cheers,
Norm.

Re: IOP.OUTL Bug?

Posted: Fri Nov 26, 2021 9:12 am
by mk79
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... ;-)

Re: IOP.OUTL Bug?

Posted: Fri Nov 26, 2021 10:50 am
by tofro
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).

Re: IOP.OUTL Bug?

Posted: Fri Nov 26, 2021 11:02 am
by mk79
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".

Re: IOP.OUTL Bug?

Posted: Fri Nov 26, 2021 6:57 pm
by NormanDunbar
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.