Changeset 568 in xtideuniversalbios for trunk/Assembly_Library


Ignore:
Timestamp:
Dec 21, 2014, 5:37:53 PM (10 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • SerDrive: Using named pipe mode (serdrive -p) now works under Windows XP/2000/Server 2003.
  • checksum.pl: Added a compatibility fix for 3Com 3C503 cards.
  • XTIDECFG will now scan every possible segment address to find and load the BIOS and/or its settings from EEPROM. This should simplify things for people using combined option ROMs.
  • Fixed a bug from r521 in BootSector.asm where the BIOS would not display a timeout error if it failed to load the boot sector from harddrive.
  • Fixed a bug from r541 in CompatibleDPT.asm where CompatibleDPT_CreateDeviceParameterTableExtensionToESBXfromDPTinDSSI would generate an invalid checksum in the DPTE.
  • Optimizations and other fixes.
Location:
trunk/Assembly_Library
Files:
8 edited

Legend:

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

    r567 r568  
    55
    66;--------------------------------------------------------------------
    7 ; Clears prefetch queue by jumping to next instruction.
    8 ; This delays much more than nop instruction of fast systems.
     7; Clears prefetch queue by jumping to the next instruction.
     8; This delays much more than the nop instruction on fast systems.
    99;
    1010; JMP_DELAY
  • trunk/Assembly_Library/Inc/Emulate.inc

    r510 r568  
    7474;--------------------------------------------------------------------
    7575%macro eSALC 0
    76     db      0D6h
     76;   db      0D6h
     77    salc
    7778%endmacro
    7879
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm

    r526 r568  
    623623    mov     cx, STRING_DIALOG_IO_size
    624624    call    Memory_ReserveCXbytesFromStackToDSSI
    625     call    .InitializeStringDialogIoInDSSIforInputtingFileName
    626 
    627     CALL_MENU_LIBRARY GetStringWithIoInDSSI
    628     mov     al, [si+STRING_DIALOG_IO.bUserCancellation]
    629     add     sp, BYTE STRING_DIALOG_IO_size
    630     test    al, al      ; User cancellation?
    631     jnz     SHORT ReturnWithoutHandlingKeystroke
    632     jmp     CloseFileDialogAfterSuccessfulSelection
    633 
    634 ALIGN JUMP_ALIGN
    635 .InitializeStringDialogIoInDSSIforInputtingFileName:
     625
     626;;; InitializeStringDialogIoInDSSIforInputtingFileName
    636627    call    InitializeNullStringsToDialogInputInDSSI
    637628    mov     WORD [si+DIALOG_INPUT.fszTitle], g_szEnterNewFileOrDirectory
     
    642633    mov     [si+STRING_DIALOG_IO.fpReturnBuffer], ax
    643634    mov     [si+STRING_DIALOG_IO.fpReturnBuffer+2], es
    644     ret
     635;;;
     636
     637    CALL_MENU_LIBRARY GetStringWithIoInDSSI
     638    mov     al, [si+STRING_DIALOG_IO.bUserCancellation]
     639    add     sp, BYTE STRING_DIALOG_IO_size
     640    test    al, al      ; User cancellation?
     641    jnz     SHORT ReturnWithoutHandlingKeystroke
     642    jmp     CloseFileDialogAfterSuccessfulSelection
    645643
    646644
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogString.asm

    r526 r568  
    9999    mov     cx, [si+STRING_DIALOG_IO.wBufferSize]
    100100    les     di, [si+STRING_DIALOG_IO.fpReturnBuffer]
    101     call    .GetCharacterFilterFunctionToDX
     101    mov     dx, [si+STRING_DIALOG_IO.fnCharFilter]
     102    test    dx, dx
     103    jnz     SHORT .CharacterFilterFunctionInDX
     104    mov     dx, Char_CharIsValid
    102105
     106.CharacterFilterFunctionInDX:
    103107    call    Keyboard_ReadUserInputtedStringToESDIWhilePrinting
    104108    jz      SHORT .UserCancellation
     
    108112.UserCancellation:
    109113    ret
    110 
    111 ;--------------------------------------------------------------------
    112 ; .GetCharacterFilterFunctionToDX
    113 ;   Parameters
    114 ;       DS:SI:  Ptr to STRING_DIALOG_IO
    115 ;       SS:BP:  Ptr to DIALOG
    116 ;   Returns:
    117 ;       CS:DX:  Ptr to character filter function
    118 ;   Corrupts registers:
    119 ;       Nothing
    120 ;--------------------------------------------------------------------
    121 ALIGN JUMP_ALIGN
    122 .GetCharacterFilterFunctionToDX:
    123     mov     dx, [si+STRING_DIALOG_IO.fnCharFilter]
    124     test    dx, dx
    125     jnz     SHORT .ReturnFilterFunctionInDX
    126     mov     dx, Char_CharIsValid
    127 ALIGN JUMP_ALIGN, ret
    128 .ReturnFilterFunctionInDX:
    129     ret
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogWord.asm

    r526 r568  
    9393;       Nothing (User input stored to WORD_DIALOG_IO)
    9494;   Corrupts registers:
    95 ;       AX, BX, DX, SI, DI
     95;       AX, BX, CX, DX, SI, DI
    9696;--------------------------------------------------------------------
    9797ALIGN JUMP_ALIGN
     
    100100    eMOVZX  bx, [si+WORD_DIALOG_IO.bNumericBase]
    101101ALIGN JUMP_ALIGN
    102 .GetUserInputIntilValidOrCancelled:
     102.GetUserInputUntilValidOrCancelled:
    103103    call    Keyboard_ReadUserInputtedWordWhilePrinting
    104104    jz      SHORT .UserCancellation
     
    116116.InputtedWordNotInRange:
    117117    call    Keyboard_PlayBellForUnwantedKeystroke
    118     call    .ClearInputtedWordFromDialog
    119     jmp     SHORT .GetUserInputIntilValidOrCancelled
    120 
    121 ;--------------------------------------------------------------------
    122 ; .ClearInputtedWordFromDialog
    123 ;   Parameters
    124 ;       SS:BP:  Ptr to DIALOG
    125 ;   Returns:
    126 ;       Nothing
    127 ;   Corrupts registers:
    128 ;       AX, CX, DX, DI
    129 ;--------------------------------------------------------------------
    130 ALIGN JUMP_ALIGN
    131 .ClearInputtedWordFromDialog:
     118    ; Clear inputted word from dialog
    132119    CALL_DISPLAY_LIBRARY GetSoftwareCoordinatesToAX
    133120    xchg    dx, ax
     
    138125
    139126    xchg    ax, dx
    140     JMP_DISPLAY_LIBRARY SetCursorCoordinatesFromAX
    141 
     127    CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX
     128    jmp     SHORT .GetUserInputUntilValidOrCancelled
  • trunk/Assembly_Library/Src/Menu/MenuBorders.asm

    r526 r568  
    5656    push    RefreshTitleBorders
    5757    push    MenuBorders_GetNumberOfMiddleCharactersToDX
    58     jmp     MenuBorders_AdjustDisplayContextForDrawingBorders
     58    jmp     SHORT MenuBorders_AdjustDisplayContextForDrawingBorders
    5959%endif
    6060
     
    120120    CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX
    121121
    122     mov     si, ATTRIBUTE_CHARS.cBordersAndBackground
     122    xor     si, si      ; SI = ATTRIBUTE_CHARS.cBordersAndBackground
    123123    jmp     MenuAttribute_SetToDisplayContextFromTypeInSI
    124124
     
    141141
    142142;--------------------------------------------------------------------
     143; RefreshItemBorders
    143144; RefreshTitleBorders
    144 ;   Parameters
    145 ;       DX:     Number of times to repeat middle character
    146 ;       SS:BP:  Ptr to MENU
    147 ;   Returns:
    148 ;       Nothing
    149 ;   Corrupts registers:
    150 ;       AX, BX, CX, SI, DI
    151 ;--------------------------------------------------------------------
    152 ALIGN MENU_JUMP_ALIGN
    153 RefreshTitleBorders:
    154     call    DrawTopBorderLine
    155     eMOVZX  cx, [bp+MENUINIT.bTitleLines]
    156     jmp     SHORT DrawTextBorderLinesByCXtimes
    157 
    158 ;--------------------------------------------------------------------
    159145; RefreshInformationBorders
    160 ;   Parameters
    161 ;       DX:     Number of times to repeat middle character
    162 ;       SS:BP:  Ptr to MENU
    163 ;   Returns:
    164 ;       Nothing
    165 ;   Corrupts registers:
    166 ;       AX, BX, CX, SI, DI
    167 ;--------------------------------------------------------------------
    168 ALIGN MENU_JUMP_ALIGN
    169 RefreshInformationBorders:
    170     call    DrawSeparationBorderLine
    171     eMOVZX  cx, [bp+MENUINIT.bInfoLines]
    172     jmp     SHORT DrawTextBorderLinesByCXtimes
    173 
    174 ;--------------------------------------------------------------------
    175 ; RefreshItemBorders
    176146;   Parameters
    177147;       DX:     Number of times to repeat middle character
     
    186156    call    DrawSeparationBorderLine
    187157    call    MenuScrollbars_GetMaxVisibleItemsOnPageToCX
    188     ; Fall to DrawTextBorderLinesByCXtimes
    189 
    190 ;--------------------------------------------------------------------
     158    jmp     SHORT DrawTextBorderLinesByCXtimes
     159
     160ALIGN MENU_JUMP_ALIGN
     161RefreshTitleBorders:
     162    call    DrawTopBorderLine
     163    mov     cl, [bp+MENUINIT.bTitleLines]
     164    jmp     SHORT DrawTextBorderLinesByCLtimes
     165
     166ALIGN MENU_JUMP_ALIGN
     167RefreshInformationBorders:
     168    call    DrawSeparationBorderLine
     169    mov     cl, [bp+MENUINIT.bInfoLines]
     170    ; Fall to DrawTextBorderLinesByCLtimes
     171
     172;--------------------------------------------------------------------
     173; DrawTextBorderLinesByCLtimes
    191174; DrawTextBorderLinesByCXtimes
    192175;   Parameters
    193 ;       CX:     Number of border lines to draw
     176;       CL/CX:  Number of border lines to draw
    194177;       DX:     Number of times to repeat middle character
    195178;       SS:BP:  Ptr to MENU
     
    199182;       AX, CX, SI, DI
    200183;--------------------------------------------------------------------
     184DrawTextBorderLinesByCLtimes:
     185    xor     ch, ch
    201186DrawTextBorderLinesByCXtimes:
    202187    jcxz    .NoBorderLinesToDraw
     
    213198; DrawSeparationBorderLine
    214199; DrawBottomBorderLine
    215 ; DrawTimeoutCounterOverBottomBorderLine
    216200; DrawBottomShadowLine
    217201; DrawTextBorderLine
     
    242226
    243227    call    DrawTimeoutCounterString
     228    push    dx
    244229    sub     dx, BYTE MENU_TIMEOUT_STRING_CHARACTERS
    245230    mov     si, g_BottomBorderWithTimeoutCharacters
    246231    call    PrintBorderCharactersFromCSSIandShadowCharacter
    247     add     dx, BYTE MENU_TIMEOUT_STRING_CHARACTERS
     232    pop     dx
    248233    ret
    249234
     
    403388    mov     si, ATTRIBUTE_CHARS.cNormalTimeout
    404389    cmp     di, BYTE MENU_TIMEOUT_SECONDS_FOR_HURRY
    405     eCMOVB  si, ATTRIBUTE_CHARS.cHurryTimeout
     390    jnb     SHORT .NormalTimeout
     391    dec     si          ; SI = ATTRIBUTE_CHARS.cHurryTimeout
     392.NormalTimeout:
    406393    call    MenuAttribute_GetToAXfromTypeInSI
    407394
  • trunk/Assembly_Library/Src/Menu/MenuScrollbars.asm

    r526 r568  
    116116ALIGN MENU_JUMP_ALIGN
    117117MenuScrollbars_MoveHighlightedItemByAX:
    118     mov     cx, [bp+MENUINIT.wHighlightedItem]
    119     add     cx, ax
    120     ; Fall to .RotateItemInCX
    121 
    122 ;--------------------------------------------------------------------
    123 ; .RotateItemInCX
    124 ;   Parameters
    125 ;       CX:     Possibly under of overflown item to be rotated
    126 ;       SS:BP:  Ptr to MENU
    127 ;   Returns:
    128 ;       CX:     Valid item index
    129 ;   Corrupts registers:
    130 ;       DX
    131 ;--------------------------------------------------------------------
    132 ;.RotateItemInCX:
    133118    mov     dx, [bp+MENUINIT.wItems]
    134     test    cx, cx
     119    add     ax, [bp+MENUINIT.wHighlightedItem]
     120    xchg    cx, ax
    135121    js      SHORT .RotateNegativeItemInCX
    136122    sub     cx, dx
  • trunk/Assembly_Library/Src/Serial/SerialServer.asm

    r567 r568  
    8383
    8484%ifdef USE_UNDOC_INTEL
    85         eSALC   ; Clear AL using CF
     85        salc    ; Clear AL using CF
    8686%else
    87         xor     ax,ax
     87        xor     al, al
    8888%endif
    8989        inc     dx              ; divisor high
     
    108108        pop     dx              ; base, interrupts disabled
    109109%ifdef USE_UNDOC_INTEL
    110         eSALC   ; Clear AL using CF
     110        salc    ; Clear AL using CF
    111111%else
    112         xor     ax,ax
     112        xor     al, al
    113113%endif
    114114        out     dx,al
Note: See TracChangeset for help on using the changeset viewer.