It is quite simple: under certain circumstances, INS calls the DOS routine ALL_SEG to reservate a new RAM segment. ALL_SEG uses some internal variables to backup the current paging state and to restore it later.
Where is the problem then? DOS function calls use the SAME variables. So, if ALL_SEG interrupts an already executing function call... the variables are smashed, so the DOS function call does not succeed in restoring the paging state and computer crashes. Why MSX-DOS does not use a stack-like structure, instead of single variables, for such tasks? Too bad... Now the solution seems simple: I must just backup by hand these variables before calling ALL_SEG, and then restore them again. But can I assume that the location of these variables does not vary from one MSX to another? BTW the variables are: #F2EB for storing the contents of #FFFF address #F2EA for storing the contents of #A8 port #F2CB to #F2CD for storing the segment switched on pages 0 to 3, respectively Can someone browse inside the ALL_SEG routine and tell me if the same variables are being used? (it is easy: load Compass, go to debugger, place cursor at #F200 and "T"race a little until you see that #FFFF and #A8 contents are saved. At least on my computer, ALL_SEG is always placed at #F200). Preferably someone that does NOT have my configuration (512Ked Turbo-R with MegaSCSI). Thanks a lot, and blame on MSX-DOS 2 designers! X-) -- For info, see http://www.stack.nl/~wynke/MSX/listinfo.html
