Changeset 592 in xtideuniversalbios for trunk/Assembly_Library/Src


Ignore:
Timestamp:
Jun 25, 2018, 10:29:27 PM (6 years ago)
Author:
Krister Nordvall
Message:

Changes:

  • The problem with NASM in the previous revision (r591) has been fixed.
  • The colors used by the boot menu and hotkey bar can now be customized by selecting one of a number of pre-defined color themes. Suggestions for additional themes are more than welcome!
  • Large builds are now 10 KB. Small builds are still 8 KB with the exception of the Tiny build which is now 4 KB. In other words, builds are now as small as possible to make it easier to combine them with other BIOSes.
  • Added code to the library to improve drive error handling. XTIDECFG can now handle "Drive Not Ready" errors.
  • Fixed a couple of potential bugs in AtaID.asm (AtaID_GetMaxPioModeToAXandMinCycleTimeToCX); 1) ATA1.bPioMode was treated as a WORD variable. 2) ATA2.bPIOSupp was assumed to be non-zero which would result in PIO mode 3 being returned if the assumption was wrong.
  • Made the same changes in the equivalent function used by BIOSDRVS (DisplayPioModeInformationUsingAtaInfoFromDSBX in AtaInfo.asm).
  • Fixed a bug from r587 in PDC20x30.asm in PDC20x30_GetMaxPioModeToALandMinPioCycleTimeToBX.
  • Fixed a bug from r523 in XTIDECFG where Auto Configure would only set the IRQ on one IDE interface on AT-builds.
  • XTIDECFG will now restore the default settings for the "Serial port virtual device" when reselecting it in the list of device types. This makes it behave consistently for all device types.
  • The eAAM macro is now used regardless if USE_UNDOC_INTEL is defined or not because it is apparently supported on all processors including the NEC V20/V30 CPUs.
  • Renamed the EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS define to EXCLUDE_FROM_XUB.
  • Added a define to exclude unused library code from BIOSDRVS (EXCLUDE_FROM_BIOSDRVS). This makes it a lot smaller than in previous revisions.
  • All unnecessary CLD-instructions are now under a new define 'CLD_NEEDED' which is only enabled for the BIOS. It is disabled for XTIDECFG and BIOSDRVS but can be enabled if needed by adding this define to the respective makefile. This change was made because these unnecessary instructions are wasteful and should never be needed. In fact, they only serve to hide bugs (in other peoples code) which I strongly believe should be avoided. I recommend people making their own BIOSes from source to not use this define as it's extremely unlikely to be needed.
  • Updated the copyright info in SerDrive and changed an URL to point to the new site.
  • Updated the copyright info and version number in BIOSDRVS.
  • Updated the copyright info in XTIDECFG.
  • Optimizations in general.
Location:
trunk/Assembly_Library/Src
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/AssemblyLibrary.asm

    r526 r592  
    9090  %endif
    9191    %include "Char.asm"
    92     %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     92    %ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    9393        %include "String.asm"
    9494        %include "StringProcess.asm"
     
    106106
    107107%ifdef INCLUDE_TIME_LIBRARY
    108     %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     108    %ifndef EXCLUDE_FROM_XUB
    109109        %include "Delay.asm"
    110110        %ifndef EXCLUDE_FROM_XTIDECFG
     
    119119    %define UTIL_SIZE_JUMP_ALIGN 1
    120120  %endif
    121     %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    122         %include "Bit.asm"
     121    %ifndef EXCLUDE_FROM_XUB
     122        %ifndef EXCLUDE_FROM_BIOSDRVS
     123            %include "Bit.asm"
     124        %endif
     125        %include "Math.asm"
    123126    %endif
    124     %include "Math.asm"
    125     %include "Registers.asm"
    126     %include "Reboot.asm"
    127     %include "Memory.asm"
     127    %ifndef EXCLUDE_FROM_BIOSDRVS
     128        %include "Registers.asm"
     129        %include "Reboot.asm"
     130        %include "Memory.asm"
     131    %endif
    128132    %include "Size.asm"
    129     %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     133    %ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    130134        %include "Sort.asm"
    131135    %endif
  • trunk/Assembly_Library/Src/Display/CgaSnow.asm

    r583 r592  
    106106;       AX, CX, DX
    107107;--------------------------------------------------------------------
    108 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     108%ifdef EXCLUDE_FROM_XUB
    109109    %ifdef MODULE_STRINGS_COMPRESSED
    110110        %define EXCLUDE
  • trunk/Assembly_Library/Src/Display/Display.asm

    r590 r592  
    3838    push    dx
    3939
     40%ifdef CLD_NEEDED
    4041    cld
     42%endif
    4143    LOAD_BDA_SEGMENT_TO ds, dx
    4244    mov     dx, di
     
    7678    %define InitializeDisplayContext                        DisplayContext_Initialize
    7779
    78 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     80%ifndef EXCLUDE_FROM_XUB
    7981    %define SetCharacterPointerFromBXAX                     DisplayContext_SetCharacterPointerFromBXAX
    8082%endif
     
    8991    %define SynchronizeDisplayContextToHardware             DisplayContext_SynchronizeToHardware
    9092
    91 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     93%ifndef EXCLUDE_FROM_XUB
    9294    %define GetCharacterPointerToBXAX                       DisplayContext_GetCharacterPointerToBXAX
    9395%endif
     
    9698
    9799    %define FormatNullTerminatedStringFromCSSI              Display_FormatNullTerminatedStringFromCSSI
    98 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     100%ifndef EXCLUDE_FROM_XUB
    99101    %define PrintSignedWordFromAXWithBaseInBL               DisplayPrint_SignedWordFromAXWithBaseInBL
    100102%endif
    101103    %define PrintWordFromAXWithBaseInBL                     DisplayPrint_WordFromAXWithBaseInBL
    102 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
     104%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    103105    %define PrintQWordFromSSBPwithBaseInBX                  DisplayPrint_QWordFromSSBPwithBaseInBX
    104106%endif
     
    109111    %define PrintCharacterFromAL                            DisplayPrint_CharacterFromAL
    110112    %define PrintNewlineCharacters                          DisplayPrint_Newline
    111 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     113%ifndef EXCLUDE_FROM_XUB
    112114    %define ClearAreaWithHeightInAHandWidthInAL             DisplayPrint_ClearAreaWithHeightInAHandWidthInAL
    113115%endif
  • trunk/Assembly_Library/Src/Display/DisplayContext.asm

    r588 r592  
    110110;       AX, DI
    111111;--------------------------------------------------------------------
    112 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     112%ifdef EXCLUDE_FROM_XUB
    113113    %ifndef MODULE_BOOT_MENU
    114114        %define EXCLUDE
     
    116116%endif
    117117
    118 %ifndef EXCLUDE
     118%ifndef EXCLUDE OR EXCLUDE_FROM_BIOSDRVS
    119119ALIGN DISPLAY_JUMP_ALIGN
    120120DisplayContext_Push:
     
    170170    mov     ds, di                  ; Restore DS
    171171    ret
    172 %endif ; EXCLUDE
     172%endif ; EXCLUDE OR EXCLUDE_FROM_BIOSDRVS
    173173%undef EXCLUDE
    174174
     
    184184;       AX, DI
    185185;--------------------------------------------------------------------
    186 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     186%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    187187ALIGN DISPLAY_JUMP_ALIGN
    188188DisplayContext_PrepareOffScreenBufferInESBXwithLengthInCX:
     
    202202    pop     ds
    203203    ret
    204 %endif ; EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     204%endif ; EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    205205
    206206
     
    215215;       AX
    216216;--------------------------------------------------------------------
    217 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     217%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    218218ALIGN DISPLAY_JUMP_ALIGN
    219219DisplayContext_SetCharacterPointerFromBXAX:
     
    235235;       Nothing
    236236;--------------------------------------------------------------------
    237 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     237%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    238238ALIGN DISPLAY_JUMP_ALIGN
    239239DisplayContext_GetCharacterPointerToBXAX:
     
    244244
    245245
    246 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     246%ifdef EXCLUDE_FROM_XUB
    247247    %ifndef MODULE_BOOT_MENU
    248248        %define EXCLUDE
     
    282282;--------------------------------------------------------------------
    283283%ifndef EXCLUDE ; 2 of 3
     284%ifndef EXCLUDE_FROM_BIOSDRVS
    284285ALIGN DISPLAY_JUMP_ALIGN
    285286DisplayContext_SetCharacterAttributeFromAL:
     
    287288    ret
    288289%endif
     290%endif
    289291
    290292
     
    300302;--------------------------------------------------------------------
    301303%ifndef EXCLUDE ; 3 of 3
     304%ifndef EXCLUDE_FROM_BIOSDRVS
    302305ALIGN DISPLAY_JUMP_ALIGN
    303306DisplayContext_SetCharacterOutputParameterFromAX:
     
    305308    ret
    306309%endif
     310%endif
    307311
    308312%undef EXCLUDE
     
    318322;       Nothing
    319323;--------------------------------------------------------------------
    320 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
     324%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG OR EXCLUDE_FROM_BIOSDRVS
    321325ALIGN DISPLAY_JUMP_ALIGN
    322326DisplayContext_GetCharacterOutputParameterToDX:
  • trunk/Assembly_Library/Src/Display/DisplayCursor.asm

    r526 r592  
    4848;       Nothing
    4949;--------------------------------------------------------------------
    50 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     50%ifdef EXCLUDE_FROM_XUB
    5151    %ifndef MODULE_BOOT_MENU
    5252        %define EXCLUDE
     
    5454%endif
    5555
    56 %ifndef EXCLUDE
     56%ifndef EXCLUDE OR EXCLUDE_FROM_BIOSDRVS
    5757ALIGN DISPLAY_JUMP_ALIGN
    5858DisplayCursor_SetShapeFromAX:
  • trunk/Assembly_Library/Src/Display/DisplayFormat.asm

    r590 r592  
    142142
    143143.rgcFormatCharToLookupIndex:
    144 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     144%ifndef EXCLUDE_FROM_XUB
    145145    db      "aIAduxsSctz-+%"
    146146%else
     
    150150ALIGN WORD_ALIGN
    151151.rgfnFormatSpecifierParser:
    152 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     152%ifndef EXCLUDE_FROM_XUB
    153153    dw      a_FormatAttributeForNextCharacter
    154154%endif
    155155    dw      I_FormatDashForZero
    156156    dw      A_FormatAttributeForRemainingString
    157 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     157%ifndef EXCLUDE_FROM_XUB
    158158    dw      d_FormatSignedDecimalWord
    159159%endif
     
    161161    dw      x_FormatHexadecimalWord
    162162    dw      s_FormatStringFromSegmentCS
    163 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     163%ifndef EXCLUDE_FROM_XUB
    164164    dw      S_FormatStringFromFarPointer
    165165%endif
    166166    dw      c_FormatCharacter
    167 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     167%ifndef EXCLUDE_FROM_XUB
    168168    dw      t_FormatRepeatCharacter
    169169%endif
    170170    dw      z_FormatStringFromSegmentZero
    171171    dw      PrepareToPrependParameterWithSpaces
    172 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     172%ifndef EXCLUDE_FROM_XUB
    173173    dw      PrepareToAppendSpacesAfterParameter
    174174    dw      percent_FormatPercent
     
    308308;       AX, BX, DX
    309309;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    310 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     310%ifndef EXCLUDE_FROM_XUB
    311311ALIGN DISPLAY_JUMP_ALIGN
    312312a_FormatAttributeForNextCharacter:
     
    330330    ret
    331331
    332 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     332%ifndef EXCLUDE_FROM_XUB
    333333ALIGN DISPLAY_JUMP_ALIGN
    334334d_FormatSignedDecimalWord:
     
    391391    ret
    392392
    393 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     393%ifndef EXCLUDE_FROM_XUB
    394394ALIGN DISPLAY_JUMP_ALIGN
    395395S_FormatStringFromFarPointer:
     
    408408    jmp     DisplayPrint_CharacterFromAL
    409409
    410 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     410%ifndef EXCLUDE_FROM_XUB
    411411ALIGN DISPLAY_JUMP_ALIGN
    412412t_FormatRepeatCharacter:
  • trunk/Assembly_Library/Src/Display/DisplayPage.asm

    r589 r592  
    3131;       AX, DX
    3232;--------------------------------------------------------------------
    33 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
     33%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG OR EXCLUDE_FROM_BIOSDRVS
    3434ALIGN DISPLAY_JUMP_ALIGN
    3535DisplayPage_SetFromAL:
     
    4141
    4242
    43 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     43%ifdef EXCLUDE_FROM_XUB
    4444    %define EXCLUDE
    4545    %ifdef MODULE_HOTKEYS OR MODULE_BOOT_MENU
     
    4848%endif
    4949
    50 %ifndef EXCLUDE
     50%ifndef EXCLUDE OR EXCLUDE_FROM_BIOSDRVS
    5151;--------------------------------------------------------------------
    5252; DisplayPage_GetColumnsToALandRowsToAH
  • trunk/Assembly_Library/Src/Display/DisplayPrint.asm

    r590 r592  
    9494;       AX, BH, DX
    9595;--------------------------------------------------------------------
    96 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     96%ifndef EXCLUDE_FROM_XUB
    9797ALIGN DISPLAY_JUMP_ALIGN
    9898DisplayPrint_SignedWordFromAXWithBaseInBL:
     
    163163;       AX, DX, [SS:BP]
    164164;--------------------------------------------------------------------
    165 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
     165%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    166166ALIGN DISPLAY_JUMP_ALIGN
    167167DisplayPrint_QWordFromSSBPwithBaseInBX:
     
    194194;       AX, DX
    195195;--------------------------------------------------------------------
    196 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     196%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    197197ALIGN DISPLAY_JUMP_ALIGN
    198198DisplayPrint_CharacterBufferFromBXSIwithLengthInCX:
     
    261261;       AX, DX
    262262;--------------------------------------------------------------------
    263 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     263%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    264264ALIGN DISPLAY_JUMP_ALIGN
    265265DisplayPrint_ClearAreaWithHeightInAHandWidthInAL:
     
    292292%endif
    293293
    294 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     294%ifdef EXCLUDE_FROM_XUB
    295295    %define EXCLUDE
    296296    %ifndef MODULE_STRINGS_COMPRESSED
  • trunk/Assembly_Library/Src/File/Directory.asm

    r526 r592  
    9999;       Nothing
    100100;--------------------------------------------------------------------
     101%ifndef EXCLUDE_FROM_XTIDECFG
    101102ALIGN JUMP_ALIGN
    102103Directory_GetMatchCountToAXforSearchStringInDSSIwithAttributesInCX:
     
    115116    pop     dx
    116117    ret
     118%endif
    117119
    118120
  • trunk/Assembly_Library/Src/File/DosCritical.asm

    r526 r592  
    1 ; File name     :   DosCritical.asm
    21; Project name  :   Assembly Library
    3 ; Created date  :   1.9.2010
    4 ; Last update   :   2.9.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   DOS Critical Error Handler (24h) replacements.
    73
     
    2218;
    2319
     20; Note! Only DOS functions 01h - 0Ch, 30h and 59h can be called from a Critical Error Handler.
    2421
    2522; DOS Critical Error Handler return values
     
    2825    .retryOperation                             resb    1
    2926    .terminateProgramAsThoughInt21hAH4ChCalled  resb    1
    30     .failSystemCallInProgress                   resb    1
     27    .failSystemCallInProgress                   resb    1   ; Needs DOS 3.1+
    3128endstruc
    3229
     
    8380
    8481;--------------------------------------------------------------------
     82; DosCritical_CustomHandler
     83;   Parameters:
     84;       Nothing
     85;   Returns:
     86;       Nothing
     87;   Corrupts registers:
     88;       Nothing
     89;--------------------------------------------------------------------
     90ALIGN JUMP_ALIGN
     91DosCritical_CustomHandler:
     92    add     sp, 6   ; Remove the INT 24h return address and flags from stack
     93
     94    mov     ah, GET_EXTENDED_ERROR_INFORMATION  ; Requires DOS 3.0+
     95    xor     bx, bx
     96    int     DOS_INTERRUPT_21h
     97    mov     [cs:bLastCriticalError], al
     98
     99    pop     ax
     100    pop     bx
     101    pop     cx
     102    pop     dx
     103    pop     si
     104    pop     di
     105    pop     bp
     106    pop     ds
     107    pop     es
     108    iret            ; Return from the INT 21h call
     109
     110bLastCriticalError:     db  0
     111
     112
     113;--------------------------------------------------------------------
    85114; DosCritical_HandlerToIgnoreAllErrors
    86115;   Parameters:
     
    95124    mov     al, CRITICAL_ERROR_ACTION.ignoreErrorAndContinueProcessingRequest
    96125    iret
     126
  • trunk/Assembly_Library/Src/File/Drive.asm

    r589 r592  
    3030;       Nothing
    3131;--------------------------------------------------------------------
     32%ifndef EXCLUDE_FROM_XTIDECFG
    3233ALIGN JUMP_ALIGN
    3334Drive_GetNumberOfAvailableDrivesToAX:
     
    4243    pop     dx
    4344    ret
     45%endif
    4446
    4547
  • trunk/Assembly_Library/Src/File/FileIO.asm

    r526 r592  
    3535;       AX, BX
    3636;--------------------------------------------------------------------
     37%ifndef EXCLUDE_FROM_XTIDECFG
    3738ALIGN JUMP_ALIGN
    3839FileIO_CreateWithPathInDSSIandAttributesInCX:
     
    4041    SKIP2B  bx
    4142    ; Fall to FileIO_OpenWithPathInDSSIandFileAccessInAL
     43%endif
    4244
    4345;--------------------------------------------------------------------
  • trunk/Assembly_Library/Src/Keyboard/Keyboard.asm

    r589 r592  
    3737;       DX
    3838;--------------------------------------------------------------------
    39 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     39%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    4040ALIGN KEYBOARD_JUMP_ALIGN
    4141Keyboard_ReadUserInputtedWordWhilePrinting:
     
    8787;       AX
    8888;--------------------------------------------------------------------
    89 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     89%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    9090ALIGN KEYBOARD_JUMP_ALIGN
    9191Keyboard_ReadUserInputtedStringToESDIWhilePrinting:
     
    9898    xor     bx, bx                              ; Zero character counter
    9999    dec     cx                                  ; Decrement buffer size for NULL
     100%ifdef CLD_NEEDED
    100101    cld
     102%endif
    101103ALIGN KEYBOARD_JUMP_ALIGN
    102104.GetCharacterFromUser:
     
    197199    xor     al, al                              ; Set ZF and clear CF
    198200    ret
    199 %endif ; EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     201%endif ; EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    200202
    201203
     
    209211;       AX
    210212;--------------------------------------------------------------------
    211 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     213%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    212214ALIGN KEYBOARD_JUMP_ALIGN
    213215Keyboard_PrintBackspace:
     
    230232;       AX
    231233;--------------------------------------------------------------------
    232 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     234%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    233235ALIGN KEYBOARD_JUMP_ALIGN
    234236Keyboard_PlayBellForUnwantedKeystroke:
     
    246248;       AX
    247249;--------------------------------------------------------------------
    248 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     250%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    249251ALIGN KEYBOARD_JUMP_ALIGN
    250252Keyboard_PrintInputtedCharacter:
     
    266268;       AX
    267269;--------------------------------------------------------------------
    268 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS   ; Only used when debugging
     270%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS               ; Only used when debugging
    269271ALIGN KEYBOARD_JUMP_ALIGN
    270272Keyboard_RemoveAllKeystrokesFromBuffer:
     
    289291;       Nothing
    290292;--------------------------------------------------------------------
    291 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     293%ifdef EXCLUDE_FROM_XUB
    292294    %define EXCLUDE
    293295    %ifdef MODULE_HOTKEYS OR MODULE_BOOT_MENU
  • trunk/Assembly_Library/Src/LibSizeCheck.asm

    r526 r592  
    2020
    2121; Include .inc files
    22 %define EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     22%define EXCLUDE_FROM_XUB
    2323;%define INCLUDE_DISPLAY_LIBRARY
    2424;%define INCLUDE_FILE_LIBRARY
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm

    r589 r592  
    249249ALIGN JUMP_ALIGN
    250250AppendFileFromDTAinDSSItoOffScreenBuffer:
    251     call    .FilterCurrentDirectory         ; We never want "."
    252     call    .FilterUpDirectoryWhenInRoot    ; No ".." when in root directory
     251    cmp     WORD [si+DTA.szFile], CURRENTDIR_CHARACTERS
     252    je      SHORT .Return                   ; We never want "."
     253    test    dl, dl
     254    jnz     SHORT .NotInRootDirectory
     255    cmp     WORD [si+DTA.szFile], UPDIR_CHARACTERS
     256    je      SHORT .Return                   ; No ".." when in root directory
     257.NotInRootDirectory:
    253258    inc     cx                              ; Nothing filtered so increment files/directories
    254259
     
    262267    pop     si
    263268    pop     bp
    264     ret
    265 
    266 ;--------------------------------------------------------------------
    267 ; .FilterCurrentDirectory
    268 ; .FilterUpDirectoryWhenInRoot
    269 ;   Parameters:
    270 ;       DL:     Zero if root directory selected
    271 ;       DS:SI:  Ptr to DTA containing file information
    272 ;   Returns:
    273 ;       Nothing
    274 ;       Returns from AppendFileToBufferInESDIfromDtaInDSSI when filtering
    275 ;   Corrupts registers:
    276 ;       AX
    277 ;--------------------------------------------------------------------
    278 ALIGN JUMP_ALIGN
    279 .FilterCurrentDirectory:
    280     cmp     WORD [si+DTA.szFile], CURRENTDIR_CHARACTERS
    281     je      SHORT .DoFilter
    282     ret
    283 
    284 ALIGN JUMP_ALIGN
    285 .FilterUpDirectoryWhenInRoot:
    286     test    dl, dl          ; Set ZF if root directory selected
    287     jnz     SHORT .ReturnWithoutFiltering
    288     cmp     WORD [si+DTA.szFile], UPDIR_CHARACTERS
    289     jne     SHORT .ReturnWithoutFiltering
    290 .DoFilter:
    291     add     sp, BYTE 2      ; Remove return address from stack
    292 ALIGN JUMP_ALIGN, ret
    293 .ReturnWithoutFiltering:
     269.Return:
    294270    ret
    295271
     
    473449ALIGN JUMP_ALIGN
    474450GetInfoLinesToCXandDialogFlagsToAX:
    475     xor     ax, ax
    476     call    GetDialogFlagsToAL
    477     jmp     Bit_GetSetCountToCXfromAX
     451    ePUSH_T ax, Bit_GetSetCountToCXfromAX
     452    xor     ah, ah
     453    ; Fall to GetDialogFlagsToAL
    478454
    479455;--------------------------------------------------------------------
     
    696672    call    .ChangeDriveToUserSelectionFromIoInDSSI
    697673    add     sp, BYTE DRIVE_DIALOG_IO_size
     674.UserCancelledDriveChange:
    698675    ret
    699676
     
    729706    jne     SHORT .UserCancelledDriveChange
    730707
     708    ; Install our Custom Critical Error Handler to catch "Drive Not Ready" errors. This handler only works on DOS 3.0+ systems
     709    ; but that should be OK because only DOS 3.1+ will trigger it. Under older DOS versions drives are enumerated using
     710    ; GET_DOS_DRIVE_PARAMETER_BLOCK_FOR_SPECIFIC_DRIVE which will access the drive so we know it is available at this point.
     711    mov     dx, DosCritical_CustomHandler
     712    call    DosCritical_InstallNewHandlerFromCSDX
     713
     714    ; Save the current drive on stack in case the selected drive is not ready and the user decides to cancel the change.
     715    call    Drive_GetDefaultToAL
     716    xchg    dx, ax
     717
     718.RetryDrive:
     719    push    dx                                  ; Save the previous current drive to stack
     720
    731721    mov     dl, [si+DRIVE_DIALOG_IO.bReturnDriveNumber]
    732722    call    Drive_SetDefaultFromDL
     723
     724    ; Now we must try to force a media access to catch "Drive Not Ready".
     725    push    ds
     726    push    ss
     727    pop     ds
     728    ePUSH_T ax, CURRENTDIR_CHARACTERS
     729    mov     cx, FLG_FILEATTR_DIRECTORY
     730    mov     dx, sp
     731    mov     ax, FIND_FIRST_MATCHING_FILE<<8
     732    int     DOS_INTERRUPT_21h
     733    pop     ax
     734    pop     ds
     735
     736    pop     dx                                  ; Restore the previous current drive from stack
     737
     738    xchg    ah, [cs:bLastCriticalError]         ; Zero bLastCriticalError and fetch error code to AH
     739    cmp     ah, ERR_DOS_DRIVE_NOT_READY
     740    jne     SHORT .DriveIsReady
     741
     742    mov     bx, g_szDlgDriveNotReady
     743    call    Dialogs_DisplayYesNoResponseDialogWithTitleStringInBX
     744    jz      SHORT .RetryDrive
     745    ; The user cancelled the drive change. Restore current drive to what it was previously.
     746    call    Drive_SetDefaultFromDL
     747    jmp     DosCritical_RestoreDosHandler
     748
     749.DriveIsReady:
     750    call    DosCritical_RestoreDosHandler
    733751    jmp     RefreshFilesToDisplay
    734 .UserCancelledDriveChange:
    735     ret
    736752
    737753
  • trunk/Assembly_Library/Src/Menu/MenuAttributes.asm

    r526 r592  
    9191
    9292.rgcColorAttributes:
     93; Classic (default theme)
    9394istruc ATTRIBUTE_CHARS
    9495    at  ATTRIBUTE_CHARS.cBordersAndBackground,  db  COLOR_ATTRIBUTE(COLOR_YELLOW, COLOR_BLUE)
     
    100101    at  ATTRIBUTE_CHARS.cNormalTimeout,         db  COLOR_ATTRIBUTE(COLOR_GREEN, COLOR_BLUE)
    101102iend
     103ColorTheme  equ     MenuAttribute_GetToAXfromTypeInSI.rgcColorAttributes
    102104
    103105.rgcBlackAndWhiteAttributes:    ; Only COLOR_WHITE, COLOR_BRIGHT_WHITE and COLOR_BLACK should be used
  • trunk/Assembly_Library/Src/Menu/MenuBorders.asm

    r583 r592  
    8787;       AX, BX, CX, DX, SI, DI
    8888;--------------------------------------------------------------------
    89 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     89%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    9090ALIGN MENU_JUMP_ALIGN
    9191MenuBorders_RefreshItemBorders:
  • trunk/Assembly_Library/Src/Menu/MenuInit.asm

    r532 r592  
    114114;       AX, BX, DX
    115115;--------------------------------------------------------------------
    116 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     116%ifndef EXCLUDE_FROM_XUB
    117117ALIGN MENU_JUMP_ALIGN
    118118MenuInit_CloseMenuIfExitEventAllows:
     
    138138
    139139
    140 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     140%ifndef EXCLUDE_FROM_XUB
    141141;--------------------------------------------------------------------
    142142; MenuInit_HighlightItemFromAX
     
    168168    mov     ax, [bp+MENUINIT.wHighlightedItem]
    169169    ret
    170 %endif ; EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     170%endif ; EXCLUDE_FROM_XUB
    171171
    172172
     
    183183;       Nothing
    184184;--------------------------------------------------------------------
    185 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     185%ifndef EXCLUDE_FROM_XUB
     186%ifndef EXCLUDE_FROM_XTIDECFG
    186187ALIGN MENU_JUMP_ALIGN
    187188MenuInit_SetTitleHeightFromAL:
     
    193194    mov     [bp+MENUINIT.bInfoLines], al
    194195    ret
     196%endif ; EXCLUDE_FROM_XTIDECFG
    195197
    196198ALIGN MENU_JUMP_ALIGN
     
    198200    mov     [bp+MENUINIT.wItems], ax
    199201    ret
    200 %endif
     202%endif ; EXCLUDE_FROM_XUB
    201203
    202204
     
    212214;       Nothing
    213215;--------------------------------------------------------------------
    214 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     216%ifndef EXCLUDE_FROM_XUB
     217%ifndef EXCLUDE_FROM_XTIDECFG
    215218ALIGN MENU_JUMP_ALIGN
    216219MenuInit_SetUserDataFromDSSI:
     
    218221    mov     [bp+MENU.dwUserData+2], ds
    219222    ret
     223%endif ; EXCLUDE_FROM_XTIDECFG
    220224
    221225ALIGN MENU_JUMP_ALIGN
     
    223227    lds     si, [bp+MENU.dwUserData]
    224228    ret
    225 %endif
     229%endif ; EXCLUDE_FROM_XUB
  • trunk/Assembly_Library/Src/Menu/MenuLocation.asm

    r583 r592  
    5555;       Nothing
    5656;--------------------------------------------------------------------
    57 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     57%ifndef EXCLUDE_FROM_XUB
    5858MenuLocation_GetItemBordersTopLeftCoordinatesToAX:
    5959%endif
  • trunk/Assembly_Library/Src/Menu/MenuText.asm

    r583 r592  
    3232;       AX, BX, CX, DX, SI, DI
    3333;--------------------------------------------------------------------
    34 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     34%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    3535ALIGN MENU_JUMP_ALIGN
    3636MenuText_ClearTitleArea:
  • trunk/Assembly_Library/Src/Serial/SerialServer.asm

    r568 r592  
    6161        push    ax              ; working copy on the top of the stack
    6262
    63 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS   ; DF already cleared in Int13h.asm
     63%ifndef EXCLUDE_FROM_XUB        ; DF already cleared in Int13h.asm
     64%ifdef CLD_NEEDED
    6465        cld
     66%endif
    6567%endif
    6668
  • trunk/Assembly_Library/Src/String/Char.asm

    r526 r592  
    5151;       Nothing
    5252;--------------------------------------------------------------------
    53 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     53%ifdef EXCLUDE_FROM_XUB
    5454    %ifndef MODULE_HOTKEYS
    5555        %define EXCLUDE
     
    5757%endif
    5858
    59 %ifndef EXCLUDE
     59%ifndef EXCLUDE OR EXCLUDE_FROM_BIOSDRVS
    6060ALIGN STRING_JUMP_ALIGN
    6161Char_IsLowerCaseLetterInAL:
     
    7676;       Nothing
    7777;--------------------------------------------------------------------
    78 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     78%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    7979ALIGN STRING_JUMP_ALIGN
    8080Char_IsUpperCaseLetterInAL:
     
    9595;       Nothing
    9696;--------------------------------------------------------------------
    97 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     97%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    9898ALIGN STRING_JUMP_ALIGN
    9999Char_IsHexadecimalDigitInAL:
     
    136136;       Nothing
    137137;--------------------------------------------------------------------
    138 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     138%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    139139ALIGN STRING_JUMP_ALIGN
    140140Char_ConvertIntegerToALfromDigitInALwithBaseInBX:
     
    166166;       Nothing
    167167;--------------------------------------------------------------------
    168 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     168%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    169169ALIGN STRING_JUMP_ALIGN
    170170Char_CharIsValid:
     
    174174
    175175
    176 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     176%ifdef EXCLUDE_FROM_XUB
    177177    %ifndef MODULE_HOTKEYS
    178178        %define EXCLUDE
     
    201201;       Nothing
    202202;--------------------------------------------------------------------
    203 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     203%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    204204ALIGN STRING_JUMP_ALIGN
    205205Char_ALtoLowerCaseLetter:
     
    218218;       Nothing
    219219;--------------------------------------------------------------------
    220 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     220%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    221221ALIGN STRING_JUMP_ALIGN
    222222Char_ALtoUpperCaseLetter:
     
    237237;       Nothing
    238238;--------------------------------------------------------------------
    239 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     239%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    240240Char_ChangeCaseInAL:
    241241    xor     al, 32
     
    254254;       Nothing
    255255;--------------------------------------------------------------------
    256 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     256%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    257257ALIGN STRING_JUMP_ALIGN
    258258Char_GetFilterFunctionToDXforNumericBaseInBX:
  • trunk/Assembly_Library/Src/Time/TimerTicks.asm

    r526 r592  
    4848;       CX
    4949;--------------------------------------------------------------------
    50 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     50%ifndef EXCLUDE_FROM_XUB
    5151%ifndef EXCLUDE_FROM_XTIDECFG
    5252ALIGN JUMP_ALIGN
     
    6464    div     cx      ; Divide DX:AX by CX, Minutes to AX, remainder ticks to DX
    6565    ret
    66 %endif ; EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    67 
    68 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
     66%endif ; EXCLUDE_FROM_XUB
     67
     68%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    6969ALIGN JUMP_ALIGN
    7070TimerTicks_GetSecondsToAXandRemainderTicksToDXfromTicksInDX:
     
    8080
    8181
    82 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     82%ifdef EXCLUDE_FROM_XUB
    8383    %ifndef MODULE_BOOT_MENU
    8484        %define EXCLUDE
     
    164164;       Nothing
    165165;--------------------------------------------------------------------
    166 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     166%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    167167ALIGN JUMP_ALIGN
    168168TimerTicks_GetElapsedToAXandResetDSBX:
     
    184184;       Nothing
    185185;--------------------------------------------------------------------
    186 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     186%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    187187ALIGN JUMP_ALIGN
    188188TimerTicks_GetElapsedToAXfromDSBX:
     
    202202;       Nothing
    203203;--------------------------------------------------------------------
    204 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     204%ifdef EXCLUDE_FROM_XUB
    205205    %ifndef MODULE_BOOT_MENU OR MODULE_HOTKEYS
    206206        %define EXCLUDE
  • trunk/Assembly_Library/Src/Util/Bit.asm

    r526 r592  
    2424; Bit_GetSetCountToCXfromDXAX
    2525;   Parameters
    26 ;       DX:AX:      Source DWORD
     26;       DX:AX:  Source DWORD
    2727;   Returns:
    2828;       CX:     Number of bits set in DX:AX
     
    5858    push    ax
    5959
    60     xor     cx, cx
     60    mov     cx, -1
    6161ALIGN JUMP_ALIGN
    62 .BitScanLoop:
     62.IncrementCX:
     63    inc     cx
     64.ShiftLoop:
    6365    shr     ax, 1
    64     jz      SHORT .LastBitInCF
    65     adc     cl, ch
    66     jmp     SHORT .BitScanLoop
    67 ALIGN JUMP_ALIGN
    68 .LastBitInCF:
    69     adc     cl, ch
     66    jc      SHORT .IncrementCX
     67    jnz     SHORT .ShiftLoop
    7068
    7169    pop     ax
     
    9593    ret
    9694
     95
    9796;--------------------------------------------------------------------
    9897; Bit_SetToAXfromIndexInCL
     
    115114    pop     dx
    116115    ret
     116
  • trunk/Assembly_Library/Src/Util/Math.asm

    r589 r592  
    3333;       AX
    3434;--------------------------------------------------------------------
    35 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
     35%ifndef EXCLUDE_FROM_XTIDECFG
    3636ALIGN JUMP_ALIGN
    3737Math_DivQWatSSBPbyCX:
    38 %if 1
    39     xor     dx, dx
    40     mov     ax, [bp+6]      ; Load highest divident WORD to DX:AX
    41     div     cx
    42     mov     [bp+6], ax      ; Store quotient
    43 
    44     mov     ax, [bp+4]
    45     div     cx
    46     mov     [bp+4], ax
    47 
    48     mov     ax, [bp+2]
    49     div     cx
    50     mov     [bp+2], ax
    51 
    52     mov     ax, [bp]
    53     div     cx
    54     mov     [bp], ax
    55     ret
    56 %else ; ~1
    57 ; This is about half the size compared to the above code but it's not tested which is why it's commented away.
    5838    push    di
    5939    mov     di, 6
     
    6545    dec     di
    6646    dec     di
    67     jns     .Next
     47    jns     SHORT .Next
    6848    pop     di
    6949    ret
    70 %endif ; 1
    7150%endif
    7251
     
    8362;       Nothing
    8463;--------------------------------------------------------------------
    85 %ifndef EXCLUDE_FROM_XTIDECFG
     64%ifndef EXCLUDE_FROM_XTIDECFG OR EXCLUDE_FROM_BIOSDRVS
    8665ALIGN JUMP_ALIGN
    8766Math_DivDXAXbyCX:
  • trunk/Assembly_Library/Src/Util/Memory.asm

    r580 r592  
    2424; OPTIMIZE_STRING_OPERATION
    2525;   Parameters
    26 ;       %1:     Repeat instruction
    27 ;       %2:     String instruction without size (for example MOVS and not MOVSB or MOVSW)
     26;       %1:     String instruction without size (only MOVS and STOS is supported)
    2827;       CX:     Number of BYTEs to operate
    29 ;       DS:SI:  Ptr to source data
     28;       DS:SI:  Ptr to source data (for MOVS)
    3029;       ES:DI:  Ptr to destination
    3130;   Returns:
     31;       CF:     Cleared
     32;       CX:     Zero
    3233;       SI, DI: Updated by number of bytes operated
    3334;   Corrupts registers:
    3435;       Nothing
    3536;--------------------------------------------------------------------
    36 %macro OPTIMIZE_STRING_OPERATION 2
    37     push    cx
    38 
    39     shr     cx, 1           ; Operate with WORDs for performance
    40     jz  %%HandleRemainingByte
    41     %1      %2w
    42 %%HandleRemainingByte:
    43     jnc     SHORT %%OperationCompleted
    44     %2b
    45 
    46 ALIGN JUMP_ALIGN
    47 %%OperationCompleted:
    48     pop     cx
     37%macro OPTIMIZE_STRING_OPERATION 1
     38    shr     cx, 1
     39    rep     %1w
     40    eRCL_IM cx, 1
     41    rep     %1b
    4942%endmacro
    5043
     
    5750;       ES:DI:  Ptr to destination buffer
    5851;   Returns:
     52;       CF:     Cleared
    5953;       SI, DI: Updated by number of bytes copied
    6054;   Corrupts registers:
    6155;       Nothing
    6256;--------------------------------------------------------------------
    63 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     57%ifndef EXCLUDE_FROM_XUB
    6458ALIGN JUMP_ALIGN
    6559Memory_CopyCXbytesFromDSSItoESDI:
    66     OPTIMIZE_STRING_OPERATION rep, movs
     60    push    cx
     61    OPTIMIZE_STRING_OPERATION movs
     62    pop     cx
    6763    ret
    6864%endif
     
    7773;       Nothing
    7874;   Corrupts registers:
    79 ;       Nothing
     75;       CX
    8076;--------------------------------------------------------------------
    8177%ifdef INCLUDE_MENU_LIBRARY
     
    10298;       DI:     Updated by number of BYTEs stored
    10399;   Corrupts registers:
    104 ;       AX
     100;       AX, CX
    105101;--------------------------------------------------------------------
    106102ALIGN JUMP_ALIGN
     
    118114;       DI:     Updated by number of BYTEs stored
    119115;   Corrupts registers:
    120 ;       Nothing
     116;       CX
    121117;--------------------------------------------------------------------
    122 ALIGN JUMP_ALIGN
    123118Memory_StoreCXbytesFromAccumToESDI:
    124     OPTIMIZE_STRING_OPERATION rep, stos
     119    OPTIMIZE_STRING_OPERATION stos
    125120    ret
    126121
     
    135130;       AX
    136131;--------------------------------------------------------------------
    137 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     132%ifndef EXCLUDE_FROM_XUB
    138133ALIGN JUMP_ALIGN
    139134Memory_ReserveCXbytesFromStackToDSSI:
  • trunk/Assembly_Library/Src/Util/Reboot.asm

    r526 r592  
    4444    mov     al, 0FEh                ; System reset (AT+ keyboard controller)
    4545    out     64h, al                 ; Reset computer (AT+)
    46 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     46%ifndef EXCLUDE_FROM_XUB
    4747    %ifdef INCLUDE_TIME_LIBRARY
    4848        mov     ax, 10
  • trunk/Assembly_Library/Src/Util/Registers.asm

    r526 r592  
    5959%endif
    6060
    61 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     61%ifndef EXCLUDE_FROM_XUB
    6262ALIGN JUMP_ALIGN
    6363Registers_CopySSBPtoDSSI:
     
    9191;
    9292;--------------------------------------------------------------------
    93 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
     93%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    9494ALIGN JUMP_ALIGN
    9595Registers_NormalizeESSI:
    9696    mov         cx, si
    97     and         si, byte 0fh
    98     jmp         Registers_NormalizeFinish
     97    and         si, BYTE 0Fh
     98    jmp         SHORT Registers_NormalizeFinish
    9999
    100100ALIGN JUMP_ALIGN
    101101Registers_NormalizeESDI:
    102102    mov         cx, di
    103     and         di, byte 0fh
     103    and         di, BYTE 0Fh
    104104;;; fall-through
    105105
  • trunk/Assembly_Library/Src/Util/Size.asm

    r580 r592  
    7070    jae     SHORT Size_DivideSizeInBXDXAXby1024andIncrementMagnitudeInCX
    7171    add     sp, BYTE 2                  ; Clean return address from stack
    72     xchg    si, cx                      ; CX = Remainder (0...1023), SI = Magnitude
    7372
    7473    ; Convert remainder to tenths
    75     xchg    bx, ax                      ; Store AX
    76     mov     al, 5                       ; AH = 0
    77     mul     cx                          ; DX:AX = remainder * (10 / 2)
    78 %ifdef USE_186
    79     shr     ax, 9                       ; Divide AX by (1024 / 2)
    80 %else
    81     shr     ax, 1
    82     mov     al, ah
    83     cbw
    84 %endif
    85     xchg    cx, ax                      ; CX = tenths
    86     xchg    ax, bx
     74    mov     bx, 640
     75    xchg    bx, ax                      ; BX = Size, AX = (10 / 1024) * 65536
     76    mul     si                          ; DX = Remainder * (10 / 1024)
     77    xchg    dx, ax
     78    xchg    cx, ax                      ; CX = Tenths, AX = Magnitude
     79    xchg    bx, ax                      ; AX = Size, BX = Magnitude
    8780
    8881    ; Convert magnitude to character
    89     mov     dl, [cs:si+.rgbMagnitudeToChar]
     82    mov     dl, [cs:bx+.rgbMagnitudeToChar]
    9083
    9184    pop     si
     
    154147;       Nothing
    155148;--------------------------------------------------------------------
    156 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     149%ifdef EXCLUDE_FROM_XUB
    157150    %ifdef USE_386
    158151        %define EXCLUDE
  • trunk/Assembly_Library/Src/Util/Sort.asm

    r526 r592  
    6363    push    cx
    6464
     65%ifdef CLD_NEEDED
    6566    cld
     67%endif
    6668    mov     cx, di                      ; Restore item size to CX
    6769    xor     ax, ax                      ; Zero starting index
     
    191193
    192194    cmp     ax, dx  ; If (left <= right)
    193     jg      SHORT ArrangeItemsInRangeAXtoDXtoBothSidesOfPivotInESDI
     195    jg      SHORT .BreakLoopSinceAllItemsExamined
    194196    call    SwapItemsFromIndexesAXandDX
    195197    inc     ax
Note: See TracChangeset for help on using the changeset viewer.