Changeset 531 in xtideuniversalbios


Ignore:
Timestamp:
Mar 30, 2013, 6:50:48 PM (11 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • A few minor optimizations.
Location:
trunk
Files:
3 edited

Legend:

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

    r526 r531  
    127127%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    128128    %assign i 0
    129     %rep DISPLAY_CONTEXT_size / 2
    130         push    WORD [VIDEO_BDA.displayContext + i]
    131     %assign i i+2
    132     %endrep
     129    %ifdef USE_386
     130        %rep DISPLAY_CONTEXT_size / 4
     131            push    DWORD [VIDEO_BDA.displayContext + i]
     132            %assign i i+4
     133        %endrep
     134    %else
     135        %rep DISPLAY_CONTEXT_size / 2
     136            push    WORD [VIDEO_BDA.displayContext + i]
     137            %assign i i+2
     138        %endrep
     139    %endif
    133140%endif
    134141
     
    144151
    145152%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    146     %assign i DISPLAY_CONTEXT_size-2
    147     %rep DISPLAY_CONTEXT_size / 2
    148         pop     WORD [VIDEO_BDA.displayContext + i]
    149     %assign i i-2
    150     %endrep
     153    %ifdef USE_386
     154        %assign i DISPLAY_CONTEXT_size-4
     155        %rep DISPLAY_CONTEXT_size / 4
     156            pop     DWORD [VIDEO_BDA.displayContext + i]
     157            %assign i i-4
     158        %endrep
     159    %else
     160        %assign i DISPLAY_CONTEXT_size-2
     161        %rep DISPLAY_CONTEXT_size / 2
     162            pop     WORD [VIDEO_BDA.displayContext + i]
     163            %assign i i-2
     164        %endrep
     165    %endif
    151166%endif
    152167
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/FloppyDrive.asm

    r530 r531  
    6464
    6565%else ; if XT build
    66     cmp     WORD [es:BIOS_DISKETTE_INTERRUPT_40h*4+2], 0C000h   ; Any ROM segment? (set CF if not)
     66    cmp     BYTE [es:BIOS_DISKETTE_INTERRUPT_40h*4+3], 0C0h ; Any ROM segment? (set CF if not)
    6767%endif ; USE_AT
    6868    cmc
     
    134134    js      .UseBIOSorBDA               ; We didn't add in any drives, counts here are not valid
    135135
    136     adc     al ,1                       ; adds in the drive count bit, and adds 1 for count vs. 0-index,
     136    adc     al, 1                       ; adds in the drive count bit, and adds 1 for count vs. 0-index,
    137137    jmp     .FinishCalc                 ; need to clear AH on the way out, and add in minimum drive numbers
    138138
     
    175175    cwd                             ; Floppy Drive 00h
    176176    int     BIOS_DISKETTE_INTERRUPT_40h
    177     mov     al, dl                  ; Number of Floppy Drives to AL
     177    xchg    dx, ax                  ; Number of Floppy Drives to AL
    178178
    179179    pop     dx
     
    187187    LOAD_BDA_SEGMENT_TO es, ax
    188188    mov     al, [es:BDA.wEquipment] ; Load Equipment WORD low byte
     189
     190%ifdef USE_UNDOC_INTEL
     191    and     al, 0C1h
     192    eAAM    64
     193%else
    189194    mov     ah, al                  ; Copy it to AH
    190195    and     ax, 0C001h              ; Leave bits 15..14 and 0
    191196    eROL_IM ah, 2                   ; EW low byte bits 7..6 to 1..0
     197%endif ; USE_UNDOC_INTEL
     198
    192199    add     al, ah                  ; AL = Floppy Drive count
    193 %endif
     200%endif ; USE_AT
    194201
    195202    pop     es
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm

    r526 r531  
    5656    mov     al, [cs:ROMVARS.bStealSize]
    5757    sub     [BDA.wBaseMem], ax
    58     mov     ax, [BDA.wBaseMem]
     58    mov     ax, [BDA.wBaseMem]          ; We can save a byte here by using INT 12h instead
    5959    eSHL_IM ax, 6                       ; Segment to first stolen kB (*=40h)
    6060    ; Fall to .InitializeRamvars
Note: See TracChangeset for help on using the changeset viewer.