Changeset 116 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common


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/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.