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

Last change on this file since 366 was 238, checked in by aitotat@…, 13 years ago

Changes to XTIDE Universal BIOS:

  • Makefile now builds small (8k) and large versions.
  • Completely untested support for JR-IDE/ISA.
File size: 1.7 KB
RevLine 
[238]1; Project name : XTIDE Universal BIOS
2; Description : Macros for normal I/O mapped ATA controllers.
3
4%ifndef IO_MAPPED_IDE_INC
5%define IO_MAPPED_IDE_INC
6
7;--------------------------------------------------------------------
8; OUTPUT_AL_TO_IDE_REGISTER_IN_DL
9; JUMP_TO_OUTPUT_AL_TO_IDE_REGISTER_IN_DL
10; OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER_IN_DL
11; Parameters:
12; AL: Byte to output
13; %1: IDE Register (OUTPUT_AL_TO_IDE_REGISTER)
14; IDE Control Block Register (OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER)
15; DS:DI: Ptr to DPT (in RAMVARS segment)
16; Returns:
17; Nothing
18; Corrupts registers:
19; BX, DX
20;--------------------------------------------------------------------
21%macro OUTPUT_AL_TO_IDE_REGISTER 1
22%ifnidni %1, dl
23 mov dl, %1
24%endif
25 call IdeIO_OutputALtoIdeRegisterInDL
26%endmacro
27
28%macro JUMP_TO_OUTPUT_AL_TO_IDE_REGISTER 1
29%ifnidni %1, dl
30 mov dl, %1
31%endif
32 jmp IdeIO_OutputALtoIdeRegisterInDL
33%endmacro
34
35%macro OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER 1
36%ifnidni %1, dl
37 mov dl, %1
38%endif
39 call IdeIO_OutputALtoIdeControlBlockRegisterInDL
40%endmacro
41
42
43;--------------------------------------------------------------------
44; INPUT_TO_AL_FROM_IDE_REGISTER
45; JUMP_TO_INPUT_TO_AL_FROM_IDE_REGISTER
46; Parameters:
47; %1: IDE Register
48; DS:DI: Ptr to DPT (in RAMVARS segment)
49; Returns:
50; AL: Inputted byte
51; Corrupts registers:
52; BX, DX
53;--------------------------------------------------------------------
54%macro INPUT_TO_AL_FROM_IDE_REGISTER 1
55%ifnidni %1, dl
56 mov dl, %1
57%endif
58 call IdeIO_InputToALfromIdeRegisterInDL
59%endmacro
60
61%macro JUMP_TO_INPUT_TO_AL_FROM_IDE_REGISTER 1
62%ifnidni %1, dl
63 mov dl, %1
64%endif
65 jmp IdeIO_InputToALfromIdeRegisterInDL
66%endmacro
67
68
69%endif ; IO_MAPPED_IDE_INC
Note: See TracBrowser for help on using the repository browser.