Changeset 162 in xtideuniversalbios for trunk


Ignore:
Timestamp:
May 28, 2011, 7:34:42 PM (13 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes to all parts of the project:

  • Size optimizations, mostly by excluding code from the BIOS.
  • Cleaned the source a bit, fixed spelling and grammar mistakes.
Location:
trunk
Files:
19 edited

Legend:

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

    r146 r162  
    376376        db  01100101b
    377377    %else
    378         %error "Invalid segment overried passed to eSEG!"
     378        %error "Invalid segment override passed to eSEG!"
    379379    %endif
    380380%endmacro
  • trunk/Assembly_Library/Src/AssemblyLibrary.asm

    r139 r162  
    6060    %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    6161        %include "String.asm"
     62        %include "StringProcess.asm"
    6263    %endif
    63     %include "StringProcess.asm"
    6464%endif
    6565
  • trunk/Assembly_Library/Src/Display/CgaSnow.asm

    r101 r162  
    3131
    3232
    33 ; CGA snow preventing must be kept optional so unnecerrasy overhead
    34 ; can be prevented when building program ment for non-CGA systems.
     33; CGA snow prevention must be kept optional to avoid unnecessary
     34; overhead when building programs meant for non-CGA systems.
    3535%ifdef ELIMINATE_CGA_SNOW
    3636
     
    7474.StoswWithoutWaitSinceUnknownPort:
    7575    stosw
     76    sti
    7677    pop     bx
    77     sti
    7878    ret
    7979
  • trunk/Assembly_Library/Src/Display/DisplayContext.asm

    r133 r162  
    268268;       Nothing
    269269;--------------------------------------------------------------------
    270 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS   ; This appears to be completely unused
    271 ALIGN JUMP_ALIGN
    272 DisplayContext_GetCharacterOutputParameterToDX:
    273     mov     dx, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam]
    274     ret
    275 %endif
     270;%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS  ; This appears to be completely unused
     271;ALIGN JUMP_ALIGN
     272;DisplayContext_GetCharacterOutputParameterToDX:
     273;   mov     dx, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam]
     274;   ret
     275;%endif
    276276
    277277
  • trunk/Assembly_Library/Src/Display/DisplayPrint.asm

    r134 r162  
    2525;   For example %8-d would prepend integer with spaces so that at least
    2626;   8 characters would be printed.
    27 ; 
     27;
    2828; DisplayPrint_FormattedNullTerminatedStringFromCSSI
    2929;   Parameters:
     
    158158    loop    .PrintNextCharacter
    159159
    160     LOAD_BDA_SEGMENT_TO ds, dx
     160    mov     ds, cx  ; Restore DS to BDA. Not needed unless DisplayPrint_CharacterFromAL changes DS.
    161161    pop     cx
    162162    pop     si
  • trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm

    r60 r162  
    1 ; File name     :   Dialog.asm
    21; Project name  :   Assembly Library
    3 ; Created date  :   6.8.2010
    4 ; Last update   :   22.11.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   Common functions for many dialogs.
    73
     
    235231    call    MenuLocation_GetTitleBordersTopLeftCoordinatesToAX
    236232    cmp     ah, dh      ; Dialog taller than parent?
    237     jb      SHORT .RedrawDialogAreaAndWholeParentWindow
    238     jmp     SHORT .RedrawWholeParentWindow
    239 
    240 ;--------------------------------------------------------------------
    241 ; .GetParentTitleBorderCoordinatesToDX
    242 ;   Parameters:
    243 ;       SS:SI:  Ptr to parent MENU
    244 ;       SS:BP:  Ptr to DIALOG
    245 ;   Returns:
    246 ;       DL:     Parent border column (X)
    247 ;       DH:     Parent border row (Y)
    248 ;   Corrupts:
    249 ;       AX
    250 ;--------------------------------------------------------------------
    251 ALIGN JUMP_ALIGN
    252 .GetParentTitleBorderCoordinatesToDX:
    253     xchg    si, bp
    254     call    MenuLocation_GetTitleBordersTopLeftCoordinatesToAX
    255     xchg    bp, si
    256     xchg    dx, ax
    257     ret
     233    jnb     SHORT .RedrawWholeParentWindow
     234    ; Fall to .RedrawDialogAreaAndWholeParentWindow
    258235
    259236;--------------------------------------------------------------------
     
    268245;       AX, BX, CX, DX, SI, DI
    269246;--------------------------------------------------------------------
    270 ALIGN JUMP_ALIGN
    271247.RedrawDialogAreaAndWholeParentWindow:
    272248    push    si
     
    286262    pop     bp
    287263    ret
     264
     265;--------------------------------------------------------------------
     266; .GetParentTitleBorderCoordinatesToDX
     267;   Parameters:
     268;       SS:SI:  Ptr to parent MENU
     269;       SS:BP:  Ptr to DIALOG
     270;   Returns:
     271;       DL:     Parent border column (X)
     272;       DH:     Parent border row (Y)
     273;   Corrupts:
     274;       AX
     275;--------------------------------------------------------------------
     276ALIGN JUMP_ALIGN
     277.GetParentTitleBorderCoordinatesToDX:
     278    xchg    si, bp
     279    call    MenuLocation_GetTitleBordersTopLeftCoordinatesToAX
     280    xchg    bp, si
     281    xchg    dx, ax
     282    ret
  • trunk/Assembly_Library/Src/String/Char.asm

    r145 r162  
    1 ; File name     :   Char.asm
    21; Project name  :   Assembly Library
    3 ; Created date  :   28.6.2010
    4 ; Last update   :   7.9.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   Functions for handling characters.
    73
     
    1814;   Returns:
    1915;       CF:     Set if character is range
    20 ;               (Jumps to CharIsNotValid if before range)
     16;               (Jumps to Char_CharIsNotValid if before range)
    2117;   Corrupts registers:
    2218;       Nothing
     
    2420%macro IS_BETWEEN_IMMEDIATES 3
    2521    cmp     %1, %2
    26     jb      SHORT CharIsNotValid
     22    jb      SHORT Char_CharIsNotValid
    2723    cmp     %1, (%3)+1              ; Set CF if %1 is lesser
    2824%endmacro
     
    5450;       Nothing
    5551;--------------------------------------------------------------------
     52%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    5653ALIGN JUMP_ALIGN
    5754Char_IsUpperCaseLetterInAL:
    5855    IS_BETWEEN_IMMEDIATES al, 'A', 'Z'
    5956    ret
     57%endif
    6058
    6159;--------------------------------------------------------------------
     
    7068;       Nothing
    7169;--------------------------------------------------------------------
     70%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    7271ALIGN JUMP_ALIGN
    7372Char_IsHexadecimalDigitInAL:
     
    7776    IS_BETWEEN_IMMEDIATES al, 'a', 'f'
    7877    ret
     78%endif
    7979
    8080;--------------------------------------------------------------------
     
    106106;       Nothing
    107107;--------------------------------------------------------------------
     108%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    108109ALIGN JUMP_ALIGN
    109110Char_ConvertIntegerToALfromDigitInALwithBaseInBX:
     
    112113    call    dx                      ; Converts to lower case
    113114    pop     dx
    114     jnc     SHORT CharIsNotValid
     115    jnc     SHORT Char_CharIsNotValid
    115116
    116117    cmp     al, '9'                 ; Decimal digit
     
    120121.ConvertToDecimalDigit:
    121122    sub     al, '0'                 ; Convert to decimal integer
    122     ; Fall to CharIsValid
    123 
    124 ;--------------------------------------------------------------------
    125 ; CharIsValid
    126 ; CharIsNotValid
    127 ;   Parameters:
    128 ;       Nothing
    129 ;   Returns:
    130 ;       CF:     Set for CharIsValid
    131 ;               Cleared for CharIsNotValid
    132 ;   Corrupts registers:
    133 ;       Nothing
    134 ;--------------------------------------------------------------------
     123    ; Fall to Char_CharIsValid
     124%endif
     125
     126;--------------------------------------------------------------------
     127; Char_CharIsValid
     128; Char_CharIsNotValid
     129;   Parameters:
     130;       Nothing
     131;   Returns:
     132;       CF:     Set for Char_CharIsValid
     133;               Cleared for Char_CharIsNotValid
     134;   Corrupts registers:
     135;       Nothing
     136;--------------------------------------------------------------------
     137%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    135138ALIGN JUMP_ALIGN
    136139Char_CharIsValid:
    137140    stc
    138141    ret
    139 
    140 ALIGN JUMP_ALIGN
    141 CharIsNotValid:
     142%endif
     143
     144ALIGN JUMP_ALIGN
     145Char_CharIsNotValid:
    142146    clc
    143147    ret
     
    153157;       Nothing
    154158;--------------------------------------------------------------------
     159%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    155160ALIGN JUMP_ALIGN
    156161Char_ALtoLowerCaseLetter:
     
    160165.Return:
    161166    ret
     167%endif
    162168
    163169;--------------------------------------------------------------------
     
    188194;       Nothing
    189195;--------------------------------------------------------------------
     196%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    190197ALIGN JUMP_ALIGN
    191198Char_GetFilterFunctionToDXforNumericBaseInBX:
     
    193200    cmp     bl, 10
    194201    je      SHORT .Return
    195     sub     dx, BYTE Char_IsDecimalDigitInAL - Char_IsHexadecimalDigitInAL
     202    mov     dx, Char_IsHexadecimalDigitInAL
    196203.Return:
    197204    ret
     205%endif
  • trunk/Assembly_Library/Src/String/StringProcess.asm

    r67 r162  
    1 ; File name     :   StringProcess.asm
    21; Project name  :   Assembly Library
    3 ; Created date  :   12.10.2010
    4 ; Last update   :   7.12.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   Functions for processing characters in a string.
    73
     
    3329;       CX:     Number of characters processed
    3430;       CF:     Clear if all characters processed
    35 ;               Set if terminated by processing function               
     31;               Set if terminated by processing function
    3632;   Corrupts registers:
    3733;       Nothing (processing function can corrupt BX,DI,ES)
     
    9187StringProcess_ConvertToWordInDIWithBaseInBX:
    9288    call    Char_ConvertIntegerToALfromDigitInALwithBaseInBX
    93     jnc     SHORT .InvalidCharacter
     89    cmc
     90    jc      SHORT .InvalidCharacter
    9491    push    dx
    9592
     
    9996    jc      SHORT .Overflow
    10097    add     di, ax      ; Add old WORD to new integer
    101     jc      SHORT .Overflow
    10298
    103     pop     dx
    104     ret
    10599.Overflow:
    106100    pop     dx
    107101.InvalidCharacter:
    108     stc                 ; Set CF to stop processing
    109102    ret
  • trunk/Configurator/Inc/emulate.inc

    r2 r162  
    329329        db  01100101b
    330330    %else
    331         %error "Invalid segment overried passed to eSEG!"
     331        %error "Invalid segment override passed to eSEG!"
    332332    %endif
    333333%endmacro
  • trunk/Configurator/Src/Libraries/file.asm

    r2 r162  
    1 ; File name     :   file.asm
    21; Project name  :   File library
    3 ; Created date  :   19.11.2009
    4 ; Last update   :   24.11.2009
    5 ; Author        :   Tomi Tilli
    6 ; Description   :   ASM library for DOS file handling. 
     2; Description   :   ASM library for DOS file handling.
    73
    84;--------------- Equates -----------------------------
     
    6965; Returns pointer to error string.
    7066; Pointer is always valid, even if error code is not.
    71 ; 
     67;
    7268; File_GetErrStr
    7369;   Parameters:
     
    111107; Opens file for reading and writing.
    112108; File must be closed with File_Close when no longer needed.
    113 ; 
     109;
    114110; File_Open
    115111;   Parameters:
     
    137133;--------------------------------------------------------------------
    138134; Closes file.
    139 ; 
     135;
    140136; File_Close
    141137;   Parameters:
     
    159155; File position is updated so next read will start where
    160156; previous read stopped.
    161 ; 
     157;
    162158; File_Read
    163159;   Parameters:
     
    191187; File position is updated so next write will start where
    192188; previous write stopped.
    193 ; 
     189;
    194190; File_Write
    195191;   Parameters:
     
    221217;--------------------------------------------------------------------
    222218; Sets current file position to wanted offset.
    223 ; 
     219;
    224220; File_SetFilePos
    225221;   Parameters:
     
    244240;--------------------------------------------------------------------
    245241; Changes current default drive.
    246 ; 
     242;
    247243; File_SetDrive
    248244;   Parameters:
     
    263259; Returns current default drive and number of
    264260; potentially drive letters available.
    265 ; 
     261;
    266262; File_GetDrive
    267263;   Parameters:
     
    286282
    287283;--------------------------------------------------------------------
    288 ; Checks are the potentially valid drive letters returned by 
     284; Checks are the potentially valid drive letters returned by
    289285; File_SetDrive and File_GetDrive actually valid or not.
    290 ; 
     286;
    291287; File_IsDrive
    292288;   Parameters:
     
    315311;--------------------------------------------------------------------
    316312; Returns number of valid drive letters.
    317 ; 
     313;
    318314; File_GetValidDrvCnt
    319315;   Parameters:
     
    337333    inc     dx                  ; Increment drive number
    338334    loop    .LetterLoop         ; Loop while drive letters left
    339     eMOVZX  cx, dh              ; Valid drv count to CX
     335    mov     cl, dh              ; Valid drv count to CX
    340336    ret
    341337
     
    344340; Return device number for Nth valid drive.
    345341; This function does not check if index in CX is valid.
    346 ; 
     342;
    347343; File_GetNthValidDrv
    348344;   Parameters:
     
    353349;   Corrupts registers:
    354350;       CX
    355 ;--------------------------------------------------------------------   
     351;--------------------------------------------------------------------
    356352ALIGN JUMP_ALIGN
    357353File_GetNthValidDrv:
     
    371367;--------------------------------------------------------------------
    372368; Changes current directory.
    373 ; 
     369;
    374370; File_ChangeDir
    375371;   Parameters:
     
    391387;--------------------------------------------------------------------
    392388; Finds files from wanted path using search wildcard characters.
    393 ; 
     389;
    394390; File_FindAndCount
    395391;   Parameters:
     
    419415; Finds files from wanted path using search wildcard characters.
    420416; Ptr to DTA is returned for wanted file.
    421 ; 
     417;
    422418; File_GetDTA
    423419;   Parameters:
     
    457453;--------------------------------------------------------------------
    458454; Find first file or directory.
    459 ; 
     455;
    460456; File_FindFirst
    461457;   Parameters:
     
    482478; Find next file or directory. File_FindFirst must always be called
    483479; before calling File_FindNext.
    484 ; 
     480;
    485481; File_FindNext
    486482;   Parameters:
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm

    r161 r162  
    204204;       AX, BX, SI, DI
    205205;--------------------------------------------------------------------
    206 ALIGN JUMP_ALIGN
    207206.PrintKnownFloppyType:
    208207    mov     si, g_szFddSize
     
    269268;       AX, BX, CX, DX, SI, DI, ES
    270269;--------------------------------------------------------------------
    271 ALIGN JUMP_ALIGN
    272270.HardDiskMenuitemInfoForOurDrive:
    273271    push    di
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH11h_HRecal.asm

    r150 r162  
    2424%else
    2525    push    Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
    26     ; Fall through to AH11h_RecalibrateDrive
     26    ; Fall to AH11h_RecalibrateDrive
    2727%endif
    2828
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm

    r150 r162  
    3535%else
    3636    push    Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
    37     ; Fall through to AH23h_SetControllerFeatures
     37    ; Fall to AH23h_SetControllerFeatures
    3838%endif
    3939
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm

    r158 r162  
    3535%else
    3636    push    Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
    37     ; Fall through to AH24h_SetBlockSize
     37    ; Fall to AH24h_SetBlockSize
    3838%endif
    3939
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm

    r158 r162  
    2424%else
    2525    push    Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
    26     ; Fall through to AH9h_InitializeDriveForUse
     26    ; Fall to AH9h_InitializeDriveForUse
    2727%endif
    2828
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHCh_HSeek.asm

    r150 r162  
    3030%else
    3131    push    Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
    32     ; Fall through to AHCh_SeekToCylinder
     32    ; Fall to AHCh_SeekToCylinder
    3333%endif
    3434
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm

    r150 r162  
    2424%else
    2525    push    Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
    26     ; Fall through to AHDh_ResetDrive
     26    ; Fall to AHDh_ResetDrive
    2727%endif
    2828
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm

    r152 r162  
    9797    cmp     bl, 8
    9898    jb      SHORT .InstallLowIrqHandler
    99     ; Fall through to .InstallHighIrqHandler
     99    ; Fall to .InstallHighIrqHandler
    100100
    101101;--------------------------------------------------------------------
     
    164164    cmp     al, 8
    165165    jb      SHORT .UnmaskLowIrqController
    166     ; Fall through to .UnmaskHighIrqController
     166    ; Fall to .UnmaskHighIrqController
    167167
    168168;--------------------------------------------------------------------
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm

    r160 r162  
    203203;   Returns:
    204204;       DL:     Drive number for new drive
    205 ;       CF:     Cleared if DPT parameters stored successfully
    206 ;               Set if any error
     205;       CF:     Always cleared
    207206;   Corrupts registers:
    208207;       Nothing
     
    218217    ja      SHORT .AllDone              ;  If so, return
    219218    mov     [RAMVARS.bFirstDrv], dl     ; Store first drive number
     219    clc
    220220.AllDone:
    221     clc
    222221    ret
Note: See TracChangeset for help on using the changeset viewer.