Last change
on this file since 150 was
150,
checked in by aitotat, 13 years ago
|
Changes to XTIDE Universal BIOS:
- Redesigned Disk Parameter Tables.
- Code generalizations for supporting non-IDE devices in the future.
|
File size:
1.4 KB
|
Line | |
---|
1 | ; Project name : XTIDE Universal BIOS |
---|
2 | ; Description : IDE Register I/O functions. |
---|
3 | |
---|
4 | ; Section containing code |
---|
5 | SECTION .text |
---|
6 | |
---|
7 | ;-------------------------------------------------------------------- |
---|
8 | ; IdeIO_OutputALtoIdeRegisterInDX |
---|
9 | ; Parameters: |
---|
10 | ; AL: Byte to output |
---|
11 | ; DX: IDE Register |
---|
12 | ; CS:BX: Ptr to IDEVARS |
---|
13 | ; Returns: |
---|
14 | ; Nothing |
---|
15 | ; Corrupts registers: |
---|
16 | ; DX |
---|
17 | ;-------------------------------------------------------------------- |
---|
18 | ALIGN JUMP_ALIGN |
---|
19 | IdeIO_OutputALtoIdeRegisterInDX: |
---|
20 | add dx, [cs:bx+IDEVARS.wPort] |
---|
21 | out dx, al |
---|
22 | ret |
---|
23 | |
---|
24 | |
---|
25 | ;-------------------------------------------------------------------- |
---|
26 | ; IdeIO_OutputALtoIdeControlBlockRegisterInDX |
---|
27 | ; Parameters: |
---|
28 | ; AL: Byte to output |
---|
29 | ; DX: IDE Control Block Register |
---|
30 | ; CS:BX: Ptr to IDEVARS |
---|
31 | ; Returns: |
---|
32 | ; Nothing |
---|
33 | ; Corrupts registers: |
---|
34 | ; DX |
---|
35 | ;-------------------------------------------------------------------- |
---|
36 | ALIGN JUMP_ALIGN |
---|
37 | IdeIO_OutputALtoIdeControlBlockRegisterInDX: |
---|
38 | add dx, [cs:bx+IDEVARS.wPortCtrl] |
---|
39 | out dx, al |
---|
40 | ret |
---|
41 | |
---|
42 | |
---|
43 | ;-------------------------------------------------------------------- |
---|
44 | ; IdeIO_InputToALfromIdeRegisterInDX |
---|
45 | ; Parameters: |
---|
46 | ; DX: IDE Register |
---|
47 | ; CS:BX: Ptr to IDEVARS |
---|
48 | ; Returns: |
---|
49 | ; AL: Inputted byte |
---|
50 | ; Corrupts registers: |
---|
51 | ; DX |
---|
52 | ;-------------------------------------------------------------------- |
---|
53 | ALIGN JUMP_ALIGN |
---|
54 | IdeIO_InputToALfromIdeRegisterInDX: |
---|
55 | add dx, [cs:bx+IDEVARS.wPort] |
---|
56 | in al, dx |
---|
57 | ret |
---|
Note: See
TracBrowser
for help on using the repository browser.