Ignore:
Timestamp:
Mar 19, 2011, 8:09:41 PM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • INT 13h optimizations to save almost 100 bytes.
File:
1 edited

Legend:

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

    r117 r148  
    1010; AH15h_HandlerForReadDiskDriveSize
    1111;   Parameters:
    12 ;       AH:     Bios function 15h
    13 ;       DL:     Drive number
    14 ;   Parameters loaded by Int13h_Jump:
    15 ;       DS:     RAMVARS segment
    16 ;   Returns:
     12;       DL:     Translated Drive number
     13;       DS:DI:  Ptr to DPT (in RAMVARS segment)
     14;       SS:BP:  Ptr to INTPACK
     15;   Returns with INTPACK in SS:BP:
    1716;       If succesfull:
    1817;           AH:     3 (Hard disk accessible)
     
    2322;           CX:DX:  0
    2423;           CF:     1
    25 ;       IF:     1
    26 ;   Corrupts registers:
    27 ;       Flags
    2824;--------------------------------------------------------------------
    2925ALIGN JUMP_ALIGN
    3026AH15h_HandlerForReadDiskDriveSize:
    31     push    bx
    32     push    ax
     27    call    HCapacity_GetSectorCountFromOurAH08h        ; Sector count to DX:AX
     28    mov     [bp+INTPACK.cx], dx                         ; HIWORD to CX
     29    mov     [bp+INTPACK.dx], ax                         ; LOWORD to DX
    3330
    34     call    HCapacity_GetSectorCountFromOurAH08h; Sector count to DX:AX (clears CF)
    35     mov     cx, dx                              ; HIWORD to CX
    36     xchg    dx, ax                              ; LOWORD to DX
    37 
    38     pop     ax
    39     pop     bx
    40     mov     ah, 3                               ; Type code = Hard disk
    41     jmp     Int13h_ReturnWithValueInDL
     31    xor     ah, ah
     32    call    HError_SetErrorCodeToIntpackInSSBPfromAH    ; Store success to BDA and CF
     33    mov     BYTE [bp+INTPACK.ah], 3                     ; Type code = Hard disk
     34    jmp     Int13h_ReturnFromHandlerWithoutStoringErrorCode
Note: See TracChangeset for help on using the changeset viewer.