Personal Computer News


Discover Your Mode On The BBC

 
Published in Personal Computer News #104

Discover Your Mode On The BBC

With some Beeb programs, it is useful to know which screen mode the computer is in. The following function should reveal all:

  10 DEFFNM
  20 LOCAL A%
  30 A%=135
  40 =(USR(&FFF4)AND&FF0000)DIV&10000

Also, many more screen colours for a pretty display are possible with the short procedure below. It can produce coloured backgrounds of non-standard colours in Mode 1. It fills the screen with a "hatched" user-defined graphic. The colouor mix is defined with the two arguments C1 and C2.

The demo program shows you the full range of colours available to you.

  10 MODE 1
  20 FOR S=0 TO 7
  30 FOR T=0 TO 7
  40 PROCFILL(S,T)
  50 A=INKEY(200)
  60 NEXT:NEXT
  70 END
1000 DEFPROCFILL(C1,C2)
1010 VDU 23,224,&AA,&55,&AA,&55,&AA,&55,&AA,&55
1020 VDU 17,C1,17,C2+128,30
1030 FOR Y%=1 TO 31
1040 PRINT STRING$(40,CHR$ 224);
1050 NEXT
1060 ENDPROC

Jonathan Temple, Beeston, Nottingham

Jonathan Temple