summaryrefslogtreecommitdiff
path: root/libc/msdos
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>1998-09-22 17:44:32 +0200
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:40:35 +0200
commit2233d47f9d89c107b6c425626d6eb2669363b055 (patch)
tree429df42a8f6ed7174868af04edd364cd778a4d54 /libc/msdos
parentec5f28e3f1400b5dacb88eda2d9db472a20b4349 (diff)
downloaddev86-2233d47f9d89c107b6c425626d6eb2669363b055.tar.gz
Import Dev86src-0.14.5.tar.gzv0.14.5
Diffstat (limited to 'libc/msdos')
-rw-r--r--libc/msdos/conio.c66
1 files changed, 58 insertions, 8 deletions
diff --git a/libc/msdos/conio.c b/libc/msdos/conio.c
index 3c51c92..1abfa40 100644
--- a/libc/msdos/conio.c
+++ b/libc/msdos/conio.c
@@ -1,23 +1,73 @@
/* Is this BIOS keyboard io ? */
-cgets()
-
-cputs()
-
getch()
+{
+#asm
+ xor ax,ax
+ int $16
+#endasm
+}
getche()
+{
+ int i = getch();
+ if( i & 0xFF) putch(i);
+ return i;
+}
+
+kbhit()
+{
+#asm
+ mov ah,#1
+ int $16
+ jz nokey
+ cmp ax,#0
+ jnz dort
+ mov ax,#3
+dort:
+ ret
+nokey:
+ xor ax,ax
+#endasm
+}
+
+putch()
+{
+#asm
+#if !__FIRST_ARG_IN_AX__
+ mov bx,sp
+ mov ax,[bx+2]
+#endif
+ mov ah,#$0E
+ mov bx,#7
+ int $10
+#endasm
+}
+
+cputs(str)
+char * str;
+{
+ while(*str) putch(*str++);
+}
+
+cgets()
+{
+}
cprintf()
+{
+}
cscanf()
+{
+}
getpass()
+{
+}
gotoxy()
-
-kbhit()
-
-putch()
+{
+}