Changeset 636 in xtideuniversalbios


Ignore:
Timestamp:
Mar 20, 2026, 8:54:42 PM (6 hours ago)
Author:
Krister Nordvall
Message:

Changes:

  • Another round of optimizations. One notable change is that the code in IdeIO.asm for the XT-IDE rev2+ controllers no longer uses a lookup table to switch A0 and A3, at least not by default. A define (NOSWAPA0A3LOOKUPTABLE = 0, 1 or 2) can be used to select between 3 different alternatives of which the first (0) is the old lookup table code which also requires the most ROM space. Vcfed member Malc has kindly benchmarked all three variants and found no differences in performance so the most space saving option (2) is now the default.
  • Another notable change is that the optimization to MenuAttributes.asm required project wide changes in the form of an additional define simply because of how bad the implementation of the origin (ORG) directive is in NASM. Even calling it half-assed would be praise.
Location:
trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/Display/CgaSnow.asm

    r593 r636  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2026 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    3434CgaSnow_IsCgaPresent:
    3535    cmp     WORD [BDA.wVidPort], CGA_STATUS_REGISTER - OFFSET_TO_CGA_STATUS_REGISTER
     36    clc
    3637    jne     SHORT .CgaNotFound
    3738
    3839    ; All standard CGA modes use 25 rows but only EGA and later store it to BDA.
    3940    cmp     BYTE [BDA.bVidRows], 24     ; BDA contains rows - 1
    40     jae     SHORT .CgaNotFound
    41     ret
    42 ALIGN DISPLAY_JUMP_ALIGN
    4341.CgaNotFound:
    44     clc
    4542    ret
    4643
  • trunk/Assembly_Library/Src/Menu/CharOutLineSplitter.asm

    r589 r636  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2026 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    4040    ; Get last text line column offset to AX
    4141    call    MenuLocation_GetMaxTextLineLengthToAX
     42%ifdef USE_386
     43    lea     ax, [edx+eax*2]
     44%else
    4245    eSHL_IM ax, 1           ; Characters to BYTEs
    4346    add     ax, dx
     47%endif
    4448
    4549    xchg    ax, dx          ; AL = First text line column offset
  • trunk/Assembly_Library/Src/Menu/MenuAttributes.asm

    r601 r636  
    55;
    66; XTIDE Universal BIOS and Associated Tools
    7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     7; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2026 by XTIDE Universal BIOS Team.
    88;
    99; This program is free software; you can redistribute it and/or modify
     
    5151
    5252
     53rgcColorAttributes:
     54; Classic (default theme)
     55istruc ATTRIBUTE_CHARS
     56    at  ATTRIBUTE_CHARS.cBordersAndBackground,  db  COLOR_ATTRIBUTE(COLOR_YELLOW, COLOR_BLUE)
     57    at  ATTRIBUTE_CHARS.cShadow,                db  COLOR_ATTRIBUTE(COLOR_GRAY, COLOR_BLACK)
     58    at  ATTRIBUTE_CHARS.cTitle,                 db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_BLUE)
     59    at  ATTRIBUTE_CHARS.cItem,                  db  COLOR_ATTRIBUTE(COLOR_WHITE, COLOR_BLUE)
     60    at  ATTRIBUTE_CHARS.cHighlightedItem,       db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_CYAN)
     61    at  ATTRIBUTE_CHARS.cHurryTimeout,          db  COLOR_ATTRIBUTE(COLOR_RED, COLOR_BLUE) | FLG_COLOR_BLINK
     62    at  ATTRIBUTE_CHARS.cNormalTimeout,         db  COLOR_ATTRIBUTE(COLOR_GREEN, COLOR_BLUE)
     63iend
     64ColorTheme  equ     rgcColorAttributes
     65
     66rgcBlackAndWhiteAttributes: ; Only COLOR_WHITE, COLOR_BRIGHT_WHITE and COLOR_BLACK should be used
     67istruc ATTRIBUTE_CHARS
     68    at  ATTRIBUTE_CHARS.cBordersAndBackground,  db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_BLACK)
     69    at  ATTRIBUTE_CHARS.cShadow,                db  COLOR_ATTRIBUTE(COLOR_GRAY, COLOR_BLACK)
     70    at  ATTRIBUTE_CHARS.cTitle,                 db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_BLACK)
     71    at  ATTRIBUTE_CHARS.cItem,                  db  COLOR_ATTRIBUTE(COLOR_WHITE, COLOR_BLACK)
     72    at  ATTRIBUTE_CHARS.cHighlightedItem,       db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_WHITE)
     73    at  ATTRIBUTE_CHARS.cHurryTimeout,          db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_BLACK) | FLG_COLOR_BLINK
     74    at  ATTRIBUTE_CHARS.cNormalTimeout,         db  COLOR_ATTRIBUTE(COLOR_WHITE, COLOR_BLACK)
     75iend
     76
     77rgcMonochromeAttributes:
     78istruc ATTRIBUTE_CHARS
     79    at  ATTRIBUTE_CHARS.cBordersAndBackground,  db  MONO_BRIGHT
     80    at  ATTRIBUTE_CHARS.cShadow,                db  MONO_REVERSE_DARK
     81    at  ATTRIBUTE_CHARS.cTitle,                 db  MONO_BRIGHT
     82    at  ATTRIBUTE_CHARS.cItem,                  db  MONO_NORMAL
     83    at  ATTRIBUTE_CHARS.cHighlightedItem,       db  MONO_REVERSE
     84    at  ATTRIBUTE_CHARS.cHurryTimeout,          db  MONO_BRIGHT_BLINK
     85    at  ATTRIBUTE_CHARS.cNormalTimeout,         db  MONO_NORMAL
     86iend
     87
     88
    5389;--------------------------------------------------------------------
    5490; MenuAttribute_GetToAXfromTypeInSI
     
    71107    jc      SHORT .LoadColorAttribute
    72108
     109%if (rgcColorAttributes-$$) & 0FF00h = (rgcMonochromeAttributes-$$) & 0FF00h    ; Are the base addresses of all three strucs on the same page?
     110%ifndef ORIGIN
     111; This kludge is needed due to NASM's completely broken implementation of the ORG directive.
     112; Since this is library code used both with ORG 0h (BIOS) and ORG 100h (XTIDECFG) we need
     113; this define as a workaround to be able to use this optimization.
     114    %warning No ORIGIN defined! Assuming 'ORG 0h'
     115    %define ORIGIN 0
     116%endif
     117
    73118.LoadBlackAndWhiteAttribute:
    74     add     si, .rgcBlackAndWhiteAttributes
     119    mov     al, (ORIGIN+rgcBlackAndWhiteAttributes-$$) & 0FFh
     120    SKIP2B  f
     121.LoadMonoAttribute:
     122    mov     al, (ORIGIN+rgcMonochromeAttributes-$$) & 0FFh
     123    SKIP2B  f
     124.LoadColorAttribute:
     125    mov     al, (ORIGIN+rgcColorAttributes-$$) & 0FFh
     126    add     si, (ORIGIN+rgcColorAttributes-$$) & 0FF00h
     127    add     si, ax
     128%else
     129%warning Please relocate the ATTRIBUTE_CHARS strucs to re-enable the optimization in this file.
     130
     131.LoadBlackAndWhiteAttribute:
     132    add     si, rgcBlackAndWhiteAttributes
    75133    jmp     SHORT .LoadAttributeAndReturn
    76134
    77135ALIGN MENU_JUMP_ALIGN
    78136.LoadMonoAttribute:
    79     add     si, .rgcMonochromeAttributes
     137    add     si, rgcMonochromeAttributes
    80138    jmp     SHORT .LoadAttributeAndReturn
    81139
    82140ALIGN MENU_JUMP_ALIGN
    83141.LoadColorAttribute:
    84     add     si, .rgcColorAttributes
     142    add     si, rgcColorAttributes
    85143.LoadAttributeAndReturn:
     144%endif
    86145    cs lodsb                            ; Load from [CS:SI] to AL
    87146
    88147    pop     ds
    89148    ret
    90 
    91 
    92 .rgcColorAttributes:
    93 ; Classic (default theme)
    94 istruc ATTRIBUTE_CHARS
    95     at  ATTRIBUTE_CHARS.cBordersAndBackground,  db  COLOR_ATTRIBUTE(COLOR_YELLOW, COLOR_BLUE)
    96     at  ATTRIBUTE_CHARS.cShadow,                db  COLOR_ATTRIBUTE(COLOR_GRAY, COLOR_BLACK)
    97     at  ATTRIBUTE_CHARS.cTitle,                 db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_BLUE)
    98     at  ATTRIBUTE_CHARS.cItem,                  db  COLOR_ATTRIBUTE(COLOR_WHITE, COLOR_BLUE)
    99     at  ATTRIBUTE_CHARS.cHighlightedItem,       db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_CYAN)
    100     at  ATTRIBUTE_CHARS.cHurryTimeout,          db  COLOR_ATTRIBUTE(COLOR_RED, COLOR_BLUE) | FLG_COLOR_BLINK
    101     at  ATTRIBUTE_CHARS.cNormalTimeout,         db  COLOR_ATTRIBUTE(COLOR_GREEN, COLOR_BLUE)
    102 iend
    103 ColorTheme  equ     MenuAttribute_GetToAXfromTypeInSI.rgcColorAttributes
    104 
    105 .rgcBlackAndWhiteAttributes:    ; Only COLOR_WHITE, COLOR_BRIGHT_WHITE and COLOR_BLACK should be used
    106 istruc ATTRIBUTE_CHARS
    107     at  ATTRIBUTE_CHARS.cBordersAndBackground,  db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_BLACK)
    108     at  ATTRIBUTE_CHARS.cShadow,                db  COLOR_ATTRIBUTE(COLOR_GRAY, COLOR_BLACK)
    109     at  ATTRIBUTE_CHARS.cTitle,                 db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_BLACK)
    110     at  ATTRIBUTE_CHARS.cItem,                  db  COLOR_ATTRIBUTE(COLOR_WHITE, COLOR_BLACK)
    111     at  ATTRIBUTE_CHARS.cHighlightedItem,       db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_WHITE)
    112     at  ATTRIBUTE_CHARS.cHurryTimeout,          db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_BLACK) | FLG_COLOR_BLINK
    113     at  ATTRIBUTE_CHARS.cNormalTimeout,         db  COLOR_ATTRIBUTE(COLOR_WHITE, COLOR_BLACK)
    114 iend
    115 
    116 .rgcMonochromeAttributes:
    117 istruc ATTRIBUTE_CHARS
    118     at  ATTRIBUTE_CHARS.cBordersAndBackground,  db  MONO_BRIGHT
    119     at  ATTRIBUTE_CHARS.cShadow,                db  MONO_REVERSE_DARK
    120     at  ATTRIBUTE_CHARS.cTitle,                 db  MONO_BRIGHT
    121     at  ATTRIBUTE_CHARS.cItem,                  db  MONO_NORMAL
    122     at  ATTRIBUTE_CHARS.cHighlightedItem,       db  MONO_REVERSE
    123     at  ATTRIBUTE_CHARS.cHurryTimeout,          db  MONO_BRIGHT_BLINK
    124     at  ATTRIBUTE_CHARS.cNormalTimeout,         db  MONO_NORMAL
    125 iend
  • trunk/Assembly_Library/Src/Menu/MenuBorders.asm

    r592 r636  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2026 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    2929; Section containing code
    3030SECTION .text
     31
     32;--------------------------------------------------------------------
     33; MenuBorders_RedrawBottomBorderLine
     34;   Parameters
     35;       SS:BP:  Ptr to MENU
     36;   Returns:
     37;       Nothing
     38;   Corrupts registers:
     39;       AX, BX, DX, SI, DI
     40;--------------------------------------------------------------------
     41ALIGN MENU_JUMP_ALIGN
     42MenuBorders_RedrawBottomBorderLine:
     43    call    MenuBorders_AdjustDisplayContextForDrawingBorders
     44    call    MenuLocation_GetBottomBordersTopLeftCoordinatesToAX
     45    CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX
     46    call    MenuBorders_GetNumberOfMiddleCharactersToDX
     47    jmp     SHORT DrawBottomBorderLine
     48
     49
     50;--------------------------------------------------------------------
     51; MenuBorders_RefreshItemBorders
     52;   Parameters
     53;       SS:BP:  Ptr to MENU
     54;   Returns:
     55;       Nothing
     56;   Corrupts registers:
     57;       AX, BX, CX, DX, SI, DI
     58;--------------------------------------------------------------------
     59%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
     60ALIGN MENU_JUMP_ALIGN
     61MenuBorders_RefreshItemBorders:
     62    call    MenuBorders_AdjustDisplayContextForDrawingBorders
     63    call    MenuLocation_GetItemBordersTopLeftCoordinatesToAX
     64    CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX
     65
     66    call    MenuBorders_GetNumberOfMiddleCharactersToDX
     67    jmp     SHORT RefreshItemBorders
     68%endif
     69
    3170
    3271;--------------------------------------------------------------------
     
    5695    push    RefreshTitleBorders
    5796    push    MenuBorders_GetNumberOfMiddleCharactersToDX
    58     jmp     SHORT MenuBorders_AdjustDisplayContextForDrawingBorders
    59 %endif
    60 
    61 
    62 ;--------------------------------------------------------------------
    63 ; MenuBorders_RedrawBottomBorderLine
    64 ;   Parameters
    65 ;       SS:BP:  Ptr to MENU
    66 ;   Returns:
    67 ;       Nothing
    68 ;   Corrupts registers:
    69 ;       AX, BX, DX, SI, DI
    70 ;--------------------------------------------------------------------
    71 ALIGN MENU_JUMP_ALIGN
    72 MenuBorders_RedrawBottomBorderLine:
    73     call    MenuBorders_AdjustDisplayContextForDrawingBorders
    74     call    MenuLocation_GetBottomBordersTopLeftCoordinatesToAX
    75     CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX
    76     call    MenuBorders_GetNumberOfMiddleCharactersToDX
    77     jmp     SHORT DrawBottomBorderLine
    78 
    79 
    80 ;--------------------------------------------------------------------
    81 ; MenuBorders_RefreshItemBorders
    82 ;   Parameters
    83 ;       SS:BP:  Ptr to MENU
    84 ;   Returns:
    85 ;       Nothing
    86 ;   Corrupts registers:
    87 ;       AX, BX, CX, DX, SI, DI
    88 ;--------------------------------------------------------------------
    89 %ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    90 ALIGN MENU_JUMP_ALIGN
    91 MenuBorders_RefreshItemBorders:
    92     call    MenuBorders_AdjustDisplayContextForDrawingBorders
    93     call    MenuLocation_GetItemBordersTopLeftCoordinatesToAX
    94     CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX
    95 
    96     call    MenuBorders_GetNumberOfMiddleCharactersToDX
    97     jmp     SHORT RefreshItemBorders
     97    ; Fall to MenuBorders_AdjustDisplayContextForDrawingBorders
    9898%endif
    9999
  • trunk/Assembly_Library/Src/Menu/MenuScrollbars.asm

    r583 r636  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2026 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    190190
    191191    call    MenuScrollbars_GetLastVisibleItemOnPageToAX
    192     cmp     cx, ax
    193     ja      SHORT .ItemIsNotVisible
    194     stc     ; Item is visible
     192    cmp     ax, cx
     193    cmc
    195194ALIGN MENU_JUMP_ALIGN, ret
    196195.ItemIsNotVisible:
  • trunk/BIOS_Drive_Information_Tool/Src/Main.asm

    r614 r636  
    55;
    66; XTIDE Universal BIOS and Associated Tools
    7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     7; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2026 by XTIDE Universal BIOS Team.
    88;
    99; This program is free software; you can redistribute it and/or modify
     
    3737
    3838; Program first instruction.
    39 ORG 100h                        ; Code starts at offset 100h (DOS .COM)
     39%define ORIGIN 100h
     40ORG ORIGIN                      ; Code starts at offset 100h (DOS .COM)
    4041Start:
    4142    jmp     StartBiosDriveInformationTool
  • trunk/BIOS_Drive_Information_Tool/Src/Strings.asm

    r631 r636  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2025 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2026 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    2222
    2323g_szProgramName:    db  "BIOS Drive Information Tool v1.0.3",CR,LF
    24                     db  "(C) 2012-2025 by XTIDE Universal BIOS Team",CR,LF
     24                    db  "(C) 2012-2026 by XTIDE Universal BIOS Team",CR,LF
    2525                    db  "Released under GNU GPL v2",CR,LF
    2626                    db  "http://xtideuniversalbios.org/",CR,LF,NULL
  • trunk/XTIDE_Universal_BIOS/Inc/Revision.inc

    r635 r636  
    1 635
     1636
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm

    r633 r636  
    55;
    66; XTIDE Universal BIOS and Associated Tools
    7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2025 by XTIDE Universal BIOS Team.
     7; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2026 by XTIDE Universal BIOS Team.
    88;
    99; This program is free software; you can redistribute it and/or modify
     
    2222SECTION .text
    2323
     24%ifndef NOSWAPA0A3LOOKUPTABLE           ; Not defined in the makefile?
     25    %define NOSWAPA0A3LOOKUPTABLE 2     ; Set this to 0, 1 or 2. 2 saves the most space, 0 the least.
     26%endif
     27
    2428;--------------------------------------------------------------------
    2529; IdeIO_InputStatusRegisterToAL
     
    5660    cmp     al, DEVICE_8BIT_XTIDE_REV2
    5761    jb      SHORT .InputToALfromRegisterInDX    ; Standard IDE controllers, Juko D16-X and XTIDE rev 1
     62%if NOSWAPA0A3LOOKUPTABLE = 0
    5863    mov     bx, dx  ; ...and BX for A0<->A3 swap and for memory mapped I/O
     64%endif
    5965
    6066%ifdef MODULE_8BIT_IDE_ADVANCED
    6167    cmp     al, DEVICE_8BIT_XTIDE_REV2_OLIVETTI
    6268    jbe     SHORT .ReverseA0andA3fromRegisterIndexInDX
     69
     70%if NOSWAPA0A3LOOKUPTABLE <> 0
     71    mov     bl, dl  ; ...and BL for memory mapped I/O
     72%endif
    6373
    6474    eSHL_IM dx, 1   ; ADP50L and XT-CF
     
    7989
    8090.ReverseA0andA3fromRegisterIndexInDX:
     91%if NOSWAPA0A3LOOKUPTABLE = 0
     92; 5 bytes plus the lookup table (8 bytes).
    8193    mov     dl, [cs:bx+g_rgbSwapA0andA3fromIdeRegisterIndex]
     94%else
     95; 8 bytes. No lookup table.
     96    test    dl, 1
     97    jz      SHORT .InputToALfromRegisterInDX
     98    xor     dl, 1001b                       ; Clear A3, Set A0
     99%endif
    82100
    83101.InputToALfromRegisterInDX:
     
    181199
    182200.ReverseA0andA3fromRegisterIndexInDX:
     201%if NOSWAPA0A3LOOKUPTABLE = 0
     202; 8 bytes plus the lookup table (8 bytes).
    183203    mov     bx, dx
    184204    mov     dl, [cs:bx+g_rgbSwapA0andA3fromIdeRegisterIndex]
    185205    SKIP2B  bx  ; Skip eSHL_IM dx, 1
     206%elif NOSWAPA0A3LOOKUPTABLE = 1
     207; 9 bytes. No lookup table.
     208    test    dl, 1
     209    jz      SHORT OutputALtoRegisterInDX
     210    xor     dl, 1001b                       ; Clear A3, Set A0
     211    SKIP2B  bx  ; Skip eSHL_IM dx, 1
     212%else
     213; 7 bytes. No lookup table.
     214    shr     dx, 1
     215    jnc     SHORT .ShlRegisterIndexInDXandOutputAL
     216    or      dx, 4
     217%endif
    186218
    187219.ShlRegisterIndexInDXandOutputAL:
     
    196228
    197229
    198 
     230%if NOSWAPA0A3LOOKUPTABLE = 0
    199231; A0 <-> A3 lookup table
    200232g_rgbSwapA0andA3fromIdeRegisterIndex:
     
    207239    db  0110b   ; <-> 0110b, 6
    208240    db  1110b   ; <-> 0111b, 7
     241%endif
     242
     243%undef NOSWAPA0A3LOOKUPTABLE
    209244
    210245%endif ; MODULE_8BIT_IDE
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm

    r632 r636  
    55;
    66; XTIDE Universal BIOS and Associated Tools
    7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2025 by XTIDE Universal BIOS Team.
     7; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2026 by XTIDE Universal BIOS Team.
    88;
    99; This program is free software; you can redistribute it and/or modify
     
    216216%ifdef USE_386
    217217    movzx   ax, BYTE [es:si+ATA1.bPioMode]  ; AH = 0, AL = PIO mode 0, 1 or 2
     218    lea     bx, [eax+eax]
    218219%else
    219220    mov     al, [es:si+ATA1.bPioMode]
    220221    cbw
    221 %endif
    222222    mov     bx, ax
    223223    eSHL_IM bx, 1                       ; Shift for WORD lookup
     224%endif
    224225    mov     cx, [cs:bx+.rgwPio0to2CycleTimeInNanosecs]
    225226
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm

    r632 r636  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2025 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2026 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    266266%ifdef USE_NEC_V
    267267    eCLR1   al, cl              ; Clear wanted bit
     268%elifdef USE_386
     269    btr     ax, cx              ; Clear wanted bit
    268270%else
    269271    mov     ch, ~1              ; Load bit mask to be rotated
  • trunk/XTIDE_Universal_BIOS/Src/Main.asm

    r625 r636  
    1515;
    1616; XTIDE Universal BIOS and Associated Tools
    17 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
     17; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2026 by XTIDE Universal BIOS Team.
    1818;
    1919; This program is free software; you can redistribute it and/or modify
     
    2929;
    3030
    31     ORG 0                           ; Code start offset 0000h
     31    %define ORIGIN 0
     32    ORG ORIGIN                      ; Code start offset 0000h
    3233
    3334    ; We must define included libraries before including "AssemblyLibrary.inc".
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CompatibleDPT.asm

    r632 r636  
    66;
    77; XTIDE Universal BIOS and Associated Tools
    8 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2025 by XTIDE Universal BIOS Team.
     8; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2026 by XTIDE Universal BIOS Team.
    99;
    1010; This program is free software; you can redistribute it and/or modify
     
    7373    push    ds
    7474    pop     es
     75%ifdef USE_186
     76    imul    di, [cs:ROMVARS.bStealSize], 1024
     77%else
    7578    mov     di, [cs:ROMVARS.bStealSize] ; No harm to read WORD
    7679    eSHL_IM di, 10                      ; DI = RAMVARS size in bytes
     80%endif
    7781%ifdef MODULE_EBIOS
    7882    sub     di, BYTE (TRANSLATED_DPT_size * 2) + DPTE_size
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm

    r632 r636  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2025 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2026 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    4040    jnz     SHORT .InitializeRamvars    ; No need to steal RAM
    4141
     42    mov     di, BDA.wBaseMem
    4243    mov     ds, ax
    4344    mov     al, [cs:ROMVARS.bStealSize]
    44     sub     [BDA.wBaseMem], ax
     45    sub     [di], ax
    4546%ifdef USE_186
    46     imul    ax, [BDA.wBaseMem], 64
     47    imul    ax, [di], 64
    4748%else
    4849    mov     al, 64
    49     mul     WORD [BDA.wBaseMem]
     50    mul     WORD [di]
    5051%endif
    5152
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Main.asm

    r620 r636  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2026 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    4242
    4343; Program first instruction.
    44 ORG 100h                        ; Code starts at offset 100h (DOS .COM)
     44%define ORIGIN 100h
     45ORG ORIGIN                      ; Code starts at offset 100h (DOS .COM)
    4546Start:
    4647    jmp     Main_Start
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm

    r633 r636  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2025 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2026 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    9898g_szNfoMainFlash:       db  "Flash loaded BIOS image to EEPROM.",NULL
    9999g_szNfoMainSave:        db  "Save BIOS changes back to original file from which it was loaded.",NULL
    100 g_szNfoMainLicense:     db  "XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2025 by XTIDE Universal BIOS Team."
     100g_szNfoMainLicense:     db  "XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2026 by XTIDE Universal BIOS Team."
    101101                        db  " Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY. Press ENTER for more details...",NULL
    102102g_szNfoMainHomePage:    db  "Visit http://xtideuniversalbios.org (home page) and http://forum.vcfed.org (support)",NULL
    103103
    104104g_szHelpMainLicense:    db  "XTIDE Universal BIOS and XTIDECFG Configuration program are Copyright 2009-2010 by Tomi Tilli,"
    105                         db  " 2011-2025 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."
     105                        db  " 2011-2026 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."
    106106                        db  " This is free software, and you are welcome to redistribute it under certain conditions."
    107107                        db  " See the LICENSE.TXT file that was included with this distribution,"
Note: See TracChangeset for help on using the changeset viewer.