SvarDOS / bugz

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

SvarCOM does not reset EDR's boot-time environment pointer #108

Closed mateuszviste closed 2 months ago

mateuszviste commented 2 months ago

SvarCOM is retrieving from the EDR kernel the segment where the "config" (kernel/boot-time) environment lies. This is supposed to work only the first time, because after obtaining it the shell should zero it out. SvarCOM relies on this to figure out when it is being booted.

The zeroing does not work, though. As an effect, when system() is called from within another program, SvarCOM thinks it is boot time and executes AUTOEXEC each time.

This is the code that was supposed to fetch & reset the EDR env segment:

image

But changing it to this works:

image

Clearly, mov [es:bx], word ptr 0 does not mean what I thought it meant...

mateuszviste commented 2 months ago

this one also works

image

mateuszviste commented 2 months ago

implemented the fix using the second option (mov word ptr [es:bx], 0).