Changeset 86 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers


Ignore:
Timestamp:
Jan 25, 2011, 9:13:56 PM (13 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Size optimizations in various files in the XTIDE BIOS.
Also added a new include file for generic macros (macros.inc).

Location:
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HError.asm

    r35 r86  
    1 ; File name     :   HError.asm
    21; Project name  :   IDE BIOS
    3 ; Created date  :   30.11.2007
    4 ; Last update   :   24.8.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   Error checking functions for BIOS Hard disk functions.
    73
     
    3430ALIGN JUMP_ALIGN
    3531HError_ProcessErrorsAfterPollingBSY:
     32%ifndef USE_186
    3633    call    HError_GetStatusAndErrorRegistersToAXandStoreThemToBDA
    3734    jmp     SHORT GetBiosErrorCodeToAHfromStatusAndErrorRegistersInAX
     35%else
     36    push    GetBiosErrorCodeToAHfromStatusAndErrorRegistersInAX
     37    ; Fall through to HError_GetStatusAndErrorRegistersToAXandStoreThemToBDA
     38%endif
    3839
    3940
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HIRQ.asm

    r35 r86  
    1 ; File name     :   HIRQ.asm
    21; Project name  :   IDE BIOS
    3 ; Created date  :   11.12.2009
    4 ; Last update   :   24.8.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   Interrupt handling related functions.
    73
     
    4137    LOAD_BDA_SEGMENT_TO ds, ax          ; Zero AX
    4238    cli                                 ; Disable interrupts
    43     cmp     al, [ds:BDA.bHDTaskFlg]     ; Task flag already set?
     39    cmp     al, [BDA.bHDTaskFlg]        ; Task flag already set?
    4440    jc      SHORT .ReturnFromWaitNotify ;  If so, skip OS notification
    4541
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HPIO.asm

    r28 r86  
    1 ; File name     :   HPIO.asm
    21; Project name  :   IDE BIOS
    3 ; Created date  :   14.12.2007
    4 ; Last update   :   1.8.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   PIO transfer functions.
    73
    84; Structure containing variables for PIO transfer functions
    9 struc PIOVARS
     5struc PIOVARS, -6
    106    .fnXfer         resb    2   ; Offset to transfer function
    117    .wBlockSize     resb    2   ; Block size in WORDs
     
    6359    ; Create PIOVARS to stack
    6460    eENTER  PIOVARS_size, 0
    65     sub     bp, BYTE PIOVARS_size           ; SS:BP now points to PIOVARS
     61
    6662    push    si
    6763    mov     si, g_rgfnPioRead               ; Offset to read function lookup
     
    7571
    7672    ; Destroy stack frame
    77     rcl     al, 1                           ; CF to AL bit 0
    78     add     bp, BYTE PIOVARS_size
    7973    eLEAVE
    80     rcr     al, 1                           ; Restore CF
    8174    mov     di, bx                          ; Restore DI
    8275    pop     es
     
    158151.BlockLoop:
    159152    call    HStatus_WaitIrqOrDrq        ; Wait until ready to transfer
    160     jc      SHORT .RetError             ; Return if error (code in AH)
     153    jc      SHORT HPIO_WriteToDrive.RetError    ; Return if error (code in AH)
    161154    mov     cx, [bp+PIOVARS.wBlockSize] ; Load block size
    162155    sub     [bp+PIOVARS.wWordsLeft], cx ; Transferring last (possibly partial) block?
     
    169162    call    [bp+PIOVARS.fnXfer]         ; Transfer possibly partial block
    170163    jmp     HStatus_WaitBsyDefTime      ; Check for errors
    171 .RetError:
    172     ret
    173164
    174165
     
    195186    ; Create PIOVARS to stack
    196187    eENTER  PIOVARS_size, 0
    197     sub     bp, BYTE PIOVARS_size           ; SS:BP now points to PIOVARS
     188
    198189    mov     si, g_rgfnPioWrite              ; Offset to write function lookup
    199190    call    HPIO_InitializePIOVARS          ; Store word count and block size
     
    205196
    206197    ; Destroy stack frame
    207     rcl     al, 1                           ; CF to AL bit 0
    208     add     bp, BYTE PIOVARS_size
    209198    eLEAVE
    210     rcr     al, 1                           ; Restore CF
     199
    211200    pop     si
    212201    pop     es
    213202    ret
     203
    214204
    215205;--------------------------------------------------------------------
     
    243233    jnc     SHORT .BlockLoop                ; If no error, loop while blocks left
    244234.RetError:
    245     ret
     235    ret                                     ; This ret is shared with HPIO_ReadFromDrive
    246236ALIGN JUMP_ALIGN
    247237.XferLastBlock:
Note: See TracChangeset for help on using the changeset viewer.