BASIC command extensions

From BeebWiki
Revision as of 18:21, 19 February 2024 by Jgharston (talk | contribs) (Added some more.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
COLOUR n           Select text colour                     VDU 17,n
COLOUR l,p         Set colour mapping                     VDU 19,l,p,0,0,0
COLOUR r,g,b       Set text colour closest to (r,g,b)
COLOUR l,r,g,b     Set colour mapping                     VDU 19,l,16,r,g,b
COLOUR l,r,g,b,a   Set colour mapping with alpha channel
COLOUR ON n        Set background text colour             VDU 17,n+128
COLOUR ON r,g,b    Set background text colour
COLOUR n ON m      Set fgd and bgd text colour            VDU 17,n,17,m+128
COLOUR n ON r,g,b      Set fgd and bgd text colour
COLOUR r,g,b ON m      Set fgd and bgd text colour
COLOUR r,g,b ON x,y,z  Set fgd and bgd text colour

GCOL n             Set graphics colour                    VDU 18,0,n
GCOL a,n           Set graphics colour and action         VDU 18,a,n
GCOL r,g,b         Set graphics colour closest to (r,g,b)
GCOL a,r,g,b       Set graphics colour closest to (r,g,b)
GCOL ON n          Set graphics background colour         VDU 18,0,n+128
GCOL ON r,g,b      Set graphics background colour
GCOL n ON m        Set graphics fgd and bgd colour        VDU 18,0,n,18,0,m+128
GCOL n ON r,g,b        Set graphics fgd and bgd colour
GCOL r,g,b ON m        Set graphics fgd and bgd colour
GCOL r,g,b ON x,y,z    Set graphics fgd and bgd colour

OFF                Turn cursor off                        VDU 23,1,0,0,0,0,0,0,0,0
ON                 Turn cursor on                         VDU 23,1,1,0,0,0,0,0,0,0

PLOT x,y           Plot a point                           VDU 25,69,x;y;
PLOT k,x,y         Plot action                            VDU 25,k,x;y;

PROCname[(parameters)]
PROC(address)[(parameters)]

BPUT#num,num       Write byte
BPUT#num,str       Write LF-terminated string
BPUT#num,str;      Write unterminated string

SOUND num,num,num,num                                     OSWORD 7
SOUND OFF                                                 OSBYTE 210,0
SOUND ON                                                  OSBYTE 210,255

?address=byte      8-bit indirection
!address=word      32-bit indirection
|address=float     40-bit indirection
var?off=byte       8-bit indirection
var!off=word       32-bit indirection
var|off=float      40-bit indirection