From ec90083cc6f7513d68807e19f893dbb27d2a45aa Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 20 Mar 2009 13:41:58 -0700 Subject: [PATCH] getc: move parseint_esdi out of the getint control flow parseint_esdi was located in the middle of the getint -> parseint fall through, with expectedly disastrous results. --- core/getc.inc | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/core/getc.inc b/core/getc.inc index 4c273a2..3fb8856 100644 --- a/core/getc.inc +++ b/core/getc.inc @@ -242,21 +242,6 @@ getint: .loaded: mov byte [di],0 mov si,NumBuf ; Fall through to parseint - -; -; parseint_esdi: -; Same as parseint, but takes the input in ES:DI -; -parseint_esdi: - push ds - push es - pop ds - xchg si,di - call parseint - xchg si,di - pop ds - ret - ; ; parseint: Convert an integer to a number in EBX ; Get characters from string in DS:SI @@ -413,3 +398,17 @@ getline: stosb .xret: popf ret + +; +; parseint_esdi: +; Same as parseint, but takes the input in ES:DI +; +parseint_esdi: + push ds + push es + pop ds + xchg si,di + call parseint + xchg si,di + pop ds + ret -- 2.7.4