SvarDOS / bugz

SvarDOS bug tracker
http://svardos.org/
6 stars 0 forks source link

Environment block is read-only #98

Closed mateuszviste closed 3 months ago

mateuszviste commented 3 months ago

image

This is likely a side effect of the recent changes related to pulling in the EDR "config" environment into the default SvarCOM env.

mateuszviste commented 3 months ago

this is because EDR's environment does not have a MCB, while SvarCOM relies on the presence of an MCB to compute the available space inside the environment block. The EDR scenario requires a more convoluted hack than what I initially did.

boeckmann commented 3 months ago

It would be best to create a fresh environment, which is properly linked in the MCB chain, from the config environment. I could put a dummy MCB in front of the config environment, not linked to the chain. But then we would loose 16 more bytes in the config environment. And trying to deallocate it would probably fail in a fatal manner.

mateuszviste commented 3 months ago

Creating a new environment is exactly the plan. It's something that SvarCOM already knows how to do, the only trouble is for me to match all possible scenarios (EDR's config env, FreeDOS initial env, MS-DOS 5 with no env at all, /P, secondary shell, ...) and do the right thing for each case. I do not see any advantage of creating a fake MCB for EDR's config env. Sooner or later this would bite us back one way or another.

mateuszviste commented 3 months ago

fixed