Hello !
I am experiencing some problems with a file loader I wrote in assembler.
The program loads several files from disk (using FCB), after setting mapper page for page 2 (address 8000h), in order to load 1 file per mapper page.
My program is working in BASIC environment (DOS not active), with enabled BIOS (it is a BLOAD file).
If I run the program from a diskette (DOS 1), it works flawlessly. Mapper page switching works fine and every file is loaded correctly.
BUT, working from hard drive using DOS-2 diskrom (exactly same program, FCBs), after opening the file, DOS2 restores mapper pages to the boot-up state (FCh=3, FD=2, FE=1, FF=0), so some files are not correctly loaded.
Is it a normal behavior of DOS-2?
Can it be avoided or I will need to change my loading routines in order to avoid this "bug"?
I made a simple test from BASIC: after altering mapper registers, (i.e. OUT &HFE,4) and issue a FILES command, all registers are restored.
I tried in a 128K RAM MSX and a 256K MSX and both work the same.