dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
loglan.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Added upstream from http://ftp.icm.edu.pl/pub/loglan/
[loglan.git]
/
sources
/
new-s5r4
/
inkeydos.c
1
#include "graf\graf.h"
2
#include <dos.h>
3
4
static union REGS r;
5
6
int pascal inkey( dummy )
7
void *dummy;
8
{
9
r.h.ah = 0x01;
10
int86( 0x16, &r, &r);
11
if( r.x.ax == 0 ) return 0;
12
else
13
{
14
r.h.ah = 0x00;
15
int86( 0x16, &r, &r);
16
if( r.h.al != '\0' )
17
return (int)(unsigned char)( r.h.al );
18
else
19
if( r.h.ah & '\x80' )
20
return (int)( -r.h.ah );
21
else
22
return (int)(unsigned char)( r.h.ah );
23
}
24
}
25