Changeset 369 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS


Ignore:
Timestamp:
Mar 29, 2012, 9:29:28 AM (13 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Removed align directives for initalization code and added define for align in boot-time calls to the assembly library (defaulting to 1), resulting in a significant savings for the AT and 386 builds. Fixed a bug with switch command line handling in the serial server. Put in CR characters in licesnse.txt, so that it properly displays on Windows. In the configurator, added default values for user supplied CHS and LBA values, defaulting to values within range when those features are enabled. Updated the copyright message in the configurator as the literal word Copyright is important.

Location:
trunk/XTIDE_Universal_BIOS
Files:
15 edited

Legend:

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

    r294 r369  
    1616;       All General Purpose Registers
    1717;--------------------------------------------------------------------
    18 ALIGN JUMP_ALIGN
    1918BootMenu_DisplayAndReturnSelectionInDX:
    2019    call    DriveXlate_Reset
     
    3938;       AX, DI
    4039;--------------------------------------------------------------------
    41 ALIGN JUMP_ALIGN
    4240BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS:
    4341    call    RamVars_GetSegmentToDS
    4442;;; fall-through
    4543
    46 ALIGN JUMP_ALIGN
    4744BootMenu_GetDriveToDXforMenuitemInCX:
    4845    cmp     cl, NO_ITEM_HIGHLIGHTED
     
    7370;       AX, BX, DI
    7471;--------------------------------------------------------------------
    75 ALIGN JUMP_ALIGN
    7672BootMenu_Enter:
    7773    mov     bx, BootMenuEvent_Handler
     
    9288;       CX
    9389;--------------------------------------------------------------------
    94 ALIGN JUMP_ALIGN
    9590BootMenu_GetMenuitemCountToAX:
    9691    call    RamVars_GetHardDiskCountFromBDAtoAX
     
    110105;       AL, CX, DI
    111106;--------------------------------------------------------------------
    112 ALIGN JUMP_ALIGN
    113107BootMenu_GetHeightToAHwithItemCountInAL:
    114108    add     al, BOOT_MENU_HEIGHT_WITHOUT_ITEMS
     
    119113    jb      SHORT .Return
    120114    mov     ah, cl
    121 ALIGN JUMP_ALIGN, ret
     115
    122116.Return:
    123117    ret
     
    133127;       CX
    134128;--------------------------------------------------------------------
    135 ALIGN JUMP_ALIGN
    136129BootMenu_GetMenuitemToAXforAsciiHotkeyInAL:
    137130    call    Char_ALtoUpperCaseLetter
     
    144137    sub     al, 'A'                     ; Letter to Floppy Drive menuitem
    145138    ret
    146 ALIGN JUMP_ALIGN
     139
    147140.StartFromHardDiskLetter:
    148141    sub     cl, al                      ; Hard Disk index
     
    165158;       AX
    166159;--------------------------------------------------------------------
    167 ALIGN JUMP_ALIGN
    168160BootMenu_GetLetterForFirstHardDiskToAL:
    169161    call    FloppyDrive_GetCountToAX
     
    172164    ja      .Return
    173165    mov     al, 'C'
    174 ALIGN JUMP_ALIGN, ret
     166       
    175167.Return:
    176168    ret
     
    186178;       AX
    187179;--------------------------------------------------------------------
    188 ALIGN JUMP_ALIGN
    189180BootMenu_GetMenuitemToDXforDriveInDL:
    190181    xor     dh, dh                      ; Drive number now in DX
     
    211202;       AX, CX
    212203;--------------------------------------------------------------------
    213 ALIGN JUMP_ALIGN
    214204BootMenu_IsDriveInSystem:
    215205    test    dl, dl                              ; Floppy drive?
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm

    r258 r369  
    1616;       All
    1717;--------------------------------------------------------------------
    18 ALIGN JUMP_ALIGN
    1918BootMenuEvent_Handler:
    2019
     
    6665; Returns:
    6766;   DS:SI:      Ptr to initialized MENUINIT struct
    68 ALIGN JUMP_ALIGN
    6967.FirstEvent:   
    7068.InitializeMenuinitFromDSSI:
     
    8583    ret
    8684
    87 ALIGN JUMP_ALIGN
    8885.GetDefaultMenuitemToDX:
    8986    mov     dl, [cs:ROMVARS.bBootDrv]   ; Default boot drive
     
    9289    call    DriveXlate_SetDriveToSwap
    9390    jmp     BootMenu_GetMenuitemToDXforDriveInDL
    94 ALIGN JUMP_ALIGN
     91
    9592.DoNotSetDefaultMenuitem:
    9693    xor     dx, dx                      ; Whatever appears first on boot menu
     
    10198;   CX:         Index of new highlighted item
    10299;   DX:         Index of previously highlighted item or NO_ITEM_HIGHLIGHTED
    103 ALIGN JUMP_ALIGN
    104100.ItemHighlightedFromCX:
    105101    push    cx
     
    124120;   AL:         ASCII character for the key
    125121;   AH:         Keyboard library scan code for the key
    126 ALIGN JUMP_ALIGN
    127122.KeyStrokeInAX:
    128123    cmp     ah, ROM_BOOT_HOTKEY_SCANCODE
     
    130125    ;; NOTE: carry flag will be clear after compare above that resulted in zero
    131126    jmp     Int19hMenu_JumpToBootSector_or_RomBoot     
    132 ALIGN JUMP_ALIGN
     127
    133128.CheckDriveHotkeys:
    134129    call    BootMenu_GetMenuitemToAXforAsciiHotkeyInAL
     
    147142; Parameters:
    148143;   CX:         Index of selected item
    149 ALIGN JUMP_ALIGN
    150144.ItemSelectedFromCX:
    151145    CALL_MENU_LIBRARY Close
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuInfo.asm

    r365 r369  
    5555;       CX
    5656;--------------------------------------------------------------------
    57 ALIGN JUMP_ALIGN
    5857BootMenuInfo_GetTotalSectorCount:
    5958    test    BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm

    r294 r369  
    1515;       AX, BX, DX, SI, DI
    1616;--------------------------------------------------------------------
    17 ALIGN JUMP_ALIGN
    1817BootMenuPrint_RefreshItem:
    1918    call    BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS
     
    5958;       AX, SI, DI
    6059;--------------------------------------------------------------------
    61 ALIGN JUMP_ALIGN
    6260BootMenuPrint_TitleStrings:
    6361    mov     si, ROMVARS.szTitle
     
    7674;       AX, DI
    7775;--------------------------------------------------------------------
    78 ALIGN JUMP_ALIGN
    7976BootMenuPrint_NullTerminatedStringFromCSSIandSetCF:
    8077;
     
    9996;       AX, BX, CX, DX, SI, DI, ES
    10097;--------------------------------------------------------------------
    101 ALIGN JUMP_ALIGN
    10298BootMenuPrint_RefreshInformation:
    10399    CALL_MENU_LIBRARY ClearInformationArea
     
    188184;       BX, CX, DX, SI, DI, ES
    189185;--------------------------------------------------------------------
    190 ALIGN JUMP_ALIGN
    191186.HardDiskRefreshInformation:
    192187    jc      .HardDiskMenuitemInfoForForeignDrive        ; Based on CF from FindDPT_ForDriveNumberInDL (way) above
     
    229224;       AX, DI
    230225;--------------------------------------------------------------------
    231 ALIGN JUMP_ALIGN
    232226BootMenuPrint_FormatCSSIfromParamsInSSBP:
    233227    CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI
     
    246240;       AX, DI
    247241;--------------------------------------------------------------------
    248 ALIGN JUMP_ALIGN
    249242BootMenuPrint_ClearScreen:
    250243    call    BootMenuPrint_InitializeDisplayContext
     
    265258;       AX, BX, CX, DX, SI, DI
    266259;--------------------------------------------------------------------
    267 ALIGN JUMP_ALIGN
    268260BootMenuPrint_TheBottomOfScreen:
    269261    call    FloppyDrive_GetCountToAX
     
    351343;       AX, SI, DI
    352344;--------------------------------------------------------------------
    353 ALIGN JUMP_ALIGN
    354345PushHotkeyParamsAndFormat:
    355346    push    bp
     
    378369;       AX, DI
    379370;--------------------------------------------------------------------
    380 ALIGN JUMP_ALIGN
    381371BootMenuPrint_InitializeDisplayContext:
    382372    CALL_DISPLAY_LIBRARY InitializeDisplayContext
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootPrint.asm

    r241 r369  
    1414;       AX, CX, SI, DI
    1515;--------------------------------------------------------------------
    16 ALIGN JUMP_ALIGN
    1716BootPrint_FailedToLoadFirstSector:
    1817    push    bp
     
    3534;       AX, SI, DI
    3635;--------------------------------------------------------------------
    37 ALIGN JUMP_ALIGN
    3836BootPrint_TryToBootFromDL:
    3937    push    bp
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootSector.asm

    r294 r369  
    1717;       AX, CX, DH, SI, DI, (DL if failed to read boot sector)
    1818;--------------------------------------------------------------------
    19 ALIGN JUMP_ALIGN
    2019BootSector_TryToLoadFromDriveDL:
    2120    call    BootPrint_TryToBootFromDL
     
    5251;       AL, CX, DH, DI
    5352;--------------------------------------------------------------------
    54 ALIGN JUMP_ALIGN
    5553LoadFirstSectorFromDriveDL:
    5654    LOAD_BDA_SEGMENT_TO es, bx              ; ES:BX now points to...
    5755    mov     bx, BOOTVARS.rgbBootSect        ; ...boot sector location
    5856    mov     di, BOOT_READ_RETRY_TIMES       ; Initialize retry counter
    59 ALIGN JUMP_ALIGN
     57
    6058.ReadRetryLoop:
    6159    call    .ResetBootDriveFromDL
     
    7876;       AL
    7977;--------------------------------------------------------------------
    80 ALIGN JUMP_ALIGN
    8178.ResetBootDriveFromDL:
    8279    xor     ax, ax                          ; AH=0h, Disk Controller Reset
     
    10198;       AL, CX, DH
    10299;--------------------------------------------------------------------
    103 ALIGN JUMP_ALIGN
    104100.LoadFirstSectorFromDLtoESBX:
    105101    mov     ax, 0201h                       ; Read 1 sector
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm

    r316 r369  
    2121;       CF:     0 if successful, 1 if error
    2222;--------------------------------------------------------------------
    23 ALIGN JUMP_ALIGN
    2423AH0h_HandlerForDiskControllerReset:
    2524    eMOVZX  bx, dl                      ; Copy requested drive to BL, zero BH to assume no errors
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH11h_HRecal.asm

    r294 r369  
    1717;       CF:     0 if successful, 1 if error
    1818;--------------------------------------------------------------------
    19 ALIGN JUMP_ALIGN
    2019AH11h_HandlerForRecalibrate:
    2120%ifndef USE_186
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm

    r294 r369  
    2424;           CF:     1
    2525;--------------------------------------------------------------------
    26 ALIGN JUMP_ALIGN
    2726AH15h_HandlerForReadDiskDriveSize:
    2827%ifdef MODULE_SERIAL_FLOPPY
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm

    r294 r369  
    2626;       CF:     0 if successful, 1 if error
    2727;--------------------------------------------------------------------
    28 ALIGN JUMP_ALIGN
    2928AH23h_HandlerForSetControllerFeatures:
    3029    xchg    si, ax      ; SI = Feature Number
     
    5554;       AL, BX, CX, DX
    5655;--------------------------------------------------------------------
    57 ;ALIGN JUMP_ALIGN
    5856AH23h_SetControllerFeatures:
    5957    mov     al, COMMAND_SET_FEATURES
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm

    r322 r369  
    2020;       CF:     0 if successful, 1 if error
    2121;--------------------------------------------------------------------
    22 ALIGN JUMP_ALIGN
    2322AH25h_HandlerForGetDriveInformation:
    2423    mov     ax, (COMMAND_IDENTIFY_DEVICE << 8 | 1)      ; Read 1 sector
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm

    r363 r369  
    1717;       CF:     0 if successful, 1 if error
    1818;--------------------------------------------------------------------
    19 ALIGN JUMP_ALIGN
    2019AHDh_HandlerForResetHardDisk:
    2120%ifndef USE_186
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm

    r294 r369  
    2121;       CF:     0 if successful, 1 if error
    2222;--------------------------------------------------------------------
    23 ALIGN JUMP_ALIGN
    2423AH41h_HandlerForCheckIfExtensionsPresent:
    2524    cmp     WORD [bp+IDEPACK.intpack+INTPACK.bx], 55AAh
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/FloppyDrive.asm

    r294 r369  
    109109;       AX, CX, DX, DI, ES
    110110;--------------------------------------------------------------------
    111 ALIGN JUMP_ALIGN
    112111FloppyDrive_GetType:
    113112    mov     ah, 08h         ; Get Drive Parameters
     
    126125;       AX:     Number of Floppy Drives
    127126;--------------------------------------------------------------------
    128 ALIGN JUMP_ALIGN
    129127FloppyDrive_GetCountToAX:
    130128%ifdef MODULE_SERIAL_FLOPPY
     
    146144    ret
    147145
    148 ALIGN JUMP_ALIGN
    149146FloppyDrive_GetCountFromBIOS_or_BDA:
    150147    push    es
     
    166163;--------------------------------------------------------------------
    167164%ifdef USE_AT
    168 ALIGN JUMP_ALIGN
    169165.GetCountFromBIOS:
    170166    push    di
     
    197193;--------------------------------------------------------------------
    198194%ifndef USE_AT
    199 ALIGN JUMP_ALIGN
    200195.GetCountFromBDA:
    201196    LOAD_BDA_SEGMENT_TO es, ax
  • trunk/XTIDE_Universal_BIOS/makefile

    r366 r369  
    193193    @perl ..\tools\checksum.pl $(TARGET)_xt.bin $(ROMSIZE)
    194194    @perl ..\tools\checksum.pl $(TARGET)_jr8k.bin $(ROMSIZE)
     195    @perl ..\tools\checksum.pl $(TARGET)_386.bin $(ROMSIZE)
    195196
    196197xt_unused: xt
Note: See TracChangeset for help on using the changeset viewer.