Date : Thu, 24 Feb 2005 13:39:34 +0000 (GMT)
From : "A.Weston" <a.weston2@...>
Subject: Re: Mode 2 text
In <URL:news:local.misc> on Thu 24 Feb, Jon Ripley wrote:
> > Was there an issue regarding VDU22 and changing modes in procedures?
> > IIRC you can't use MODE in BASIC II.
>
> The MODE statement is available from BASIC I onwards. If you think about
> it, if MODE wan't in BASIC II, then only people with a BBC B+ or better
> would have been able to change mode! If there were any problems using
> VDU 22,mode then almost every BBC game would have suffered.
>
I mean MODE in procedures which IIRC is not permitted by BASIC II.
> Just need to make sure that HIMEM is set to the right value for mode 2,
> otherwise you might risk corrupting the BASIC stack.
> Best way to avoid this is to set MODE 2 at the start of the program and
> use VDU 22,mode in the rest of the program to switch screen mode.
>
> Using MODE at the start of the program sets up everything correctly for
> BASIC - HIMEM, the stack and some other bits; BASIC then does VDU
> 22,mode. VDU 22,mode sets up the VDU, system workspace and actually
> changes the screen mode.
There was a weird bug with VDU22 though on my old BBC Micro in that when
I used it to change mode I got a few residual pixels at the top left of
the screen.
regards,
A.Weston
--
Staffordshire, UK of GB&NI.
An alternative vision for Britain and Europe: www.new-frontiers.org