Changeset 194 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src


Ignore:
Timestamp:
Nov 17, 2011, 11:07:58 AM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

ifdef'd out more unused code. Also added a tool for looking through the listing and the output of the precompiler to aid in finding dead code. Some changes in the files are to add annotations for the tool to avoid false positives.

Location:
trunk/XTIDE_Universal_BIOS/Src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm

    r190 r194  
    182182    shl     bl,1                ;  drive letter high order bit to CF, Item/Information bit to SF
    183183    jc      SHORT BootMenuPrint_HardDiskMenuitem
     184    ; fall through to BootMenuEvent_FallThroughToFloppyMenuitem
    184185       
    185186;;;
     
    189190ALIGN JUMP_ALIGN
    190191BootMenuEvent_FallThroughToFloppyMenuitem: 
    191 
     192    ; fall through to BootMenuPrint_FloppyMenuitem
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm

    r192 r194  
    3232    jmp     short BootMenuPrint_FormatCSSIfromParamsInSSBP
    3333
     34%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    3435%if BootMenuPrint_FloppyMenuitem <> BootMenuEvent_FallThroughToFloppyMenuitem
    3536%error "BootMenuPrint.asm must follow BootMenuEvent.asm, and BootMenuPrint_FloppyMenuitem must be the first routine in BootMenuPrint.asm"
    3637%endif
    37 
     38%endif
    3839       
    3940;--------------------------------------------------------------------
     
    174175    db      2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 6
    175176
     177%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    176178%if g_szFddFiveQuarter <> g_szFddThreeHalf+g_szFddThreeFive_Displacement
    177179%error "FddThreeFive_Displacement incorrect"
     180%endif
    178181%endif
    179182       
     
    225228    cmp     bl, FLOPPY_TYPE_525_HD
    226229    ja      .ThreeHalf
     230%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    227231%if g_szFddThreeFive_Displacement = 2       
    228232    inc     ax                      ; compressed string case
     
    230234%else
    231235    add     ax, g_szFddThreeFive_Displacement
     236%endif
    232237%endif
    233238.ThreeHalf:     
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm

    r193 r194  
    2626    eMOVZX  ax, BYTE [di+DPT.bIdevarsOffset]
    2727    xchg    si, ax                      ; CS:SI now points to IDEVARS
    28     ; Fall to PushAndFormatCfgString
     28    ; Fall to .PushAndFormatCfgString
    2929
    3030;--------------------------------------------------------------------
     
    3838;       AX, DX, SI, DI
    3939;--------------------------------------------------------------------
    40 PushAndFormatCfgString:
     40.PushAndFormatCfgString:
    4141    push    bp
    4242    mov     bp, sp
     
    5353;       AX, BX
    5454;--------------------------------------------------------------------
    55 PushAddressingMode:
     55.PushAddressingMode:
    5656    CustomDPT_GetUnshiftedAddressModeToALZF
    5757    ;;
     
    7676;       AX
    7777;--------------------------------------------------------------------
    78 PushBlockMode:
     78.PushBlockMode:
    7979    mov     ax, 1
    8080    test    BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED
     
    9494;       AX, DX
    9595;--------------------------------------------------------------------
    96 ;PushBusType:
     96.PushBusType:
    9797    mov     al,g_szBusTypeValues_Displacement
    9898    mul     BYTE [cs:si+IDEVARS.bDevice]
     
    113113;       AX, DX
    114114;--------------------------------------------------------------------
    115 PushIRQ:
     115.PushIRQ:
    116116    eMOVZX  ax, BYTE [cs:si+IDEVARS.bIRQ]
    117117    push    ax
     
    127127;       AX
    128128;--------------------------------------------------------------------
    129 PushResetStatus:
     129.PushResetStatus:
    130130    mov     al, [di+DPT.bFlagsHigh]
    131131    and     ax, MASKH_DPT_RESET
     
    141141;       AX, SI, DI
    142142;--------------------------------------------------------------------
    143 PrintValuesFromStack:
     143.PrintValuesFromStack:
    144144    mov     si, g_szCfgFormat
    145145    jmp     BootPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm

    r193 r194  
    8585ALIGN JUMP_ALIGN
    8686Address_OldInt13hAddressToIdeAddress:
    87     call    Address_ExtractLCHSparametersFromOldInt13hAddress
     87        call    Address_ExtractLCHSparametersFromOldInt13hAddress
     88           
     89        CustomDPT_GetUnshiftedAddressModeToALZF
    8890       
    89     CustomDPT_GetUnshiftedAddressModeToALZF
    90     jz      DoNotConvertLCHS    ; 0, ADDR_DPT_LCHS
     91;;; 0: ADDR_DPT_LCHS       
     92        jz      DoNotConvertLCHS   
    9193       
    92     ;;
    93     ;; Since we are only checking for zero, we can do our math in the high order bits,
    94     ;; in this case effectively subtracting 1 from the address mode.
    95     ;;
    96     sub     al,(1<<ADDRESSING_MODE_FIELD_POSITION)
    97     jz      ConvertLCHStoPCHS   ; 1, ADDR_DPT_PCHS
    98        
    99 ;; Fall-through                 ; 2, ADDR_DPT_LBA28 and 3, ADDR_DPT_LBA48
     94;;; 1: ADDR_DPT_PCHS
     95        ;
     96        ; Since we are only checking for zero, we can do our math in the high order bits,
     97        ; in this case effectively subtracting 1 from the address mode.
     98        ;
     99        sub     al,(1<<ADDRESSING_MODE_FIELD_POSITION)
     100        jz      ConvertLCHStoPCHS   
     101
     102;;; 2: ADDR_DPT_LBA28 and 3: ADDR_DPT_LBA48             
     103        ; Fall through to ConvertLCHStoLBARegisterValues 
    100104       
    101105;---------------------------------------------------------------------
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm

    r158 r194  
    1717;       Nothing
    1818;--------------------------------------------------------------------
    19 Initialize_FromMainBiosRomSearch:
     19Initialize_FromMainBiosRomSearch:             ; unused entrypoint ok
    2020    pushf
    2121    push    es
  • trunk/XTIDE_Universal_BIOS/Src/Strings.asm

    r189 r194  
    5151; Ensure that addressing modes are correctly spaced in memory
    5252;
     53%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS       
    5354%if g_szLCHS <> g_szAddressingModes
    5455%error "g_szAddressingModes Displacement Incorrect 1"
     
    6263%if g_szLBA48 <> g_szLBA28 + g_szAddressingModes_Displacement       
    6364%error "g_szAddressingModes Displacement Incorrect 4"
    64 %endif             
     65%endif
     66%endif     
    6567       
    6668g_szFddUnknown: db  "%sUnknown",NULL
     
    8385; Ensure that bus type strings are correctly spaced in memory
    8486;
     87%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
    8588%if g_szBusTypeValues_8Dual <> g_szBusTypeValues
    8689%error "g_szBusTypeValues Displacement Incorrect 1"
     
    100103%if g_szBusTypeValues_Serial <> g_szBusTypeValues_32 + g_szBusTypeValues_Displacement
    101104%error "g_szBusTypeValues Displacement Incorrect 6"             
    102 %endif             
     105%endif
     106%endif
    103107       
    104108g_szSelectionTimeout:   db      DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
  • trunk/XTIDE_Universal_BIOS/Src/StringsCompress.pl

    r189 r194  
    203203# Ensure that branch targets are within reach
    204204#
     205print "%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS\n";
    205206for( $t = $format_begin; $format_index[$t]; $t++ )
    206207{
     
    209210    print "%endif\n";
    210211}
     212print "%endif\n";
    211213
    212214#--------------------------------------------------------------------------------
  • trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm

    r189 r194  
    137137; Ensure that addressing modes are correctly spaced in memory
    138138;
     139%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS       
    139140%if g_szLCHS <> g_szAddressingModes
    140141%error "g_szAddressingModes Displacement Incorrect 1"
     
    148149%if g_szLBA48 <> g_szLBA28 + g_szAddressingModes_Displacement       
    149150%error "g_szAddressingModes Displacement Incorrect 4"
    150 %endif             
     151%endif
     152%endif     
    151153
    152154g_szFddUnknown: ; db    "%sUnknown",NULL
     
    202204; Ensure that bus type strings are correctly spaced in memory
    203205;
     206%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
    204207%if g_szBusTypeValues_8Dual <> g_szBusTypeValues
    205208%error "g_szBusTypeValues Displacement Incorrect 1"
     
    219222%if g_szBusTypeValues_Serial <> g_szBusTypeValues_32 + g_szBusTypeValues_Displacement
    220223%error "g_szBusTypeValues Displacement Incorrect 6"             
    221 %endif             
     224%endif
     225%endif
    222226
    223227g_szSelectionTimeout:   ; db        DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
     
    268272        db     (DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_A)    ; 29
    269273
     274%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    270275%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_s || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_s > 255
    271276%error "DisplayFormatCompressed_Format_s is out of range of DisplayFormatCompressed_BaseFormatOffset"
     
    298303%error "DisplayFormatCompressed_Format_A is out of range of DisplayFormatCompressed_BaseFormatOffset"
    299304%endif
     305%endif
    300306
    301307;; translated usage stats
     
    304310;; format usage stats
    305311;; A:4
    306 ;; c:6
    307 ;; s:14
    308312;; 2-u:1
    309 ;; u:5
    310313;; 5-u:3
    311 ;; 2-I:1
    312314;; x:6
    313315;; 5-x:1
     316;; s:14
    314317;; nl:6
     318;; 2-I:1
     319;; c:6
     320;; u:5
    315321;; total format: 10
    316322
Note: See TracChangeset for help on using the changeset viewer.