Changeset 84 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot


Ignore:
Timestamp:
Jan 14, 2011, 10:57:46 PM (13 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Minor size optimizations in various files.

Location:
trunk/XTIDE_Universal_BIOS/Src/Boot
Files:
3 edited

Legend:

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

    r32 r84  
    22; Project name  :   IDE BIOS
    33; Created date  :   25.3.2010
    4 ; Last update   :   3.8.2010
    5 ; Author        :   Tomi Tilli
     4; Last update   :   14.1.2011
     5; Author        :   Tomi Tilli,
     6;               :   Krister Nordvall (optimizations)
    67; Description   :   Displays Boot Menu.
    78
     
    3132    call    BootMenu_Enter          ; Get selected menuitem index to CX
    3233    call    BootMenuPrint_ClearScreen
    33     cmp     cx, BYTE 0              ; -1 if nothing selected (ESC pressed)
    34     jl      SHORT BootMenu_DisplayAndReturnSelection
     34    test    cx, cx                  ; -1 if nothing selected (ESC pressed)
     35    js      SHORT BootMenu_DisplayAndReturnSelection
    3536    call    BootMenu_CheckAndConvertHotkeyToMenuitem
    3637    jc      SHORT .SetDriveTranslationForHotkey
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm

    r32 r84  
    22; Project name  :   IDE BIOS
    33; Created date  :   26.3.2010
    4 ; Last update   :   3.8.2010
    5 ; Author        :   Tomi Tilli
     4; Last update   :   14.1.2011
     5; Author        :   Tomi Tilli,
     6;               :   Krister Nordvall (optimizations)
    67; Description   :   Functions for printing boot menu strings.
    78
     
    4344;       DH:     Cursor Y coordinate
    4445;   Corrupts registers:
    45 ;       AX
     46;       Nothing
    4647;--------------------------------------------------------------------
    4748ALIGN JUMP_ALIGN
    4849BootMenuPrint_GetCoordinatesForBottomStrings:
    4950    mov     dx, 1800h               ; (0, 24)
    50     xor     ax, ax                  ; Zero AX
    51     sub     al, bl                  ; Set CF if any floppy drives
    52     sbb     dh, 0                   ; Decrement Y-coordinate if necessary
    53     sub     ah, bh                  ; Set CF if any hard disks
    54     sbb     dh, 0                   ; Decrement Y-coordinate if necessary
     51    cmp     dl, bl                  ; Set CF if any floppy drives
     52    sbb     dh, dl                  ; Decrement Y-coordinate if necessary
     53    cmp     dl, bh                  ; Set CF if any hard disks
     54    sbb     dh, dl                  ; Decrement Y-coordinate if necessary
    5555    ret
    5656
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootVars.asm

    r3 r84  
    22; Project name  :   IDE BIOS
    33; Created date  :   1.4.2010
    4 ; Last update   :   12.4.2010
    5 ; Author        :   Tomi Tilli
     4; Last update   :   14.1.2011
     5; Author        :   Tomi Tilli,
     6;               :   Krister Nordvall (optimizations)
    67; Description   :   Functions to access BOOTVARS struct.
    78
     
    6667    cli                                 ; Disable interrupts
    6768    LOAD_BDA_SEGMENT_TO ss, sp
    68     eLSS    sp, ss:BOOTVARS.dwPostStack
     69;   eLSS    sp, ss:BOOTVARS.dwPostStack ; Expanded macro to remove
     70                                        ; unneeded CLI instruction
     71%ifndef USE_386
     72    mov     sp, [ss:BOOTVARS.dwPostStack]
     73    mov     ss, [ss:BOOTVARS.dwPostStack+2]
     74%else
     75    lss     sp, [ss:BOOTVARS.dwPostStack]
     76%endif
    6977    sti                                 ; Enable interrupts
    7078    jmp     ax
Note: See TracChangeset for help on using the changeset viewer.