I'm playing around with BASIC/XBASIC and machine code subroutines. I've figured out the parameter passing, and I am using CLEAR to allocate some memory between MEMTOP and 0xf1c9. However, what I don't understand is how to know how much you can safely lower MEMTOP. E.g. I'd like to reserve 5k for data and assembler routines, then I would set MEMTOP to 0xf1c9-0x1400=0xddc9, right? But how do I know if this "eats" into BASIC/XBASIC RAM?
Another thing - on my SVI738 with MSX2+ ROMs MEMTOP is at 58656/0xe520. So there is already some reserved space between MEMTOP and 61897/0xf1c9 where DOS/Disk-BASIC work area begins (according to https://www.msx.org/wiki/The_Memory), correct? Would this always be the case?
Edit: Seems like I've misunderstood the memory map above. If I try to raise MEMTOP to slightly below 0xf1c9 the disk operations no longer works. So it looks like the default MEMTOP indeed is MEMTOP and should not be touched.