Home » Archimedes archive » Acorn User » AU 1997-Xmas A.adf » StrongHelp » !Manuals/VDU

!Manuals/VDU

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1997-Xmas A.adf » StrongHelp
Filename: !Manuals/VDU
Read OK:
File size: 267C bytes
Load address: 0000
Exec address: 0000
File contents
HELP(�T
,����$DIR$��E������!Root4F���*�',517lF���ݽ�17aF���$�',�18�E���&���18a|$G���xi�19%G���A�ig19a�F���˨',22�F����22aF���LO�623E���H���23,0E���N����23,1�F��� �6�23,17�E���Z���W23,17,0E���\����23,17,4�E���f��ߴ23,17,6�F����6�23,17,7\E���k���L23,2�F���׉6�23,6PF���ks6�23a!E���|���e24�!F���"w',�25 "E�������[28|"F�����',�29(#F���ؾ',R31DATAVDU List:
#Table 17 33
  0 Null Operation
  1 Send next char to printer
  2 Enable printer
  3 Disable printer
  4 Split text,graphics cursors
  5 Join  text,graphics cursors
  6 Enable screen output
  7 Bell
  8 Back space     (move left )
  9 Horizontal tab (move right)
 10 Line feed      (move down )
 11 Vertical tab   (move up   )
 12 Form feed/clear screen
 13 Carriage return
 14 Page mode on
 15 Page mode off
 16 Clear graphics window
<17> Set text colour
<18> Set graphics colour and action
<19> Set palette
20 Restore default colours
21 Disable screen output
<22> Change Screen Mode
<23> Misc
<24> Define graphics window
<25> Plot
26 Restore default windows
27 NoOp
<28> Define text window
<29> Set graphics origin
30 Home
<31> Position text cursor
127 Delete
#EndTableDATA5VDU 17
VDU 17,<colour=>17a>

Set text colour
DATA�colour
0	-	127	: Foreground colour set.
128	-	255	: Background colour set to colour-128.

colour used = colour AND maxcol.

maxcol is 1,3,15 or 63 for 256-colour modes.DATA�VDU 18
VDU 18,<action=>18a>,<colour=>17a>

This VDU is used to define graphics fore or background colour, and the way in which it is to be plotted on the screen.DATAAction:
s is pixel on screen.
c is new colour.

Value  Action
-----  -----------------------------------------
    0  s = c
    1  s = s OR c
    2  s = s AND c
    3  s = s XOR c
    4  s = NOT s
    5
    6  s = s AND NOT c
    7  s = s OR NOT c
 8-15  As 0-7 but background col is transparent.
16-31  Colour pattern 1, using action 0-15
32-47  Colour pattern 2, using action 0-15
48-63  Colour pattern 3, using action 0-15
64-79  Colour pattern 4, using action 0-15
80-95  Giant pattern, using action 0-15FREE�����19
VDU 19,colour,<mode=>19a>,r,g,b

This VDU defines the RGB value for the border, or one of the screen or pointer colours.FREE��	:
Mode  Action
----  ------------------------
0-15  logical col = actual col
  16  logical colour = RGB
  17  first flash = RGB
  18  second flash = RGB
  24  Border colour = RGB
  25  Pointer col = RGB

Add 128 to set supremacy bit.

Only top four bits of R,G and B, is used
today, but if you want the colours to
look the same on a future 24-bit VIDC,
you should set bottom bits=top bits.DATAVDU 22
VDU 22,<mode=>22a>

This VDU is used to select screen mode.

To read which mode is currently set, use <OS_Byte=>SWI.OS_Byte> 135, and to read other info, use <OS_ReadModeVariable=>SWI.OS_ReadModeVariable> or <OS_ReadVduVariables=>SWI.OS_ReadVduVariables>.DATAStandard Modes:
Mode	col*row	pixx*pixy	colours	Memory	Type
#Line
0	80*32	640*256		2	20K	****-
1	40*32	320*256		4	20K	****-
2	20*32	160*256		16	40K	****-
3	80*25	Text only	2	40K	****-
4	40*32	320*256		2	20K	****-
5	20*32	160*256		4	20K	****-
6	40*25	Text only	2	20K	****-
7	40*25	Teletext	16	80K	****-
8	80*32	640*256		4	40K	****-
9	40*32	320*256		16	40K	****-
10	20*32	160*256		256	80K	****-
11	80*25	640*250		4	40K	****-
12	80*32	640*256		16	80K	****-
13	40*32	320*256		256	80K	****-
14	80*25	640*250		16	80K	****-
15	80*32	640*256		256	160K	****-
16	132*32	1056*256	16	132K	**---
17	132*25	1056*250	16	132K	**---
18	80*64	640*512		2	40K	-*---
19	80*64	640*512		4	80K	-*---
20	80*64	640*512		16	160K	-*---
21	80*64	640*512		256	320K	-*---
22	66*36	768*288		16	108K	**---
23	144*56	1152*896	2	126K	----*
24	132*25	1056*256	256	264K	**---
25	80*50	640*480		2	37.5K	-***-
26	80*50	640*480		4	75K	-***-
27	80*50	640*480		16	150K	-***-
28	80*50	640*480		256	300K	-***-
29	100*75	800*600		2	58.6K	-*-*-
30	100*75	800*600		4	117.2K	-*-*-
31	100*75	800*600		16	234.4K	-*-*-
32
33	96*36	768*288		2	27K	**---
34	96*36	768*288		4	54K	**---
35	96*36	768*288		16	108K	**---
36	96*36	768*288		256	216K	**---
37	112*44	896*352		2	38.5K	-*---
38	112*44	896*352		4	77K	-*---
39	112*44	896*352		16	154K	-*---
40	112*44	896*352		256	308K	-*---
41	80*44	640*352		2	27.5K	-***-
42	80*44	640*352		4	55K	-***-
43	80*44	640*352		16	110K	-***-
44	80*25	640*200		2	15.7K	-***-
45	80*25	640*200		4	31.3K	-***-
46	80*25	640*200		16	62.5K	-***-
#Tab
                                          �����
                       'TV'-type monitor  �����
                        Multisync monitor  ����
                     60 Hz VGA-type monitor ���
                           Super-VGA monitor ��
        61.2 kHz high-res monochrome monitor  �DATAVDU 23
VDU 23,<command=>23a>,eight parameters

Miscellaneous commands.

Though few of the commands use all of the eight parameters, they must always be present. In BASIC, you can use '|' to add eight 0'es:

	VDU 23,0,10|
 =	VDU 23,0,10,0,0,0,0,0,0,0,0DATA�VDU 23,0
Set the interlace and control cursor appearance.
VDU 23,0,action,mode,0,0,0,0,0,0

Action =  8  Set interlace:
  Mode :  0  Set it to opposite of current *TV
          1  Set it to current *TV
        &80  Turn interlace off
        &81  Turn interlace on

Action = 10  Set start line for cursor:
  Mode bits 0-4  Start line (0 is top)
       bits 5-6  00 Steady
                 01 Off
                 02 Fast flash
                 03 Slow flash

Action = 11 End line for cursor = ModeDATA�VDU 23,1
VDU 23,1,mode,0,0,0,0,0,0,0

This VDU controls the appearance
of the cursor:
  0 Hide cursor
  1 Show cursor
  2 Steady cursor
  3 Flashing corsor

The effect of this VDU is 
cancelled when cursor editing occurs.DATA�VDU 23,17,x
<0-3=>23,17,0>	Set tint
<4=>23,17,4>	Choose colour-pattern type
5		Swap text fore and background colour
<6=>23,17,6>	Set ECF origin
<7=>23,17,7>	Set char size and spacingDATAWVDU 23,17,0-3
This VDU is used to set the tint for a colour in 
a 256-colour mode:

VDU 23,17,0,tint,0,0,0,0,0,0,0  Text foreground
VDU 23,17,1,tint,0,0,0,0,0,0,0  Text background
VDU 23,17,2,tint,0,0,0,0,0,0,0  Graphics foreground
VDU 23,17,3,tint,0,0,0,0,0,0,0  Graphics background

Tint is &00,&40,&80 or &C0 (uses only 2 top bits).DATA�VDU 23,17,4
VDU 23,17,4,0,0,0,0,0,0,0 : Use ancient pattern
VDU 23,17,4,1,0,0,0,0,0,0 : Use new & improved

This VDU chooses which set of colour patterns 
are used to interpret subsequent <VDU 23,2-5=>23,2>
calls.DATA�VDU 23,17,6
23,17,6,x;y;0,0,0

This VDU sets the point with which to align
the bottom left of the ECF pattern with.

You can also use <OS_SetECFOrigin=>SWI.OS_SetECFOrigin>DATA�VDU 23,17,7
VDU 23,17,7,flags,x;y;

Flagbits:
#Line
  0	Set size of VDU 5 characters. (sizes 8*8 and 8*16 are fast, others slow)
  1	Set spacing between VDU 5 characters.DATALVDU 23,2-5
VDU 23,nr,eight colour bytes.

This VDU defines one of the ECF patterns
Nr is 2-5 for pattern 1-4.
Each of the eight colour bytes define one row
of the ECF pattern, and there are two modes:
a BBC-mode, and an Archimedes mode. 
To choose mode, use <VDU 23,17,4=>23,17,4>.

Bit 0-7 in each colour byte,is used as follows:

Bits pr  
pixel    BBC pixels       Archimedes pixels
-------  ---------------  -----------------
   1     7,6,5,4,3,2,1,0  0,1,2,3,4,5,6,7
   2     73,62,51,40      10,32,54,76
   4     7531,6420        3210,7654
   8     76543210         76543210DATA�VDU 23,6
VDU 23,6, 8 pattern bytes

This VDU sets the dot-dash line style used by dotted <plot=>SWI:OS_Plot> commands. The most significant bit is used first.DATA�VDU 23 commands:
<0=>23,0>	Set interlace & cursor appearance
<1=>23,1>	Control cursor appearance
<2-5=>23,2>	Define ECF pattern & colours
<6=>23,6>	Set dot-dash line style
7		Scroll text window or screen
8		Clear block of text window
9		Set time for 1st flash colour
10		Set time for 2nd flash colour
11		Set default pattern
12-15		Define simple ECF & colours
16		Control cursor movement after print
<17=>23,17>	Misc
32-255		Redefine a character.DATAeVDU 24
                    (rx,ty)

 Define graphics window:
   VDU 24,lx;by;rx;ty;


(lx,by)DATA�VDU 25
VDU 25,<command=>swi.os_plot0>,x;y;

This VDU executes a plot command. It is faster (and simpler) to use the SWI <OS_Plot=>SWI:OS_Plot> directly.DATA[VDU 28
                (rx,ty)

 Define text window:
  VDU 28,lx,by,rx,ty


(lx,by)DATA�VDU 29
VDU 29,x;y;

This VDU defines where on screen 0,0 is. All graphics operations are relative to this point. Graphics window remains at same position on screen.DATARVDU 31
VDU 31,x,y

This VDU moves the text cursor to (x,y).

(0,0) is top left of current text window. If (x,y) is outside text window, nothing happens, unless scroll protect is enabled and x = maxx+1  => cursor is moved to (x-1,y), and a pending newline is generated.

Current position can be read with <OS_Byte=>SWI:OS_Byte> 134DATA�VDU 19
#wrap off
VDU 19,colour,<mode=>19a>,r,g,b
#wrap

This VDU defines the RGB value for the border, or one of the screen or pointer colours.DATAgMode:
Mode	Action
#Line
0-15	logical col = actual col
16	logical colour = RGB
17	first flash = RGB
18	second flash = RGB
24	Border colour = RGB
25	Pointer col = RGB

Add 128 to set supremacy bit.

Only top four bits of R,G and B, is used today, but if you want the colours to look the same on a future 24-bit VIDC, you should set bottom bits=top bits.
00000000  48 45 4c 50 28 00 00 00  c9 00 00 00 54 0a 00 00  |HELP(.......T...|
00000010  2c 00 00 00 00 fd ff ff  00 00 00 00 e8 02 00 00  |,...............|
00000020  00 01 00 00 00 00 00 00  24 00 00 00 44 49 52 24  |........$...DIR$|
00000030  f0 02 00 00 f0 02 00 00  1c 03 00 00 45 fd ff ff  |............E...|
00000040  00 96 e8 df 15 03 00 00  13 00 00 00 00 00 00 00  |................|
00000050  21 52 6f 6f 74 00 00 00  34 06 00 00 46 fd ff ff  |!Root...4...F...|
00000060  2a 99 27 2c 35 00 00 00  13 00 00 00 00 00 00 00  |*.',5...........|
00000070  31 37 00 00 6c 06 00 00  46 fd ff ff 11 dd bd 0e  |17..l...F.......|
00000080  b0 00 00 00 13 00 00 00  00 00 00 00 31 37 61 00  |............17a.|
00000090  1c 07 00 00 46 fd ff ff  24 9e 27 2c a9 00 00 00  |....F...$.',....|
000000a0  13 00 00 00 00 00 00 00  31 38 00 00 c8 07 00 00  |........18......|
000000b0  45 fd ff ff 26 96 e8 df  04 02 00 00 13 00 00 00  |E...&...........|
000000c0  00 00 00 00 31 38 61 00  7c 24 00 00 47 fd ff ff  |....18a.|$..G...|
000000d0  01 78 69 03 97 00 00 00  13 00 00 00 00 00 00 00  |.xi.............|
000000e0  31 39 00 00 14 25 00 00  47 fd ff ff 41 91 69 03  |19...%..G...A.i.|
000000f0  67 01 00 00 13 00 00 00  00 00 00 00 31 39 61 00  |g...........19a.|
00000100  e8 0b 00 00 46 fd ff ff  cb a8 27 2c 0e 01 00 00  |....F.....',....|
00000110  13 00 00 00 00 00 00 00  32 32 00 00 f8 0c 00 00  |........22......|
00000120  46 fd ff ff e4 a4 1b 07  19 07 00 00 13 00 00 00  |F...............|
00000130  00 00 00 00 32 32 61 00  14 14 00 00 46 fd ff ff  |....22a.....F...|
00000140  4c 4f b9 36 03 01 00 00  13 00 00 00 00 00 00 00  |LO.6............|
00000150  32 33 00 00 18 15 00 00  45 fd ff ff 48 96 e8 df  |23......E...H...|
00000160  f9 01 00 00 13 00 00 00  00 00 00 00 32 33 2c 30  |............23,0|
00000170  00 00 00 00 14 17 00 00  45 fd ff ff 4e 96 e8 df  |........E...N...|
00000180  e5 00 00 00 13 00 00 00  00 00 00 00 32 33 2c 31  |............23,1|
00000190  00 00 00 00 fc 17 00 00  46 fd ff ff 20 97 0e 36  |........F... ..6|
000001a0  be 00 00 00 13 00 00 00  00 00 00 00 32 33 2c 31  |............23,1|
000001b0  37 00 00 00 bc 18 00 00  45 fd ff ff 5a 96 e8 df  |7.......E...Z...|
000001c0  57 01 00 00 13 00 00 00  00 00 00 00 32 33 2c 31  |W...........23,1|
000001d0  37 2c 30 00 14 1a 00 00  45 fd ff ff 5c 96 e8 df  |7,0.....E...\...|
000001e0  dd 00 00 00 13 00 00 00  00 00 00 00 32 33 2c 31  |............23,1|
000001f0  37 2c 34 00 f4 1a 00 00  45 fd ff ff 66 96 e8 df  |7,4.....E...f...|
00000200  b4 00 00 00 13 00 00 00  00 00 00 00 32 33 2c 31  |............23,1|
00000210  37 2c 36 00 a8 1b 00 00  46 fd ff ff e6 a6 0e 36  |7,6.....F......6|
00000220  b2 00 00 00 13 00 00 00  00 00 00 00 32 33 2c 31  |............23,1|
00000230  37 2c 37 00 5c 1c 00 00  45 fd ff ff 6b 96 e8 df  |7,7.\...E...k...|
00000240  4c 02 00 00 13 00 00 00  00 00 00 00 32 33 2c 32  |L...........23,2|
00000250  00 00 00 00 a8 1e 00 00  46 fd ff ff d7 89 0e 36  |........F......6|
00000260  a6 00 00 00 13 00 00 00  00 00 00 00 32 33 2c 36  |............23,6|
00000270  00 00 00 00 50 1f 00 00  46 fd ff ff 6b 73 0e 36  |....P...F...ks.6|
00000280  c6 01 00 00 13 00 00 00  00 00 00 00 32 33 61 00  |............23a.|
00000290  18 21 00 00 45 fd ff ff  7c 96 e8 df 65 00 00 00  |.!..E...|...e...|
000002a0  13 00 00 00 00 00 00 00  32 34 00 00 80 21 00 00  |........24...!..|
000002b0  46 fd ff ff 22 77 27 2c  a0 00 00 00 13 00 00 00  |F..."w',........|
000002c0  00 00 00 00 32 35 00 00  20 22 00 00 45 fd ff ff  |....25.. "..E...|
000002d0  80 96 e8 df 5b 00 00 00  13 00 00 00 00 00 00 00  |....[...........|
000002e0  32 38 00 00 7c 22 00 00  46 fd ff ff 8c b5 27 2c  |28..|"..F.....',|
000002f0  ac 00 00 00 13 00 00 00  00 00 00 00 32 39 00 00  |............29..|
00000300  28 23 00 00 46 fd ff ff  d8 be 27 2c 52 01 00 00  |(#..F.....',R...|
00000310  13 00 00 00 00 00 00 00  33 31 00 00 44 41 54 41  |........31..DATA|
00000320  15 03 00 00 56 44 55 20  4c 69 73 74 3a 0a 23 54  |....VDU List:.#T|
00000330  61 62 6c 65 20 31 37 20  33 33 0a 20 20 30 20 4e  |able 17 33.  0 N|
00000340  75 6c 6c 20 4f 70 65 72  61 74 69 6f 6e 0a 20 20  |ull Operation.  |
00000350  31 20 53 65 6e 64 20 6e  65 78 74 20 63 68 61 72  |1 Send next char|
00000360  20 74 6f 20 70 72 69 6e  74 65 72 0a 20 20 32 20  | to printer.  2 |
00000370  45 6e 61 62 6c 65 20 70  72 69 6e 74 65 72 0a 20  |Enable printer. |
00000380  20 33 20 44 69 73 61 62  6c 65 20 70 72 69 6e 74  | 3 Disable print|
00000390  65 72 0a 20 20 34 20 53  70 6c 69 74 20 74 65 78  |er.  4 Split tex|
000003a0  74 2c 67 72 61 70 68 69  63 73 20 63 75 72 73 6f  |t,graphics curso|
000003b0  72 73 0a 20 20 35 20 4a  6f 69 6e 20 20 74 65 78  |rs.  5 Join  tex|
000003c0  74 2c 67 72 61 70 68 69  63 73 20 63 75 72 73 6f  |t,graphics curso|
000003d0  72 73 0a 20 20 36 20 45  6e 61 62 6c 65 20 73 63  |rs.  6 Enable sc|
000003e0  72 65 65 6e 20 6f 75 74  70 75 74 0a 20 20 37 20  |reen output.  7 |
000003f0  42 65 6c 6c 0a 20 20 38  20 42 61 63 6b 20 73 70  |Bell.  8 Back sp|
00000400  61 63 65 20 20 20 20 20  28 6d 6f 76 65 20 6c 65  |ace     (move le|
00000410  66 74 20 29 0a 20 20 39  20 48 6f 72 69 7a 6f 6e  |ft ).  9 Horizon|
00000420  74 61 6c 20 74 61 62 20  28 6d 6f 76 65 20 72 69  |tal tab (move ri|
00000430  67 68 74 29 0a 20 31 30  20 4c 69 6e 65 20 66 65  |ght). 10 Line fe|
00000440  65 64 20 20 20 20 20 20  28 6d 6f 76 65 20 64 6f  |ed      (move do|
00000450  77 6e 20 29 0a 20 31 31  20 56 65 72 74 69 63 61  |wn ). 11 Vertica|
00000460  6c 20 74 61 62 20 20 20  28 6d 6f 76 65 20 75 70  |l tab   (move up|
00000470  20 20 20 29 0a 20 31 32  20 46 6f 72 6d 20 66 65  |   ). 12 Form fe|
00000480  65 64 2f 63 6c 65 61 72  20 73 63 72 65 65 6e 0a  |ed/clear screen.|
00000490  20 31 33 20 43 61 72 72  69 61 67 65 20 72 65 74  | 13 Carriage ret|
000004a0  75 72 6e 0a 20 31 34 20  50 61 67 65 20 6d 6f 64  |urn. 14 Page mod|
000004b0  65 20 6f 6e 0a 20 31 35  20 50 61 67 65 20 6d 6f  |e on. 15 Page mo|
000004c0  64 65 20 6f 66 66 0a 20  31 36 20 43 6c 65 61 72  |de off. 16 Clear|
000004d0  20 67 72 61 70 68 69 63  73 20 77 69 6e 64 6f 77  | graphics window|
000004e0  0a 3c 31 37 3e 20 53 65  74 20 74 65 78 74 20 63  |.<17> Set text c|
000004f0  6f 6c 6f 75 72 0a 3c 31  38 3e 20 53 65 74 20 67  |olour.<18> Set g|
00000500  72 61 70 68 69 63 73 20  63 6f 6c 6f 75 72 20 61  |raphics colour a|
00000510  6e 64 20 61 63 74 69 6f  6e 0a 3c 31 39 3e 20 53  |nd action.<19> S|
00000520  65 74 20 70 61 6c 65 74  74 65 0a 32 30 20 52 65  |et palette.20 Re|
00000530  73 74 6f 72 65 20 64 65  66 61 75 6c 74 20 63 6f  |store default co|
00000540  6c 6f 75 72 73 0a 32 31  20 44 69 73 61 62 6c 65  |lours.21 Disable|
00000550  20 73 63 72 65 65 6e 20  6f 75 74 70 75 74 0a 3c  | screen output.<|
00000560  32 32 3e 20 43 68 61 6e  67 65 20 53 63 72 65 65  |22> Change Scree|
00000570  6e 20 4d 6f 64 65 0a 3c  32 33 3e 20 4d 69 73 63  |n Mode.<23> Misc|
00000580  0a 3c 32 34 3e 20 44 65  66 69 6e 65 20 67 72 61  |.<24> Define gra|
00000590  70 68 69 63 73 20 77 69  6e 64 6f 77 0a 3c 32 35  |phics window.<25|
000005a0  3e 20 50 6c 6f 74 0a 32  36 20 52 65 73 74 6f 72  |> Plot.26 Restor|
000005b0  65 20 64 65 66 61 75 6c  74 20 77 69 6e 64 6f 77  |e default window|
000005c0  73 0a 32 37 20 4e 6f 4f  70 0a 3c 32 38 3e 20 44  |s.27 NoOp.<28> D|
000005d0  65 66 69 6e 65 20 74 65  78 74 20 77 69 6e 64 6f  |efine text windo|
000005e0  77 0a 3c 32 39 3e 20 53  65 74 20 67 72 61 70 68  |w.<29> Set graph|
000005f0  69 63 73 20 6f 72 69 67  69 6e 0a 33 30 20 48 6f  |ics origin.30 Ho|
00000600  6d 65 0a 3c 33 31 3e 20  50 6f 73 69 74 69 6f 6e  |me.<31> Position|
00000610  20 74 65 78 74 20 63 75  72 73 6f 72 0a 31 32 37  | text cursor.127|
00000620  20 44 65 6c 65 74 65 0a  23 45 6e 64 54 61 62 6c  | Delete.#EndTabl|
00000630  65 00 00 00 44 41 54 41  35 00 00 00 56 44 55 20  |e...DATA5...VDU |
00000640  31 37 0a 56 44 55 20 31  37 2c 3c 63 6f 6c 6f 75  |17.VDU 17,<colou|
00000650  72 3d 3e 31 37 61 3e 0a  0a 53 65 74 20 74 65 78  |r=>17a>..Set tex|
00000660  74 20 63 6f 6c 6f 75 72  0a 00 00 00 44 41 54 41  |t colour....DATA|
00000670  b0 00 00 00 63 6f 6c 6f  75 72 0a 30 09 2d 09 31  |....colour.0.-.1|
00000680  32 37 09 3a 20 46 6f 72  65 67 72 6f 75 6e 64 20  |27.: Foreground |
00000690  63 6f 6c 6f 75 72 20 73  65 74 2e 0a 31 32 38 09  |colour set..128.|
000006a0  2d 09 32 35 35 09 3a 20  42 61 63 6b 67 72 6f 75  |-.255.: Backgrou|
000006b0  6e 64 20 63 6f 6c 6f 75  72 20 73 65 74 20 74 6f  |nd colour set to|
000006c0  20 63 6f 6c 6f 75 72 2d  31 32 38 2e 0a 0a 63 6f  | colour-128...co|
000006d0  6c 6f 75 72 20 75 73 65  64 20 3d 20 63 6f 6c 6f  |lour used = colo|
000006e0  75 72 20 41 4e 44 20 6d  61 78 63 6f 6c 2e 0a 0a  |ur AND maxcol...|
000006f0  6d 61 78 63 6f 6c 20 69  73 20 31 2c 33 2c 31 35  |maxcol is 1,3,15|
00000700  20 6f 72 20 36 33 20 66  6f 72 20 32 35 36 2d 63  | or 63 for 256-c|
00000710  6f 6c 6f 75 72 20 6d 6f  64 65 73 2e 44 41 54 41  |olour modes.DATA|
00000720  a9 00 00 00 56 44 55 20  31 38 0a 56 44 55 20 31  |....VDU 18.VDU 1|
00000730  38 2c 3c 61 63 74 69 6f  6e 3d 3e 31 38 61 3e 2c  |8,<action=>18a>,|
00000740  3c 63 6f 6c 6f 75 72 3d  3e 31 37 61 3e 0a 0a 54  |<colour=>17a>..T|
00000750  68 69 73 20 56 44 55 20  69 73 20 75 73 65 64 20  |his VDU is used |
00000760  74 6f 20 64 65 66 69 6e  65 20 67 72 61 70 68 69  |to define graphi|
00000770  63 73 20 66 6f 72 65 20  6f 72 20 62 61 63 6b 67  |cs fore or backg|
00000780  72 6f 75 6e 64 20 63 6f  6c 6f 75 72 2c 20 61 6e  |round colour, an|
00000790  64 20 74 68 65 20 77 61  79 20 69 6e 20 77 68 69  |d the way in whi|
000007a0  63 68 20 69 74 20 69 73  20 74 6f 20 62 65 20 70  |ch it is to be p|
000007b0  6c 6f 74 74 65 64 20 6f  6e 20 74 68 65 20 73 63  |lotted on the sc|
000007c0  72 65 65 6e 2e 00 00 00  44 41 54 41 04 02 00 00  |reen....DATA....|
000007d0  41 63 74 69 6f 6e 3a 0a  73 20 69 73 20 70 69 78  |Action:.s is pix|
000007e0  65 6c 20 6f 6e 20 73 63  72 65 65 6e 2e 0a 63 20  |el on screen..c |
000007f0  69 73 20 6e 65 77 20 63  6f 6c 6f 75 72 2e 0a 0a  |is new colour...|
00000800  56 61 6c 75 65 20 20 41  63 74 69 6f 6e 0a 2d 2d  |Value  Action.--|
00000810  2d 2d 2d 20 20 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |---  -----------|
00000820  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000830  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0a 20  |--------------. |
00000840  20 20 20 30 20 20 73 20  3d 20 63 0a 20 20 20 20  |   0  s = c.    |
00000850  31 20 20 73 20 3d 20 73  20 4f 52 20 63 0a 20 20  |1  s = s OR c.  |
00000860  20 20 32 20 20 73 20 3d  20 73 20 41 4e 44 20 63  |  2  s = s AND c|
00000870  0a 20 20 20 20 33 20 20  73 20 3d 20 73 20 58 4f  |.    3  s = s XO|
00000880  52 20 63 0a 20 20 20 20  34 20 20 73 20 3d 20 4e  |R c.    4  s = N|
00000890  4f 54 20 73 0a 20 20 20  20 35 0a 20 20 20 20 36  |OT s.    5.    6|
000008a0  20 20 73 20 3d 20 73 20  41 4e 44 20 4e 4f 54 20  |  s = s AND NOT |
000008b0  63 0a 20 20 20 20 37 20  20 73 20 3d 20 73 20 4f  |c.    7  s = s O|
000008c0  52 20 4e 4f 54 20 63 0a  20 38 2d 31 35 20 20 41  |R NOT c. 8-15  A|
000008d0  73 20 30 2d 37 20 62 75  74 20 62 61 63 6b 67 72  |s 0-7 but backgr|
000008e0  6f 75 6e 64 20 63 6f 6c  20 69 73 20 74 72 61 6e  |ound col is tran|
000008f0  73 70 61 72 65 6e 74 2e  0a 31 36 2d 33 31 20 20  |sparent..16-31  |
00000900  43 6f 6c 6f 75 72 20 70  61 74 74 65 72 6e 20 31  |Colour pattern 1|
00000910  2c 20 75 73 69 6e 67 20  61 63 74 69 6f 6e 20 30  |, using action 0|
00000920  2d 31 35 0a 33 32 2d 34  37 20 20 43 6f 6c 6f 75  |-15.32-47  Colou|
00000930  72 20 70 61 74 74 65 72  6e 20 32 2c 20 75 73 69  |r pattern 2, usi|
00000940  6e 67 20 61 63 74 69 6f  6e 20 30 2d 31 35 0a 34  |ng action 0-15.4|
00000950  38 2d 36 33 20 20 43 6f  6c 6f 75 72 20 70 61 74  |8-63  Colour pat|
00000960  74 65 72 6e 20 33 2c 20  75 73 69 6e 67 20 61 63  |tern 3, using ac|
00000970  74 69 6f 6e 20 30 2d 31  35 0a 36 34 2d 37 39 20  |tion 0-15.64-79 |
00000980  20 43 6f 6c 6f 75 72 20  70 61 74 74 65 72 6e 20  | Colour pattern |
00000990  34 2c 20 75 73 69 6e 67  20 61 63 74 69 6f 6e 20  |4, using action |
000009a0  30 2d 31 35 0a 38 30 2d  39 35 20 20 47 69 61 6e  |0-15.80-95  Gian|
000009b0  74 20 70 61 74 74 65 72  6e 2c 20 75 73 69 6e 67  |t pattern, using|
000009c0  20 61 63 74 69 6f 6e 20  30 2d 31 35 46 52 45 45  | action 0-15FREE|
000009d0  87 00 00 00 ff ff ff ff  31 39 0a 56 44 55 20 31  |........19.VDU 1|
000009e0  39 2c 63 6f 6c 6f 75 72  2c 3c 6d 6f 64 65 3d 3e  |9,colour,<mode=>|
000009f0  31 39 61 3e 2c 72 2c 67  2c 62 0a 0a 54 68 69 73  |19a>,r,g,b..This|
00000a00  20 56 44 55 20 64 65 66  69 6e 65 73 20 74 68 65  | VDU defines the|
00000a10  20 52 47 42 20 76 61 6c  75 65 20 66 6f 72 20 74  | RGB value for t|
00000a20  68 65 20 62 6f 72 64 65  72 2c 20 6f 72 20 6f 6e  |he border, or on|
00000a30  65 20 6f 66 20 74 68 65  20 73 63 72 65 65 6e 20  |e of the screen |
00000a40  6f 72 20 70 6f 69 6e 74  65 72 20 63 6f 6c 6f 75  |or pointer colou|
00000a50  72 73 2e 00 46 52 45 45  91 01 00 00 cc 09 00 00  |rs..FREE........|
00000a60  3a 0a 4d 6f 64 65 20 20  41 63 74 69 6f 6e 0a 2d  |:.Mode  Action.-|
00000a70  2d 2d 2d 20 20 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |---  -----------|
00000a80  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0a 30 2d  |-------------.0-|
00000a90  31 35 20 20 6c 6f 67 69  63 61 6c 20 63 6f 6c 20  |15  logical col |
00000aa0  3d 20 61 63 74 75 61 6c  20 63 6f 6c 0a 20 20 31  |= actual col.  1|
00000ab0  36 20 20 6c 6f 67 69 63  61 6c 20 63 6f 6c 6f 75  |6  logical colou|
00000ac0  72 20 3d 20 52 47 42 0a  20 20 31 37 20 20 66 69  |r = RGB.  17  fi|
00000ad0  72 73 74 20 66 6c 61 73  68 20 3d 20 52 47 42 0a  |rst flash = RGB.|
00000ae0  20 20 31 38 20 20 73 65  63 6f 6e 64 20 66 6c 61  |  18  second fla|
00000af0  73 68 20 3d 20 52 47 42  0a 20 20 32 34 20 20 42  |sh = RGB.  24  B|
00000b00  6f 72 64 65 72 20 63 6f  6c 6f 75 72 20 3d 20 52  |order colour = R|
00000b10  47 42 0a 20 20 32 35 20  20 50 6f 69 6e 74 65 72  |GB.  25  Pointer|
00000b20  20 63 6f 6c 20 3d 20 52  47 42 0a 0a 41 64 64 20  | col = RGB..Add |
00000b30  31 32 38 20 74 6f 20 73  65 74 20 73 75 70 72 65  |128 to set supre|
00000b40  6d 61 63 79 20 62 69 74  2e 0a 0a 4f 6e 6c 79 20  |macy bit...Only |
00000b50  74 6f 70 20 66 6f 75 72  20 62 69 74 73 20 6f 66  |top four bits of|
00000b60  20 52 2c 47 20 61 6e 64  20 42 2c 20 69 73 20 75  | R,G and B, is u|
00000b70  73 65 64 0a 74 6f 64 61  79 2c 20 62 75 74 20 69  |sed.today, but i|
00000b80  66 20 79 6f 75 20 77 61  6e 74 20 74 68 65 20 63  |f you want the c|
00000b90  6f 6c 6f 75 72 73 20 74  6f 0a 6c 6f 6f 6b 20 74  |olours to.look t|
00000ba0  68 65 20 73 61 6d 65 20  6f 6e 20 61 20 66 75 74  |he same on a fut|
00000bb0  75 72 65 20 32 34 2d 62  69 74 20 56 49 44 43 2c  |ure 24-bit VIDC,|
00000bc0  0a 79 6f 75 20 73 68 6f  75 6c 64 20 73 65 74 20  |.you should set |
00000bd0  62 6f 74 74 6f 6d 20 62  69 74 73 3d 74 6f 70 20  |bottom bits=top |
00000be0  62 69 74 73 2e 00 00 00  44 41 54 41 0e 01 00 00  |bits....DATA....|
00000bf0  56 44 55 20 32 32 0a 56  44 55 20 32 32 2c 3c 6d  |VDU 22.VDU 22,<m|
00000c00  6f 64 65 3d 3e 32 32 61  3e 0a 0a 54 68 69 73 20  |ode=>22a>..This |
00000c10  56 44 55 20 69 73 20 75  73 65 64 20 74 6f 20 73  |VDU is used to s|
00000c20  65 6c 65 63 74 20 73 63  72 65 65 6e 20 6d 6f 64  |elect screen mod|
00000c30  65 2e 0a 0a 54 6f 20 72  65 61 64 20 77 68 69 63  |e...To read whic|
00000c40  68 20 6d 6f 64 65 20 69  73 20 63 75 72 72 65 6e  |h mode is curren|
00000c50  74 6c 79 20 73 65 74 2c  20 75 73 65 20 3c 4f 53  |tly set, use <OS|
00000c60  5f 42 79 74 65 3d 3e 53  57 49 2e 4f 53 5f 42 79  |_Byte=>SWI.OS_By|
00000c70  74 65 3e 20 31 33 35 2c  20 61 6e 64 20 74 6f 20  |te> 135, and to |
00000c80  72 65 61 64 20 6f 74 68  65 72 20 69 6e 66 6f 2c  |read other info,|
00000c90  20 75 73 65 20 3c 4f 53  5f 52 65 61 64 4d 6f 64  | use <OS_ReadMod|
00000ca0  65 56 61 72 69 61 62 6c  65 3d 3e 53 57 49 2e 4f  |eVariable=>SWI.O|
00000cb0  53 5f 52 65 61 64 4d 6f  64 65 56 61 72 69 61 62  |S_ReadModeVariab|
00000cc0  6c 65 3e 20 6f 72 20 3c  4f 53 5f 52 65 61 64 56  |le> or <OS_ReadV|
00000cd0  64 75 56 61 72 69 61 62  6c 65 73 3d 3e 53 57 49  |duVariables=>SWI|
00000ce0  2e 4f 53 5f 52 65 61 64  56 64 75 56 61 72 69 61  |.OS_ReadVduVaria|
00000cf0  62 6c 65 73 3e 2e 00 00  44 41 54 41 19 07 00 00  |bles>...DATA....|
00000d00  53 74 61 6e 64 61 72 64  20 4d 6f 64 65 73 3a 0a  |Standard Modes:.|
00000d10  4d 6f 64 65 09 63 6f 6c  2a 72 6f 77 09 70 69 78  |Mode.col*row.pix|
00000d20  78 2a 70 69 78 79 09 63  6f 6c 6f 75 72 73 09 4d  |x*pixy.colours.M|
00000d30  65 6d 6f 72 79 09 54 79  70 65 0a 23 4c 69 6e 65  |emory.Type.#Line|
00000d40  0a 30 09 38 30 2a 33 32  09 36 34 30 2a 32 35 36  |.0.80*32.640*256|
00000d50  09 09 32 09 32 30 4b 09  2a 2a 2a 2a 2d 0a 31 09  |..2.20K.****-.1.|
00000d60  34 30 2a 33 32 09 33 32  30 2a 32 35 36 09 09 34  |40*32.320*256..4|
00000d70  09 32 30 4b 09 2a 2a 2a  2a 2d 0a 32 09 32 30 2a  |.20K.****-.2.20*|
00000d80  33 32 09 31 36 30 2a 32  35 36 09 09 31 36 09 34  |32.160*256..16.4|
00000d90  30 4b 09 2a 2a 2a 2a 2d  0a 33 09 38 30 2a 32 35  |0K.****-.3.80*25|
00000da0  09 54 65 78 74 20 6f 6e  6c 79 09 32 09 34 30 4b  |.Text only.2.40K|
00000db0  09 2a 2a 2a 2a 2d 0a 34  09 34 30 2a 33 32 09 33  |.****-.4.40*32.3|
00000dc0  32 30 2a 32 35 36 09 09  32 09 32 30 4b 09 2a 2a  |20*256..2.20K.**|
00000dd0  2a 2a 2d 0a 35 09 32 30  2a 33 32 09 31 36 30 2a  |**-.5.20*32.160*|
00000de0  32 35 36 09 09 34 09 32  30 4b 09 2a 2a 2a 2a 2d  |256..4.20K.****-|
00000df0  0a 36 09 34 30 2a 32 35  09 54 65 78 74 20 6f 6e  |.6.40*25.Text on|
00000e00  6c 79 09 32 09 32 30 4b  09 2a 2a 2a 2a 2d 0a 37  |ly.2.20K.****-.7|
00000e10  09 34 30 2a 32 35 09 54  65 6c 65 74 65 78 74 09  |.40*25.Teletext.|
00000e20  31 36 09 38 30 4b 09 2a  2a 2a 2a 2d 0a 38 09 38  |16.80K.****-.8.8|
00000e30  30 2a 33 32 09 36 34 30  2a 32 35 36 09 09 34 09  |0*32.640*256..4.|
00000e40  34 30 4b 09 2a 2a 2a 2a  2d 0a 39 09 34 30 2a 33  |40K.****-.9.40*3|
00000e50  32 09 33 32 30 2a 32 35  36 09 09 31 36 09 34 30  |2.320*256..16.40|
00000e60  4b 09 2a 2a 2a 2a 2d 0a  31 30 09 32 30 2a 33 32  |K.****-.10.20*32|
00000e70  09 31 36 30 2a 32 35 36  09 09 32 35 36 09 38 30  |.160*256..256.80|
00000e80  4b 09 2a 2a 2a 2a 2d 0a  31 31 09 38 30 2a 32 35  |K.****-.11.80*25|
00000e90  09 36 34 30 2a 32 35 30  09 09 34 09 34 30 4b 09  |.640*250..4.40K.|
00000ea0  2a 2a 2a 2a 2d 0a 31 32  09 38 30 2a 33 32 09 36  |****-.12.80*32.6|
00000eb0  34 30 2a 32 35 36 09 09  31 36 09 38 30 4b 09 2a  |40*256..16.80K.*|
00000ec0  2a 2a 2a 2d 0a 31 33 09  34 30 2a 33 32 09 33 32  |***-.13.40*32.32|
00000ed0  30 2a 32 35 36 09 09 32  35 36 09 38 30 4b 09 2a  |0*256..256.80K.*|
00000ee0  2a 2a 2a 2d 0a 31 34 09  38 30 2a 32 35 09 36 34  |***-.14.80*25.64|
00000ef0  30 2a 32 35 30 09 09 31  36 09 38 30 4b 09 2a 2a  |0*250..16.80K.**|
00000f00  2a 2a 2d 0a 31 35 09 38  30 2a 33 32 09 36 34 30  |**-.15.80*32.640|
00000f10  2a 32 35 36 09 09 32 35  36 09 31 36 30 4b 09 2a  |*256..256.160K.*|
00000f20  2a 2a 2a 2d 0a 31 36 09  31 33 32 2a 33 32 09 31  |***-.16.132*32.1|
00000f30  30 35 36 2a 32 35 36 09  31 36 09 31 33 32 4b 09  |056*256.16.132K.|
00000f40  2a 2a 2d 2d 2d 0a 31 37  09 31 33 32 2a 32 35 09  |**---.17.132*25.|
00000f50  31 30 35 36 2a 32 35 30  09 31 36 09 31 33 32 4b  |1056*250.16.132K|
00000f60  09 2a 2a 2d 2d 2d 0a 31  38 09 38 30 2a 36 34 09  |.**---.18.80*64.|
00000f70  36 34 30 2a 35 31 32 09  09 32 09 34 30 4b 09 2d  |640*512..2.40K.-|
00000f80  2a 2d 2d 2d 0a 31 39 09  38 30 2a 36 34 09 36 34  |*---.19.80*64.64|
00000f90  30 2a 35 31 32 09 09 34  09 38 30 4b 09 2d 2a 2d  |0*512..4.80K.-*-|
00000fa0  2d 2d 0a 32 30 09 38 30  2a 36 34 09 36 34 30 2a  |--.20.80*64.640*|
00000fb0  35 31 32 09 09 31 36 09  31 36 30 4b 09 2d 2a 2d  |512..16.160K.-*-|
00000fc0  2d 2d 0a 32 31 09 38 30  2a 36 34 09 36 34 30 2a  |--.21.80*64.640*|
00000fd0  35 31 32 09 09 32 35 36  09 33 32 30 4b 09 2d 2a  |512..256.320K.-*|
00000fe0  2d 2d 2d 0a 32 32 09 36  36 2a 33 36 09 37 36 38  |---.22.66*36.768|
00000ff0  2a 32 38 38 09 09 31 36  09 31 30 38 4b 09 2a 2a  |*288..16.108K.**|
00001000  2d 2d 2d 0a 32 33 09 31  34 34 2a 35 36 09 31 31  |---.23.144*56.11|
00001010  35 32 2a 38 39 36 09 32  09 31 32 36 4b 09 2d 2d  |52*896.2.126K.--|
00001020  2d 2d 2a 0a 32 34 09 31  33 32 2a 32 35 09 31 30  |--*.24.132*25.10|
00001030  35 36 2a 32 35 36 09 32  35 36 09 32 36 34 4b 09  |56*256.256.264K.|
00001040  2a 2a 2d 2d 2d 0a 32 35  09 38 30 2a 35 30 09 36  |**---.25.80*50.6|
00001050  34 30 2a 34 38 30 09 09  32 09 33 37 2e 35 4b 09  |40*480..2.37.5K.|
00001060  2d 2a 2a 2a 2d 0a 32 36  09 38 30 2a 35 30 09 36  |-***-.26.80*50.6|
00001070  34 30 2a 34 38 30 09 09  34 09 37 35 4b 09 2d 2a  |40*480..4.75K.-*|
00001080  2a 2a 2d 0a 32 37 09 38  30 2a 35 30 09 36 34 30  |**-.27.80*50.640|
00001090  2a 34 38 30 09 09 31 36  09 31 35 30 4b 09 2d 2a  |*480..16.150K.-*|
000010a0  2a 2a 2d 0a 32 38 09 38  30 2a 35 30 09 36 34 30  |**-.28.80*50.640|
000010b0  2a 34 38 30 09 09 32 35  36 09 33 30 30 4b 09 2d  |*480..256.300K.-|
000010c0  2a 2a 2a 2d 0a 32 39 09  31 30 30 2a 37 35 09 38  |***-.29.100*75.8|
000010d0  30 30 2a 36 30 30 09 09  32 09 35 38 2e 36 4b 09  |00*600..2.58.6K.|
000010e0  2d 2a 2d 2a 2d 0a 33 30  09 31 30 30 2a 37 35 09  |-*-*-.30.100*75.|
000010f0  38 30 30 2a 36 30 30 09  09 34 09 31 31 37 2e 32  |800*600..4.117.2|
00001100  4b 09 2d 2a 2d 2a 2d 0a  33 31 09 31 30 30 2a 37  |K.-*-*-.31.100*7|
00001110  35 09 38 30 30 2a 36 30  30 09 09 31 36 09 32 33  |5.800*600..16.23|
00001120  34 2e 34 4b 09 2d 2a 2d  2a 2d 0a 33 32 0a 33 33  |4.4K.-*-*-.32.33|
00001130  09 39 36 2a 33 36 09 37  36 38 2a 32 38 38 09 09  |.96*36.768*288..|
00001140  32 09 32 37 4b 09 2a 2a  2d 2d 2d 0a 33 34 09 39  |2.27K.**---.34.9|
00001150  36 2a 33 36 09 37 36 38  2a 32 38 38 09 09 34 09  |6*36.768*288..4.|
00001160  35 34 4b 09 2a 2a 2d 2d  2d 0a 33 35 09 39 36 2a  |54K.**---.35.96*|
00001170  33 36 09 37 36 38 2a 32  38 38 09 09 31 36 09 31  |36.768*288..16.1|
00001180  30 38 4b 09 2a 2a 2d 2d  2d 0a 33 36 09 39 36 2a  |08K.**---.36.96*|
00001190  33 36 09 37 36 38 2a 32  38 38 09 09 32 35 36 09  |36.768*288..256.|
000011a0  32 31 36 4b 09 2a 2a 2d  2d 2d 0a 33 37 09 31 31  |216K.**---.37.11|
000011b0  32 2a 34 34 09 38 39 36  2a 33 35 32 09 09 32 09  |2*44.896*352..2.|
000011c0  33 38 2e 35 4b 09 2d 2a  2d 2d 2d 0a 33 38 09 31  |38.5K.-*---.38.1|
000011d0  31 32 2a 34 34 09 38 39  36 2a 33 35 32 09 09 34  |12*44.896*352..4|
000011e0  09 37 37 4b 09 2d 2a 2d  2d 2d 0a 33 39 09 31 31  |.77K.-*---.39.11|
000011f0  32 2a 34 34 09 38 39 36  2a 33 35 32 09 09 31 36  |2*44.896*352..16|
00001200  09 31 35 34 4b 09 2d 2a  2d 2d 2d 0a 34 30 09 31  |.154K.-*---.40.1|
00001210  31 32 2a 34 34 09 38 39  36 2a 33 35 32 09 09 32  |12*44.896*352..2|
00001220  35 36 09 33 30 38 4b 09  2d 2a 2d 2d 2d 0a 34 31  |56.308K.-*---.41|
00001230  09 38 30 2a 34 34 09 36  34 30 2a 33 35 32 09 09  |.80*44.640*352..|
00001240  32 09 32 37 2e 35 4b 09  2d 2a 2a 2a 2d 0a 34 32  |2.27.5K.-***-.42|
00001250  09 38 30 2a 34 34 09 36  34 30 2a 33 35 32 09 09  |.80*44.640*352..|
00001260  34 09 35 35 4b 09 2d 2a  2a 2a 2d 0a 34 33 09 38  |4.55K.-***-.43.8|
00001270  30 2a 34 34 09 36 34 30  2a 33 35 32 09 09 31 36  |0*44.640*352..16|
00001280  09 31 31 30 4b 09 2d 2a  2a 2a 2d 0a 34 34 09 38  |.110K.-***-.44.8|
00001290  30 2a 32 35 09 36 34 30  2a 32 30 30 09 09 32 09  |0*25.640*200..2.|
000012a0  31 35 2e 37 4b 09 2d 2a  2a 2a 2d 0a 34 35 09 38  |15.7K.-***-.45.8|
000012b0  30 2a 32 35 09 36 34 30  2a 32 30 30 09 09 34 09  |0*25.640*200..4.|
000012c0  33 31 2e 33 4b 09 2d 2a  2a 2a 2d 0a 34 36 09 38  |31.3K.-***-.46.8|
000012d0  30 2a 32 35 09 36 34 30  2a 32 30 30 09 09 31 36  |0*25.640*200..16|
000012e0  09 36 32 2e 35 4b 09 2d  2a 2a 2a 2d 0a 23 54 61  |.62.5K.-***-.#Ta|
000012f0  62 0a 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |b.              |
00001300  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001310  20 20 20 20 20 20 20 20  20 20 20 20 92 92 92 92  |            ....|
00001320  92 0a 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
00001330  20 20 20 20 20 20 20 20  20 27 54 56 27 2d 74 79  |         'TV'-ty|
00001340  70 65 20 6d 6f 6e 69 74  6f 72 20 20 94 92 92 92  |pe monitor  ....|
00001350  92 0a 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
00001360  20 20 20 20 20 20 20 20  20 20 4d 75 6c 74 69 73  |          Multis|
00001370  79 6e 63 20 6d 6f 6e 69  74 6f 72 20 20 94 92 92  |ync monitor  ...|
00001380  92 0a 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
00001390  20 20 20 20 20 20 20 36  30 20 48 7a 20 56 47 41  |       60 Hz VGA|
000013a0  2d 74 79 70 65 20 6d 6f  6e 69 74 6f 72 20 94 92  |-type monitor ..|
000013b0  92 0a 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
000013c0  20 20 20 20 20 20 20 20  20 20 20 20 20 53 75 70  |             Sup|
000013d0  65 72 2d 56 47 41 20 6d  6f 6e 69 74 6f 72 20 94  |er-VGA monitor .|
000013e0  92 0a 20 20 20 20 20 20  20 20 36 31 2e 32 20 6b  |..        61.2 k|
000013f0  48 7a 20 68 69 67 68 2d  72 65 73 20 6d 6f 6e 6f  |Hz high-res mono|
00001400  63 68 72 6f 6d 65 20 6d  6f 6e 69 74 6f 72 20 20  |chrome monitor  |
00001410  94 00 00 00 44 41 54 41  03 01 00 00 56 44 55 20  |....DATA....VDU |
00001420  32 33 0a 56 44 55 20 32  33 2c 3c 63 6f 6d 6d 61  |23.VDU 23,<comma|
00001430  6e 64 3d 3e 32 33 61 3e  2c 65 69 67 68 74 20 70  |nd=>23a>,eight p|
00001440  61 72 61 6d 65 74 65 72  73 0a 0a 4d 69 73 63 65  |arameters..Misce|
00001450  6c 6c 61 6e 65 6f 75 73  20 63 6f 6d 6d 61 6e 64  |llaneous command|
00001460  73 2e 0a 0a 54 68 6f 75  67 68 20 66 65 77 20 6f  |s...Though few o|
00001470  66 20 74 68 65 20 63 6f  6d 6d 61 6e 64 73 20 75  |f the commands u|
00001480  73 65 20 61 6c 6c 20 6f  66 20 74 68 65 20 65 69  |se all of the ei|
00001490  67 68 74 20 70 61 72 61  6d 65 74 65 72 73 2c 20  |ght parameters, |
000014a0  74 68 65 79 20 6d 75 73  74 20 61 6c 77 61 79 73  |they must always|
000014b0  20 62 65 20 70 72 65 73  65 6e 74 2e 20 49 6e 20  | be present. In |
000014c0  42 41 53 49 43 2c 20 79  6f 75 20 63 61 6e 20 75  |BASIC, you can u|
000014d0  73 65 20 27 7c 27 20 74  6f 20 61 64 64 20 65 69  |se '|' to add ei|
000014e0  67 68 74 20 30 27 65 73  3a 0a 0a 09 56 44 55 20  |ght 0'es:...VDU |
000014f0  32 33 2c 30 2c 31 30 7c  0a 20 3d 09 56 44 55 20  |23,0,10|. =.VDU |
00001500  32 33 2c 30 2c 31 30 2c  30 2c 30 2c 30 2c 30 2c  |23,0,10,0,0,0,0,|
00001510  30 2c 30 2c 30 2c 30 00  44 41 54 41 f9 01 00 00  |0,0,0,0.DATA....|
00001520  56 44 55 20 32 33 2c 30  0a 53 65 74 20 74 68 65  |VDU 23,0.Set the|
00001530  20 69 6e 74 65 72 6c 61  63 65 20 61 6e 64 20 63  | interlace and c|
00001540  6f 6e 74 72 6f 6c 20 63  75 72 73 6f 72 20 61 70  |ontrol cursor ap|
00001550  70 65 61 72 61 6e 63 65  2e 0a 56 44 55 20 32 33  |pearance..VDU 23|
00001560  2c 30 2c 61 63 74 69 6f  6e 2c 6d 6f 64 65 2c 30  |,0,action,mode,0|
00001570  2c 30 2c 30 2c 30 2c 30  2c 30 0a 0a 41 63 74 69  |,0,0,0,0,0..Acti|
00001580  6f 6e 20 3d 20 20 38 20  20 53 65 74 20 69 6e 74  |on =  8  Set int|
00001590  65 72 6c 61 63 65 3a 0a  20 20 4d 6f 64 65 20 3a  |erlace:.  Mode :|
000015a0  20 20 30 20 20 53 65 74  20 69 74 20 74 6f 20 6f  |  0  Set it to o|
000015b0  70 70 6f 73 69 74 65 20  6f 66 20 63 75 72 72 65  |pposite of curre|
000015c0  6e 74 20 2a 54 56 0a 20  20 20 20 20 20 20 20 20  |nt *TV.         |
000015d0  20 31 20 20 53 65 74 20  69 74 20 74 6f 20 63 75  | 1  Set it to cu|
000015e0  72 72 65 6e 74 20 2a 54  56 0a 20 20 20 20 20 20  |rrent *TV.      |
000015f0  20 20 26 38 30 20 20 54  75 72 6e 20 69 6e 74 65  |  &80  Turn inte|
00001600  72 6c 61 63 65 20 6f 66  66 0a 20 20 20 20 20 20  |rlace off.      |
00001610  20 20 26 38 31 20 20 54  75 72 6e 20 69 6e 74 65  |  &81  Turn inte|
00001620  72 6c 61 63 65 20 6f 6e  0a 0a 41 63 74 69 6f 6e  |rlace on..Action|
00001630  20 3d 20 31 30 20 20 53  65 74 20 73 74 61 72 74  | = 10  Set start|
00001640  20 6c 69 6e 65 20 66 6f  72 20 63 75 72 73 6f 72  | line for cursor|
00001650  3a 0a 20 20 4d 6f 64 65  20 62 69 74 73 20 30 2d  |:.  Mode bits 0-|
00001660  34 20 20 53 74 61 72 74  20 6c 69 6e 65 20 28 30  |4  Start line (0|
00001670  20 69 73 20 74 6f 70 29  0a 20 20 20 20 20 20 20  | is top).       |
00001680  62 69 74 73 20 35 2d 36  20 20 30 30 20 53 74 65  |bits 5-6  00 Ste|
00001690  61 64 79 0a 20 20 20 20  20 20 20 20 20 20 20 20  |ady.            |
000016a0  20 20 20 20 20 30 31 20  4f 66 66 0a 20 20 20 20  |     01 Off.    |
000016b0  20 20 20 20 20 20 20 20  20 20 20 20 20 30 32 20  |             02 |
000016c0  46 61 73 74 20 66 6c 61  73 68 0a 20 20 20 20 20  |Fast flash.     |
000016d0  20 20 20 20 20 20 20 20  20 20 20 20 30 33 20 53  |            03 S|
000016e0  6c 6f 77 20 66 6c 61 73  68 0a 0a 41 63 74 69 6f  |low flash..Actio|
000016f0  6e 20 3d 20 31 31 20 45  6e 64 20 6c 69 6e 65 20  |n = 11 End line |
00001700  66 6f 72 20 63 75 72 73  6f 72 20 3d 20 4d 6f 64  |for cursor = Mod|
00001710  65 00 00 00 44 41 54 41  e5 00 00 00 56 44 55 20  |e...DATA....VDU |
00001720  32 33 2c 31 0a 56 44 55  20 32 33 2c 31 2c 6d 6f  |23,1.VDU 23,1,mo|
00001730  64 65 2c 30 2c 30 2c 30  2c 30 2c 30 2c 30 2c 30  |de,0,0,0,0,0,0,0|
00001740  0a 0a 54 68 69 73 20 56  44 55 20 63 6f 6e 74 72  |..This VDU contr|
00001750  6f 6c 73 20 74 68 65 20  61 70 70 65 61 72 61 6e  |ols the appearan|
00001760  63 65 0a 6f 66 20 74 68  65 20 63 75 72 73 6f 72  |ce.of the cursor|
00001770  3a 0a 20 20 30 20 48 69  64 65 20 63 75 72 73 6f  |:.  0 Hide curso|
00001780  72 0a 20 20 31 20 53 68  6f 77 20 63 75 72 73 6f  |r.  1 Show curso|
00001790  72 0a 20 20 32 20 53 74  65 61 64 79 20 63 75 72  |r.  2 Steady cur|
000017a0  73 6f 72 0a 20 20 33 20  46 6c 61 73 68 69 6e 67  |sor.  3 Flashing|
000017b0  20 63 6f 72 73 6f 72 0a  0a 54 68 65 20 65 66 66  | corsor..The eff|
000017c0  65 63 74 20 6f 66 20 74  68 69 73 20 56 44 55 20  |ect of this VDU |
000017d0  69 73 20 0a 63 61 6e 63  65 6c 6c 65 64 20 77 68  |is .cancelled wh|
000017e0  65 6e 20 63 75 72 73 6f  72 20 65 64 69 74 69 6e  |en cursor editin|
000017f0  67 20 6f 63 63 75 72 73  2e 00 00 00 44 41 54 41  |g occurs....DATA|
00001800  be 00 00 00 56 44 55 20  32 33 2c 31 37 2c 78 0a  |....VDU 23,17,x.|
00001810  3c 30 2d 33 3d 3e 32 33  2c 31 37 2c 30 3e 09 53  |<0-3=>23,17,0>.S|
00001820  65 74 20 74 69 6e 74 0a  3c 34 3d 3e 32 33 2c 31  |et tint.<4=>23,1|
00001830  37 2c 34 3e 09 43 68 6f  6f 73 65 20 63 6f 6c 6f  |7,4>.Choose colo|
00001840  75 72 2d 70 61 74 74 65  72 6e 20 74 79 70 65 0a  |ur-pattern type.|
00001850  35 09 09 53 77 61 70 20  74 65 78 74 20 66 6f 72  |5..Swap text for|
00001860  65 20 61 6e 64 20 62 61  63 6b 67 72 6f 75 6e 64  |e and background|
00001870  20 63 6f 6c 6f 75 72 0a  3c 36 3d 3e 32 33 2c 31  | colour.<6=>23,1|
00001880  37 2c 36 3e 09 53 65 74  20 45 43 46 20 6f 72 69  |7,6>.Set ECF ori|
00001890  67 69 6e 0a 3c 37 3d 3e  32 33 2c 31 37 2c 37 3e  |gin.<7=>23,17,7>|
000018a0  09 53 65 74 20 63 68 61  72 20 73 69 7a 65 20 61  |.Set char size a|
000018b0  6e 64 20 73 70 61 63 69  6e 67 00 00 44 41 54 41  |nd spacing..DATA|
000018c0  57 01 00 00 56 44 55 20  32 33 2c 31 37 2c 30 2d  |W...VDU 23,17,0-|
000018d0  33 0a 54 68 69 73 20 56  44 55 20 69 73 20 75 73  |3.This VDU is us|
000018e0  65 64 20 74 6f 20 73 65  74 20 74 68 65 20 74 69  |ed to set the ti|
000018f0  6e 74 20 66 6f 72 20 61  20 63 6f 6c 6f 75 72 20  |nt for a colour |
00001900  69 6e 20 0a 61 20 32 35  36 2d 63 6f 6c 6f 75 72  |in .a 256-colour|
00001910  20 6d 6f 64 65 3a 0a 0a  56 44 55 20 32 33 2c 31  | mode:..VDU 23,1|
00001920  37 2c 30 2c 74 69 6e 74  2c 30 2c 30 2c 30 2c 30  |7,0,tint,0,0,0,0|
00001930  2c 30 2c 30 2c 30 20 20  54 65 78 74 20 66 6f 72  |,0,0,0  Text for|
00001940  65 67 72 6f 75 6e 64 0a  56 44 55 20 32 33 2c 31  |eground.VDU 23,1|
00001950  37 2c 31 2c 74 69 6e 74  2c 30 2c 30 2c 30 2c 30  |7,1,tint,0,0,0,0|
00001960  2c 30 2c 30 2c 30 20 20  54 65 78 74 20 62 61 63  |,0,0,0  Text bac|
00001970  6b 67 72 6f 75 6e 64 0a  56 44 55 20 32 33 2c 31  |kground.VDU 23,1|
00001980  37 2c 32 2c 74 69 6e 74  2c 30 2c 30 2c 30 2c 30  |7,2,tint,0,0,0,0|
00001990  2c 30 2c 30 2c 30 20 20  47 72 61 70 68 69 63 73  |,0,0,0  Graphics|
000019a0  20 66 6f 72 65 67 72 6f  75 6e 64 0a 56 44 55 20  | foreground.VDU |
000019b0  32 33 2c 31 37 2c 33 2c  74 69 6e 74 2c 30 2c 30  |23,17,3,tint,0,0|
000019c0  2c 30 2c 30 2c 30 2c 30  2c 30 20 20 47 72 61 70  |,0,0,0,0,0  Grap|
000019d0  68 69 63 73 20 62 61 63  6b 67 72 6f 75 6e 64 0a  |hics background.|
000019e0  0a 54 69 6e 74 20 69 73  20 26 30 30 2c 26 34 30  |.Tint is &00,&40|
000019f0  2c 26 38 30 20 6f 72 20  26 43 30 20 28 75 73 65  |,&80 or &C0 (use|
00001a00  73 20 6f 6e 6c 79 20 32  20 74 6f 70 20 62 69 74  |s only 2 top bit|
00001a10  73 29 2e 00 44 41 54 41  dd 00 00 00 56 44 55 20  |s)..DATA....VDU |
00001a20  32 33 2c 31 37 2c 34 0a  56 44 55 20 32 33 2c 31  |23,17,4.VDU 23,1|
00001a30  37 2c 34 2c 30 2c 30 2c  30 2c 30 2c 30 2c 30 2c  |7,4,0,0,0,0,0,0,|
00001a40  30 20 3a 20 55 73 65 20  61 6e 63 69 65 6e 74 20  |0 : Use ancient |
00001a50  70 61 74 74 65 72 6e 0a  56 44 55 20 32 33 2c 31  |pattern.VDU 23,1|
00001a60  37 2c 34 2c 31 2c 30 2c  30 2c 30 2c 30 2c 30 2c  |7,4,1,0,0,0,0,0,|
00001a70  30 20 3a 20 55 73 65 20  6e 65 77 20 26 20 69 6d  |0 : Use new & im|
00001a80  70 72 6f 76 65 64 0a 0a  54 68 69 73 20 56 44 55  |proved..This VDU|
00001a90  20 63 68 6f 6f 73 65 73  20 77 68 69 63 68 20 73  | chooses which s|
00001aa0  65 74 20 6f 66 20 63 6f  6c 6f 75 72 20 70 61 74  |et of colour pat|
00001ab0  74 65 72 6e 73 20 0a 61  72 65 20 75 73 65 64 20  |terns .are used |
00001ac0  74 6f 20 69 6e 74 65 72  70 72 65 74 20 73 75 62  |to interpret sub|
00001ad0  73 65 71 75 65 6e 74 20  3c 56 44 55 20 32 33 2c  |sequent <VDU 23,|
00001ae0  32 2d 35 3d 3e 32 33 2c  32 3e 0a 63 61 6c 6c 73  |2-5=>23,2>.calls|
00001af0  2e 00 00 00 44 41 54 41  b4 00 00 00 56 44 55 20  |....DATA....VDU |
00001b00  32 33 2c 31 37 2c 36 0a  32 33 2c 31 37 2c 36 2c  |23,17,6.23,17,6,|
00001b10  78 3b 79 3b 30 2c 30 2c  30 0a 0a 54 68 69 73 20  |x;y;0,0,0..This |
00001b20  56 44 55 20 73 65 74 73  20 74 68 65 20 70 6f 69  |VDU sets the poi|
00001b30  6e 74 20 77 69 74 68 20  77 68 69 63 68 20 74 6f  |nt with which to|
00001b40  20 61 6c 69 67 6e 0a 74  68 65 20 62 6f 74 74 6f  | align.the botto|
00001b50  6d 20 6c 65 66 74 20 6f  66 20 74 68 65 20 45 43  |m left of the EC|
00001b60  46 20 70 61 74 74 65 72  6e 20 77 69 74 68 2e 0a  |F pattern with..|
00001b70  0a 59 6f 75 20 63 61 6e  20 61 6c 73 6f 20 75 73  |.You can also us|
00001b80  65 20 3c 4f 53 5f 53 65  74 45 43 46 4f 72 69 67  |e <OS_SetECFOrig|
00001b90  69 6e 3d 3e 53 57 49 2e  4f 53 5f 53 65 74 45 43  |in=>SWI.OS_SetEC|
00001ba0  46 4f 72 69 67 69 6e 3e  44 41 54 41 b2 00 00 00  |FOrigin>DATA....|
00001bb0  56 44 55 20 32 33 2c 31  37 2c 37 0a 56 44 55 20  |VDU 23,17,7.VDU |
00001bc0  32 33 2c 31 37 2c 37 2c  66 6c 61 67 73 2c 78 3b  |23,17,7,flags,x;|
00001bd0  79 3b 0a 0a 46 6c 61 67  62 69 74 73 3a 0a 23 4c  |y;..Flagbits:.#L|
00001be0  69 6e 65 0a 20 20 30 09  53 65 74 20 73 69 7a 65  |ine.  0.Set size|
00001bf0  20 6f 66 20 56 44 55 20  35 20 63 68 61 72 61 63  | of VDU 5 charac|
00001c00  74 65 72 73 2e 20 28 73  69 7a 65 73 20 38 2a 38  |ters. (sizes 8*8|
00001c10  20 61 6e 64 20 38 2a 31  36 20 61 72 65 20 66 61  | and 8*16 are fa|
00001c20  73 74 2c 20 6f 74 68 65  72 73 20 73 6c 6f 77 29  |st, others slow)|
00001c30  0a 20 20 31 09 53 65 74  20 73 70 61 63 69 6e 67  |.  1.Set spacing|
00001c40  20 62 65 74 77 65 65 6e  20 56 44 55 20 35 20 63  | between VDU 5 c|
00001c50  68 61 72 61 63 74 65 72  73 2e 00 00 44 41 54 41  |haracters...DATA|
00001c60  4c 02 00 00 56 44 55 20  32 33 2c 32 2d 35 0a 56  |L...VDU 23,2-5.V|
00001c70  44 55 20 32 33 2c 6e 72  2c 65 69 67 68 74 20 63  |DU 23,nr,eight c|
00001c80  6f 6c 6f 75 72 20 62 79  74 65 73 2e 0a 0a 54 68  |olour bytes...Th|
00001c90  69 73 20 56 44 55 20 64  65 66 69 6e 65 73 20 6f  |is VDU defines o|
00001ca0  6e 65 20 6f 66 20 74 68  65 20 45 43 46 20 70 61  |ne of the ECF pa|
00001cb0  74 74 65 72 6e 73 0a 4e  72 20 69 73 20 32 2d 35  |tterns.Nr is 2-5|
00001cc0  20 66 6f 72 20 70 61 74  74 65 72 6e 20 31 2d 34  | for pattern 1-4|
00001cd0  2e 0a 45 61 63 68 20 6f  66 20 74 68 65 20 65 69  |..Each of the ei|
00001ce0  67 68 74 20 63 6f 6c 6f  75 72 20 62 79 74 65 73  |ght colour bytes|
00001cf0  20 64 65 66 69 6e 65 20  6f 6e 65 20 72 6f 77 0a  | define one row.|
00001d00  6f 66 20 74 68 65 20 45  43 46 20 70 61 74 74 65  |of the ECF patte|
00001d10  72 6e 2c 20 61 6e 64 20  74 68 65 72 65 20 61 72  |rn, and there ar|
00001d20  65 20 74 77 6f 20 6d 6f  64 65 73 3a 0a 61 20 42  |e two modes:.a B|
00001d30  42 43 2d 6d 6f 64 65 2c  20 61 6e 64 20 61 6e 20  |BC-mode, and an |
00001d40  41 72 63 68 69 6d 65 64  65 73 20 6d 6f 64 65 2e  |Archimedes mode.|
00001d50  20 0a 54 6f 20 63 68 6f  6f 73 65 20 6d 6f 64 65  | .To choose mode|
00001d60  2c 20 75 73 65 20 3c 56  44 55 20 32 33 2c 31 37  |, use <VDU 23,17|
00001d70  2c 34 3d 3e 32 33 2c 31  37 2c 34 3e 2e 0a 0a 42  |,4=>23,17,4>...B|
00001d80  69 74 20 30 2d 37 20 69  6e 20 65 61 63 68 20 63  |it 0-7 in each c|
00001d90  6f 6c 6f 75 72 20 62 79  74 65 2c 69 73 20 75 73  |olour byte,is us|
00001da0  65 64 20 61 73 20 66 6f  6c 6c 6f 77 73 3a 0a 0a  |ed as follows:..|
00001db0  42 69 74 73 20 70 72 20  20 0a 70 69 78 65 6c 20  |Bits pr  .pixel |
00001dc0  20 20 20 42 42 43 20 70  69 78 65 6c 73 20 20 20  |   BBC pixels   |
00001dd0  20 20 20 20 41 72 63 68  69 6d 65 64 65 73 20 70  |    Archimedes p|
00001de0  69 78 65 6c 73 0a 2d 2d  2d 2d 2d 2d 2d 20 20 2d  |ixels.-------  -|
00001df0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 20 20  |--------------  |
00001e00  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001e10  2d 0a 20 20 20 31 20 20  20 20 20 37 2c 36 2c 35  |-.   1     7,6,5|
00001e20  2c 34 2c 33 2c 32 2c 31  2c 30 20 20 30 2c 31 2c  |,4,3,2,1,0  0,1,|
00001e30  32 2c 33 2c 34 2c 35 2c  36 2c 37 0a 20 20 20 32  |2,3,4,5,6,7.   2|
00001e40  20 20 20 20 20 37 33 2c  36 32 2c 35 31 2c 34 30  |     73,62,51,40|
00001e50  20 20 20 20 20 20 31 30  2c 33 32 2c 35 34 2c 37  |      10,32,54,7|
00001e60  36 0a 20 20 20 34 20 20  20 20 20 37 35 33 31 2c  |6.   4     7531,|
00001e70  36 34 32 30 20 20 20 20  20 20 20 20 33 32 31 30  |6420        3210|
00001e80  2c 37 36 35 34 0a 20 20  20 38 20 20 20 20 20 37  |,7654.   8     7|
00001e90  36 35 34 33 32 31 30 20  20 20 20 20 20 20 20 20  |6543210         |
00001ea0  37 36 35 34 33 32 31 30  44 41 54 41 a6 00 00 00  |76543210DATA....|
00001eb0  56 44 55 20 32 33 2c 36  0a 56 44 55 20 32 33 2c  |VDU 23,6.VDU 23,|
00001ec0  36 2c 20 38 20 70 61 74  74 65 72 6e 20 62 79 74  |6, 8 pattern byt|
00001ed0  65 73 0a 0a 54 68 69 73  20 56 44 55 20 73 65 74  |es..This VDU set|
00001ee0  73 20 74 68 65 20 64 6f  74 2d 64 61 73 68 20 6c  |s the dot-dash l|
00001ef0  69 6e 65 20 73 74 79 6c  65 20 75 73 65 64 20 62  |ine style used b|
00001f00  79 20 64 6f 74 74 65 64  20 3c 70 6c 6f 74 3d 3e  |y dotted <plot=>|
00001f10  53 57 49 3a 4f 53 5f 50  6c 6f 74 3e 20 63 6f 6d  |SWI:OS_Plot> com|
00001f20  6d 61 6e 64 73 2e 20 54  68 65 20 6d 6f 73 74 20  |mands. The most |
00001f30  73 69 67 6e 69 66 69 63  61 6e 74 20 62 69 74 20  |significant bit |
00001f40  69 73 20 75 73 65 64 20  66 69 72 73 74 2e 00 00  |is used first...|
00001f50  44 41 54 41 c6 01 00 00  56 44 55 20 32 33 20 63  |DATA....VDU 23 c|
00001f60  6f 6d 6d 61 6e 64 73 3a  0a 3c 30 3d 3e 32 33 2c  |ommands:.<0=>23,|
00001f70  30 3e 09 53 65 74 20 69  6e 74 65 72 6c 61 63 65  |0>.Set interlace|
00001f80  20 26 20 63 75 72 73 6f  72 20 61 70 70 65 61 72  | & cursor appear|
00001f90  61 6e 63 65 0a 3c 31 3d  3e 32 33 2c 31 3e 09 43  |ance.<1=>23,1>.C|
00001fa0  6f 6e 74 72 6f 6c 20 63  75 72 73 6f 72 20 61 70  |ontrol cursor ap|
00001fb0  70 65 61 72 61 6e 63 65  0a 3c 32 2d 35 3d 3e 32  |pearance.<2-5=>2|
00001fc0  33 2c 32 3e 09 44 65 66  69 6e 65 20 45 43 46 20  |3,2>.Define ECF |
00001fd0  70 61 74 74 65 72 6e 20  26 20 63 6f 6c 6f 75 72  |pattern & colour|
00001fe0  73 0a 3c 36 3d 3e 32 33  2c 36 3e 09 53 65 74 20  |s.<6=>23,6>.Set |
00001ff0  64 6f 74 2d 64 61 73 68  20 6c 69 6e 65 20 73 74  |dot-dash line st|
00002000  79 6c 65 0a 37 09 09 53  63 72 6f 6c 6c 20 74 65  |yle.7..Scroll te|
00002010  78 74 20 77 69 6e 64 6f  77 20 6f 72 20 73 63 72  |xt window or scr|
00002020  65 65 6e 0a 38 09 09 43  6c 65 61 72 20 62 6c 6f  |een.8..Clear blo|
00002030  63 6b 20 6f 66 20 74 65  78 74 20 77 69 6e 64 6f  |ck of text windo|
00002040  77 0a 39 09 09 53 65 74  20 74 69 6d 65 20 66 6f  |w.9..Set time fo|
00002050  72 20 31 73 74 20 66 6c  61 73 68 20 63 6f 6c 6f  |r 1st flash colo|
00002060  75 72 0a 31 30 09 09 53  65 74 20 74 69 6d 65 20  |ur.10..Set time |
00002070  66 6f 72 20 32 6e 64 20  66 6c 61 73 68 20 63 6f  |for 2nd flash co|
00002080  6c 6f 75 72 0a 31 31 09  09 53 65 74 20 64 65 66  |lour.11..Set def|
00002090  61 75 6c 74 20 70 61 74  74 65 72 6e 0a 31 32 2d  |ault pattern.12-|
000020a0  31 35 09 09 44 65 66 69  6e 65 20 73 69 6d 70 6c  |15..Define simpl|
000020b0  65 20 45 43 46 20 26 20  63 6f 6c 6f 75 72 73 0a  |e ECF & colours.|
000020c0  31 36 09 09 43 6f 6e 74  72 6f 6c 20 63 75 72 73  |16..Control curs|
000020d0  6f 72 20 6d 6f 76 65 6d  65 6e 74 20 61 66 74 65  |or movement afte|
000020e0  72 20 70 72 69 6e 74 0a  3c 31 37 3d 3e 32 33 2c  |r print.<17=>23,|
000020f0  31 37 3e 09 4d 69 73 63  0a 33 32 2d 32 35 35 09  |17>.Misc.32-255.|
00002100  09 52 65 64 65 66 69 6e  65 20 61 20 63 68 61 72  |.Redefine a char|
00002110  61 63 74 65 72 2e 00 00  44 41 54 41 65 00 00 00  |acter...DATAe...|
00002120  56 44 55 20 32 34 0a 20  20 20 20 20 20 20 20 20  |VDU 24.         |
00002130  20 20 20 20 20 20 20 20  20 20 20 28 72 78 2c 74  |           (rx,t|
00002140  79 29 0a 0a 20 44 65 66  69 6e 65 20 67 72 61 70  |y).. Define grap|
00002150  68 69 63 73 20 77 69 6e  64 6f 77 3a 0a 20 20 20  |hics window:.   |
00002160  56 44 55 20 32 34 2c 6c  78 3b 62 79 3b 72 78 3b  |VDU 24,lx;by;rx;|
00002170  74 79 3b 0a 0a 0a 28 6c  78 2c 62 79 29 00 00 00  |ty;...(lx,by)...|
00002180  44 41 54 41 a0 00 00 00  56 44 55 20 32 35 0a 56  |DATA....VDU 25.V|
00002190  44 55 20 32 35 2c 3c 63  6f 6d 6d 61 6e 64 3d 3e  |DU 25,<command=>|
000021a0  73 77 69 2e 6f 73 5f 70  6c 6f 74 30 3e 2c 78 3b  |swi.os_plot0>,x;|
000021b0  79 3b 0a 0a 54 68 69 73  20 56 44 55 20 65 78 65  |y;..This VDU exe|
000021c0  63 75 74 65 73 20 61 20  70 6c 6f 74 20 63 6f 6d  |cutes a plot com|
000021d0  6d 61 6e 64 2e 20 49 74  20 69 73 20 66 61 73 74  |mand. It is fast|
000021e0  65 72 20 28 61 6e 64 20  73 69 6d 70 6c 65 72 29  |er (and simpler)|
000021f0  20 74 6f 20 75 73 65 20  74 68 65 20 53 57 49 20  | to use the SWI |
00002200  3c 4f 53 5f 50 6c 6f 74  3d 3e 53 57 49 3a 4f 53  |<OS_Plot=>SWI:OS|
00002210  5f 50 6c 6f 74 3e 20 64  69 72 65 63 74 6c 79 2e  |_Plot> directly.|
00002220  44 41 54 41 5b 00 00 00  56 44 55 20 32 38 0a 20  |DATA[...VDU 28. |
00002230  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 28  |               (|
00002240  72 78 2c 74 79 29 0a 0a  20 44 65 66 69 6e 65 20  |rx,ty).. Define |
00002250  74 65 78 74 20 77 69 6e  64 6f 77 3a 0a 20 20 56  |text window:.  V|
00002260  44 55 20 32 38 2c 6c 78  2c 62 79 2c 72 78 2c 74  |DU 28,lx,by,rx,t|
00002270  79 0a 0a 0a 28 6c 78 2c  62 79 29 00 44 41 54 41  |y...(lx,by).DATA|
00002280  ac 00 00 00 56 44 55 20  32 39 0a 56 44 55 20 32  |....VDU 29.VDU 2|
00002290  39 2c 78 3b 79 3b 0a 0a  54 68 69 73 20 56 44 55  |9,x;y;..This VDU|
000022a0  20 64 65 66 69 6e 65 73  20 77 68 65 72 65 20 6f  | defines where o|
000022b0  6e 20 73 63 72 65 65 6e  20 30 2c 30 20 69 73 2e  |n screen 0,0 is.|
000022c0  20 41 6c 6c 20 67 72 61  70 68 69 63 73 20 6f 70  | All graphics op|
000022d0  65 72 61 74 69 6f 6e 73  20 61 72 65 20 72 65 6c  |erations are rel|
000022e0  61 74 69 76 65 20 74 6f  20 74 68 69 73 20 70 6f  |ative to this po|
000022f0  69 6e 74 2e 20 47 72 61  70 68 69 63 73 20 77 69  |int. Graphics wi|
00002300  6e 64 6f 77 20 72 65 6d  61 69 6e 73 20 61 74 20  |ndow remains at |
00002310  73 61 6d 65 20 70 6f 73  69 74 69 6f 6e 20 6f 6e  |same position on|
00002320  20 73 63 72 65 65 6e 2e  44 41 54 41 52 01 00 00  | screen.DATAR...|
00002330  56 44 55 20 33 31 0a 56  44 55 20 33 31 2c 78 2c  |VDU 31.VDU 31,x,|
00002340  79 0a 0a 54 68 69 73 20  56 44 55 20 6d 6f 76 65  |y..This VDU move|
00002350  73 20 74 68 65 20 74 65  78 74 20 63 75 72 73 6f  |s the text curso|
00002360  72 20 74 6f 20 28 78 2c  79 29 2e 0a 0a 28 30 2c  |r to (x,y)...(0,|
00002370  30 29 20 69 73 20 74 6f  70 20 6c 65 66 74 20 6f  |0) is top left o|
00002380  66 20 63 75 72 72 65 6e  74 20 74 65 78 74 20 77  |f current text w|
00002390  69 6e 64 6f 77 2e 20 49  66 20 28 78 2c 79 29 20  |indow. If (x,y) |
000023a0  69 73 20 6f 75 74 73 69  64 65 20 74 65 78 74 20  |is outside text |
000023b0  77 69 6e 64 6f 77 2c 20  6e 6f 74 68 69 6e 67 20  |window, nothing |
000023c0  68 61 70 70 65 6e 73 2c  20 75 6e 6c 65 73 73 20  |happens, unless |
000023d0  73 63 72 6f 6c 6c 20 70  72 6f 74 65 63 74 20 69  |scroll protect i|
000023e0  73 20 65 6e 61 62 6c 65  64 20 61 6e 64 20 78 20  |s enabled and x |
000023f0  3d 20 6d 61 78 78 2b 31  20 20 3d 3e 20 63 75 72  |= maxx+1  => cur|
00002400  73 6f 72 20 69 73 20 6d  6f 76 65 64 20 74 6f 20  |sor is moved to |
00002410  28 78 2d 31 2c 79 29 2c  20 61 6e 64 20 61 20 70  |(x-1,y), and a p|
00002420  65 6e 64 69 6e 67 20 6e  65 77 6c 69 6e 65 20 69  |ending newline i|
00002430  73 20 67 65 6e 65 72 61  74 65 64 2e 0a 0a 43 75  |s generated...Cu|
00002440  72 72 65 6e 74 20 70 6f  73 69 74 69 6f 6e 20 63  |rrent position c|
00002450  61 6e 20 62 65 20 72 65  61 64 20 77 69 74 68 20  |an be read with |
00002460  3c 4f 53 5f 42 79 74 65  3d 3e 53 57 49 3a 4f 53  |<OS_Byte=>SWI:OS|
00002470  5f 42 79 74 65 3e 20 31  33 34 00 00 44 41 54 41  |_Byte> 134..DATA|
00002480  97 00 00 00 56 44 55 20  31 39 0a 23 77 72 61 70  |....VDU 19.#wrap|
00002490  20 6f 66 66 0a 56 44 55  20 31 39 2c 63 6f 6c 6f  | off.VDU 19,colo|
000024a0  75 72 2c 3c 6d 6f 64 65  3d 3e 31 39 61 3e 2c 72  |ur,<mode=>19a>,r|
000024b0  2c 67 2c 62 0a 23 77 72  61 70 0a 0a 54 68 69 73  |,g,b.#wrap..This|
000024c0  20 56 44 55 20 64 65 66  69 6e 65 73 20 74 68 65  | VDU defines the|
000024d0  20 52 47 42 20 76 61 6c  75 65 20 66 6f 72 20 74  | RGB value for t|
000024e0  68 65 20 62 6f 72 64 65  72 2c 20 6f 72 20 6f 6e  |he border, or on|
000024f0  65 20 6f 66 20 74 68 65  20 73 63 72 65 65 6e 20  |e of the screen |
00002500  6f 72 20 70 6f 69 6e 74  65 72 20 63 6f 6c 6f 75  |or pointer colou|
00002510  72 73 2e 00 44 41 54 41  67 01 00 00 4d 6f 64 65  |rs..DATAg...Mode|
00002520  3a 0a 4d 6f 64 65 09 41  63 74 69 6f 6e 0a 23 4c  |:.Mode.Action.#L|
00002530  69 6e 65 0a 30 2d 31 35  09 6c 6f 67 69 63 61 6c  |ine.0-15.logical|
00002540  20 63 6f 6c 20 3d 20 61  63 74 75 61 6c 20 63 6f  | col = actual co|
00002550  6c 0a 31 36 09 6c 6f 67  69 63 61 6c 20 63 6f 6c  |l.16.logical col|
00002560  6f 75 72 20 3d 20 52 47  42 0a 31 37 09 66 69 72  |our = RGB.17.fir|
00002570  73 74 20 66 6c 61 73 68  20 3d 20 52 47 42 0a 31  |st flash = RGB.1|
00002580  38 09 73 65 63 6f 6e 64  20 66 6c 61 73 68 20 3d  |8.second flash =|
00002590  20 52 47 42 0a 32 34 09  42 6f 72 64 65 72 20 63  | RGB.24.Border c|
000025a0  6f 6c 6f 75 72 20 3d 20  52 47 42 0a 32 35 09 50  |olour = RGB.25.P|
000025b0  6f 69 6e 74 65 72 20 63  6f 6c 20 3d 20 52 47 42  |ointer col = RGB|
000025c0  0a 0a 41 64 64 20 31 32  38 20 74 6f 20 73 65 74  |..Add 128 to set|
000025d0  20 73 75 70 72 65 6d 61  63 79 20 62 69 74 2e 0a  | supremacy bit..|
000025e0  0a 4f 6e 6c 79 20 74 6f  70 20 66 6f 75 72 20 62  |.Only top four b|
000025f0  69 74 73 20 6f 66 20 52  2c 47 20 61 6e 64 20 42  |its of R,G and B|
00002600  2c 20 69 73 20 75 73 65  64 20 74 6f 64 61 79 2c  |, is used today,|
00002610  20 62 75 74 20 69 66 20  79 6f 75 20 77 61 6e 74  | but if you want|
00002620  20 74 68 65 20 63 6f 6c  6f 75 72 73 20 74 6f 20  | the colours to |
00002630  6c 6f 6f 6b 20 74 68 65  20 73 61 6d 65 20 6f 6e  |look the same on|
00002640  20 61 20 66 75 74 75 72  65 20 32 34 2d 62 69 74  | a future 24-bit|
00002650  20 56 49 44 43 2c 20 79  6f 75 20 73 68 6f 75 6c  | VIDC, you shoul|
00002660  64 20 73 65 74 20 62 6f  74 74 6f 6d 20 62 69 74  |d set bottom bit|
00002670  73 3d 74 6f 70 20 62 69  74 73 2e 00              |s=top bits..|
0000267c