RAMDOS manual


Technical details

RAMDOS.BIN occupies about &900 bytes, the bulk of which (about &800) can be relocated to any address between &4000 and &BFFF or in any of the extra banks of memory (ie banks 4-7), and a small portion of which (about &CO) must reside in &8000-&BFFF. It is relocated by loading into &3000 then calling &3000 with the following parameters:
    CALL &3000,@hm% [,bank,@hm.bank%]

The portion in square brackets is optional and is used to relocate the larger part of the program into one of the extra banks of memory. If it is ommitted, the larger part of the program will be relocated immediately below the smaller part. The variables hm% and hm.bank% are the addresses below which the program will be relocated, and must be defined before they are used. After relocation they are automatically updated to the address immediatedly below the relocated program.

Exmples of alternative loading programs:


    10 REM To relocate RAMDOS.BIN below HIMEM
    20 IF HIMEM>&7FFF then hm%=HIMEM-2*-&8000 ELSE hl%=HIMEM
    30 MEMORY &2FFF: LOAD "RAMDOS.BIN",&3000
    40 CALL &3000, @hm%
    50 MEMORY hm%: REM set HIMEM just below Ramdos


    10 REM To relocate RAMDOS.BIN to bank 7 and below HIMEM
    20 IF HIMEM>&7FFF then hm%=HIMEN-2*-&8000 ELSE hl%=HIMEM
    30 bank%=7
    40 hm.bank%=&7FFF: REM address in bank 7
    50 MEMORY &2FFF: LOAD "RAMDOS.BIN",&3000
    60 CALL &3000,@hm%,bank%,@hm.bank%
    70 MEMORY hm%: REM set himem just below Ramdos

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.

The bank number at which the majority of the program is held is found at &BE3F, in the form of &C0+bank number. In the ROM version this is the ROM position, and in RAMD0S2 this has the value of 2.