<!-- PDF page 273 -->

<table>
<thead>
<tr><th rowspan="2">Notes</th><th colspan="2">Address</th><th rowspan="2">Name</th><th rowspan="2">Description</th></tr>
<tr><th>Hex</th><th>Dec</th></tr>
</thead>
<tbody>
<tr><td><b>X117</b></td><td>5BFF</td><td>23551</td><td><b>TSTACK</b></td><td>Temporary stack grows down from here. Used when RAM bank <b>7</b> is switched in at top of memory while executing the editor or calling NextZXOS. It may safely go down to <b>5B8Ah</b> if necessary. This guarantees at least 117 bytes of stack when NextBASIC calls NextZXOS</td></tr>
<tr><td><b>N8</b></td><td>5C00</td><td>23552</td><td><b>KSTATE</b></td><td>Used in reading the keyboard</td></tr>
<tr><td><b>N1</b></td><td>5C08</td><td>23560</td><td><b>LASTK</b></td><td>Stores newly pressed key</td></tr>
<tr><td><b>1</b></td><td>5C09</td><td>23561</td><td><b>REPDEL</b></td><td>Time (in 50<sup>ths</sup> of a second) that a key must be held down before it repeats. This starts off at 35, but you can <b>POKE</b> in other values</td></tr>
<tr><td><b>1</b></td><td>5C0A</td><td>23562</td><td><b>REPPER</b></td><td>Delay (in 50<sup>ths</sup> of a second) between successive repeats of a key held down – initially 5)</td></tr>
<tr><td><b>X2</b></td><td>5C0B</td><td>23563</td><td><b>RETVARS</b></td><td>Address of local variables on return stack</td></tr>
<tr><td><b>N1</b></td><td>5C0D</td><td>23565</td><td><b>K_DATA</b></td><td>Stores 2<sup>nd</sup> byte of colour controls entered from keyboard</td></tr>
<tr><td><b>N2</b></td><td>5C0E</td><td>23566</td><td><b>TVDATA</b></td><td>Stores bytes of colour, <b>AT</b> and <b>TAB</b> controls going to TV</td></tr>
<tr><td><b>X38</b></td><td>5C10</td><td>23568</td><td><b>STRMS</b></td><td>Addresses of channels attached to streams</td></tr>
<tr><td><b>2</b></td><td>5C36</td><td>23606</td><td><b>CHARS</b></td><td>256 less than address of character set (which starts with space and carries on until ©). Normally in ROM, but you can set up your own in RAM and make CHARS point to it</td></tr>
<tr><td><b>1</b></td><td>5C38</td><td>23608</td><td><b>RASP</b></td><td>Length of warning buzz</td></tr>
<tr><td><b>1</b></td><td>5C39</td><td>23609</td><td><b>PIP</b></td><td>Length of keyboard click</td></tr>
<tr><td><b>1</b></td><td>5C3A</td><td>23610</td><td><b>ERRNR</b></td><td><b>1</b> less than the report code. Starts off at <b>255</b> (for <b>-1</b>) so <b>PEEK 23610</b> gives <b>255</b></td></tr>
<tr><td><b>X1</b></td><td>5C3B</td><td>23611</td><td><b>FLAGS</b></td><td>Various flags to control the NextBASIC system</td></tr>
<tr><td><b>X1</b></td><td>5C3C</td><td>23612</td><td><b>TVFLAG</b></td><td>Flags associated with the TV</td></tr>
<tr><td><b>X2</b></td><td>5C3D</td><td>23613</td><td><b>ERRSP</b></td><td>Address of item on machine stack to be used as error return</td></tr>
<tr><td><b>N2</b></td><td>5C3F</td><td>23615</td><td></td><td>Reserved for system use</td></tr>
<tr><td><b>N1</b></td><td>5C41</td><td>23617</td><td><b>MODE</b></td><td>Specifies <code>K</code>, <code>L</code>, <code>C</code>, <code>E</code> or <code>G</code> cursor.</td></tr>
<tr><td><b>2</b></td><td>5C42</td><td>23618</td><td><b>NEWPPC</b></td><td>Line to be jumped to</td></tr>
<tr><td><b>N1</b></td><td>5C44</td><td>23620</td><td></td><td>Reserved for system use</td></tr>
<tr><td><b>2</b></td><td>5C45</td><td>23621</td><td><b>PPC</b></td><td>Line number of statement currently being executed</td></tr>
<tr><td><b>1</b></td><td>5C47</td><td>23623</td><td><b>SUBPPC</b></td><td>Number within line of statement currently being executed</td></tr>
<tr><td><b>1</b></td><td>5C48</td><td>23624</td><td><b>BORDCR</b></td><td>Border colour multiplied by 8; also contains the attributes normally used for the lower half of the screen</td></tr>
<tr><td><b>2</b></td><td>5C49</td><td>23625</td><td><b>E_PPC</b></td><td>Number of current line (with program cursor)</td></tr>
<tr><td><b>X2</b></td><td>5C4B</td><td>23627</td><td><b>VARS</b></td><td>Address of variables</td></tr>
<tr><td><b>N2</b></td><td>5C4D</td><td>23629</td><td><b>DEST</b></td><td>Address of variable in assignment</td></tr>
<tr><td><b>X2</b></td><td>5C4F</td><td>23631</td><td><b>CHANS</b></td><td>Address of channel data</td></tr>
<tr><td><b>X2</b></td><td>5C51</td><td>23633</td><td><b>CURCHL</b></td><td>Address of information currently being used for input and output</td></tr>
<tr><td><b>X2</b></td><td>5C53</td><td>23635</td><td><b>PROG</b></td><td>Address of NextBASIC program</td></tr>
<tr><td><b>X2</b></td><td>5C55</td><td>23637</td><td><b>NXTLIN</b></td><td>Address of next line in program</td></tr>
<tr><td><b>X2</b></td><td>5C57</td><td>23639</td><td><b>DATADD</b></td><td>Address of terminator of last <b>DATA</b> item</td></tr>
<tr><td><b>X2</b></td><td>5C59</td><td>23641</td><td><b>E_LINE</b></td><td>Address of command being typed in</td></tr>
<tr><td><b>2</b></td><td>5C5B</td><td>23643</td><td><b>K_CUR</b></td><td>Address of cursor</td></tr>
<tr><td><b>X2</b></td><td>5C5D</td><td>23645</td><td><b>CH_ADD</b></td><td>Address of the next character to be interpreted – the character after the argument of <b>PEEK</b>, or the <b>NEWLINE</b> at the end of a <b>POKE</b> statement</td></tr>
<tr><td><b>2</b></td><td>5C5F</td><td>23647</td><td><b>X_PTR</b></td><td>Address of the character after the <code>?</code> marker</td></tr>
<tr><td><b>X2</b></td><td>5C61</td><td>23649</td><td><b>WORKSP</b></td><td>Address of temporary work space</td></tr>
<tr><td><b>X2</b></td><td>5C63</td><td>23651</td><td><b>STKBOT</b></td><td>Address of bottom of calculator stack</td></tr>
<tr><td><b>X2</b></td><td>5C65</td><td>23653</td><td><b>STKEND</b></td><td>Address of start of spare space</td></tr>
<tr><td><b>N1</b></td><td>5C67</td><td>23655</td><td><b>BREG</b></td><td>Calculator's B register</td></tr>
</tbody>
</table>

