<!-- PDF page 216 -->

<table>
<thead>
<tr><th rowspan="2">J</th><th rowspan="2">Code</th><th colspan="2">Description</th></tr>
<tr><th>UW</th><th>SW</th></tr>
</thead>
<tbody>
<tr><td></td><td>13</td><td colspan="2">Start new line (<b>PRINT</b> ')</td></tr>
<tr><td></td><td>14</td><td colspan="2">Clear window to current attributes</td></tr>
<tr><td></td><td>15</td><td colspan="2">Wash window with current attributes[^p216-8]</td></tr>
<tr><td>●</td><td>16; n</td><td colspan="2">Set <b>INK n</b> (where n=<b>0</b> to <b>7</b>)</td></tr>
<tr><td>●</td><td>17; n</td><td colspan="2">Set <b>PAPER n</b> (where n=<b>0</b> to <b>7</b>)</td></tr>
<tr><td>●</td><td>18; n</td><td colspan="2">Set <b>FLASH n</b> (where n=<b>0</b> or <b>1</b>)[^p216-9]</td></tr>
<tr><td>●</td><td>19; n</td><td colspan="2">Set <b>BRIGHT n</b> (where n=<b>0</b> or <b>1</b>)[^p216-9]</td></tr>
<tr><td>●</td><td>20; n</td><td colspan="2">Set <b>INVERSE n</b> (where n=<b>0</b> or <b>1</b>)</td></tr>
<tr><td>●</td><td>21; n</td><td colspan="2">Set <b>OVER n</b> (where n=<b>0</b> or <b>1</b>)</td></tr>
<tr><td>×</td><td>22; y; x</td><td colspan="2">Sets cursor to pixel line <i>y</i>, character size column <i>x</i>. (<b>AT y,x</b>). Position is specified in terms of character positions (dependent upon the character size currently selected and whether reduced-height text is in operation. Double-width and double-height do not affect the coordinates, however)</td></tr>
<tr><td>×</td><td>23; nLow; nHigh</td><td colspan="2"><b>TAB</b> to (character sized) column <i>n</i>. This is a 16bit number so for column numbers smaller than 256, <i>nHigh</i> is always <b>0</b>. Otherwise <i>n</i> is calculated as <b>nLow+(nHigh*256)</b></td></tr>
<tr><td>●</td><td>24; n</td><td colspan="2">Sets <b>ATTR n</b> (Where n=<b>0</b> to <b>255</b>)[^p216-10]</td></tr>
<tr><td>×</td><td>25; y; xLow; xHigh</td><td colspan="2">Changes the print position to pixel coordinates <i>x</i>, <i>y</i> (<b>0</b> to <b>511</b> and <b>0</b> to <b>191</b> respectively). Since we may be running at <i>Layer 1,2</i> mode (HiRes) and the <i>x</i> position may be higher than <b>256</b> pixels (ergo a value larger than what a single byte can hold) it breaks the <i>x</i> coordinate into two byte components: <i>xLow</i> (<b>0</b> to <b>255</b>) and <i>xHigh</i> (<b>0</b> to <b>1</b>). For horizontal resolutions up to 256 pixels, <i>xHigh</i> is always <b>0</b> while for resolutions &gt; 256 pixels it may be <b>0</b> or <b>1</b>. The <i>x</i> coordinate is calculated as <b>(xLow) + (xHigh*256)</b></td></tr>
<tr><td>●</td><td>26; n</td><td colspan="2">Auto-pauses every <i>n</i> character lines. After each <i>n</i> character lines have been scrolled out of the window, output will automatically pause until the <b>SPACE</b> key is pressed (the bottom right character in the window will be flashed to indicate <b>SPACE</b> is being waited for).<br>After a window has been cleared, the first pause occurs before any lines have been scrolled out; subsequent pauses wait for <i>n</i> character lines. Typically you would want to set <i>n</i> to the height of the window. If set to <b>0</b> (the default), auto-pause is disabled.</td></tr>
<tr><td>●</td><td>27; n</td><td colspan="2">Fills window with character <i>n</i>. Attributes and cursor position are affected.</td></tr>
<tr><td>×</td><td>28; n</td><td colspan="2">Sets double width (where <i>n</i>=<b>1</b>) or normal width (where <i>n</i>=<b>0</b>)</td></tr>
<tr><td>●</td><td>29; n</td><td colspan="2">Sets height <i>n</i> (<b>0</b>=normal, <b>1</b>=double, <b>2</b>=reduced, <b>3</b>=double reduced) – See <i>Chapter 14</i> for details</td></tr>
<tr><td></td><td>30; n</td><td>Selects justification mode <i>n</i> where <i>n</i> is <b>0</b>=Left Justified , <b>1</b>= Fully Justified and <b>2</b> =Centre Justified</td><td>Changes the current character set width to <i>n</i> (can be <b>3</b>,<b>4</b>,<b>5</b>,<b>6</b>,<b>7</b> or <b>8</b> pixels), and moves the cursor to the start of the next line.</td></tr>
<tr><td></td><td>31; n</td><td>Selects whether embedded codes are permitted (<b>1</b>) or not (<b>0</b>) in justify mode</td><td>Causes the size <i>n</i> character set to be replaced with the character set defined by the CHARS system variable.</td></tr>
</tbody>
</table>

*Table 21– Window control codes*

In the table above on the column marked as J an × means *ignored if issued in justified mode* and an ● means *code can be used in justified mode only if the "embedded codes" setting has been enabled*. For control codes normally ignored in justified mode, note that these will still be taken into account if you set them before entering justified mode.

### User character sets

If the default character set(s) are replaced using control codes 2, 3 or 31 in a system window, any subsequent text printed in any window (which doesn't have its own user-defined character set) will use the new character set(s).

The system-defined character sets are partially shared: sizes 3 and 4 use the same set (only the leftmost 3 pixels are used for size 3), and similarly so do sizes 5 and 6. This should be borne in mind when replacing system character sets using control code **31**.

[^p216-8]: *Has no effect on Layer 2 or LoRes*
[^p216-9]: *Ignored unless in Standard or HiColour modes and EnhancedULA is not enabled*
[^p216-10]: *Ignored in LoRes, Layer 2 and HiRes modes*

