Changeset 116 in xtideuniversalbios


Ignore:
Timestamp:
Feb 26, 2011, 11:55:06 PM (14 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes to all parts of the project:

  • Removed a redundant macro (HPIO_NORMALIZE_PTR)
  • Deleted XTIDE_Universal_BIOS/Inc/BiosData.inc since that was also redundant.
  • Size optimization: Changed the LOAD_BDA_SEGMENT_TO macro to use the stack on 186+ processors (the old behaviour can still be used where needed).
  • Made other minor size optimizations and cleanups to various functions, mostly in the Int13h handler.
Location:
trunk
Files:
1 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Inc/BiosData.inc

    r41 r116  
    1 ; File name     :   BiosData.inc
    2 ; Project name  :   IDE BIOS
    3 ; Created date  :   28.7.2007
    4 ; Last update   :   23.3.2010
    5 ; Author        :   Tomi Tilli
     1; Project name  :   XTIDE Universal BIOS
    62; Description   :   Equates for BIOS Data Area.
    73%ifndef BIOSDATA_INC
     
    2117    .wLPT1          resb    2       ; 0:408h, Parallel I/O Address, Port 1
    2218    .wLPT2          resb    2       ; 0:40Ah, Parallel I/O Address, Port 2
    23     .wLPT3          resb    2       ; 0:40Ch, Parallel I/O Address, Port 3                 
     19    .wLPT3          resb    2       ; 0:40Ch, Parallel I/O Address, Port 3
    2420    .wLPT4:                         ; 0:40Eh, Parallel I/O Address, Port 4 (PC/XT)
    2521    .wSegEBDA       resb    2       ; 0:40Eh, Extended BIOS Data Area segment (AT+)
    26    
     22
    2723    .wEquipment     resb    2       ; 0:410h, Equipment Word
    2824    .bTest          resb    1       ; 0:412h, Manufacturing test
     
    3632    .wKBTail        resb    2       ; 0:41Ch, Keyboard, Tail of buffer pointer
    3733    .rgwKBBuff      resb    32      ; 0:41Eh, Keyboard, 16-word buffer
    38    
     34
    3935    .bFDRecal       resb    1       ; 0:43Eh, Diskette, Recalibrate status
    4036    .bFDMotor       resb    1       ; 0:43Fh, Diskette, Motor status
    41    
     37
    4238    .bFDMotTime     resb    1       ; 0:440h, Diskette, Motor timeout counter
    4339    .bFDRetST       resb    1       ; 0:441h, Diskette, Controller status return code
     
    4743    .wVidBpP        resb    2       ; 0:44Ch, Video, Total number of bytes per page
    4844    .wVidPageOff    resb    2       ; 0:44Eh, Video, Current page offset
    49    
     45
    5046    .rgwVidCurPos   resb    16      ; 0:450h, Video, Cursor position, pages 0...7
    51    
     47
    5248    .wVidCurShape   resb    2       ; 0:460h, Video, Cursor shape
    5349    .bVidPageIdx    resb    1       ; 0:462h, Video, Active display page
     
    6258    .bLastIRQ       resb    1       ; 0:46Bh, Last interrupt that occurred (XT+)
    6359    .dwTimerTicks   resb    4       ; 0:46Ch, Timer ticks count
    64    
     60
    6561    .bTimer24h      resb    1       ; 0:470h, Timer ticks rollover flag
    6662    .bKBCtrlBrk     resb    1       ; 0:471h, Keyboard, Ctrl+Break flag
     
    6864    .bHDLastSt      resb    1       ; 0:474h, Hard Disk, Status of Last Operation (XT+)
    6965    .bHDCount       resb    1       ; 0:475h, Hard Disk, Number of HDs Attached (XT+)
    70     .bHDCtrl        resb    1       ; 0:476h, Hard Disk, Control Byte (temp, XT+) 
     66    .bHDCtrl        resb    1       ; 0:476h, Hard Disk, Control Byte (temp, XT+)
    7167    .bHDPortOff     resb    1       ; 0:477h, Hard Disk, Port Offset (XT)
    7268    .bLPT1Timeout   resb    1       ; 0:478h, Parallel Printer 1, Timeout (XT+)
     
    7874    .bCOM3Timeout   resb    1       ; 0:47Eh, Serial 3, Timeout (XT+)
    7975    .bCOM4Timeout   resb    1       ; 0:47Fh, Serial 4, Timeout (XT+)
    80    
     76
    8177    .wKBPtrStart    resb    2       ; 0:480h, Keyboard, Pointer to start of buffer (XT+)
    8278    .wKBPtrEnd      resb    2       ; 0:482h, Keyboard, Pointer to end of buffer (XT+)
     
    9288    .bHDTaskFlg     resb    1       ; 0:48Eh, Hard Disk, Task Complete Flag (AT+)
    9389    .bFDCtrlInfo    resb    1       ; 0:48Fh, Diskette, Controller information (AT+)
    94    
     90
    9591    .bFDMedia0      resb    1       ; 0:490h, Diskette 0, Media state (AT+)
    9692    .bFDMedia1      resb    1       ; 0:491h, Diskette 1, Media state (AT+)
     
    10399    .dwWaitPtr      resb    4       ; 0:498h, User's wait flag pointer (AT+)
    104100    .dwWaitCnt      resb    4       ; 0:49Ch, User's wait count (AT+)
    105    
     101
    106102    .bWaitFlg       resb    1       ; 0:4A0h, Wait flag (AT+)
    107103    .rgbLAN         resb    7       ; 0:4A1h, Local Area Network (AT+)
     
    133129; Load BDA (Bios Data Area) segment to wanted segment register.
    134130;
     131; Use an exclamation point (!) as the third parameter when you want
     132; to force the use of the register in the second parameter. This is
     133; useful when that register needs to be zeroed in subsequent code or
     134; when stack usage is undesirable (ie speed is critical).
     135;
    135136; LOAD_BDA_SEGMENT_TO
    136137;   Parameters:
    137138;       %1:     Destination Segment Register
    138139;       %2:     Temporary WORD Register
     140;       %3:     Can be ! or empty
    139141;   Returns:
    140142;       %1:     BDA segment (zero)
     
    142144;       %2
    143145;--------------------------------------------------------------------
    144 %macro LOAD_BDA_SEGMENT_TO 2
     146%macro LOAD_BDA_SEGMENT_TO 2-3
     147%ifndef USE_186
    145148    xor     %2, %2
    146149    mov     %1, %2
     150%elifidn %3, !
     151    xor     %2, %2
     152    mov     %1, %2
     153%else
     154    push    BYTE 0
     155    pop     %1
     156%endif
    147157%endmacro
    148158
  • trunk/Assembly_Library/Src/File/Directory.asm

    r41 r116  
    1 ; File name     :   Directory.asm
    21; Project name  :   Assembly Library
    3 ; Created date  :   3.9.2010
    4 ; Last update   :   6.9.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   Functions for accessing directories.
    73
     
    7066    push    dx
    7167
    72     xor     dx, dx              ; Default drive (00h)
    73     mov     ah, GET_CURRENT_DIRECTORY
     68    mov     ah, GET_CURRENT_DIRECTORY   ; GET_CURRENT_DIRECTORY = 47h
     69    cwd                                 ; Default drive (00h)
    7470    int     DOS_INTERRUPT_21h
    7571
     
    131127; Directory_UpdateDTAForNextMatchUsingPreviousParameters
    132128;   Parameters:
    133 ;       Nothing (Parameters from previous call to 
     129;       Nothing (Parameters from previous call to
    134130;               Directory_UpdateDTAForFirstMatchForDSSIwithAttributesInCX are used)
    135131;   Returns:
  • trunk/Assembly_Library/Src/Menu/MenuAttributes.asm

    r104 r116  
    4848    push    ds
    4949
    50     LOAD_BDA_SEGMENT_TO ds, ax
     50    LOAD_BDA_SEGMENT_TO ds, ax, !
    5151    mov     al, [VIDEO_BDA.bMode]       ; Load BIOS display mode (0, 1, 2, 3 or 7)
    5252    cmp     al, 7
     
    7373    pop     ds
    7474    ret
    75 
    7675
    7776
  • trunk/Assembly_Library/Src/Menu/MenuInit.asm

    r104 r116  
    1919    push    es
    2020    push    ds
    21     LOAD_BDA_SEGMENT_TO ds, cx
     21    LOAD_BDA_SEGMENT_TO ds, cx, !
    2222    push    WORD [BDA.wVidCurShape]
    2323    mov     cl, MENU_size
     
    7474    call    MenuText_RefreshTitle           ; Draw title strings
    7575    call    MenuText_RefreshAllItems        ; Draw item strings
    76     jmp     MenuText_RefreshInformation     ; Draw information strings 
     76    jmp     MenuText_RefreshInformation     ; Draw information strings
    7777
    7878
  • trunk/Configurator/Inc/BiosData.inc

    r2 r116  
    1 ; File name     :   BiosData.inc
    2 ; Project name  :   IDE BIOS
    3 ; Created date  :   28.7.2007
    4 ; Last update   :   23.3.2010
    5 ; Author        :   Tomi Tilli
     1; Project name  :   XTIDE Universal BIOS
    62; Description   :   Equates for BIOS Data Area.
    73%ifndef BIOSDATA_INC
     
    2117    .wLPT1          resb    2       ; 0:408h, Parallel I/O Address, Port 1
    2218    .wLPT2          resb    2       ; 0:40Ah, Parallel I/O Address, Port 2
    23     .wLPT3          resb    2       ; 0:40Ch, Parallel I/O Address, Port 3                 
     19    .wLPT3          resb    2       ; 0:40Ch, Parallel I/O Address, Port 3
    2420    .wLPT4:                         ; 0:40Eh, Parallel I/O Address, Port 4 (PC/XT)
    2521    .wSegEBDA       resb    2       ; 0:40Eh, Extended BIOS Data Area segment (AT+)
    26    
     22
    2723    .wEquipment     resb    2       ; 0:410h, Equipment Word
    2824    .bTest          resb    1       ; 0:412h, Manufacturing test
     
    3632    .wKBTail        resb    2       ; 0:41Ch, Keyboard, Tail of buffer pointer
    3733    .rgwKBBuff      resb    32      ; 0:41Eh, Keyboard, 16-word buffer
    38    
     34
    3935    .bFDRecal       resb    1       ; 0:43Eh, Diskette, Recalibrate status
    4036    .bFDMotor       resb    1       ; 0:43Fh, Diskette, Motor status
    41    
     37
    4238    .bFDMotTime     resb    1       ; 0:440h, Diskette, Motor timeout counter
    4339    .bFDRetST       resb    1       ; 0:441h, Diskette, Controller status return code
     
    4743    .wVidBpP        resb    2       ; 0:44Ch, Video, Total number of bytes per page
    4844    .wVidPageOff    resb    2       ; 0:44Eh, Video, Current page offset
    49    
     45
    5046    .rgwVidCurPos   resb    16      ; 0:450h, Video, Cursor position, pages 0...7
    51    
     47
    5248    .wVidCurShape   resb    2       ; 0:460h, Video, Cursor shape
    5349    .bVidPageIdx    resb    1       ; 0:462h, Video, Active display page
     
    6258    .bLastIRQ       resb    1       ; 0:46Bh, Last interrupt that occurred (XT+)
    6359    .dwTimerTicks   resb    4       ; 0:46Ch, Timer ticks count
    64    
     60
    6561    .bTimer24h      resb    1       ; 0:470h, Timer ticks rollover flag
    6662    .bKBCtrlBrk     resb    1       ; 0:471h, Keyboard, Ctrl+Break flag
     
    6864    .bHDLastSt      resb    1       ; 0:474h, Hard Disk, Status of Last Operation (XT+)
    6965    .bHDCount       resb    1       ; 0:475h, Hard Disk, Number of HDs Attached (XT+)
    70     .bHDCtrl        resb    1       ; 0:476h, Hard Disk, Control Byte (temp, XT+) 
     66    .bHDCtrl        resb    1       ; 0:476h, Hard Disk, Control Byte (temp, XT+)
    7167    .bHDPortOff     resb    1       ; 0:477h, Hard Disk, Port Offset (XT)
    7268    .bLPT1Timeout   resb    1       ; 0:478h, Parallel Printer 1, Timeout (XT+)
     
    7874    .bCOM3Timeout   resb    1       ; 0:47Eh, Serial 3, Timeout (XT+)
    7975    .bCOM4Timeout   resb    1       ; 0:47Fh, Serial 4, Timeout (XT+)
    80    
     76
    8177    .wKBPtrStart    resb    2       ; 0:480h, Keyboard, Pointer to start of buffer (XT+)
    8278    .wKBPtrEnd      resb    2       ; 0:482h, Keyboard, Pointer to end of buffer (XT+)
     
    9288    .bHDTaskFlg     resb    1       ; 0:48Eh, Hard Disk, Task Complete Flag (AT+)
    9389    .bFDCtrlInfo    resb    1       ; 0:48Fh, Diskette, Controller information (AT+)
    94    
     90
    9591    .bFDMedia0      resb    1       ; 0:490h, Diskette 0, Media state (AT+)
    9692    .bFDMedia1      resb    1       ; 0:491h, Diskette 1, Media state (AT+)
     
    10399    .dwWaitPtr      resb    4       ; 0:498h, User's wait flag pointer (AT+)
    104100    .dwWaitCnt      resb    4       ; 0:49Ch, User's wait count (AT+)
    105    
     101
    106102    .bWaitFlg       resb    1       ; 0:4A0h, Wait flag (AT+)
    107103    .rgbLAN         resb    7       ; 0:4A1h, Local Area Network (AT+)
     
    133129; Load BDA (Bios Data Area) segment to wanted segment register.
    134130;
     131; Use an exclamation point (!) as the third parameter when you want
     132; to force the use of the register in the second parameter. This is
     133; useful when that register needs to be zeroed in subsequent code or
     134; when stack usage is undesirable (ie speed is critical).
     135;
    135136; LOAD_BDA_SEGMENT_TO
    136137;   Parameters:
    137138;       %1:     Destination Segment Register
    138139;       %2:     Temporary WORD Register
     140;       %3:     Can be ! or empty
    139141;   Returns:
    140142;       %1:     BDA segment (zero)
     
    142144;       %2
    143145;--------------------------------------------------------------------
    144 %macro LOAD_BDA_SEGMENT_TO 2
     146%macro LOAD_BDA_SEGMENT_TO 2-3
     147%ifndef USE_186
    145148    xor     %2, %2
    146149    mov     %1, %2
     150%elifidn %3, !
     151    xor     %2, %2
     152    mov     %1, %2
     153%else
     154    push    BYTE 0
     155    pop     %1
     156%endif
    147157%endmacro
    148158
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm

    r96 r116  
    9999    xchg    ax, bx      ; Store BX to AX
    100100    eMOVZX  bx, BYTE [cs:si+IDEVARS.bBusType]
    101     mov     bx, [cs:bx+.rgwBusTypeValues]   ; Char to BL, Int to BH 
     101    mov     bx, [cs:bx+.rgwBusTypeValues]   ; Char to BL, Int to BH
    102102    eMOVZX  dx, bh
    103103    push    bx          ; Push character
     
    191191    mov     dl, [di+DPT.bDrvNum]        ; Load Drive number to DL
    192192    call    BootInfo_GetOffsetToBX      ; ES:BX now points...
    193     LOAD_BDA_SEGMENT_TO es, ax          ; ...to BOOTNFO
     193    LOAD_BDA_SEGMENT_TO es, ax, !       ; ...to BOOTNFO
    194194    mov     al, [di+DPT.bIdeOff]
    195195    xchg    si, ax                      ; CS:SI now points to IDEVARS
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootVars.asm

    r96 r116  
    2828; POST stack is not large enough when DPTs are stored to 30:0h.
    2929;
     30; Note regarding LOAD_BDA_SEGMENT_TO: If you force the use of SP
     31; then you also have to unconditionally enable the CLI/STI pair.
     32; The reason for this is that only some buggy 808x CPU:s need the
     33; CLI/STI instruction pair when changing stacks. Other CPU:s disable
     34; interrupts automatically when SS is modified for the duration of
     35; the immediately following instruction to give time to change SP.
     36;
    3037; BootVars_SwitchToBootMenuStack
    3138;   Parameters:
     
    3946BootVars_SwitchToBootMenuStack:
    4047    pop     ax                          ; Pop return address
     48%ifndef USE_186
    4149    cli                                 ; Disable interrupts
     50%endif
    4251    LOAD_BDA_SEGMENT_TO ss, sp
    4352    mov     sp, BOOTVARS.rgbMnuStack    ; Load offset to stack
     53%ifndef USE_186
    4454    sti                                 ; Enable interrupts
     55%endif
    4556    jmp     ax
    4657
     
    4859;--------------------------------------------------------------------
    4960; Restores SS and SP to initial boot loader values.
     61;
     62; Before doing any changes, see the note regarding
     63; LOAD_BDA_SEGMENT_TO in BootVars_SwitchToBootMenuStack
    5064;
    5165; BootVars_SwitchBackToPostStack
     
    6074BootVars_SwitchBackToPostStack:
    6175    pop     ax                          ; Pop return address
     76%ifndef USE_186
    6277    cli                                 ; Disable interrupts
     78%endif
    6379    LOAD_BDA_SEGMENT_TO ss, sp
    6480%ifndef USE_386
     
    6884    lss     sp, [ss:BOOTVARS.dwPostStack]
    6985%endif
     86%ifndef USE_186
    7087    sti                                 ; Enable interrupts
     88%endif
    7189    jmp     ax
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1h_HStatus.asm

    r35 r116  
    1 ; File name     :   AH1h_HStatus.asm
    2 ; Project name  :   IDE BIOS
    3 ; Created date  :   27.9.2007
    4 ; Last update   :   24.8.2010
    5 ; Author        :   Tomi Tilli
     1; Project name  :   XTIDE Universal BIOS
    62; Description   :   Int 13h function AH=1h, Read Disk Status.
    73
     
    3026
    3127    LOAD_BDA_SEGMENT_TO ds, di
    32     xor     ah, ah                  ; Zero AH
    33     cmp     ah, [BDA.bHDLastSt]     ; Set CF if error code is non-zero
    3428    mov     ah, [BDA.bHDLastSt]     ; Last error to AH
     29    cmp     ah, 1                   ; Set CF if error code is zero
     30    cmc                             ; Invert CF
    3531
    3632    pop     ds
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm

    r88 r116  
    108108;--------------------------------------------------------------------
    109109; Returns timeout value for drive detection.
    110 ; Long timeout is required for detecing first drive to make sure it is
     110; Long timeout is required for detecting first drive to make sure it is
    111111; ready after power-on (ATA specification says up to 31 seconds).
    112112; Short timeout is used for additional drives to prevent long boot time
     
    123123ALIGN JUMP_ALIGN
    124124AH25h_GetDriveDetectionTimeoutValue:
     125    mov     cl, B_TIMEOUT_RESET         ; Load long timeout (assume first drive)
    125126    cmp     BYTE [RAMVARS.bDrvCnt], 0   ; Detecting first drive?
    126     je      SHORT .GetLongDelayForInitialDetection
     127    je      SHORT .Return
    127128    mov     cl, B_TIMEOUT_DRVINFO       ; Load short timeout
     129ALIGN JUMP_ALIGN, ret   ; This speed optimization may be unnecessary
     130.Return:
    128131    ret
    129 ALIGN JUMP_ALIGN
    130 .GetLongDelayForInitialDetection:
    131     mov     cl, B_TIMEOUT_RESET         ; Load long timeout
    132     ret
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHCh_HSeek.asm

    r84 r116  
    1 ; File name     :   AHCh_HSeek.asm
    2 ; Project name  :   IDE BIOS
    3 ; Created date  :   13.12.2007
    4 ; Last update   :   14.1.2011
    5 ; Author        :   Tomi Tilli,
    6 ;               :   Krister Nordvall (optimizations)
     1; Project name  :   XTIDE Universal BIOS
    72; Description   :   Int 13h function AH=Ch, Seek.
    83
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm

    r88 r116  
    100100    ; HSR2: Check_status
    101101    mov     cl, B_TIMEOUT_RESET         ; Reset timeout delay
    102     mov     dx, [RAMVARS.wIdeBase]      ; Load base port address
    103     jmp     HStatus_WaitBsyBase
     102    jmp     HStatus_WaitBsy
    104103
    105104
     
    125124    call    AH9h_InitializeDriveForUse
    126125    mov     cl, ah                      ; Copy error code to CL
    127 ALIGN JUMP_ALIGN
    128126.InitializeSlave:
    129127    pop     dx                          ; Restore base port address
     
    132130    call    AH9h_InitializeDriveForUse
    133131    mov     ch, ah                      ; Copy error code to CH
    134 ALIGN JUMP_ALIGN
    135132.CombineErrors:
    136133    or      cl, ch                      ; OR error codes, clear CF
    137     jnz     SHORT .ReturnError
    138     ret
    139 .ReturnError:
     134    jz      SHORT .Return
    140135    mov     ah, RET_HD_RESETFAIL        ; Load Reset Failed error code
    141136    stc
     137.Return:
    142138    ret
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HIRQ.asm

    r86 r116  
    1 ; Project name  :   IDE BIOS
     1; Project name  :   XTIDE Universal BIOS
    22; Description   :   Interrupt handling related functions.
    33
     
    3535    push    ds
    3636
    37     LOAD_BDA_SEGMENT_TO ds, ax          ; Zero AX
     37    LOAD_BDA_SEGMENT_TO ds, ax, !       ; Zero AX
    3838    cli                                 ; Disable interrupts
    3939    cmp     al, [BDA.bHDTaskFlg]        ; Task flag already set?
     
    6868HIRQ_ClearTaskFlag:
    6969    push    ds
    70     LOAD_BDA_SEGMENT_TO ds, ax      ; Also zero AX
     70    LOAD_BDA_SEGMENT_TO ds, ax, !       ; Also zero AX
    7171    mov     [BDA.bHDTaskFlg], al
    7272    pop     ds
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HPIO.asm

    r86 r116  
    1 ; Project name  :   IDE BIOS
     1; Project name  :   XTIDE Universal BIOS
    22; Description   :   PIO transfer functions.
    33
     
    1515
    1616;--------------------------------------------------------------------
    17 ; Normalizes far pointer to that offset overflows won't happen
    18 ; when transferring data using PIO.
    19 ;
    20 ; HPIO_NORMALIZE_PTR
    21 ;   Parameters:
    22 ;       %1:%2:      Far pointer to normalize
    23 ;       %3:         Scratch register
    24 ;       %4:         Scratch register
    25 ;   Returns:
    26 ;       %1:%2:      Normalized far pointer
    27 ;   Corrupts registers:
    28 ;       %3, %4
    29 ;--------------------------------------------------------------------
    30 %macro HPIO_NORMALIZE_PTR 4
    31     mov     %4, %2              ; Copy offset to scratch reg
    32     and     %2, BYTE 0Fh        ; Clear offset bits 15...4
    33     eSHR_IM %4, 4               ; Divide offset by 16
    34     mov     %3, %1              ; Copy segment to scratch reg
    35     add     %3, %4              ; Add shifted offset to segment
    36     mov     %1, %3              ; Set normalized segment
    37 %endmacro
    38 
    39 
    40 ;--------------------------------------------------------------------
    4117; Reads sectors from hard disk using PIO transfer mode.
    4218;
     
    11086    mov     [bp+PIOVARS.fnXfer], bx             ; Store offset to transfer function
    11187    xchg    bx, ax
    112     ; Fall to HPIO_NormalizePtr
    113 
    114 ;--------------------------------------------------------------------
    115 ; Initializes PIOVARS members.
    116 ;
    117 ; HPIO_InitializePIOVARS
     88    ; Fall to HPIO_NormalizeDataPointer
     89
     90;--------------------------------------------------------------------
     91; Normalizes far pointers so that offset overflows won't happen
     92; when transferring data using PIO.
     93;
     94; HPIO_NormalizeDataPointer
    11895;   Parameters:
    11996;       ES:BX:  Ptr to source or destination data buffer
     
    125102;ALIGN JUMP_ALIGN
    126103HPIO_NormalizeDataPointer:
    127     HPIO_NORMALIZE_PTR  es, bx, ax, cx
     104    NORMALIZE_FAR_POINTER es, bx, ax, cx
    128105    ret
    129106
  • trunk/XTIDE_Universal_BIOS/Src/Main.asm

    r112 r116  
    1515; Included .inc files
    1616%include "AssemblyLibrary.inc"  ; Assembly Library. Must be included first!
    17 %include "BiosData.inc"         ; For BIOS Data area equates
    1817%include "Interrupts.inc"       ; For interrupt equates
    1918%include "ATA_ID.inc"           ; For ATA Drive Information structs
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm

    r99 r116  
    3434    jz      SHORT .InitializeRamvars    ; No need to steal RAM
    3535
    36     LOAD_BDA_SEGMENT_TO ds, ax          ; Zero AX
     36    LOAD_BDA_SEGMENT_TO ds, ax, !       ; Zero AX
    3737    mov     al, [cs:ROMVARS.bStealSize]
    3838    sub     [BDA.wBaseMem], ax
     
    197197;   Corrupts registers:
    198198;       Nothing
    199 ;--------------------------------------------------------------------   
     199;--------------------------------------------------------------------
    200200ALIGN JUMP_ALIGN
    201201RamVars_GetHardDiskCountFromBDAtoCX:
     
    203203    push    dx
    204204
    205     LOAD_BDA_SEGMENT_TO es, cx          ; Zero CX
     205    LOAD_BDA_SEGMENT_TO es, cx, !       ; Zero CX
    206206    call    RamVars_GetCountOfKnownDrivesToDL
    207207    MAX_U   dl, [es:BDA.bHDCount]
     
    220220;   Corrupts registers:
    221221;       Nothing
    222 ;--------------------------------------------------------------------   
     222;--------------------------------------------------------------------
    223223ALIGN JUMP_ALIGN
    224224RamVars_GetCountOfKnownDrivesToDL:
     
    237237;   Corrupts registers:
    238238;       Nothing
    239 ;--------------------------------------------------------------------   
     239;--------------------------------------------------------------------
    240240RamVars_GetIdeControllerCountToCX:
    241241    eMOVZX  cx, BYTE [cs:ROMVARS.bIdeCnt]
Note: See TracChangeset for help on using the changeset viewer.