Topics

VDU 23,16

Jerónimo Luis Dalla Via
 

Hello, how are you?

 

I want to use VDU 23,16 to let the text cursor move beyond the edge of the viewport/page (in VDU 5 mode).

VDU 5 causes text to be written at the graphics cursor position.

 

The structure shown in the help file is this:

 

VDU 23,16,x,y,0;0;0;

VDU 23,16,f;0;0;0;

or

VDU 23,16,f|

 

And I want to activate only this:

 

Bit 6 = 1 The text cursor can move beyond the edge of the viewport/page (except in VDU 4 mode).

 

Does anyone know how to achieve it?

 

I tried everything but I couldn’t make it work.

 

Thank you very much.

 

Best regards.

 

Saludos,

 

Jerónimo

 


Libre de virus. www.avast.com

dai_m_leeds
 

Hi Jeronimo,

Using the form VDU 23,16,x,y,0;0;0;

The manual says the existing flag byte is first ANDed with y and the XORed with X, so:

1) If we set y =10111111 binary =&BF, then the flag bit will have everything unchanged except that bit 6 will be 0.
2) If we set x=01000000 binary = &40, then bit 6 will get set to 1 (since we know it WAS 0), and everything else will be unchanged.

So the command you want should be:
VDU 23,16,&40,&BF,0;0;0;

I haven't actually checked this, so I'd be interested to hear if it works!

Best wishes,

D

J.G.Harston
 

Jerónimo Luis Dalla Via wrote:
I want to use VDU 23,16 to let the text cursor move beyond the edge of
the viewport/page (in VDU 5 mode).
...
VDU 23,16,f|
And I want to activate only this:
Bit 6 = 1 The text cursor can move beyond the edge of the
viewport/page (except in VDU 4 mode).
It only works in VDU 5 mode, like this:

MODE 1
VDU 5
MOVE 0,1024-16:PRINT STRING$(60,"*");
VDU 23,16,64|
MOVE 0,1024-96:PRINT STRING$(60,"#");

The VDU 23,16,x,y| form allows you to turn individual bits on and off,
the final setting is (oldsetting AND y) XOR x, so VDU 23,16,64,255-64|
would turn bit 6 on without changing any other setting. You may
recognise this as the same method as OSBYTE variables.

--
J.G.Harston - jgh@... - mdfs.net/jgh

Jerónimo Luis Dalla Via
 

Hello David,

 

I Works great!

 

I clearly understand how it Works now.

 

Because of AND Boolean operator, y=10111111 BIN (BF HEX) won’t change anything (0 will continue as 0 and 1 will continue as 1) except for bit 6 that will value 0 now (0 AND 0=0, 1 AND 0=0).

 

Because of OR Boolean operator, x=01000000 BIN (40 HEX) won’t change anything (0 will continue as 0 and 1 will continue as 1) except for bit 6 that will value 1 now (0 OR 1=1).

 

Thank you very much!

 

Best regards.

 

Saludos,

 

Jerónimo

 

De: bb4w@groups.io [mailto:bb4w@groups.io] En nombre de dai_m_leeds
Enviado el: miércoles, 1 de mayo de 2019 07:55
Para: bb4w@groups.io
Asunto: Re: [bb4w] VDU 23,16

 

Hi Jeronimo,

Using the form VDU 23,16,x,y,0;0;0;

The manual says the existing flag byte is first ANDed with y and the XORed with X, so:

1) If we set y =10111111 binary =&BF, then the flag bit will have everything unchanged except that bit 6 will be 0.
2) If we set x=01000000 binary = &40, then bit 6 will get set to 1 (since we know it WAS 0), and everything else will be unchanged.

So the command you want should be:
VDU 23,16,&40,&BF,0;0;0;

I haven't actually checked this, so I'd be interested to hear if it works!

Best wishes,

D


Libre de virus. www.avast.com