Home » Archimedes archive » Acorn User » AU 1995-10.adf » !CHelp » CHelp/!StrongHlp/HelpData/VDU

CHelp/!StrongHlp/HelpData/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 1995-10.adf » !CHelp
Filename: CHelp/!StrongHlp/HelpData/VDU
Read OK:
File size: 24C4 bytes
Load address: 0000
Exec address: 0000
File contents
HELP(�����,����$DIR$��E������!Root4E������417hF���ݽ�17aE�����ߨ18�E���&���18a�	E���/��߆19L
E���0��ߑ19a�E���9���
22�F����22aE���A���23E���H���23,0E���N����23,1�E���T����23,17�E���Z���W23,17,0E���\����23,17,4�E���f��ߴ23,17,6�E���g����23,17,7|E���k���L23,2�E���s��ߦ23,6pE���u����23a`!E���|���e24�!E�����ߟ25h"E�������[28�"E������߫29p#F�����Q31DATAVDU 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
#EndTableDATA4VDU 17
Set text colour:
VDU 17,<colour=>17a>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-15DATA�VDU 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.DATA�Mode:
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.DATA
VDU 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  �DATA�VDU 23
VDU 23,<command=>23a>,nine parameters
Miscellaneous commands.
Though few of the commands use all
of the nine 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:
------------------------------------
  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.DATAQVDU 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> 134
00000000  48 45 4c 50 28 00 00 00  c9 00 00 00 ff ff ff ff  |HELP(...........|
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 45 fd ff ff  |!Root...4...E...|
00000060  14 96 e8 df 34 00 00 00  13 00 00 00 00 00 00 00  |....4...........|
00000070  31 37 00 00 68 06 00 00  46 fd ff ff 11 dd bd 0e  |17..h...F.......|
00000080  b0 00 00 00 13 00 00 00  00 00 00 00 31 37 61 00  |............17a.|
00000090  18 07 00 00 45 fd ff ff  1e 96 e8 df a8 00 00 00  |....E...........|
000000a0  13 00 00 00 00 00 00 00  31 38 00 00 c0 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  c4 09 00 00 45 fd ff ff  |....18a.....E...|
000000d0  2f 96 e8 df 86 00 00 00  13 00 00 00 00 00 00 00  |/...............|
000000e0  31 39 00 00 4c 0a 00 00  45 fd ff ff 30 96 e8 df  |19..L...E...0...|
000000f0  91 01 00 00 13 00 00 00  00 00 00 00 31 39 61 00  |............19a.|
00000100  e0 0b 00 00 45 fd ff ff  39 96 e8 df 0d 01 00 00  |....E...9.......|
00000110  13 00 00 00 00 00 00 00  32 32 00 00 f0 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  0c 14 00 00 45 fd ff ff  |....22a.....E...|
00000140  41 96 e8 df fd 00 00 00  13 00 00 00 00 00 00 00  |A...............|
00000150  32 33 00 00 0c 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 08 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 f0 17 00 00  45 fd ff ff 54 96 e8 df  |........E...T...|
000001a0  c5 00 00 00 13 00 00 00  00 00 00 00 32 33 2c 31  |............23,1|
000001b0  37 00 00 00 b8 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 10 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 f0 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 a4 1b 00 00  45 fd ff ff 67 96 e8 df  |7,6.....E...g...|
00000220  d8 00 00 00 13 00 00 00  00 00 00 00 32 33 2c 31  |............23,1|
00000230  37 2c 37 00 7c 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 c8 1e 00 00  45 fd ff ff 73 96 e8 df  |........E...s...|
00000260  a6 00 00 00 13 00 00 00  00 00 00 00 32 33 2c 36  |............23,6|
00000270  00 00 00 00 70 1f 00 00  45 fd ff ff 75 96 e8 df  |....p...E...u...|
00000280  f0 01 00 00 13 00 00 00  00 00 00 00 32 33 61 00  |............23a.|
00000290  60 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 c8 21 00 00  |........24...!..|
000002b0  45 fd ff ff 7f 96 e8 df  9f 00 00 00 13 00 00 00  |E...............|
000002c0  00 00 00 00 32 35 00 00  68 22 00 00 45 fd ff ff  |....25..h"..E...|
000002d0  80 96 e8 df 5b 00 00 00  13 00 00 00 00 00 00 00  |....[...........|
000002e0  32 38 00 00 c4 22 00 00  45 fd ff ff 81 96 e8 df  |28..."..E.......|
000002f0  ab 00 00 00 13 00 00 00  00 00 00 00 32 39 00 00  |............29..|
00000300  70 23 00 00 46 fd ff ff  ce c1 bd 0e 51 01 00 00  |p#..F.......Q...|
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  34 00 00 00 56 44 55 20  |e...DATA4...VDU |
00000640  31 37 0a 53 65 74 20 74  65 78 74 20 63 6f 6c 6f  |17.Set text colo|
00000650  75 72 3a 0a 56 44 55 20  31 37 2c 3c 63 6f 6c 6f  |ur:.VDU 17,<colo|
00000660  75 72 3d 3e 31 37 61 3e  44 41 54 41 b0 00 00 00  |ur=>17a>DATA....|
00000670  63 6f 6c 6f 75 72 0a 30  09 2d 09 31 32 37 09 3a  |colour.0.-.127.:|
00000680  20 46 6f 72 65 67 72 6f  75 6e 64 20 63 6f 6c 6f  | Foreground colo|
00000690  75 72 20 73 65 74 2e 0a  31 32 38 09 2d 09 32 35  |ur set..128.-.25|
000006a0  35 09 3a 20 42 61 63 6b  67 72 6f 75 6e 64 20 63  |5.: Background c|
000006b0  6f 6c 6f 75 72 20 73 65  74 20 74 6f 20 63 6f 6c  |olour set to col|
000006c0  6f 75 72 2d 31 32 38 2e  0a 0a 63 6f 6c 6f 75 72  |our-128...colour|
000006d0  20 75 73 65 64 20 3d 20  63 6f 6c 6f 75 72 20 41  | used = colour A|
000006e0  4e 44 20 6d 61 78 63 6f  6c 2e 0a 0a 6d 61 78 63  |ND maxcol...maxc|
000006f0  6f 6c 20 69 73 20 31 2c  33 2c 31 35 20 6f 72 20  |ol is 1,3,15 or |
00000700  36 33 20 66 6f 72 20 32  35 36 2d 63 6f 6c 6f 75  |63 for 256-colou|
00000710  72 20 6d 6f 64 65 73 2e  44 41 54 41 a8 00 00 00  |r modes.DATA....|
00000720  56 44 55 20 31 38 0a 56  44 55 20 31 38 2c 3c 61  |VDU 18.VDU 18,<a|
00000730  63 74 69 6f 6e 3d 3e 31  38 61 3e 2c 3c 63 6f 6c  |ction=>18a>,<col|
00000740  6f 75 72 3d 3e 31 37 61  3e 0a 54 68 69 73 20 56  |our=>17a>.This V|
00000750  44 55 20 69 73 20 75 73  65 64 20 74 6f 20 64 65  |DU is used to de|
00000760  66 69 6e 65 20 67 72 61  70 68 69 63 73 20 66 6f  |fine graphics fo|
00000770  72 65 20 6f 72 0a 62 61  63 6b 67 72 6f 75 6e 64  |re or.background|
00000780  20 63 6f 6c 6f 75 72 2c  20 61 6e 64 20 74 68 65  | colour, and the|
00000790  20 77 61 79 20 69 6e 20  77 68 69 63 68 20 69 74  | way in which it|
000007a0  0a 69 73 20 74 6f 20 62  65 20 70 6c 6f 74 74 65  |.is to be plotte|
000007b0  64 20 6f 6e 20 74 68 65  20 73 63 72 65 65 6e 2e  |d on the screen.|
000007c0  44 41 54 41 04 02 00 00  41 63 74 69 6f 6e 3a 0a  |DATA....Action:.|
000007d0  73 20 69 73 20 70 69 78  65 6c 20 6f 6e 20 73 63  |s is pixel on sc|
000007e0  72 65 65 6e 2e 0a 63 20  69 73 20 6e 65 77 20 63  |reen..c is new c|
000007f0  6f 6c 6f 75 72 2e 0a 0a  56 61 6c 75 65 20 20 41  |olour...Value  A|
00000800  63 74 69 6f 6e 0a 2d 2d  2d 2d 2d 20 20 2d 2d 2d  |ction.-----  ---|
00000810  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000830  2d 2d 2d 2d 2d 2d 0a 20  20 20 20 30 20 20 73 20  |------.    0  s |
00000840  3d 20 63 0a 20 20 20 20  31 20 20 73 20 3d 20 73  |= c.    1  s = s|
00000850  20 4f 52 20 63 0a 20 20  20 20 32 20 20 73 20 3d  | OR c.    2  s =|
00000860  20 73 20 41 4e 44 20 63  0a 20 20 20 20 33 20 20  | s AND c.    3  |
00000870  73 20 3d 20 73 20 58 4f  52 20 63 0a 20 20 20 20  |s = s XOR c.    |
00000880  34 20 20 73 20 3d 20 4e  4f 54 20 73 0a 20 20 20  |4  s = NOT s.   |
00000890  20 35 0a 20 20 20 20 36  20 20 73 20 3d 20 73 20  | 5.    6  s = s |
000008a0  41 4e 44 20 4e 4f 54 20  63 0a 20 20 20 20 37 20  |AND NOT c.    7 |
000008b0  20 73 20 3d 20 73 20 4f  52 20 4e 4f 54 20 63 0a  | s = s OR NOT c.|
000008c0  20 38 2d 31 35 20 20 41  73 20 30 2d 37 20 62 75  | 8-15  As 0-7 bu|
000008d0  74 20 62 61 63 6b 67 72  6f 75 6e 64 20 63 6f 6c  |t background col|
000008e0  20 69 73 20 74 72 61 6e  73 70 61 72 65 6e 74 2e  | is transparent.|
000008f0  0a 31 36 2d 33 31 20 20  43 6f 6c 6f 75 72 20 70  |.16-31  Colour p|
00000900  61 74 74 65 72 6e 20 31  2c 20 75 73 69 6e 67 20  |attern 1, using |
00000910  61 63 74 69 6f 6e 20 30  2d 31 35 0a 33 32 2d 34  |action 0-15.32-4|
00000920  37 20 20 43 6f 6c 6f 75  72 20 70 61 74 74 65 72  |7  Colour patter|
00000930  6e 20 32 2c 20 75 73 69  6e 67 20 61 63 74 69 6f  |n 2, using actio|
00000940  6e 20 30 2d 31 35 0a 34  38 2d 36 33 20 20 43 6f  |n 0-15.48-63  Co|
00000950  6c 6f 75 72 20 70 61 74  74 65 72 6e 20 33 2c 20  |lour pattern 3, |
00000960  75 73 69 6e 67 20 61 63  74 69 6f 6e 20 30 2d 31  |using action 0-1|
00000970  35 0a 36 34 2d 37 39 20  20 43 6f 6c 6f 75 72 20  |5.64-79  Colour |
00000980  70 61 74 74 65 72 6e 20  34 2c 20 75 73 69 6e 67  |pattern 4, using|
00000990  20 61 63 74 69 6f 6e 20  30 2d 31 35 0a 38 30 2d  | action 0-15.80-|
000009a0  39 35 20 20 47 69 61 6e  74 20 70 61 74 74 65 72  |95  Giant patter|
000009b0  6e 2c 20 75 73 69 6e 67  20 61 63 74 69 6f 6e 20  |n, using action |
000009c0  30 2d 31 35 44 41 54 41  86 00 00 00 56 44 55 20  |0-15DATA....VDU |
000009d0  31 39 0a 56 44 55 20 31  39 2c 63 6f 6c 6f 75 72  |19.VDU 19,colour|
000009e0  2c 3c 6d 6f 64 65 3d 3e  31 39 61 3e 2c 72 2c 67  |,<mode=>19a>,r,g|
000009f0  2c 62 0a 54 68 69 73 20  56 44 55 20 64 65 66 69  |,b.This VDU defi|
00000a00  6e 65 73 20 74 68 65 20  52 47 42 20 76 61 6c 75  |nes the RGB valu|
00000a10  65 20 66 6f 72 0a 74 68  65 20 62 6f 72 64 65 72  |e for.the border|
00000a20  2c 20 6f 72 20 6f 6e 65  20 6f 66 20 74 68 65 20  |, or one of the |
00000a30  73 63 72 65 65 6e 0a 6f  72 20 70 6f 69 6e 74 65  |screen.or pointe|
00000a40  72 20 63 6f 6c 6f 75 72  73 2e 00 00 44 41 54 41  |r colours...DATA|
00000a50  91 01 00 00 4d 6f 64 65  3a 0a 4d 6f 64 65 20 20  |....Mode:.Mode  |
00000a60  41 63 74 69 6f 6e 0a 2d  2d 2d 2d 20 20 2d 2d 2d  |Action.----  ---|
00000a70  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000a80  2d 2d 2d 2d 2d 0a 30 2d  31 35 20 20 6c 6f 67 69  |-----.0-15  logi|
00000a90  63 61 6c 20 63 6f 6c 20  3d 20 61 63 74 75 61 6c  |cal col = actual|
00000aa0  20 63 6f 6c 0a 20 20 31  36 20 20 6c 6f 67 69 63  | col.  16  logic|
00000ab0  61 6c 20 63 6f 6c 6f 75  72 20 3d 20 52 47 42 0a  |al colour = RGB.|
00000ac0  20 20 31 37 20 20 66 69  72 73 74 20 66 6c 61 73  |  17  first flas|
00000ad0  68 20 3d 20 52 47 42 0a  20 20 31 38 20 20 73 65  |h = RGB.  18  se|
00000ae0  63 6f 6e 64 20 66 6c 61  73 68 20 3d 20 52 47 42  |cond flash = RGB|
00000af0  0a 20 20 32 34 20 20 42  6f 72 64 65 72 20 63 6f  |.  24  Border co|
00000b00  6c 6f 75 72 20 3d 20 52  47 42 0a 20 20 32 35 20  |lour = RGB.  25 |
00000b10  20 50 6f 69 6e 74 65 72  20 63 6f 6c 20 3d 20 52  | Pointer col = R|
00000b20  47 42 0a 0a 41 64 64 20  31 32 38 20 74 6f 20 73  |GB..Add 128 to s|
00000b30  65 74 20 73 75 70 72 65  6d 61 63 79 20 62 69 74  |et supremacy bit|
00000b40  2e 0a 0a 4f 6e 6c 79 20  74 6f 70 20 66 6f 75 72  |...Only top four|
00000b50  20 62 69 74 73 20 6f 66  20 52 2c 47 20 61 6e 64  | bits of R,G and|
00000b60  20 42 2c 20 69 73 20 75  73 65 64 0a 74 6f 64 61  | B, is used.toda|
00000b70  79 2c 20 62 75 74 20 69  66 20 79 6f 75 20 77 61  |y, but if you wa|
00000b80  6e 74 20 74 68 65 20 63  6f 6c 6f 75 72 73 20 74  |nt the colours t|
00000b90  6f 0a 6c 6f 6f 6b 20 74  68 65 20 73 61 6d 65 20  |o.look the same |
00000ba0  6f 6e 20 61 20 66 75 74  75 72 65 20 32 34 2d 62  |on a future 24-b|
00000bb0  69 74 20 56 49 44 43 2c  0a 79 6f 75 20 73 68 6f  |it VIDC,.you sho|
00000bc0  75 6c 64 20 73 65 74 20  62 6f 74 74 6f 6d 20 62  |uld set bottom b|
00000bd0  69 74 73 3d 74 6f 70 20  62 69 74 73 2e 00 00 00  |its=top bits....|
00000be0  44 41 54 41 0d 01 00 00  56 44 55 20 32 32 0a 56  |DATA....VDU 22.V|
00000bf0  44 55 20 32 32 2c 3c 6d  6f 64 65 3d 3e 32 32 61  |DU 22,<mode=>22a|
00000c00  3e 0a 54 68 69 73 20 56  44 55 20 69 73 20 75 73  |>.This VDU is us|
00000c10  65 64 20 74 6f 20 73 65  6c 65 63 74 20 73 63 72  |ed to select scr|
00000c20  65 65 6e 20 6d 6f 64 65  2e 0a 54 6f 20 72 65 61  |een mode..To rea|
00000c30  64 20 77 68 69 63 68 20  6d 6f 64 65 20 69 73 20  |d which mode is |
00000c40  63 75 72 72 65 6e 74 6c  79 20 73 65 74 2c 20 75  |currently set, u|
00000c50  73 65 20 0a 3c 4f 53 5f  42 79 74 65 3d 3e 53 57  |se .<OS_Byte=>SW|
00000c60  49 2e 4f 53 5f 42 79 74  65 3e 20 31 33 35 2c 20  |I.OS_Byte> 135, |
00000c70  61 6e 64 20 74 6f 20 72  65 61 64 20 6f 74 68 65  |and to read othe|
00000c80  72 20 69 6e 66 6f 2c 20  75 73 65 0a 3c 4f 53 5f  |r info, use.<OS_|
00000c90  52 65 61 64 4d 6f 64 65  56 61 72 69 61 62 6c 65  |ReadModeVariable|
00000ca0  3d 3e 53 57 49 2e 4f 53  5f 52 65 61 64 4d 6f 64  |=>SWI.OS_ReadMod|
00000cb0  65 56 61 72 69 61 62 6c  65 3e 20 6f 72 20 3c 4f  |eVariable> or <O|
00000cc0  53 5f 52 65 61 64 56 64  75 56 61 72 69 61 62 6c  |S_ReadVduVariabl|
00000cd0  65 73 3d 3e 53 57 49 2e  4f 53 5f 52 65 61 64 56  |es=>SWI.OS_ReadV|
00000ce0  64 75 56 61 72 69 61 62  6c 65 73 3e 2e 00 00 00  |duVariables>....|
00000cf0  44 41 54 41 19 07 00 00  53 74 61 6e 64 61 72 64  |DATA....Standard|
00000d00  20 4d 6f 64 65 73 3a 0a  4d 6f 64 65 09 63 6f 6c  | Modes:.Mode.col|
00000d10  2a 72 6f 77 09 70 69 78  78 2a 70 69 78 79 09 63  |*row.pixx*pixy.c|
00000d20  6f 6c 6f 75 72 73 09 4d  65 6d 6f 72 79 09 54 79  |olours.Memory.Ty|
00000d30  70 65 0a 23 4c 69 6e 65  0a 30 09 38 30 2a 33 32  |pe.#Line.0.80*32|
00000d40  09 36 34 30 2a 32 35 36  09 09 32 09 32 30 4b 09  |.640*256..2.20K.|
00000d50  2a 2a 2a 2a 2d 0a 31 09  34 30 2a 33 32 09 33 32  |****-.1.40*32.32|
00000d60  30 2a 32 35 36 09 09 34  09 32 30 4b 09 2a 2a 2a  |0*256..4.20K.***|
00000d70  2a 2d 0a 32 09 32 30 2a  33 32 09 31 36 30 2a 32  |*-.2.20*32.160*2|
00000d80  35 36 09 09 31 36 09 34  30 4b 09 2a 2a 2a 2a 2d  |56..16.40K.****-|
00000d90  0a 33 09 38 30 2a 32 35  09 54 65 78 74 20 6f 6e  |.3.80*25.Text on|
00000da0  6c 79 09 32 09 34 30 4b  09 2a 2a 2a 2a 2d 0a 34  |ly.2.40K.****-.4|
00000db0  09 34 30 2a 33 32 09 33  32 30 2a 32 35 36 09 09  |.40*32.320*256..|
00000dc0  32 09 32 30 4b 09 2a 2a  2a 2a 2d 0a 35 09 32 30  |2.20K.****-.5.20|
00000dd0  2a 33 32 09 31 36 30 2a  32 35 36 09 09 34 09 32  |*32.160*256..4.2|
00000de0  30 4b 09 2a 2a 2a 2a 2d  0a 36 09 34 30 2a 32 35  |0K.****-.6.40*25|
00000df0  09 54 65 78 74 20 6f 6e  6c 79 09 32 09 32 30 4b  |.Text only.2.20K|
00000e00  09 2a 2a 2a 2a 2d 0a 37  09 34 30 2a 32 35 09 54  |.****-.7.40*25.T|
00000e10  65 6c 65 74 65 78 74 09  31 36 09 38 30 4b 09 2a  |eletext.16.80K.*|
00000e20  2a 2a 2a 2d 0a 38 09 38  30 2a 33 32 09 36 34 30  |***-.8.80*32.640|
00000e30  2a 32 35 36 09 09 34 09  34 30 4b 09 2a 2a 2a 2a  |*256..4.40K.****|
00000e40  2d 0a 39 09 34 30 2a 33  32 09 33 32 30 2a 32 35  |-.9.40*32.320*25|
00000e50  36 09 09 31 36 09 34 30  4b 09 2a 2a 2a 2a 2d 0a  |6..16.40K.****-.|
00000e60  31 30 09 32 30 2a 33 32  09 31 36 30 2a 32 35 36  |10.20*32.160*256|
00000e70  09 09 32 35 36 09 38 30  4b 09 2a 2a 2a 2a 2d 0a  |..256.80K.****-.|
00000e80  31 31 09 38 30 2a 32 35  09 36 34 30 2a 32 35 30  |11.80*25.640*250|
00000e90  09 09 34 09 34 30 4b 09  2a 2a 2a 2a 2d 0a 31 32  |..4.40K.****-.12|
00000ea0  09 38 30 2a 33 32 09 36  34 30 2a 32 35 36 09 09  |.80*32.640*256..|
00000eb0  31 36 09 38 30 4b 09 2a  2a 2a 2a 2d 0a 31 33 09  |16.80K.****-.13.|
00000ec0  34 30 2a 33 32 09 33 32  30 2a 32 35 36 09 09 32  |40*32.320*256..2|
00000ed0  35 36 09 38 30 4b 09 2a  2a 2a 2a 2d 0a 31 34 09  |56.80K.****-.14.|
00000ee0  38 30 2a 32 35 09 36 34  30 2a 32 35 30 09 09 31  |80*25.640*250..1|
00000ef0  36 09 38 30 4b 09 2a 2a  2a 2a 2d 0a 31 35 09 38  |6.80K.****-.15.8|
00000f00  30 2a 33 32 09 36 34 30  2a 32 35 36 09 09 32 35  |0*32.640*256..25|
00000f10  36 09 31 36 30 4b 09 2a  2a 2a 2a 2d 0a 31 36 09  |6.160K.****-.16.|
00000f20  31 33 32 2a 33 32 09 31  30 35 36 2a 32 35 36 09  |132*32.1056*256.|
00000f30  31 36 09 31 33 32 4b 09  2a 2a 2d 2d 2d 0a 31 37  |16.132K.**---.17|
00000f40  09 31 33 32 2a 32 35 09  31 30 35 36 2a 32 35 30  |.132*25.1056*250|
00000f50  09 31 36 09 31 33 32 4b  09 2a 2a 2d 2d 2d 0a 31  |.16.132K.**---.1|
00000f60  38 09 38 30 2a 36 34 09  36 34 30 2a 35 31 32 09  |8.80*64.640*512.|
00000f70  09 32 09 34 30 4b 09 2d  2a 2d 2d 2d 0a 31 39 09  |.2.40K.-*---.19.|
00000f80  38 30 2a 36 34 09 36 34  30 2a 35 31 32 09 09 34  |80*64.640*512..4|
00000f90  09 38 30 4b 09 2d 2a 2d  2d 2d 0a 32 30 09 38 30  |.80K.-*---.20.80|
00000fa0  2a 36 34 09 36 34 30 2a  35 31 32 09 09 31 36 09  |*64.640*512..16.|
00000fb0  31 36 30 4b 09 2d 2a 2d  2d 2d 0a 32 31 09 38 30  |160K.-*---.21.80|
00000fc0  2a 36 34 09 36 34 30 2a  35 31 32 09 09 32 35 36  |*64.640*512..256|
00000fd0  09 33 32 30 4b 09 2d 2a  2d 2d 2d 0a 32 32 09 36  |.320K.-*---.22.6|
00000fe0  36 2a 33 36 09 37 36 38  2a 32 38 38 09 09 31 36  |6*36.768*288..16|
00000ff0  09 31 30 38 4b 09 2a 2a  2d 2d 2d 0a 32 33 09 31  |.108K.**---.23.1|
00001000  34 34 2a 35 36 09 31 31  35 32 2a 38 39 36 09 32  |44*56.1152*896.2|
00001010  09 31 32 36 4b 09 2d 2d  2d 2d 2a 0a 32 34 09 31  |.126K.----*.24.1|
00001020  33 32 2a 32 35 09 31 30  35 36 2a 32 35 36 09 32  |32*25.1056*256.2|
00001030  35 36 09 32 36 34 4b 09  2a 2a 2d 2d 2d 0a 32 35  |56.264K.**---.25|
00001040  09 38 30 2a 35 30 09 36  34 30 2a 34 38 30 09 09  |.80*50.640*480..|
00001050  32 09 33 37 2e 35 4b 09  2d 2a 2a 2a 2d 0a 32 36  |2.37.5K.-***-.26|
00001060  09 38 30 2a 35 30 09 36  34 30 2a 34 38 30 09 09  |.80*50.640*480..|
00001070  34 09 37 35 4b 09 2d 2a  2a 2a 2d 0a 32 37 09 38  |4.75K.-***-.27.8|
00001080  30 2a 35 30 09 36 34 30  2a 34 38 30 09 09 31 36  |0*50.640*480..16|
00001090  09 31 35 30 4b 09 2d 2a  2a 2a 2d 0a 32 38 09 38  |.150K.-***-.28.8|
000010a0  30 2a 35 30 09 36 34 30  2a 34 38 30 09 09 32 35  |0*50.640*480..25|
000010b0  36 09 33 30 30 4b 09 2d  2a 2a 2a 2d 0a 32 39 09  |6.300K.-***-.29.|
000010c0  31 30 30 2a 37 35 09 38  30 30 2a 36 30 30 09 09  |100*75.800*600..|
000010d0  32 09 35 38 2e 36 4b 09  2d 2a 2d 2a 2d 0a 33 30  |2.58.6K.-*-*-.30|
000010e0  09 31 30 30 2a 37 35 09  38 30 30 2a 36 30 30 09  |.100*75.800*600.|
000010f0  09 34 09 31 31 37 2e 32  4b 09 2d 2a 2d 2a 2d 0a  |.4.117.2K.-*-*-.|
00001100  33 31 09 31 30 30 2a 37  35 09 38 30 30 2a 36 30  |31.100*75.800*60|
00001110  30 09 09 31 36 09 32 33  34 2e 34 4b 09 2d 2a 2d  |0..16.234.4K.-*-|
00001120  2a 2d 0a 33 32 0a 33 33  09 39 36 2a 33 36 09 37  |*-.32.33.96*36.7|
00001130  36 38 2a 32 38 38 09 09  32 09 32 37 4b 09 2a 2a  |68*288..2.27K.**|
00001140  2d 2d 2d 0a 33 34 09 39  36 2a 33 36 09 37 36 38  |---.34.96*36.768|
00001150  2a 32 38 38 09 09 34 09  35 34 4b 09 2a 2a 2d 2d  |*288..4.54K.**--|
00001160  2d 0a 33 35 09 39 36 2a  33 36 09 37 36 38 2a 32  |-.35.96*36.768*2|
00001170  38 38 09 09 31 36 09 31  30 38 4b 09 2a 2a 2d 2d  |88..16.108K.**--|
00001180  2d 0a 33 36 09 39 36 2a  33 36 09 37 36 38 2a 32  |-.36.96*36.768*2|
00001190  38 38 09 09 32 35 36 09  32 31 36 4b 09 2a 2a 2d  |88..256.216K.**-|
000011a0  2d 2d 0a 33 37 09 31 31  32 2a 34 34 09 38 39 36  |--.37.112*44.896|
000011b0  2a 33 35 32 09 09 32 09  33 38 2e 35 4b 09 2d 2a  |*352..2.38.5K.-*|
000011c0  2d 2d 2d 0a 33 38 09 31  31 32 2a 34 34 09 38 39  |---.38.112*44.89|
000011d0  36 2a 33 35 32 09 09 34  09 37 37 4b 09 2d 2a 2d  |6*352..4.77K.-*-|
000011e0  2d 2d 0a 33 39 09 31 31  32 2a 34 34 09 38 39 36  |--.39.112*44.896|
000011f0  2a 33 35 32 09 09 31 36  09 31 35 34 4b 09 2d 2a  |*352..16.154K.-*|
00001200  2d 2d 2d 0a 34 30 09 31  31 32 2a 34 34 09 38 39  |---.40.112*44.89|
00001210  36 2a 33 35 32 09 09 32  35 36 09 33 30 38 4b 09  |6*352..256.308K.|
00001220  2d 2a 2d 2d 2d 0a 34 31  09 38 30 2a 34 34 09 36  |-*---.41.80*44.6|
00001230  34 30 2a 33 35 32 09 09  32 09 32 37 2e 35 4b 09  |40*352..2.27.5K.|
00001240  2d 2a 2a 2a 2d 0a 34 32  09 38 30 2a 34 34 09 36  |-***-.42.80*44.6|
00001250  34 30 2a 33 35 32 09 09  34 09 35 35 4b 09 2d 2a  |40*352..4.55K.-*|
00001260  2a 2a 2d 0a 34 33 09 38  30 2a 34 34 09 36 34 30  |**-.43.80*44.640|
00001270  2a 33 35 32 09 09 31 36  09 31 31 30 4b 09 2d 2a  |*352..16.110K.-*|
00001280  2a 2a 2d 0a 34 34 09 38  30 2a 32 35 09 36 34 30  |**-.44.80*25.640|
00001290  2a 32 30 30 09 09 32 09  31 35 2e 37 4b 09 2d 2a  |*200..2.15.7K.-*|
000012a0  2a 2a 2d 0a 34 35 09 38  30 2a 32 35 09 36 34 30  |**-.45.80*25.640|
000012b0  2a 32 30 30 09 09 34 09  33 31 2e 33 4b 09 2d 2a  |*200..4.31.3K.-*|
000012c0  2a 2a 2d 0a 34 36 09 38  30 2a 32 35 09 36 34 30  |**-.46.80*25.640|
000012d0  2a 32 30 30 09 09 31 36  09 36 32 2e 35 4b 09 2d  |*200..16.62.5K.-|
000012e0  2a 2a 2a 2d 0a 23 54 61  62 0a 20 20 20 20 20 20  |***-.#Tab.      |
000012f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00001310  20 20 20 20 92 92 92 92  92 0a 20 20 20 20 20 20  |    ......      |
00001320  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001330  20 27 54 56 27 2d 74 79  70 65 20 6d 6f 6e 69 74  | 'TV'-type monit|
00001340  6f 72 20 20 94 92 92 92  92 0a 20 20 20 20 20 20  |or  ......      |
00001350  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001360  20 20 4d 75 6c 74 69 73  79 6e 63 20 6d 6f 6e 69  |  Multisync moni|
00001370  74 6f 72 20 20 94 92 92  92 0a 20 20 20 20 20 20  |tor  .....      |
00001380  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 36  |               6|
00001390  30 20 48 7a 20 56 47 41  2d 74 79 70 65 20 6d 6f  |0 Hz VGA-type mo|
000013a0  6e 69 74 6f 72 20 94 92  92 0a 20 20 20 20 20 20  |nitor ....      |
000013b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000013c0  20 20 20 20 20 53 75 70  65 72 2d 56 47 41 20 6d  |     Super-VGA m|
000013d0  6f 6e 69 74 6f 72 20 94  92 0a 20 20 20 20 20 20  |onitor ...      |
000013e0  20 20 36 31 2e 32 20 6b  48 7a 20 68 69 67 68 2d  |  61.2 kHz high-|
000013f0  72 65 73 20 6d 6f 6e 6f  63 68 72 6f 6d 65 20 6d  |res monochrome m|
00001400  6f 6e 69 74 6f 72 20 20  94 00 00 00 44 41 54 41  |onitor  ....DATA|
00001410  fd 00 00 00 56 44 55 20  32 33 0a 56 44 55 20 32  |....VDU 23.VDU 2|
00001420  33 2c 3c 63 6f 6d 6d 61  6e 64 3d 3e 32 33 61 3e  |3,<command=>23a>|
00001430  2c 6e 69 6e 65 20 70 61  72 61 6d 65 74 65 72 73  |,nine parameters|
00001440  0a 4d 69 73 63 65 6c 6c  61 6e 65 6f 75 73 20 63  |.Miscellaneous c|
00001450  6f 6d 6d 61 6e 64 73 2e  0a 54 68 6f 75 67 68 20  |ommands..Though |
00001460  66 65 77 20 6f 66 20 74  68 65 20 63 6f 6d 6d 61  |few of the comma|
00001470  6e 64 73 20 75 73 65 20  61 6c 6c 0a 6f 66 20 74  |nds use all.of t|
00001480  68 65 20 6e 69 6e 65 20  70 61 72 61 6d 65 74 65  |he nine paramete|
00001490  72 73 2c 20 74 68 65 79  20 6d 75 73 74 0a 61 6c  |rs, they must.al|
000014a0  77 61 79 73 20 62 65 20  70 72 65 73 65 6e 74 2e  |ways be present.|
000014b0  20 49 6e 20 42 41 53 49  43 2c 20 79 6f 75 20 0a  | In BASIC, you .|
000014c0  63 61 6e 20 75 73 65 20  7c 20 74 6f 20 61 64 64  |can use | to add|
000014d0  20 65 69 67 68 74 20 30  27 65 73 3a 0a 20 20 56  | eight 0'es:.  V|
000014e0  44 55 20 32 33 2c 30 2c  31 30 7c 0a 20 3d 56 44  |DU 23,0,10|. =VD|
000014f0  55 20 32 33 2c 30 2c 31  30 2c 30 2c 30 2c 30 2c  |U 23,0,10,0,0,0,|
00001500  30 2c 30 2c 30 2c 30 2c  30 00 00 00 44 41 54 41  |0,0,0,0,0...DATA|
00001510  f9 01 00 00 56 44 55 20  32 33 2c 30 0a 53 65 74  |....VDU 23,0.Set|
00001520  20 74 68 65 20 69 6e 74  65 72 6c 61 63 65 20 61  | the interlace a|
00001530  6e 64 20 63 6f 6e 74 72  6f 6c 20 63 75 72 73 6f  |nd control curso|
00001540  72 20 61 70 70 65 61 72  61 6e 63 65 2e 0a 56 44  |r appearance..VD|
00001550  55 20 32 33 2c 30 2c 61  63 74 69 6f 6e 2c 6d 6f  |U 23,0,action,mo|
00001560  64 65 2c 30 2c 30 2c 30  2c 30 2c 30 2c 30 0a 0a  |de,0,0,0,0,0,0..|
00001570  41 63 74 69 6f 6e 20 3d  20 20 38 20 20 53 65 74  |Action =  8  Set|
00001580  20 69 6e 74 65 72 6c 61  63 65 3a 0a 20 20 4d 6f  | interlace:.  Mo|
00001590  64 65 20 3a 20 20 30 20  20 53 65 74 20 69 74 20  |de :  0  Set it |
000015a0  74 6f 20 6f 70 70 6f 73  69 74 65 20 6f 66 20 63  |to opposite of c|
000015b0  75 72 72 65 6e 74 20 2a  54 56 0a 20 20 20 20 20  |urrent *TV.     |
000015c0  20 20 20 20 20 31 20 20  53 65 74 20 69 74 20 74  |     1  Set it t|
000015d0  6f 20 63 75 72 72 65 6e  74 20 2a 54 56 0a 20 20  |o current *TV.  |
000015e0  20 20 20 20 20 20 26 38  30 20 20 54 75 72 6e 20  |      &80  Turn |
000015f0  69 6e 74 65 72 6c 61 63  65 20 6f 66 66 0a 20 20  |interlace off.  |
00001600  20 20 20 20 20 20 26 38  31 20 20 54 75 72 6e 20  |      &81  Turn |
00001610  69 6e 74 65 72 6c 61 63  65 20 6f 6e 0a 0a 41 63  |interlace on..Ac|
00001620  74 69 6f 6e 20 3d 20 31  30 20 20 53 65 74 20 73  |tion = 10  Set s|
00001630  74 61 72 74 20 6c 69 6e  65 20 66 6f 72 20 63 75  |tart line for cu|
00001640  72 73 6f 72 3a 0a 20 20  4d 6f 64 65 20 62 69 74  |rsor:.  Mode bit|
00001650  73 20 30 2d 34 20 20 53  74 61 72 74 20 6c 69 6e  |s 0-4  Start lin|
00001660  65 20 28 30 20 69 73 20  74 6f 70 29 0a 20 20 20  |e (0 is top).   |
00001670  20 20 20 20 62 69 74 73  20 35 2d 36 20 20 30 30  |    bits 5-6  00|
00001680  20 53 74 65 61 64 79 0a  20 20 20 20 20 20 20 20  | Steady.        |
00001690  20 20 20 20 20 20 20 20  20 30 31 20 4f 66 66 0a  |         01 Off.|
000016a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000016b0  20 30 32 20 46 61 73 74  20 66 6c 61 73 68 0a 20  | 02 Fast flash. |
000016c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000016d0  30 33 20 53 6c 6f 77 20  66 6c 61 73 68 0a 0a 41  |03 Slow flash..A|
000016e0  63 74 69 6f 6e 20 3d 20  31 31 20 45 6e 64 20 6c  |ction = 11 End l|
000016f0  69 6e 65 20 66 6f 72 20  63 75 72 73 6f 72 20 3d  |ine for cursor =|
00001700  20 4d 6f 64 65 00 00 00  44 41 54 41 e5 00 00 00  | Mode...DATA....|
00001710  56 44 55 20 32 33 2c 31  0a 56 44 55 20 32 33 2c  |VDU 23,1.VDU 23,|
00001720  31 2c 6d 6f 64 65 2c 30  2c 30 2c 30 2c 30 2c 30  |1,mode,0,0,0,0,0|
00001730  2c 30 2c 30 0a 0a 54 68  69 73 20 56 44 55 20 63  |,0,0..This VDU c|
00001740  6f 6e 74 72 6f 6c 73 20  74 68 65 20 61 70 70 65  |ontrols the appe|
00001750  61 72 61 6e 63 65 0a 6f  66 20 74 68 65 20 63 75  |arance.of the cu|
00001760  72 73 6f 72 3a 0a 20 20  30 20 48 69 64 65 20 63  |rsor:.  0 Hide c|
00001770  75 72 73 6f 72 0a 20 20  31 20 53 68 6f 77 20 63  |ursor.  1 Show c|
00001780  75 72 73 6f 72 0a 20 20  32 20 53 74 65 61 64 79  |ursor.  2 Steady|
00001790  20 63 75 72 73 6f 72 0a  20 20 33 20 46 6c 61 73  | cursor.  3 Flas|
000017a0  68 69 6e 67 20 63 6f 72  73 6f 72 0a 0a 54 68 65  |hing corsor..The|
000017b0  20 65 66 66 65 63 74 20  6f 66 20 74 68 69 73 20  | effect of this |
000017c0  56 44 55 20 69 73 20 0a  63 61 6e 63 65 6c 6c 65  |VDU is .cancelle|
000017d0  64 20 77 68 65 6e 20 63  75 72 73 6f 72 20 65 64  |d when cursor ed|
000017e0  69 74 69 6e 67 20 6f 63  63 75 72 73 2e 00 00 00  |iting occurs....|
000017f0  44 41 54 41 c5 00 00 00  56 44 55 20 32 33 2c 31  |DATA....VDU 23,1|
00001800  37 2c 78 0a 3c 30 2d 33  3d 3e 32 33 2c 31 37 2c  |7,x.<0-3=>23,17,|
00001810  30 3e 20 53 65 74 20 74  69 6e 74 0a 3c 20 20 34  |0> Set tint.<  4|
00001820  3d 3e 32 33 2c 31 37 2c  34 3e 20 43 68 6f 6f 73  |=>23,17,4> Choos|
00001830  65 20 63 6f 6c 6f 75 72  2d 70 61 74 74 65 72 6e  |e colour-pattern|
00001840  20 74 79 70 65 0a 20 20  35 20 53 77 61 70 20 74  | type.  5 Swap t|
00001850  65 78 74 20 66 6f 72 65  20 61 6e 64 20 62 61 63  |ext fore and bac|
00001860  6b 67 72 6f 75 6e 64 20  63 6f 6c 6f 75 72 0a 3c  |kground colour.<|
00001870  20 20 36 3d 3e 32 33 2c  31 37 2c 36 3e 20 53 65  |  6=>23,17,6> Se|
00001880  74 20 45 43 46 20 6f 72  69 67 69 6e 0a 3c 20 20  |t ECF origin.<  |
00001890  37 3d 3e 32 33 2c 31 37  2c 37 3e 20 53 65 74 20  |7=>23,17,7> Set |
000018a0  63 68 61 72 20 73 69 7a  65 20 61 6e 64 20 73 70  |char size and sp|
000018b0  61 63 69 6e 67 00 00 00  44 41 54 41 57 01 00 00  |acing...DATAW...|
000018c0  56 44 55 20 32 33 2c 31  37 2c 30 2d 33 0a 54 68  |VDU 23,17,0-3.Th|
000018d0  69 73 20 56 44 55 20 69  73 20 75 73 65 64 20 74  |is VDU is used t|
000018e0  6f 20 73 65 74 20 74 68  65 20 74 69 6e 74 20 66  |o set the tint f|
000018f0  6f 72 20 61 20 63 6f 6c  6f 75 72 20 69 6e 20 0a  |or a colour in .|
00001900  61 20 32 35 36 2d 63 6f  6c 6f 75 72 20 6d 6f 64  |a 256-colour mod|
00001910  65 3a 0a 0a 56 44 55 20  32 33 2c 31 37 2c 30 2c  |e:..VDU 23,17,0,|
00001920  74 69 6e 74 2c 30 2c 30  2c 30 2c 30 2c 30 2c 30  |tint,0,0,0,0,0,0|
00001930  2c 30 20 20 54 65 78 74  20 66 6f 72 65 67 72 6f  |,0  Text foregro|
00001940  75 6e 64 0a 56 44 55 20  32 33 2c 31 37 2c 31 2c  |und.VDU 23,17,1,|
00001950  74 69 6e 74 2c 30 2c 30  2c 30 2c 30 2c 30 2c 30  |tint,0,0,0,0,0,0|
00001960  2c 30 20 20 54 65 78 74  20 62 61 63 6b 67 72 6f  |,0  Text backgro|
00001970  75 6e 64 0a 56 44 55 20  32 33 2c 31 37 2c 32 2c  |und.VDU 23,17,2,|
00001980  74 69 6e 74 2c 30 2c 30  2c 30 2c 30 2c 30 2c 30  |tint,0,0,0,0,0,0|
00001990  2c 30 20 20 47 72 61 70  68 69 63 73 20 66 6f 72  |,0  Graphics for|
000019a0  65 67 72 6f 75 6e 64 0a  56 44 55 20 32 33 2c 31  |eground.VDU 23,1|
000019b0  37 2c 33 2c 74 69 6e 74  2c 30 2c 30 2c 30 2c 30  |7,3,tint,0,0,0,0|
000019c0  2c 30 2c 30 2c 30 20 20  47 72 61 70 68 69 63 73  |,0,0,0  Graphics|
000019d0  20 62 61 63 6b 67 72 6f  75 6e 64 0a 0a 54 69 6e  | background..Tin|
000019e0  74 20 69 73 20 26 30 30  2c 26 34 30 2c 26 38 30  |t is &00,&40,&80|
000019f0  20 6f 72 20 26 43 30 20  28 75 73 65 73 20 6f 6e  | or &C0 (uses on|
00001a00  6c 79 20 32 20 74 6f 70  20 62 69 74 73 29 2e 00  |ly 2 top bits)..|
00001a10  44 41 54 41 dd 00 00 00  56 44 55 20 32 33 2c 31  |DATA....VDU 23,1|
00001a20  37 2c 34 0a 56 44 55 20  32 33 2c 31 37 2c 34 2c  |7,4.VDU 23,17,4,|
00001a30  30 2c 30 2c 30 2c 30 2c  30 2c 30 2c 30 20 3a 20  |0,0,0,0,0,0,0 : |
00001a40  55 73 65 20 61 6e 63 69  65 6e 74 20 70 61 74 74  |Use ancient patt|
00001a50  65 72 6e 0a 56 44 55 20  32 33 2c 31 37 2c 34 2c  |ern.VDU 23,17,4,|
00001a60  31 2c 30 2c 30 2c 30 2c  30 2c 30 2c 30 20 3a 20  |1,0,0,0,0,0,0 : |
00001a70  55 73 65 20 6e 65 77 20  26 20 69 6d 70 72 6f 76  |Use new & improv|
00001a80  65 64 0a 0a 54 68 69 73  20 56 44 55 20 63 68 6f  |ed..This VDU cho|
00001a90  6f 73 65 73 20 77 68 69  63 68 20 73 65 74 20 6f  |oses which set o|
00001aa0  66 20 63 6f 6c 6f 75 72  20 70 61 74 74 65 72 6e  |f colour pattern|
00001ab0  73 20 0a 61 72 65 20 75  73 65 64 20 74 6f 20 69  |s .are used to i|
00001ac0  6e 74 65 72 70 72 65 74  20 73 75 62 73 65 71 75  |nterpret subsequ|
00001ad0  65 6e 74 20 3c 56 44 55  20 32 33 2c 32 2d 35 3d  |ent <VDU 23,2-5=|
00001ae0  3e 32 33 2c 32 3e 0a 63  61 6c 6c 73 2e 00 00 00  |>23,2>.calls....|
00001af0  44 41 54 41 b4 00 00 00  56 44 55 20 32 33 2c 31  |DATA....VDU 23,1|
00001b00  37 2c 36 0a 32 33 2c 31  37 2c 36 2c 78 3b 79 3b  |7,6.23,17,6,x;y;|
00001b10  30 2c 30 2c 30 0a 0a 54  68 69 73 20 56 44 55 20  |0,0,0..This VDU |
00001b20  73 65 74 73 20 74 68 65  20 70 6f 69 6e 74 20 77  |sets the point w|
00001b30  69 74 68 20 77 68 69 63  68 20 74 6f 20 61 6c 69  |ith which to ali|
00001b40  67 6e 0a 74 68 65 20 62  6f 74 74 6f 6d 20 6c 65  |gn.the bottom le|
00001b50  66 74 20 6f 66 20 74 68  65 20 45 43 46 20 70 61  |ft of the ECF pa|
00001b60  74 74 65 72 6e 20 77 69  74 68 2e 0a 0a 59 6f 75  |ttern with...You|
00001b70  20 63 61 6e 20 61 6c 73  6f 20 75 73 65 20 3c 4f  | can also use <O|
00001b80  53 5f 53 65 74 45 43 46  4f 72 69 67 69 6e 3d 3e  |S_SetECFOrigin=>|
00001b90  53 57 49 2e 4f 53 5f 53  65 74 45 43 46 4f 72 69  |SWI.OS_SetECFOri|
00001ba0  67 69 6e 3e 44 41 54 41  d8 00 00 00 56 44 55 20  |gin>DATA....VDU |
00001bb0  32 33 2c 31 37 2c 37 0a  56 44 55 20 32 33 2c 31  |23,17,7.VDU 23,1|
00001bc0  37 2c 37 2c 66 6c 61 67  73 2c 78 3b 79 3b 0a 0a  |7,7,flags,x;y;..|
00001bd0  46 6c 61 67 62 69 74 73  3a 0a 2d 2d 2d 2d 2d 2d  |Flagbits:.------|
00001be0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001bf0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0a 20  |--------------. |
00001c00  20 30 20 20 53 65 74 20  73 69 7a 65 20 6f 66 20  | 0  Set size of |
00001c10  56 44 55 20 35 20 63 68  61 72 61 63 74 65 72 73  |VDU 5 characters|
00001c20  2e 0a 20 20 20 20 20 28  73 69 7a 65 73 20 38 2a  |..     (sizes 8*|
00001c30  38 20 61 6e 64 20 38 2a  31 36 20 61 72 65 20 66  |8 and 8*16 are f|
00001c40  61 73 74 2c 20 6f 74 68  65 72 73 20 73 6c 6f 77  |ast, others slow|
00001c50  29 0a 20 20 31 20 20 53  65 74 20 73 70 61 63 69  |).  1  Set spaci|
00001c60  6e 67 20 62 65 74 77 65  65 6e 20 56 44 55 20 35  |ng between VDU 5|
00001c70  20 63 68 61 72 61 63 74  65 72 73 2e 44 41 54 41  | characters.DATA|
00001c80  4c 02 00 00 56 44 55 20  32 33 2c 32 2d 35 0a 56  |L...VDU 23,2-5.V|
00001c90  44 55 20 32 33 2c 6e 72  2c 65 69 67 68 74 20 63  |DU 23,nr,eight c|
00001ca0  6f 6c 6f 75 72 20 62 79  74 65 73 2e 0a 0a 54 68  |olour bytes...Th|
00001cb0  69 73 20 56 44 55 20 64  65 66 69 6e 65 73 20 6f  |is VDU defines o|
00001cc0  6e 65 20 6f 66 20 74 68  65 20 45 43 46 20 70 61  |ne of the ECF pa|
00001cd0  74 74 65 72 6e 73 0a 4e  72 20 69 73 20 32 2d 35  |tterns.Nr is 2-5|
00001ce0  20 66 6f 72 20 70 61 74  74 65 72 6e 20 31 2d 34  | for pattern 1-4|
00001cf0  2e 0a 45 61 63 68 20 6f  66 20 74 68 65 20 65 69  |..Each of the ei|
00001d00  67 68 74 20 63 6f 6c 6f  75 72 20 62 79 74 65 73  |ght colour bytes|
00001d10  20 64 65 66 69 6e 65 20  6f 6e 65 20 72 6f 77 0a  | define one row.|
00001d20  6f 66 20 74 68 65 20 45  43 46 20 70 61 74 74 65  |of the ECF patte|
00001d30  72 6e 2c 20 61 6e 64 20  74 68 65 72 65 20 61 72  |rn, and there ar|
00001d40  65 20 74 77 6f 20 6d 6f  64 65 73 3a 0a 61 20 42  |e two modes:.a B|
00001d50  42 43 2d 6d 6f 64 65 2c  20 61 6e 64 20 61 6e 20  |BC-mode, and an |
00001d60  41 72 63 68 69 6d 65 64  65 73 20 6d 6f 64 65 2e  |Archimedes mode.|
00001d70  20 0a 54 6f 20 63 68 6f  6f 73 65 20 6d 6f 64 65  | .To choose mode|
00001d80  2c 20 75 73 65 20 3c 56  44 55 20 32 33 2c 31 37  |, use <VDU 23,17|
00001d90  2c 34 3d 3e 32 33 2c 31  37 2c 34 3e 2e 0a 0a 42  |,4=>23,17,4>...B|
00001da0  69 74 20 30 2d 37 20 69  6e 20 65 61 63 68 20 63  |it 0-7 in each c|
00001db0  6f 6c 6f 75 72 20 62 79  74 65 2c 69 73 20 75 73  |olour byte,is us|
00001dc0  65 64 20 61 73 20 66 6f  6c 6c 6f 77 73 3a 0a 0a  |ed as follows:..|
00001dd0  42 69 74 73 20 70 72 20  20 0a 70 69 78 65 6c 20  |Bits pr  .pixel |
00001de0  20 20 20 42 42 43 20 70  69 78 65 6c 73 20 20 20  |   BBC pixels   |
00001df0  20 20 20 20 41 72 63 68  69 6d 65 64 65 73 20 70  |    Archimedes p|
00001e00  69 78 65 6c 73 0a 2d 2d  2d 2d 2d 2d 2d 20 20 2d  |ixels.-------  -|
00001e10  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 20 20  |--------------  |
00001e20  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001e30  2d 0a 20 20 20 31 20 20  20 20 20 37 2c 36 2c 35  |-.   1     7,6,5|
00001e40  2c 34 2c 33 2c 32 2c 31  2c 30 20 20 30 2c 31 2c  |,4,3,2,1,0  0,1,|
00001e50  32 2c 33 2c 34 2c 35 2c  36 2c 37 0a 20 20 20 32  |2,3,4,5,6,7.   2|
00001e60  20 20 20 20 20 37 33 2c  36 32 2c 35 31 2c 34 30  |     73,62,51,40|
00001e70  20 20 20 20 20 20 31 30  2c 33 32 2c 35 34 2c 37  |      10,32,54,7|
00001e80  36 0a 20 20 20 34 20 20  20 20 20 37 35 33 31 2c  |6.   4     7531,|
00001e90  36 34 32 30 20 20 20 20  20 20 20 20 33 32 31 30  |6420        3210|
00001ea0  2c 37 36 35 34 0a 20 20  20 38 20 20 20 20 20 37  |,7654.   8     7|
00001eb0  36 35 34 33 32 31 30 20  20 20 20 20 20 20 20 20  |6543210         |
00001ec0  37 36 35 34 33 32 31 30  44 41 54 41 a6 00 00 00  |76543210DATA....|
00001ed0  56 44 55 20 32 33 2c 36  0a 56 44 55 20 32 33 2c  |VDU 23,6.VDU 23,|
00001ee0  36 2c 20 38 20 70 61 74  74 65 72 6e 20 62 79 74  |6, 8 pattern byt|
00001ef0  65 73 0a 0a 54 68 69 73  20 56 44 55 20 73 65 74  |es..This VDU set|
00001f00  73 20 74 68 65 20 64 6f  74 2d 64 61 73 68 20 6c  |s the dot-dash l|
00001f10  69 6e 65 20 73 74 79 6c  65 0a 75 73 65 64 20 62  |ine style.used b|
00001f20  79 20 64 6f 74 74 65 64  20 3c 70 6c 6f 74 3d 3e  |y dotted <plot=>|
00001f30  53 57 49 2e 4f 53 5f 50  6c 6f 74 3e 20 63 6f 6d  |SWI.OS_Plot> com|
00001f40  6d 61 6e 64 73 2e 0a 54  68 65 20 6d 6f 73 74 20  |mands..The most |
00001f50  73 69 67 6e 69 66 69 63  61 6e 74 20 62 69 74 20  |significant bit |
00001f60  69 73 20 75 73 65 64 20  66 69 72 73 74 2e 00 00  |is used first...|
00001f70  44 41 54 41 f0 01 00 00  56 44 55 20 32 33 20 63  |DATA....VDU 23 c|
00001f80  6f 6d 6d 61 6e 64 73 3a  0a 20 20 20 20 3c 20 30  |ommands:.    < 0|
00001f90  3d 3e 32 33 2c 30 3e 20  53 65 74 20 69 6e 74 65  |=>23,0> Set inte|
00001fa0  72 6c 61 63 65 20 26 20  63 75 72 73 6f 72 20 61  |rlace & cursor a|
00001fb0  70 70 65 61 72 61 6e 63  65 0a 20 20 20 20 3c 20  |ppearance.    < |
00001fc0  31 3d 3e 32 33 2c 31 3e  20 43 6f 6e 74 72 6f 6c  |1=>23,1> Control|
00001fd0  20 63 75 72 73 6f 72 20  61 70 70 65 61 72 61 6e  | cursor appearan|
00001fe0  63 65 0a 20 20 20 3c 32  2d 35 3d 3e 32 33 2c 32  |ce.   <2-5=>23,2|
00001ff0  3e 20 44 65 66 69 6e 65  20 45 43 46 20 70 61 74  |> Define ECF pat|
00002000  74 65 72 6e 20 26 20 63  6f 6c 6f 75 72 73 0a 20  |tern & colours. |
00002010  20 20 20 3c 20 36 3d 3e  32 33 2c 36 3e 20 53 65  |   < 6=>23,6> Se|
00002020  74 20 64 6f 74 2d 64 61  73 68 20 6c 69 6e 65 20  |t dot-dash line |
00002030  73 74 79 6c 65 0a 20 20  20 20 20 37 20 53 63 72  |style.     7 Scr|
00002040  6f 6c 6c 20 74 65 78 74  20 77 69 6e 64 6f 77 20  |oll text window |
00002050  6f 72 20 73 63 72 65 65  6e 0a 20 20 20 20 20 38  |or screen.     8|
00002060  20 43 6c 65 61 72 20 62  6c 6f 63 6b 20 6f 66 20  | Clear block of |
00002070  74 65 78 74 20 77 69 6e  64 6f 77 0a 20 20 20 20  |text window.    |
00002080  20 39 20 53 65 74 20 74  69 6d 65 20 66 6f 72 20  | 9 Set time for |
00002090  31 73 74 20 66 6c 61 73  68 20 63 6f 6c 6f 75 72  |1st flash colour|
000020a0  0a 20 20 20 20 31 30 20  53 65 74 20 74 69 6d 65  |.    10 Set time|
000020b0  20 66 6f 72 20 32 6e 64  20 66 6c 61 73 68 20 63  | for 2nd flash c|
000020c0  6f 6c 6f 75 72 0a 20 20  20 20 31 31 20 53 65 74  |olour.    11 Set|
000020d0  20 64 65 66 61 75 6c 74  20 70 61 74 74 65 72 6e  | default pattern|
000020e0  0a 20 31 32 2d 31 35 20  44 65 66 69 6e 65 20 73  |. 12-15 Define s|
000020f0  69 6d 70 6c 65 20 45 43  46 20 26 20 63 6f 6c 6f  |imple ECF & colo|
00002100  75 72 73 0a 20 20 20 20  31 36 20 43 6f 6e 74 72  |urs.    16 Contr|
00002110  6f 6c 20 63 75 72 73 6f  72 20 6d 6f 76 65 6d 65  |ol cursor moveme|
00002120  6e 74 20 61 66 74 65 72  20 70 72 69 6e 74 0a 20  |nt after print. |
00002130  20 20 20 3c 31 37 3d 3e  32 33 2c 31 37 3e 20 4d  |   <17=>23,17> M|
00002140  69 73 63 0a 33 32 2d 32  35 35 20 52 65 64 65 66  |isc.32-255 Redef|
00002150  69 6e 65 20 61 20 63 68  61 72 61 63 74 65 72 2e  |ine a character.|
00002160  44 41 54 41 65 00 00 00  56 44 55 20 32 34 0a 20  |DATAe...VDU 24. |
00002170  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002180  20 20 20 28 72 78 2c 74  79 29 0a 0a 20 44 65 66  |   (rx,ty).. Def|
00002190  69 6e 65 20 67 72 61 70  68 69 63 73 20 77 69 6e  |ine graphics win|
000021a0  64 6f 77 3a 0a 20 20 20  56 44 55 20 32 34 2c 6c  |dow:.   VDU 24,l|
000021b0  78 3b 62 79 3b 72 78 3b  74 79 3b 0a 0a 0a 28 6c  |x;by;rx;ty;...(l|
000021c0  78 2c 62 79 29 00 00 00  44 41 54 41 9f 00 00 00  |x,by)...DATA....|
000021d0  56 44 55 20 32 35 0a 56  44 55 20 32 35 2c 3c 63  |VDU 25.VDU 25,<c|
000021e0  6f 6d 6d 61 6e 64 3d 3e  73 77 69 2e 6f 73 5f 70  |ommand=>swi.os_p|
000021f0  6c 6f 74 30 3e 2c 78 3b  79 3b 0a 54 68 69 73 20  |lot0>,x;y;.This |
00002200  56 44 55 20 65 78 65 63  75 74 65 73 20 61 20 70  |VDU executes a p|
00002210  6c 6f 74 20 63 6f 6d 6d  61 6e 64 2e 0a 49 74 20  |lot command..It |
00002220  69 73 20 66 61 73 74 65  72 20 28 61 6e 64 20 73  |is faster (and s|
00002230  69 6d 70 6c 65 72 29 20  74 6f 20 75 73 65 0a 74  |impler) to use.t|
00002240  68 65 20 53 57 49 20 3c  4f 53 5f 50 6c 6f 74 3d  |he SWI <OS_Plot=|
00002250  3e 53 57 49 2e 4f 53 5f  50 6c 6f 74 3e 20 64 69  |>SWI.OS_Plot> di|
00002260  72 65 63 74 6c 79 2e 00  44 41 54 41 5b 00 00 00  |rectly..DATA[...|
00002270  56 44 55 20 32 38 0a 20  20 20 20 20 20 20 20 20  |VDU 28.         |
00002280  20 20 20 20 20 20 20 28  72 78 2c 74 79 29 0a 0a  |       (rx,ty)..|
00002290  20 44 65 66 69 6e 65 20  74 65 78 74 20 77 69 6e  | Define text win|
000022a0  64 6f 77 3a 0a 20 20 56  44 55 20 32 38 2c 6c 78  |dow:.  VDU 28,lx|
000022b0  2c 62 79 2c 72 78 2c 74  79 0a 0a 0a 28 6c 78 2c  |,by,rx,ty...(lx,|
000022c0  62 79 29 00 44 41 54 41  ab 00 00 00 56 44 55 20  |by).DATA....VDU |
000022d0  32 39 0a 56 44 55 20 32  39 2c 78 3b 79 3b 0a 54  |29.VDU 29,x;y;.T|
000022e0  68 69 73 20 56 44 55 20  64 65 66 69 6e 65 73 20  |his VDU defines |
000022f0  77 68 65 72 65 20 6f 6e  20 73 63 72 65 65 6e 20  |where on screen |
00002300  30 2c 30 20 69 73 2e 0a  41 6c 6c 20 67 72 61 70  |0,0 is..All grap|
00002310  68 69 63 73 20 6f 70 65  72 61 74 69 6f 6e 73 20  |hics operations |
00002320  61 72 65 20 72 65 6c 61  74 69 76 65 20 74 6f 0a  |are relative to.|
00002330  74 68 69 73 20 70 6f 69  6e 74 2e 20 47 72 61 70  |this point. Grap|
00002340  68 69 63 73 20 77 69 6e  64 6f 77 20 72 65 6d 61  |hics window rema|
00002350  69 6e 73 20 61 74 0a 73  61 6d 65 20 70 6f 73 69  |ins at.same posi|
00002360  74 69 6f 6e 20 6f 6e 20  73 63 72 65 65 6e 2e 00  |tion on screen..|
00002370  44 41 54 41 51 01 00 00  56 44 55 20 33 31 0a 56  |DATAQ...VDU 31.V|
00002380  44 55 20 33 31 2c 78 2c  79 0a 54 68 69 73 20 56  |DU 31,x,y.This V|
00002390  44 55 20 6d 6f 76 65 73  20 74 68 65 20 74 65 78  |DU moves the tex|
000023a0  74 20 63 75 72 73 6f 72  20 74 6f 20 28 78 2c 79  |t cursor to (x,y|
000023b0  29 2e 0a 28 30 2c 30 29  20 69 73 20 74 6f 70 20  |)..(0,0) is top |
000023c0  6c 65 66 74 20 6f 66 20  63 75 72 72 65 6e 74 20  |left of current |
000023d0  74 65 78 74 20 77 69 6e  64 6f 77 2e 0a 49 66 20  |text window..If |
000023e0  28 78 2c 79 29 20 69 73  20 6f 75 74 73 69 64 65  |(x,y) is outside|
000023f0  20 74 65 78 74 20 77 69  6e 64 6f 77 2c 20 6e 6f  | text window, no|
00002400  74 68 69 6e 67 0a 68 61  70 70 65 6e 73 2c 20 75  |thing.happens, u|
00002410  6e 6c 65 73 73 20 73 63  72 6f 6c 6c 20 70 72 6f  |nless scroll pro|
00002420  74 65 63 74 20 69 73 20  65 6e 61 62 6c 65 64 0a  |tect is enabled.|
00002430  61 6e 64 20 78 20 3d 20  6d 61 78 78 2b 31 20 20  |and x = maxx+1  |
00002440  3d 3e 20 63 75 72 73 6f  72 20 69 73 20 6d 6f 76  |=> cursor is mov|
00002450  65 64 20 74 6f 20 0a 28  78 2d 31 2c 79 29 2c 20  |ed to .(x-1,y), |
00002460  61 6e 64 20 61 20 70 65  6e 64 69 6e 67 20 6e 65  |and a pending ne|
00002470  77 6c 69 6e 65 20 69 73  20 67 65 6e 65 72 61 74  |wline is generat|
00002480  65 64 2e 0a 0a 43 75 72  72 65 6e 74 20 70 6f 73  |ed...Current pos|
00002490  69 74 69 6f 6e 20 63 61  6e 20 62 65 20 72 65 61  |ition can be rea|
000024a0  64 20 77 69 74 68 20 3c  4f 53 5f 42 79 74 65 3d  |d with <OS_Byte=|
000024b0  3e 53 57 49 3a 4f 53 5f  42 79 74 65 3e 20 31 33  |>SWI:OS_Byte> 13|
000024c0  34 00 00 00                                       |4...|
000024c4