Subversion Repositories SvarDOS

Rev

Rev 1859 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1859 Rev 1861
Line 146... Line 146...
146
    jc FAIL              /* not DR-DOS */
146
    jc FAIL              /* not DR-DOS */
147
 
147
 
148
    add bx, 0x12
148
    add bx, 0x12
149
    mov ax, es:[bx]      /* read the segment of the kernel environment */
149
    mov ax, es:[bx]      /* read the segment of the kernel environment */
150
    mov kernenvseg, ax   /* save the kern env segment for later */
150
    mov kernenvseg, ax   /* save the kern env segment for later */
-
 
151
    mov es:[bx], word ptr 0  /* reset the pointer to kernel env as done by DR COMMAND.COM */
-
 
152
 
-
 
153
    /* if DR-DOS env is at seg 0x60 then overwrite my own env in PSP with this.
-
 
154
     * Seg 0x60 is used since https://github.com/SvarDOS/edrdos/issues/88 and
-
 
155
     * it is safe to be used as it won't be overwritten */
151
    xor ax, ax
156
    cmp ax, 0x60
-
 
157
    jne FAIL
152
    mov es:[bx], ax      /* reset the pointer to kernel env as done by DR COMMAND.COM */
158
    mov bx, 0x2C         /* environment segment field in my PSP */
-
 
159
    mov [bx], ax
153
 
160
 
154
    FAIL:
161
    FAIL:
155
    pop es
162
    pop es
156
    pop bx
163
    pop bx
157
    pop ax
164
    pop ax