From b0e9b25cf4d73255c90a201be0ec3e55b2479024 Mon Sep 17 00:00:00 2001 From: Andreas Ziermann Date: Fri, 27 Nov 2015 11:37:20 +0100 Subject: libc/msdos: __mkargv es register changed In __mkargv.o the es register is modified during the processing of the arguments and never restored. --- libc/msdos/msdos.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libc') diff --git a/libc/msdos/msdos.c b/libc/msdos/msdos.c index f9bfb9b..973b0a6 100644 --- a/libc/msdos/msdos.c +++ b/libc/msdos/msdos.c @@ -181,6 +181,8 @@ char ** __argv; { int length, i, argc=1, s=0; unsigned char *ptr, *p; + int es=__get_es(); + __set_es(__psp); /* Pointer to the args */ length = __peek_es(0x80); /* Length of cmd line */ if( length > 0 ) @@ -212,6 +214,7 @@ char ** __argv; } __argv[argc] = 0; } + __set_es(es); } #endif -- cgit v1.2.1