source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IOMappedIDE.inc@ 380

Last change on this file since 380 was 376, checked in by gregli@…, 13 years ago

WIDE checkin... Added copyright and license information to sorce files, as per the GPL instructions for usage.

File size: 2.4 KB
RevLine 
[238]1; Project name : XTIDE Universal BIOS
2; Description : Macros for normal I/O mapped ATA controllers.
3
[376]4;
5; XTIDE Universal BIOS and Associated Tools
6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
7;
8; This program is free software; you can redistribute it and/or modify
9; it under the terms of the GNU General Public License as published by
10; the Free Software Foundation; either version 2 of the License, or
11; (at your option) any later version.
12;
13; This program is distributed in the hope that it will be useful,
14; but WITHOUT ANY WARRANTY; without even the implied warranty of
15; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16; GNU General Public License for more details.
17; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
18;
19
[238]20%ifndef IO_MAPPED_IDE_INC
21%define IO_MAPPED_IDE_INC
22
23;--------------------------------------------------------------------
24; OUTPUT_AL_TO_IDE_REGISTER_IN_DL
25; JUMP_TO_OUTPUT_AL_TO_IDE_REGISTER_IN_DL
26; OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER_IN_DL
27; Parameters:
28; AL: Byte to output
29; %1: IDE Register (OUTPUT_AL_TO_IDE_REGISTER)
30; IDE Control Block Register (OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER)
31; DS:DI: Ptr to DPT (in RAMVARS segment)
32; Returns:
33; Nothing
34; Corrupts registers:
35; BX, DX
36;--------------------------------------------------------------------
37%macro OUTPUT_AL_TO_IDE_REGISTER 1
38%ifnidni %1, dl
39 mov dl, %1
40%endif
41 call IdeIO_OutputALtoIdeRegisterInDL
42%endmacro
43
44%macro JUMP_TO_OUTPUT_AL_TO_IDE_REGISTER 1
45%ifnidni %1, dl
46 mov dl, %1
47%endif
48 jmp IdeIO_OutputALtoIdeRegisterInDL
49%endmacro
50
51%macro OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER 1
52%ifnidni %1, dl
53 mov dl, %1
54%endif
55 call IdeIO_OutputALtoIdeControlBlockRegisterInDL
56%endmacro
57
58
59;--------------------------------------------------------------------
60; INPUT_TO_AL_FROM_IDE_REGISTER
61; JUMP_TO_INPUT_TO_AL_FROM_IDE_REGISTER
62; Parameters:
63; %1: IDE Register
64; DS:DI: Ptr to DPT (in RAMVARS segment)
65; Returns:
66; AL: Inputted byte
67; Corrupts registers:
68; BX, DX
69;--------------------------------------------------------------------
70%macro INPUT_TO_AL_FROM_IDE_REGISTER 1
71%ifnidni %1, dl
72 mov dl, %1
73%endif
74 call IdeIO_InputToALfromIdeRegisterInDL
75%endmacro
76
77%macro JUMP_TO_INPUT_TO_AL_FROM_IDE_REGISTER 1
78%ifnidni %1, dl
79 mov dl, %1
80%endif
81 jmp IdeIO_InputToALfromIdeRegisterInDL
82%endmacro
83
84
85%endif ; IO_MAPPED_IDE_INC
Note: See TracBrowser for help on using the repository browser.