[BBC-Micro] Scrolling scrolling scrolling...

Jonathan Graham Harston jgh at arcade.demon.co.uk
Fri Dec 8 00:01:14 GMT 2006

>Message-ID: <06146B5D5346FB41B5C65713A6EB725001476B46 at bbcxues12.national.core.
"Tim Matthews" <tim.matthews at bbc.co.uk> wrote:
> I'd like to know how to print a character at position (39,31) in MODE 1
> _WITHOUT_ the screen scrolling or using VDU 5. I'm sure it must be
> possible! I remember writing lots of games at scholl none of which used
> line 31! What a waste
A way to do it legally is to print the bottom line, allow the
screen to scroll, then go back to the top line and scroll the
screen back:
PRINT TAB(39,31)"*..";TAB(0,0);CHR$11;
What you need to do is set bit 1 of the VDU status byte.
Unfortunately, this is only readable legally, with OSBYTE &75. Due
to there being no legal way of writing the VDU status byte, other
than the side effects of various VDU codes, Acorn chose to declare
it's location as a fixed location so it could be written to.
It is at &FFFF00D0, that is &D0 in the I/O processor.
b0 : printer output enabled, set by VDU 2, reset by VDU 3
b1 : scrolling disabled, set by VDU 5, reset by VDU 4
b2 : paged scrolling selected, set by VDU 14, reset by VDU 15
b3 : software scrolling selected, set by VDU 28, reset by VDU 22/26
b4 : shadow screen selected, set by explicit or implied
      VDU 22,128+n, reset by VDU 22,n
b5 : printing at the graphics cursor, set by VDU 5, reset by VDU 4
b6 : input and output cursors separated, set by cursor key
       editing, reset by VDU 13
b7 : VDU output disabled, set by VDU 21, reset by VDU 6
As you see, b1 and b5 normally follow each other. You want b1
without b5. The only way to do this is ?&D0=?&D0 OR 2 as long as
you are running in the I/O memory.
J.G.Harston - jgh at arcade.demon.co.uk - mdfs.net/User/JGH
RISC OS Internationalisation - http://mdfs.net/Software/RISCOS

More information about the bbc-micro mailing list