-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDevmisc.orn
56 lines (51 loc) · 1.17 KB
/
Devmisc.orn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* UZIX - UNIX Implementation for MSX
* (c) 1997-2001 Arcady Schekochikhin
* Adriano C. R. da Cunha
*
* UZIX is based on UZI (UNIX Zilog Implementation)
* UZI is a UNIX kernel clone written for Z-80 systems.
* All code is public domain, not being based on any AT&T code.
*
* The author, Douglas Braun, can be reached at:
* 7696 West Zayante Rd.
* Felton, CA 95018
* oliveb!intelca!mipos3!cadev4!dbraun
*
* This program is under GNU GPL, read COPYING for details
*
*/
/**********************************************************
Orion memory/printer/null device drivers
**********************************************************/
/* write one char to line printer */
STATIC uchar lpout(uchar c)
{
if (!bios(BIOS_LISTST))
return 1;
bios(BIOS_LIST, c);
return 0;
}
GBL void rdtime(tloc)
register time_t *tloc;
{
#ifndef __KERNEL__
rdtod();
#else /* __KERNEL__ */
#asm
di
#endasm
#endif /* __KERNEL__ */
*tloc = tod;
#ifdef __KERNEL__
_ei();
#endif /* __KERNEL__ */
}
/* Min() calculate minimal of two numbers
* Must be function not macro!
*/
GBL int Min(a, b)
int a, b;
{
return (b < a ? b : a);
}