-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestByWinRing0.cs
More file actions
61 lines (47 loc) · 1.74 KB
/
TestByWinRing0.cs
File metadata and controls
61 lines (47 loc) · 1.74 KB
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
57
58
59
60
61
using OpenLibSys;
using System;
using System.Collections.Generic;
using System.Text;
namespace MyFirstapp
{
class TestByWinRing0
{
Ols MyOls;
public bool Initialize()
{
MyOls = new OpenLibSys.Ols();
return MyOls.GetStatus() == (uint)OpenLibSys.Ols.Status.NO_ERROR;
}
//#define IBFMASK 0x02
//#define OBFMASK 0x01
//#define WaitIBFE while(((inportb(0x66)) & (0x02)) == 0x02)
//#define WaitOBFF while(((inportb(0x66)) & (0x01)) == 0x00)
//unsigned char ReadECRAM(unsigned char Address)
//{
// while (((inportb(0x66)) & (0x02)) == 0x02) ;
// outportb(0x66, 0x80);
// while (((inportb(0x66)) & (0x02)) == 0x02) ;
// outportb(0x62, Address);
// while (((inportb(0x66)) & (0x01)) == 0x00) ;
// return inportb(0x62);
//}
/*public Byte ReadECRAM(Byte Address)
{
while (((MyOls.ReadIoPortByte(0x66)) & (0x02)) == 0x02) ;
MyOls.WriteIoPortByte(0x66, 0x80);
while (((MyOls.ReadIoPortByte(0x66)) & (0x02)) == 0x02) ;
MyOls.WriteIoPortByte(0x62, Address);
while (((MyOls.ReadIoPortByte(0x66)) & (0x01)) == 0x00) ;
return MyOls.ReadIoPortByte(0x62);
}*/
public Byte ReadECRAM(Byte Address)
{
while (((MyOls.ReadIoPortByte(0x66)) & (0x02)) == 0x02) ;
MyOls.WriteIoPortByte(0x66, 0x80);
while (((MyOls.ReadIoPortByte(0x66)) & (0x02)) == 0x02) ;
MyOls.WriteIoPortByte(0x62, Address);
while (((MyOls.ReadIoPortByte(0x66)) & (0x01)) == 0x00) ;
return MyOls.ReadIoPortByte(0x62);
}
}
}