Changeset 133 in xtideuniversalbios for trunk/Assembly_Library/Src/File


Ignore:
Timestamp:
Mar 12, 2011, 1:48:48 PM (14 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Size optimizations in various files in the Assembly Library. Also a very small change to a string in XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm

Location:
trunk/Assembly_Library/Src/File
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/File/Drive.asm

    r41 r133  
    1 ; File name     :   Drive.asm
    21; Project name  :   Assembly Library
    3 ; Created date  :   1.9.2010
    4 ; Last update   :   3.9.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   Functions for accessing drives.
    73
     
    5248    xor     bx, bx
    5349    xor     ax, ax              ; Temporary use BX:AX for flags
    54     xor     dx, dx              ; Start from drive 0
     50    cwd                         ; Start from drive 0
    5551    call    .CheckDriveValidityUntilCXisZero
    5652    mov     dx, bx              ; Flags now in DX:AX
     
    163159Drive_GetDefaultToAL:
    164160    mov     ah, GET_CURRENT_DEFAULT_DRIVE
    165     int     DOS_INTERRUPT_21h
    166     ret
     161    SKIP2B  f   ; cmp ax, <next instruction>
     162    ; Fall to Drive_SetDefaultFromDL
    167163
    168164
     
    176172;       AH
    177173;--------------------------------------------------------------------
    178 ALIGN JUMP_ALIGN
    179174Drive_SetDefaultFromDL:
    180175    mov     ah, SELECT_DEFAULT_DRIVE
    181176    int     DOS_INTERRUPT_21h
    182177    ret
    183    
  • trunk/Assembly_Library/Src/File/FileIO.asm

    r105 r133  
    2525    xchg    si, dx
    2626    mov     bx, ax      ; Copy file handle to BX
    27     ret
    28 
    29 
    30 ;--------------------------------------------------------------------
    31 ; FileIO_CloseUsingHandleFromBX
    32 ;   Parameters:
    33 ;       BX:     File handle
    34 ;   Returns:
    35 ;       AX:     DOS error code if CF set
    36 ;       CF:     Clear if file closed successfully
    37 ;               Set if error
    38 ;   Corrupts registers:
    39 ;       AX
    40 ;--------------------------------------------------------------------
    41 ALIGN JUMP_ALIGN
    42 FileIO_CloseUsingHandleFromBX:
    43     mov     ah, CLOSE_FILE
    44     int     DOS_INTERRUPT_21h
    4527    ret
    4628
     
    7052; File position is updated so next read will start where
    7153; previous read stopped.
    72 ; 
     54;
    7355; FileIO_ReadCXbytesToDSSIusingHandleFromBX
    7456;   Parameters:
     
    11799; File position is updated so next write will start where
    118100; previous write stopped.
    119 ; 
     101;
    120102; FileIO_WriteCXbytesFromDSSIusingHandleFromBX:
    121103;   Parameters:
     
    249231
    250232;--------------------------------------------------------------------
     233; FileIO_CloseUsingHandleFromBX
     234;   Parameters:
     235;       BX:     File handle
     236;   Returns:
     237;       AX:     DOS error code if CF set
     238;       CF:     Clear if file closed successfully
     239;               Set if error
     240;   Corrupts registers:
     241;       AX
     242;--------------------------------------------------------------------
     243ALIGN JUMP_ALIGN
     244FileIO_CloseUsingHandleFromBX:
     245    mov     ah, CLOSE_FILE
     246    SKIP2B  f   ; cmp ax, <next instruction>
     247    ; Fall to FileIO_SeekFromOriginInALtoOffsetInDXAXusingHandleFromBX
     248
     249
     250;--------------------------------------------------------------------
    251251; FileIO_SeekFromOriginInALtoOffsetInDXAXusingHandleFromBX:
    252252;   Parameters:
     
    262262;       Nothing
    263263;--------------------------------------------------------------------
    264 ALIGN JUMP_ALIGN
    265264FileIO_SeekFromOriginInALtoOffsetInDXAXusingHandleFromBX:
    266265    mov     ah, SET_CURRENT_FILE_POSITION
Note: See TracChangeset for help on using the changeset viewer.