From 19a6dc1ba40c91badb8a5372bffffff902bb399e Mon Sep 17 00:00:00 2001 From: lpproj Date: Fri, 27 Dec 2019 17:41:51 +0900 Subject: [PATCH] Fix func 0Bh (Get STDIN Status) always returns AL=FFh with some alternative CON drivers: * qwikansi.sys (simtelnet: simtelnet/msdos/screen/qwikansi.zip * most of Japanese input methods (Microsoft MS-IME, ATOK, WXP/WX2/WX3) --- kernel/chario.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/chario.c b/kernel/chario.c index 3f3d1c2..b5853d5 100644 --- a/kernel/chario.c +++ b/kernel/chario.c @@ -96,7 +96,9 @@ STATIC void CharCmd(struct dhdr FAR **pdev, unsigned command) STATIC int Busy(struct dhdr FAR **pdev) { - CharCmd(pdev, C_ISTAT); + CharCmd(pdev, C_NDREAD); + if (CharReqHdr.r_status & S_ERROR) + CharCmd(pdev, C_ISTAT); return CharReqHdr.r_status & S_BUSY; }