document.write("\
<H4>Exmples of alternative loading programs:</H4>\
<P CLASS=code>10 REM To relocate RAMDOS.BIN below HIMEM</P>\
<P CLASS=code>20 IF HIMEM>&amp;7FFF then hm%=HIMEM-2*-&amp;8000 ELSE hl%=HIMEM</P>\
<P CLASS=code>30 MEMORY &amp;2FFF: LOAD \"RAMDOS.BIN\",&amp;3000</P>\
<P CLASS=code>40 CALL &amp;3000, @hm%</P>\
<P CLASS=code>50 MEMORY hm%: REM set HIMEM just below Ramdos</P>\
<BR><BR>\
<P CLASS=code>10 REM To relocate RAMDOS.BIN to bank 7 and below HIMEM</P>\
<P CLASS=code>20 IF HIMEM>&amp;7FFF then hm%=HIMEN-2*-&amp;8000 ELSE hl%=HIMEM</P>\
<P CLASS=code>30 bank%=7</P>\
<P CLASS=code>40 hm.bank%=&amp;7FFF: REM address in bank 7</P>\
<P CLASS=code>50 MEMORY &amp;2FFF: LOAD \"RAMDOS.BIN\",&amp;3000</P>\
<P CLASS=code>60 CALL &amp;3000,@hm%,bank%,@hm.bank%</P>\
<P CLASS=code>70 MEMORY hm%: REM set himem just below Ramdos</P>\
<P>The loading program RAMDOS.BAS relocates RAMDOS.BIN to just below HIMEM\
   or, if extra banks are available, to the top of bank 7 and to the area of\
   memory used by Tone Envelopes nos. 3-15. If you wish to  use these Tone\
   Envelopes, then either relocate the whole of RAMDOS.BIN  below HIMEM in\
   the normal RAM or relocate the small second part into a  different area.\
   The first option is the easier, because you just need to tell RAMDOS.BAS\
   that you are using an unexpanded 464 or 664. The second  option requires\
   that you write an alternative loading program, such as no.s 2 or 3 above.\
<P>The bank number at which the majority of the program is held is found at\
   &amp;BE3F, in the form of &amp;C0+bank number.  In the ROM version this is the ROM\
   position, and in RAMD0S2 this has the value of 2.\
<P>If RAMDOS is relocated into one of the extra banks of memory, the 2K\
   buffer used by CAT and LOAD is fixed immediately below RAMDOS, occupying\
   roughly &amp;7000-&amp;7800.  This buffer normally resides immediately below\
   HIMEM but this means that the buffer would be in danger of over-writing\
   RAMDOS.  This is because the bank used by RAMDOS is switched in to occupy\
   &amp;4000-&amp;7FFF whenever disc functions are used, so that the 2K buffer\
   over-writes this bank whenever HIMEM is between &amp;4800 and &amp;8800.  To avoid\
   this, the buffer is fixed to a permanent position occupying the 2K\
   immediately below RAMDOS.\
<P>The position of this permanent buffer address can be changed by poking a\
   new value into &amp;BE3B/C after RAMDOS has been initialised.  A value of zero\
   will make the buffer lie immediately below HIMEM as normal.\
");