Changeset 241 in xtideuniversalbios


Ignore:
Timestamp:
Feb 9, 2012, 11:08:59 AM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Space optimizations in the Boot Menu and BootInfo routines, taking advantage of nested %s. Optimization in the init of RamVars to avoid writing the signature twice. Preparing for addition of serial floppy support, starting to break the assumption that our drives are always 80h or higher.

Location:
trunk
Files:
14 edited

Legend:

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

    r223 r241  
    127127.rgcFormatCharToLookupIndex:
    128128%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    129     db      "aIAduxsSct-+%"
     129    db      "aIAduxsSctz-+%"
    130130%else
    131     db      "IAuxsc-"       ; Required by XTIDE Universal BIOS
     131    db      "IAuxscz-"      ; Required by XTIDE Universal BIOS
    132132%endif
    133133.rgcFormatCharToLookupIndexEnd:
     
    152152    dw      t_FormatRepeatCharacter
    153153%endif
     154    dw      z_FormatStringFromSegmentZero
    154155    dw      PrepareToPrependParameterWithSpaces
    155156%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     
    344345ALIGN JUMP_ALIGN
    345346s_FormatStringFromSegmentCS:
     347    push    si
     348    push    cx
     349    mov     si, [bp]
     350       
     351    cmp     si, byte 07fh       ;  well within the boundaries of ROMVARS_size
     352    jb      .notFormatted
     353
     354    dec     bp
     355    dec     bp
     356    call    DisplayFormat_ParseCharacters
     357    inc     bp                  ; will be decremented after the call is done
     358    inc     bp
     359    jmp     .done
     360       
     361.notFormatted: 
     362    call    DisplayPrint_NullTerminatedStringFromCSSI
     363       
     364.done:
     365    pop     cx
     366    pop     si
     367    ret     
     368
     369ALIGN JUMP_ALIGN
     370z_FormatStringFromSegmentZero: 
    346371    xchg    si, [bp]
    347     call    DisplayPrint_NullTerminatedStringFromCSSI
     372    xor     bx, bx
     373    call    DisplayPrint_NullTerminatedStringFromBXSI
    348374    mov     si, [bp]
    349     ret
     375    ret     
    350376
    351377%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
  • trunk/Assembly_Library/Src/Display/DisplayFormatCompressed.asm

    r223 r241  
    6767DisplayFormatCompressed_ret:            ; jump target for other routines who need a "ret"
    6868    ret
     69
     70DisplayFormatCompressed_Format_z:
     71    xor     bx, bx
     72    xchg    si, ax
     73    jmp     short DisplayPrint_NullTerminatedStringFromBXSI
    6974
    7075DisplayFormatCompressed_Format_x:
  • trunk/Assembly_Library/Src/Display/DisplayPrint.asm

    r223 r241  
    346346ALIGN JUMP_ALIGN
    347347DisplayPrint_CharacterFromAL:
    348 %ifdef MODULE_STRINGS_COMPRESSED
    349348    test    al,al
    350349    jz      DisplayPrint_Ret
    351 %endif
     350
    352351    mov     ah, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.bAttribute]
    353352    jmp     [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fnCharOut]
  • trunk/Tools/StringsCompress.pl

    r197 r241  
    226226
    227227print "\n;; translated usage stats\n";
    228 foreach $f (keys(%special))
     228foreach $f (keys(%translate))
    229229{
    230230    print ";; ".$f.":".$used{$f}."\n";
  • trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc

    r221 r241  
    1313LEN_BOOTNFO_DRV     EQU     26      ; Bytes reserved for drive name
    1414struc BOOTNFO
     15    .szDrvName      resb    LEN_BOOTNFO_DRV     ; Drive name
     16                    resb    2       ; Zero word (ensures string terminates)
    1517    .twSectCnt      resb    6       ; Total user addressable sectors
    16     .szDrvName      resb    LEN_BOOTNFO_DRV+1   ; Drive name
    17                     resb    1       ; Alignment
     18                    resb    2       ; padding to make BOOTNFO size an even multiple of DPT size
    1819endstruc
     20
     21DPT_BOOTNFO_SIZE_MULTIPLIER  equ    BOOTNFO_size / LARGEST_DPT_SIZE
     22
     23%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
     24
     25%if BOOTNFO_size % LARGEST_DPT_SIZE <> 0
     26%error "BOOTNFO's size must be an even multiple of DPT's size.  Add or remove padding at the bottom of BOOTNFO to bring the two sizes into alignment.  As BOOTNFO is only used at boot time, with plenty of memory to consume, it is OK to waste some space here."
     27%endif
     28
     29%if BOOTNFO.szDrvName <> 0
     30%error "BOOTNFO.szDrvName is assumed to be the first member of struc BOOTNFO, in BootMenuPrint_RefreshItem"
     31%endif
     32
     33%if BOOTNFO.szDrvName + LEN_BOOTNFO_DRV + 2 <> BOOTNFO.twSectCnt
     34%error "BOOTNFO.twSectCnt is assumed to come immediately after BOOTNFO.szDrvName (with zero padding), in BootInfo_CreateForHardDisk"
     35%endif
     36
     37%endif
    1938
    2039
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootInfo.asm

    r181 r241  
    1616;   Returns:
    1717;       ES:BX:  Ptr to BOOTNFO (if successful)
    18 ;       CF:     Cleared if BOOTNFO created succesfully
    19 ;               Set if any error
    2018;   Corrupts registers:
    21 ;       AX, BX, CX, DX
     19;       AX, BX, CX, DX, DI, SI
    2220;--------------------------------------------------------------------
    2321BootInfo_CreateForHardDisk:
    24     call    BootInfo_GetOffsetToBX      ; ES:BX now points to new BOOTNFO
    25     ; Fall to .StoreSectorCount
     22    call    BootInfo_ConvertDPTtoBX     ; ES:BX now points to new BOOTNFO
     23    push    bx                          ; Preserve for return
    2624
    27 ;--------------------------------------------------------------------
    28 ; .StoreSectorCount
    29 ;   Parameters:
    30 ;       ES:BX:  Ptr to BOOTNFO
    31 ;       ES:SI:  Ptr to 512-byte ATA information read from the drive
    32 ;       DS:DI:  Ptr to Disk Parameter Table
    33 ;   Returns:
    34 ;       Nothing
    35 ;   Corrupts registers:
    36 ;       AX, CX, DX
    37 ;--------------------------------------------------------------------
    38 .StoreSectorCount:
    39     push    bx
    40     call    AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI
    41     mov     cx, bx                          ; Now in CX:DX:AX
    42     pop     bx
    43     mov     [es:bx+BOOTNFO.twSectCnt], ax
    44     mov     [es:bx+BOOTNFO.twSectCnt+2], dx
    45     mov     [es:bx+BOOTNFO.twSectCnt+4], cx
    46     ; Fall to .StoreDriveName
     25    mov     di, bx                      ; Starting pointer at beginning of structure
    4726
    48 ;--------------------------------------------------------------------
    49 ; .StoreDriveName
    50 ;   Parameters:
    51 ;       ES:BX:  Ptr to BOOTNFO
    52 ;       ES:SI:  Ptr to 512-byte ATA information read from the drive
    53 ;       DS:DI:  Ptr to Disk Parameter Table
    54 ;   Returns:
    55 ;       CF:     Cleared if variables stored succesfully
    56 ;               Set if any error
    57 ;   Corrupts registers:
    58 ;       AX, CX
    59 ;--------------------------------------------------------------------
    60 .StoreDriveName:
    61     push    ds
    62     push    si
    63     push    di
     27;
     28; Store Drive Name
     29;       
     30    push    ds                          ; Preserve RAMVARS
     31    push    si                          ; Preserve SI for call to GetTotalSectorCount...
    6432
    65     push    es
     33    push    es                          ; ES copied to DS
    6634    pop     ds
     35
    6736    add     si, BYTE ATA1.strModel      ; DS:SI now points drive name
    6837    lea     di, [bx+BOOTNFO.szDrvName]  ; ES:DI now points to name destination
     
    7443    loop    .CopyNextWord
    7544    xor     ax, ax                      ; Zero AX and clear CF
    76     stosb                               ; Terminate with NULL
     45    stosw                               ; Terminate with NULL
    7746
    78     pop     di
    7947    pop     si
    8048    pop     ds
     49
     50;
     51; Store Sector Count
     52;
     53    call    AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI
     54
     55    stosw
     56    xchg    ax, dx
     57    stosw
     58    xchg    ax, bx
     59    stosw
     60
     61    pop     bx
     62       
    8163    ret
    8264
    83 
     65       
    8466;--------------------------------------------------------------------
    8567; Finds BOOTNFO for drive and returns total sector count.
     
    8769; BootInfo_GetTotalSectorCount
    8870;   Parameters:
    89 ;       DL:     Drive number
    90 ;       DS:     RAMVARS segment
     71;       DS:DI:      DPT Pointer
    9172;   Returns:
    9273;       BX:DX:AX:   48-bit sector count
     
    9778BootInfo_GetTotalSectorCount:
    9879    push    ds
    99     call    BootInfo_GetOffsetToBX
     80    call    BootInfo_ConvertDPTtoBX
    10081    LOAD_BDA_SEGMENT_TO ds, ax
    10182    mov     ax, [bx+BOOTNFO.twSectCnt]
     
    10788
    10889;--------------------------------------------------------------------
    109 ; Returns offset to BOOTNFO for wanted drive.
     90; Returns offset to BOOTNFO based on DPT pointer.
    11091;
    111 ; BootInfo_GetOffsetToBX
     92; BootInfo_ConvertDPTtoBX
    11293;   Parameters:
    113 ;       DL:     Drive number
    114 ;       DS:     RAMVARS segment
     94;       DS:DI:  DPT Pointer
    11595;   Returns:
    11696;       BX:     Offset to BOOTNFO struct
     
    11999;--------------------------------------------------------------------
    120100ALIGN JUMP_ALIGN
    121 BootInfo_GetOffsetToBX:
    122     mov     bl, dl                      ; Copy drive number to BL
    123     mov     al, BOOTNFO_size            ; Size of struct
    124     sub     bl, [RAMVARS.bFirstDrv]     ; Drive number to index
    125     mul     bl                          ; AX = Offset inside BOOTNFO array
    126     add     ax, BOOTVARS.rgBootNfo      ; Add offset to BOOTNFO array
    127     xchg    bx, ax                      ; Move result to BX
    128     ret
     101BootInfo_ConvertDPTtoBX:
     102    mov     ax, di
     103    sub     ax, RAMVARS_size                ; subtract off base of DPTs
     104    mov     bl, DPT_BOOTNFO_SIZE_MULTIPLIER ; BOOTNFO's are a whole number multiple of DPT size
     105    mul     bl                             
     106    add     ax, BOOTVARS.rgBootNfo          ; add base of BOOTNFO
     107    xchg    ax, bx
     108    ret         
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm

    r181 r241  
    2222    call    BootMenu_Enter          ; Get selected menuitem index to CX
    2323    call    BootMenuPrint_ClearScreen
    24     cmp     cx, BYTE NO_ITEM_SELECTED
    25     je      SHORT BootMenu_DisplayAndReturnSelection    ; Clear screen and display menu
    26     ; Fall to BootMenu_GetDriveToDXforMenuitemInCX
     24    call    BootMenu_GetDriveToDXforMenuitemInCX
     25    jnc     BootMenu_DisplayAndReturnSelection
     26    ret
    2727
    2828;--------------------------------------------------------------------
     
    3030;   Parameters:
    3131;       CX:     Index of menuitem selected from Boot Menu
    32 ;       DS:     RAMVARS segment
    3332;   Returns:
    3433;       DX:     Drive number to be used for booting
    35 ;   Corrupts registers:
    36 ;       CX
    37 ;--------------------------------------------------------------------
     34;       DS:     RAMVARS segment
     35;       CF:     Set: There is a selected menu item, DL is valid
     36;               Clear: There is no selected menu item, DL is not valid
     37;   Corrupts registers:
     38;       CX, DI
     39;--------------------------------------------------------------------
     40ALIGN JUMP_ALIGN
     41BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS:
     42    call    RamVars_GetSegmentToDS
     43;;; fall-through
     44                       
    3845ALIGN JUMP_ALIGN
    3946BootMenu_GetDriveToDXforMenuitemInCX:
    40     mov     dx, cx                  ; Copy menuitem index to DX
    41     call    FloppyDrive_GetCountToCX
    42     cmp     dx, cx                  ; Floppy drive?
    43     jb      SHORT .ReturnFloppyDriveInDX
    44     sub     dx, cx                  ; Remove floppy drives from index
    45     or      dl, 80h
     47    cmp     cl, NO_ITEM_HIGHLIGHTED
     48    je      SHORT .ReturnFloppyDriveInDX    ; Clear CF if branch taken
     49
     50    mov     dl, cl                          ; Copy menuitem index to DX
     51    call    FloppyDrive_GetCountToCX
     52    cmp     dl, cl                          ; Floppy drive?
     53    jb      SHORT .ReturnFloppyDriveInDX    ; Set CF if branch taken
     54    or      cl, 80h                         ; Or 80h into CL before the sub
     55                                            ; to cause CF to be set after
     56                                            ; and result has high order bit set
     57    sub     dl, cl                          ; Remove floppy drives from index
     58
    4659.ReturnFloppyDriveInDX:
    4760    ret
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm

    r212 r241  
    2525
    2626MENUEVENT_InitializeMenuinitFromDSSI equ  (BootMenuEvent_Handler.InitializeMenuinitFromDSSI - BootMenuEvent_Handler)
    27 MENUEVENT_ExitMenu equ  (BootMenuEvent_Handler.EventCompleted - BootMenuEvent_Handler)
     27MENUEVENT_ExitMenu equ  (BootMenuEvent_EventCompleted - BootMenuEvent_Handler)
    2828MENUEVENT_ItemHighlightedFromCX equ (BootMenuEvent_Handler.ItemHighlightedFromCX - BootMenuEvent_Handler)
    2929MENUEVENT_ItemSelectedFromCX equ (BootMenuEvent_Handler.ItemSelectedFromCX - BootMenuEvent_Handler)
    3030MENUEVENT_KeyStrokeInAX equ (BootMenuEvent_Handler.KeyStrokeInAX - BootMenuEvent_Handler)
    3131MENUEVENT_RefreshTitle equ (BootMenuPrint_TitleStrings - BootMenuEvent_Handler)
    32 MENUEVENT_RefreshInformation equ (BootMenuEvent_Handler.RefreshInformation - BootMenuEvent_Handler)
    33 MENUEVENT_RefreshItemFromCX equ (BootMenuEvent_Handler.RefreshItemFromCX - BootMenuEvent_Handler)
     32MENUEVENT_RefreshInformation equ (BootMenuPrint_RefreshInformation - BootMenuEvent_Handler)
     33MENUEVENT_RefreshItemFromCX equ (BootMenuPrint_RefreshItem - BootMenuEvent_Handler)
    3434;
    3535; Note that there is no entry for MENUEVENT_IdleProcessing.  If MENUEVENT_IDLEPROCESSING_ENABLE is not %defined,
     
    4949ALIGN WORD_ALIGN
    5050.rgfnEventSpecificHandlers:
    51     dw      .InitializeMenuinitFromDSSI ; MENUEVENT.InitializeMenuinitFromDSSI
    52     dw      .EventCompleted             ; MENUEVENT.ExitMenu
    53     dw      .EventNotHandled            ; MENUEVENT.IdleProcessing
    54     dw      .ItemHighlightedFromCX      ; MENUEVENT.ItemHighlightedFromCX
    55     dw      .ItemSelectedFromCX         ; MENUEVENT.ItemSelectedFromCX
    56     dw      .KeyStrokeInAX              ; MENUEVENT.KeyStrokeInAX
    57     dw      BootMenuPrint_TitleStrings  ; MENUEVENT.RefreshTitle
    58     dw      .RefreshInformation         ; MENUEVENT.RefreshInformation
    59     dw      .RefreshItemFromCX          ; MENUEVENT.RefreshItemFromCX
     51    dw      .InitializeMenuinitFromDSSI         ; MENUEVENT.InitializeMenuinitFromDSSI
     52    dw      BootMenuEvent_EventCompleted        ; MENUEVENT.ExitMenu
     53    dw      .EventNotHandled                    ; MENUEVENT.IdleProcessing
     54    dw      .ItemHighlightedFromCX              ; MENUEVENT.ItemHighlightedFromCX
     55    dw      .ItemSelectedFromCX                 ; MENUEVENT.ItemSelectedFromCX
     56    dw      .KeyStrokeInAX                      ; MENUEVENT.KeyStrokeInAX
     57    dw      BootMenuPrint_TitleStrings          ; MENUEVENT.RefreshTitle
     58    dw      BootMenuPrint_RefreshInformation    ; MENUEVENT.RefreshInformation
     59    dw      BootMenuPrint_RefreshItem           ; MENUEVENT.RefreshItemFromCX
    6060
    6161%endif
     
    103103.ItemHighlightedFromCX:
    104104    push    cx
    105     call    RamVars_GetSegmentToDS
     105    call    BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS     
    106106    call    DriveXlate_Reset
    107     call    BootMenu_GetDriveToDXforMenuitemInCX
    108107    call    DriveXlate_SetDriveToSwap
    109108
     
    134133    call    BootMenu_GetMenuitemToAXforAsciiHotkeyInAL
    135134    cmp     ax, [bp+MENUINIT.wItems]
    136     jae     SHORT .EventCompleted   ; Invalid key
     135    jae     SHORT BootMenuEvent_EventCompleted  ; Invalid key
    137136    CALL_MENU_LIBRARY HighlightItemFromAX
    138137    ; Fall to .ItemSelectedFromCX
     
    144143.ItemSelectedFromCX:
    145144    CALL_MENU_LIBRARY Close
    146 .EventCompleted:
     145       
     146BootMenuEvent_EventCompleted:
    147147    stc
    148148    ret
    149149
    150 
    151 ; Parameters:
    152 ;   CX:         Index of item to refresh
    153 ;   Cursor has been positioned to the beginning of item line
    154 ALIGN JUMP_ALIGN
    155 .RefreshItemFromCX:
    156     xor     bl, bl      ; will result in SF being clear in .RefreshItemOrInformation...
    157     SKIP2B  dx          ; dx corrupted below by BootMenu_GetDriveToDXforMenuitemInCX
    158     ; Fall to .RefreshInformation
    159 
    160 ; Parameters:
    161 ;   CX:         Index of highlighted item
    162 ;   Cursor has been positioned to the beginning of first line
    163 ; NO ALIGN - in the shadow of SKIP2B
    164 .RefreshInformation:
    165     mov     bl,040h     ;  will result in SF being set in .RefreshItemOrInformation...
    166     ; Fall to .RefreshItemOrInformationWithJumpTableInCSBX
    167 
    168 ;--------------------------------------------------------------------
    169 ; RefreshItemOrInformationWithJumpTableInCSBX
    170 ;   Parameters:
    171 ;       CX:     Index of selected menuitem
    172 ;       CS:BX:  Ptr to ITEM_TYPE_REFRESH jump table
    173 ;   Returns:
    174 ;       CF:     set since event processed
    175 ;--------------------------------------------------------------------
    176 .RefreshItemOrInformationWithJumpTableInCSBX:
    177     cmp     cl, NO_ITEM_HIGHLIGHTED
    178     je      SHORT .EventCompleted
    179 
    180     call    RamVars_GetSegmentToDS
    181     call    BootMenu_GetDriveToDXforMenuitemInCX
    182     or      bl,dl               ;  or drive number with bit from .RefreshItemFromCX or .RefreshInformation
    183     shl     bl,1                ;  drive letter high order bit to CF, Item/Information bit to SF
    184     jc      SHORT BootMenuPrint_HardDiskMenuitem
    185     ; fall through to BootMenuEvent_FallThroughToFloppyMenuitem
    186 
    187 ;;;
    188 ;;; Fall-through (to BootMenuPrint_FloppyMenuitem)
    189 ;;; (checked at assembler time with the code after BootMenuPrint_FloppyMenuitem)
    190 ;;;
    191 ALIGN JUMP_ALIGN
    192 BootMenuEvent_FallThroughToFloppyMenuitem:
    193     ; fall through to BootMenuPrint_FloppyMenuitem
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm

    r200 r241  
    55SECTION .text
    66
    7 ;;;
    8 ;;; Fall-through from BootMenuEvent.asm!
    9 ;;; BootMenuPrint_FloppyMenuitem must be the first routine in this file
    10 ;;; (checked at assembler time with the code after BootMenuPrint_FloppyMenuitem)
    11 ;;;
    12 ;--------------------------------------------------------------------
    13 ; BootMenuPrint_FloppyMenuitem
     7;--------------------------------------------------------------------
     8; BootMenuPrint_RefreshItem
     9;
    1410;   Parameters:
    1511;       DL:     Untranslated Floppy Drive number
    16 ;       SF:     set for Information, clear for Item
    17 ;   Returns:
    18 ;       Nothing
    19 ;   Corrupts registers:
    20 ;       AX, DX, SI, DI
    21 ;--------------------------------------------------------------------
    22 ALIGN JUMP_ALIGN
    23 BootMenuPrint_FloppyMenuitem:
    24     js      short BootMenuPrint_FloppyMenuitemInformation
    25     call    PrintDriveNumberAfterTranslationFromDL
     12;   Returns:
     13;       Nothing
     14;   Corrupts registers:
     15;       AX, BX, DX, SI, DI
     16;--------------------------------------------------------------------
     17ALIGN JUMP_ALIGN
     18BootMenuPrint_RefreshItem:
     19    call    BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS
     20    jnc     BootMenuEvent_EventCompleted            ; if no menu item selected, out we go
     21       
    2622    push    bp
    2723    mov     bp, sp
    28     mov     si, g_szFDLetter
    29     ePUSH_T ax, g_szFloppyDrv
    30     add     dl, 'A'
    31     push    dx                  ; Drive letter
     24
     25    call    RamVars_IsDriveHandledByThisBIOS               
     26    jnc     .notOurs
     27
     28    call    FindDPT_ForDriveNumber                  ; if it is one of ours, print the string in bootnfo
     29    call    BootInfo_ConvertDPTtoBX
     30    mov     si, g_szDriveNumBOOTNFO                 ; special g_szDriveNum that prints from BDA
     31    jmp     .go
     32       
     33.notOurs:
     34    mov     si,g_szDriveNum                                 
     35    mov     bx,g_szForeignHD                        ; assume a hard disk for the moment
     36       
     37    test    dl,80h                                         
     38    js      .go
     39    mov     bl,((g_szFloppyDrv)-$$ & 0xff)          ; and revisit the earlier assumption...
     40       
     41.go:
     42    mov     ax, dx                                  ; preserve DL for the floppy drive letter addition
     43    call    DriveXlate_ToOrBack
     44    push    dx                                      ; translated drive number
     45    push    bx                                      ; sub string
     46    add     al, 'A'                                 ; floppy drive letter (we always push this although
     47    push    ax                                      ; the hard disks don't ever use it, but it does no harm)
     48       
    3249    jmp     short BootMenuPrint_FormatCSSIfromParamsInSSBP
    33 
    34 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    35 %if BootMenuPrint_FloppyMenuitem <> BootMenuEvent_FallThroughToFloppyMenuitem
    36 %error "BootMenuPrint.asm must follow BootMenuEvent.asm, and BootMenuPrint_FloppyMenuitem must be the first routine in BootMenuPrint.asm"
    37 %endif
    38 %endif
    39        
    40 ;--------------------------------------------------------------------
    41 ; ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
    42 ;   Parameters:
    43 ;       BX:DX:AX:   Sector count
    44 ;   Returns:
    45 ;       Size in stack
    46 ;   Corrupts registers:
    47 ;       AX, BX, CX, DX, SI
    48 ;--------------------------------------------------------------------
    49 ALIGN JUMP_ALIGN
    50 ConvertSectorCountInBXDXAXtoSizeAndPushForFormat:
    51     pop     si      ; Pop return address
    52     call    Size_ConvertSectorCountInBXDXAXtoKiB
    53     mov     cx, BYTE_MULTIPLES.kiB
    54     call    Size_GetSizeToAXAndCharToDLfromBXDXAXwithMagnitudeInCX
    55     push    ax      ; Size in magnitude
    56     push    cx      ; Tenths
    57     push    dx      ; Magnitude character
    58     jmp     si
    59 
    6050
    6151;--------------------------------------------------------------------
     
    7767    mov     si, ROMVARS.szVersion
    7868    ; Fall to BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
    79 
    8069
    8170;--------------------------------------------------------------------
     
    10291       
    10392;--------------------------------------------------------------------
    104 ; BootMenuPrint_HardDiskMenuitem
    105 ;   Parameters:
    106 ;       DL:     Untranslated Hard Disk number
    107 ;       DS:     RAMVARS segment
    108 ;       SF:     set for Information, clear for Item     
    109 ;   Returns:
    110 ;       CF:     Set since menu event handled
    111 ;   Corrupts registers:
    112 ;       AX, BX, SI, DI
    113 ;--------------------------------------------------------------------
    114 ALIGN JUMP_ALIGN
    115 BootMenuPrint_HardDiskMenuitem:
    116     js      short BootMenuPrint_HardDiskMenuitemInformation
    117     call    PrintDriveNumberAfterTranslationFromDL
    118     call    RamVars_IsDriveHandledByThisBIOS
    119     jnc     SHORT .HardDiskMenuitemForForeignDrive
    120     ; Fall to .HardDiskMenuitemForOurDrive
    121 
    122 ;--------------------------------------------------------------------
    123 ; .HardDiskMenuitemForOurDrive
    124 ;   Parameters:
    125 ;       DL:     Untranslated Hard Disk number
    126 ;       DS:     RAMVARS segment
    127 ;   Returns:
    128 ;       CF:     Set since menu event handled
    129 ;   Corrupts registers:
    130 ;       AX, BX, SI, DI
    131 ;--------------------------------------------------------------------
    132 .HardDiskMenuitemForOurDrive:
    133     call    BootInfo_GetOffsetToBX
    134     lea     si, [bx+BOOTNFO.szDrvName]
    135     xor     bx, bx          ; BDA segment
    136     CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromBXSI
    137     stc
    138     ret
    139 
    140 ;--------------------------------------------------------------------
    141 ; BootMenuPrint_HardDiskMenuitemForForeignDrive
    142 ;   Parameters:
    143 ;       DL:     Untranslated Hard Disk number
    144 ;       DS:     RAMVARS segment
    145 ;   Returns:
    146 ;       CF:     Set since menu event handled
    147 ;   Corrupts registers:
    148 ;       AX, SI, DI
    149 ;--------------------------------------------------------------------
    150 ALIGN JUMP_ALIGN
    151 .HardDiskMenuitemForForeignDrive:
    152     mov     si, g_szforeignHD
    153     jmp     SHORT BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
    154 
    155 
    156 ;--------------------------------------------------------------------
    15793; BootMenuPrint_FloppyMenuitemInformation
    15894;   Parameters:
     
    165101;--------------------------------------------------------------------
    166102
    167 FloppyTypes:
    168 .rgbCapacityMultiplier equ 20           ; Multiplier to reduce word sized values to byte size
    169 .rgbCapacity:
    170     db      360   / FloppyTypes.rgbCapacityMultiplier    ;  type 1
    171     db      1200  / FloppyTypes.rgbCapacityMultiplier    ;  type 2
    172     db      720   / FloppyTypes.rgbCapacityMultiplier    ;  type 3
    173     db      1440  / FloppyTypes.rgbCapacityMultiplier    ;  type 4
    174     db      2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 5
    175     db      2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 6
    176 
    177 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    178 %if g_szFddFiveQuarter <> g_szFddThreeHalf+g_szFddThreeFive_Displacement
    179 %error "FddThreeFive_Displacement incorrect"
    180 %endif
    181 %endif
    182        
    183 ALIGN JUMP_ALIGN
    184 BootMenuPrint_FloppyMenuitemInformation:
    185     call    BootMenuPrint_ClearInformationArea
    186     call    FloppyDrive_GetType         ; Get Floppy Drive type to BX
     103ALIGN JUMP_ALIGN
     104BootMenuPrint_RefreshInformation:
     105    CALL_MENU_LIBRARY ClearInformationArea     
     106       
     107    call    BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS
     108    jnc     BootMenuEvent_EventCompleted                ; if no menu selection, abort
    187109
    188110    push    bp
    189111    mov     bp, sp
    190     ePUSH_T ax, g_szCapacity
    191        
    192     mov     si, g_szFddSizeOr           ; .PrintXTFloppyType
    193     test    bx, bx                      ; Two possibilities? (FLOPPY_TYPE_525_OR_35_DD)     
    194     jz      SHORT .output
    195 
    196     mov     si, g_szFddUnknown          ; .PrintUnknownFloppyType
     112
     113    test    dl, dl                                      ; are we a hard disk?
     114    js      BootMenuPrint_HardDiskRefreshInformation       
     115       
     116    call    FloppyDrive_GetType                         ; Get Floppy Drive type to BX
     117
     118    mov     cx, g_szFddSizeOr                           ; .PrintXTFloppyType
     119    test    bx, bx                                      ; Two possibilities? (FLOPPY_TYPE_525_OR_35_DD)     
     120    jz      SHORT BootMenuPrint_HardDiskRefreshInformation.output
     121
     122    mov     cl, (g_szFddUnknown - $$) & 0xff            ; .PrintUnknownFloppyType
    197123    cmp     bl, FLOPPY_TYPE_35_ED
    198     ja      SHORT .output
     124    ja      SHORT BootMenuPrint_HardDiskRefreshInformation.output
    199125       
    200126    ; Fall to .PrintKnownFloppyType
    201 
    202127
    203128;--------------------------------------------------------------------
     
    223148;--------------------------------------------------------------------
    224149.PrintKnownFloppyType:
    225     mov     si, g_szFddSize
    226        
    227     mov     ax, g_szFddThreeHalf
     150    mov     cl, (g_szFddSize - $$) & 0xff
     151    push    cx
     152       
     153    mov     cl, (g_szFddThreeHalf - $$) & 0xff
    228154    cmp     bl, FLOPPY_TYPE_525_HD
    229155    ja      .ThreeHalf
    230 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    231 %if g_szFddThreeFive_Displacement = 2       
    232     inc     ax                      ; compressed string case
    233     inc     ax
    234 %else
    235     add     ax, g_szFddThreeFive_Displacement
    236 %endif
    237 %endif
     156    mov     cl, (g_szFddFiveQuarter - $$) & 0xff
    238157.ThreeHalf:     
    239     push    ax                      ; "5 1/4" or "3 1/2"
     158    push    cx                                          ; "5 1/4" or "3 1/2"
    240159
    241160    mov     al,FloppyTypes.rgbCapacityMultiplier
     
    243162    push    ax
    244163
     164    jmp     short BootMenuPrint_HardDiskRefreshInformation.output
     165
     166
     167;--------------------------------------------------------------------
     168; Prints Hard Disk Menuitem information strings.
     169;
     170; BootMenuPrint_HardDiskMenuitemInformation
     171;   Parameters:
     172;       DL:     Untranslated Hard Disk number
     173;       DS:     RAMVARS segment
     174;   Returns:
     175;       CF:     Set since menu event was handled successfully
     176;   Corrupts registers:
     177;       BX, CX, DX, SI, DI, ES
     178;--------------------------------------------------------------------
     179ALIGN JUMP_ALIGN
     180BootMenuPrint_HardDiskRefreshInformation:       
     181    call    RamVars_IsDriveHandledByThisBIOS
     182    jnc     SHORT .HardDiskMenuitemInfoForForeignDrive
     183    call    FindDPT_ForDriveNumber                      ; DS:DI to point DPT
     184    ; Fall to .HardDiskMenuitemInfoForOurDrive
     185
     186;--------------------------------------------------------------------
     187; .HardDiskMenuitemInfoForOurDrive
     188;   Parameters:
     189;       DL:     Untranslated Hard Disk number
     190;       DS:DI:  Ptr to DPT
     191;   Returns:
     192;       Nothing
     193;   Corrupts registers:
     194;       AX, BX, CX, DX, SI, DI, ES
     195;--------------------------------------------------------------------
     196.HardDiskMenuitemInfoForOurDrive:
     197    ePUSH_T ax, g_szSizeDual
     198       
     199    ; Get and push L-CHS size
     200    call    AH15h_GetSectorCountToDXAX
     201    call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
     202
     203    ; Get and push total LBA size
     204    call    BootInfo_GetTotalSectorCount
     205    call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat       
     206    jmp     BootMenuPrintCfg_ForOurDrive
     207               
     208;--------------------------------------------------------------------
     209; .HardDiskMenuitemInfoForForeignDrive
     210;   Parameters:
     211;       DL:     Untranslated Hard Disk number
     212;       DS:     RAMVARS segment
     213;   Returns:
     214;       CF:     Set since menu event was handled successfully
     215;   Corrupts registers:
     216;       AX, BX, CX, DX, SI, DI
     217;--------------------------------------------------------------------
     218ALIGN JUMP_ALIGN
     219.HardDiskMenuitemInfoForForeignDrive:
     220    call    DriveXlate_ToOrBack
     221    call    AH15h_GetSectorCountFromForeignDriveToDXAX
     222    call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
     223
    245224ALIGN JUMP_ALIGN       
    246225.output:
     226    mov     si, g_szCapacity
    247227;;; fall-through
    248228
     
    263243    stc             ; Successfull return from menu event
    264244    pop     bp
    265     ret     
    266 
    267        
    268 ;--------------------------------------------------------------------
    269 ; Prints Hard Disk Menuitem information strings.
    270 ;
    271 ; BootMenuPrint_HardDiskMenuitemInformation
    272 ;   Parameters:
    273 ;       DL:     Untranslated Hard Disk number
    274 ;       DS:     RAMVARS segment
    275 ;   Returns:
    276 ;       CF:     Set since menu event was handled successfully
    277 ;   Corrupts registers:
    278 ;       BX, CX, DX, SI, DI, ES
    279 ;--------------------------------------------------------------------
    280 ALIGN JUMP_ALIGN
    281 BootMenuPrint_HardDiskMenuitemInformation:
    282     call    RamVars_IsDriveHandledByThisBIOS
    283     jnc     SHORT .HardDiskMenuitemInfoForForeignDrive
    284     call    FindDPT_ForDriveNumber      ; DS:DI to point DPT
    285     ; Fall to .HardDiskMenuitemInfoForOurDrive
    286 
    287 ;--------------------------------------------------------------------
    288 ; .HardDiskMenuitemInfoForOurDrive
    289 ;   Parameters:
    290 ;       DL:     Untranslated Hard Disk number
    291 ;       DS:DI:  Ptr to DPT
    292 ;   Returns:
    293 ;       Nothing
    294 ;   Corrupts registers:
    295 ;       AX, BX, CX, DX, SI, DI, ES
    296 ;--------------------------------------------------------------------
    297 .HardDiskMenuitemInfoForOurDrive:
    298     push    di
    299     ePUSH_T ax, BootMenuPrintCfg_ForOurDrive    ; Return from BootMenuPrint_FormatCSSIfromParamsInSSBP
    300     push    bp
    301     mov     bp, sp
    302     ePUSH_T ax, g_szCapacity
    303 
    304     ; Get and push L-CHS size
    305     mov     [RAMVARS.bTimeoutTicksLeft], dl     ; Store drive number
    306     call    AH15h_GetSectorCountToDXAX
    307     call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
    308 
    309     ; Get and push total LBA size
    310     mov     dl, [RAMVARS.bTimeoutTicksLeft]     ; Restore drive number
    311     call    BootInfo_GetTotalSectorCount
    312     call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
    313 
    314     mov     si, g_szSizeDual
    315     jmp     SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
    316 
    317 
    318 ;--------------------------------------------------------------------
    319 ; .HardDiskMenuitemInfoForForeignDrive
    320 ;   Parameters:
    321 ;       DL:     Untranslated Hard Disk number
    322 ;       DS:     RAMVARS segment
    323 ;   Returns:
    324 ;       CF:     Set since menu event was handled successfully
    325 ;   Corrupts registers:
    326 ;       AX, BX, CX, DX, SI, DI
    327 ;--------------------------------------------------------------------
    328 ALIGN JUMP_ALIGN
    329 .HardDiskMenuitemInfoForForeignDrive:
    330     push    bp
    331     mov     bp, sp
    332     ePUSH_T ax, g_szCapacity
    333 
    334     call    DriveXlate_ToOrBack
    335     call    AH15h_GetSectorCountFromForeignDriveToDXAX
    336     call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
    337 
    338     mov     si, g_szSizeSingle
    339     jmp     SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
    340 
    341        
    342 ;--------------------------------------------------------------------
    343 ; BootMenuPrint_ClearInformationArea
    344 ;   Parameters:
    345 ;       Nothing
    346 ;   Returns:
    347 ;       CF:     Set
    348 ;   Corrupts registers:
    349 ;       AX, DI
    350 ;--------------------------------------------------------------------
    351 ALIGN JUMP_ALIGN
    352 BootMenuPrint_ClearInformationArea:
    353     CALL_MENU_LIBRARY ClearInformationArea
    354     stc
    355245    ret
    356 
     246       
    357247       
    358248;--------------------------------------------------------------------
     
    373263    CALL_DISPLAY_LIBRARY ClearScreenWithCharInALandAttrInAH
    374264    ret
    375 
    376        
    377 ;--------------------------------------------------------------------
    378 ; PrintDriveNumberAfterTranslationFromDL
    379 ;   Parameters:
    380 ;       DL:     Untranslated Floppy Drive number
    381 ;       DS:     RAMVARS segment
    382 ;   Returns:
    383 ;       Nothing
    384 ;   Corrupts registers:
    385 ;       AX, DI
    386 ;--------------------------------------------------------------------
    387 ALIGN JUMP_ALIGN
    388 PrintDriveNumberAfterTranslationFromDL:
    389     mov     ax, dx
    390     call    DriveXlate_ToOrBack
    391     xchg    dx, ax              ; Restore DX, WORD to print in AL
    392     xor     ah, ah
    393     push    bp
    394     mov     bp, sp
    395     mov     si, g_szDriveNum
    396     push    ax
    397        
    398 BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay:
    399     jmp     SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
    400265
    401266
     
    510375    push    cx          ; Key attribute for last space
    511376    mov     si, g_szHotkey
    512     jmp     SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay
     377       
     378BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay:
     379    jmp     SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
    513380
    514381
     
    528395
    529396
    530        
    531 
    532 
    533        
     397;--------------------------------------------------------------------
     398; ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
     399;   Parameters:
     400;       BX:DX:AX:   Sector count
     401;   Returns:
     402;       Size in stack
     403;   Corrupts registers:
     404;       AX, BX, CX, DX, SI
     405;--------------------------------------------------------------------
     406ALIGN JUMP_ALIGN
     407ConvertSectorCountInBXDXAXtoSizeAndPushForFormat:
     408    pop     si                      ; Pop return address
     409    ePUSH_T cx, g_szCapacityNum     ; Push format substring
     410    call    Size_ConvertSectorCountInBXDXAXtoKiB
     411    mov     cx, BYTE_MULTIPLES.kiB
     412    call    Size_GetSizeToAXAndCharToDLfromBXDXAXwithMagnitudeInCX
     413    push    ax                      ; Size in magnitude
     414    push    cx                      ; Tenths
     415    push    dx                      ; Magnitude character
     416    jmp     si
     417
     418
     419FloppyTypes:
     420.rgbCapacityMultiplier equ 20           ; Multiplier to reduce word sized values to byte size
     421.rgbCapacity:
     422    db      360   / FloppyTypes.rgbCapacityMultiplier    ;  type 1
     423    db      1200  / FloppyTypes.rgbCapacityMultiplier    ;  type 2
     424    db      720   / FloppyTypes.rgbCapacityMultiplier    ;  type 3
     425    db      1440  / FloppyTypes.rgbCapacityMultiplier    ;  type 4
     426    db      2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 5
     427    db      2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 6
     428
     429
     430
     431
     432       
     433
     434
     435       
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm

    r200 r241  
    1212; BootMenuPrintCfg_ForOurDrive
    1313;   Parameters:
    14 ;       DS:     Segment to DPT
    15 ;       Stack:  Offset to DPT
     14;       DS:DI:      Pointer to DPT
    1615;   Returns:
    1716;       Nothing
     
    2120ALIGN JUMP_ALIGN
    2221BootMenuPrintCfg_ForOurDrive:
    23     mov     si, g_szCfgHeader
    24     call    BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
    25     pop     di
    2622    eMOVZX  ax, BYTE [di+DPT.bIdevarsOffset]
    2723    xchg    si, ax                      ; CS:SI now points to IDEVARS
    2824    ; Fall to .PushAndFormatCfgString
    29 
    30 ;--------------------------------------------------------------------
    31 ; PushAndFormatCfgString
    32 ;   Parameters:
    33 ;       DS:DI:  Ptr to DPT
    34 ;       CS:SI:  Ptr to IDEVARS
    35 ;   Returns:
    36 ;       Nothing
    37 ;   Corrupts registers:
    38 ;       AX, DX, SI, DI
    39 ;--------------------------------------------------------------------
    40 .PushAndFormatCfgString:
    41     push    bp
    42     mov     bp, sp
    43     ; Fall to first push below
    4425
    4526;--------------------------------------------------------------------
     
    11495;--------------------------------------------------------------------
    11596.PushIRQ:
    116     eMOVZX  ax, BYTE [cs:si+IDEVARS.bIRQ]
     97    mov     al, BYTE [cs:si+IDEVARS.bIRQ]
     98    cbw
    11799    push    ax
    118100
     
    129111.PushResetStatus:
    130112    mov     al, [di+DPT.bFlagsHigh]
    131     and     ax, MASKH_DPT_RESET
     113    and     al, MASKH_DPT_RESET         ;  ah already zero from last push
    132114    push    ax
    133115
     
    142124;--------------------------------------------------------------------
    143125.PrintValuesFromStack:
    144     mov     si, g_szCfgFormat
    145     jmp     BootPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay
     126    jmp     BootMenuPrint_HardDiskRefreshInformation.output
    146127
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootPrint.asm

    r192 r241  
    2222    mov     si, g_szReadError
    2323       
    24 BootPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay:       
    2524    jmp     short BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay
    2625       
     
    5453
    5554    mov     si, g_szTryToBoot
    56     jmp     short BootPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay     
     55    jmp     short BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay       
    5756
    5857
  • trunk/XTIDE_Universal_BIOS/Src/Strings.asm

    r233 r241  
    88; Section containing code
    99SECTION .text
    10 
    11 ; POST drive detection strings
    12 g_szRomAt:      db  "%s @ %x",LF,CR,NULL
    1310
    1411; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
     
    2926%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
    3027%if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
    31 %error "g_szDetect* strings must be on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
    32 %endif
    33 %endif             
     28%error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
     29%endif
     30%endif
     31
     32; Boot Menu menuitem strings
     33;
     34; The following strings are used by BootMenuPrint_* routines.
     35; To support optimizations in that code, these strings must start on the same 256 byte page,
     36; which is checked at assembly time below.
     37;       
     38g_szBootMenuPrintStart:
     39g_szDriveNum:           db  "%x %s",NULL
     40g_szDriveNumBOOTNFO:    db  "%x %z",NULL
     41g_szFloppyDrv:          db  "Floppy Drive %c",NULL
     42g_szBootMenuPrintEnd:   
     43g_szForeignHD:          db  "Foreign Hard Disk",NULL
     44
     45%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
     46%if ((g_szBootMenuPrintStart-$$) & 0xff00) <> ((g_szBootMenuPrintEnd-$$) & 0xff00)
     47%error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines.  Please move this block up or down within strings.asm"
     48%endif
     49%endif
     50
     51; POST drive detection strings
     52g_szRomAt:      db  "%s @ %x",LF,CR,NULL
    3453               
    3554; Boot loader strings
     
    4463g_szRomBoot:    db  "ROM Boot",NULL
    4564g_szHotkey:     db  "%A%c%c%A%s%A ",NULL
    46 
    47 
    48 ; Boot Menu menuitem strings
    49 g_szDriveNum:   db  "%x ",NULL
    50 g_szFDLetter:   db  "%s %c",NULL
    51 g_szFloppyDrv:  db  "Floppy Drive",NULL
    52 g_szforeignHD:  db  "Foreign Hard Disk",NULL
    53 
     65               
    5466; Boot Menu information strings
    55 g_szCapacity:   db  "Capacity : ",NULL
    56 g_szSizeSingle: db  "%s%u.%u %ciB",NULL
    57 g_szSizeDual:   db  "%s%5-u.%u %ciB /%5-u.%u %ciB",LF,CR,NULL
    58 g_szCfgHeader:  db  "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",  SINGLE_VERTICAL,"IRQ",  SINGLE_VERTICAL,"Reset",LF,CR,NULL
    59 g_szCfgFormat:  db  "%s"   ,SINGLE_VERTICAL,"%5-u", SINGLE_VERTICAL,"%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x",  NULL
    60        
     67g_szCapacity:           db  "Capacity : %s",NULL
     68g_szCapacityNum:        db  "%5-u.%u %ciB",NULL     
     69g_szSizeDual:           db  "%s /%s",LF,CR
     70    db  "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,  "IRQ",SINGLE_VERTICAL,"Reset",LF,CR
     71    db     "%s",SINGLE_VERTICAL, "%5-u",SINGLE_VERTICAL, "%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x" ,NULL
     72
     73; Boot Menu Floppy Disk strings
     74;
     75; The following strings are used by BootMenuPrint_RefreshInformation
     76; To support optimizations in that code, these strings must start on the same 256 byte page,
     77; which is checked at assembly time below.
     78;               
     79g_szFddStart:   
     80g_szFddUnknown: db  "Unknown",NULL
     81g_szFddSizeOr:  db  "5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
     82g_szFddSize:    db  "%s",QUOTATION_MARK,", %u kiB",NULL ; 3½", 1440 kiB
     83g_szFddThreeHalf:       db  "3",ONE_HALF,NULL
     84g_szFddEnd:     
     85g_szFddFiveQuarter:     db  "5",ONE_QUARTER,NULL
     86
     87%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
     88%if ((g_szFddStart-$$) & 0xff00) <> ((g_szFddEnd-$$) & 0xff00)
     89%error "g_szFdd* strings must start on the same 256 byte page, required by the BootMenuPrint_RefreshInformation routines for floppy drives.  Please move this block up or down within strings.asm"
     90%endif
     91%endif                     
     92
    6193g_szAddressingModes:                   
    6294g_szLCHS:       db  "L-CHS",NULL
     
    83115%endif     
    84116       
    85 g_szFddUnknown: db  "%sUnknown",NULL
    86 g_szFddSizeOr:  db  "%s5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
    87 g_szFddSize:    db  "%s%s",QUOTATION_MARK,", %u kiB",NULL   ; 3½", 1440 kiB
    88 
    89 g_szFddThreeHalf:       db  "3",ONE_HALF,NULL
    90 g_szFddFiveQuarter:     db  "5",ONE_QUARTER,NULL       
    91 g_szFddThreeFive_Displacement equ (g_szFddFiveQuarter - g_szFddThreeHalf)
    92 
    93117g_szBusTypeValues:     
    94118g_szBusTypeValues_8Dual:        db      "D8 ",NULL
     
    152176;$translate{200}      = 18;    # DOUBLE_BOTTOM_LEFT_CORNER
    153177;$translate{181}      = 19;    # DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL
    154 ;$translate{ord('0')} = 20;    # DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL     
     178;$translate{ord('0')} = 20;
    155179;
    156180; Formats begin immediately after the last Translated character (they are in the same table)
     
    167191;$format{"2-u"} = 28;        # must be even
    168192;$format{"A"}   = 29;        # n/a
    169 ;$format{"s"}   = 30;        # n/a     
     193;$format{"s"}   = 30;        # n/a, normal string from DS
     194;$format{"z"}   = 31;        # n/a, boot string from BDA
    170195;
    171196; NOTE: The last $format cannot exceed 31 (stored in a 5-bit quantity).
  • trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm

    r233 r241  
    1717SECTION .text
    1818
     19; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
     20; To support an optimization in that code, these strings must start on the same 256 byte page,
     21; which is checked at assembly time below.
     22;
     23g_szDetectStart:       
     24g_szDetectMaster:       ; db    "Master",NULL
     25                        ; db     4dh,  61h,  73h,  74h,  65h,  72h,  00h    ; uncompressed
     26                          db     53h,  67h,  79h,  7ah,  6bh, 0b8h          ; compressed
     27
     28g_szDetectSlave:        ; db    "Slave ",NULL
     29                        ; db     53h,  6ch,  61h,  76h,  65h,  20h,  00h    ; uncompressed
     30                          db     59h,  72h,  67h,  7ch,  6bh,  00h          ; compressed
     31
     32g_szDetectOuter:        ; db    "IDE %s at %s: ",NULL
     33                        ; db     49h,  44h,  45h,  20h,  25h,  73h,  20h,  61h,  74h,  20h,  25h,  73h,  3ah,  20h,  00h    ; uncompressed
     34                          db     4fh,  4ah, 0cbh,  3eh,  20h,  67h, 0fah,  3eh,  40h,  00h                                  ; compressed
     35
     36g_szDetectPort:         ; db    "%x",NULL                       ; IDE Master at 1F0h:
     37                        ; db     25h,  78h,  00h    ; uncompressed
     38                          db     19h                ; compressed
     39
     40g_szDetectCOM:          ; db  "COM%c%s",NULL           
     41                        ; db   43h,  4fh,  4dh,  25h,  63h,  25h,  73h,  00h    ; uncompressed
     42                          db   49h,  55h,  53h,  35h,  1eh                      ; compressed
     43
     44g_szDetectCOMAuto:      ; db    " Auto",NULL
     45                        ; db     20h,  41h,  75h,  74h,  6fh,  00h    ; uncompressed
     46                          db     20h,  47h,  7bh,  7ah, 0b5h          ; compressed
     47
     48g_szDetectCOMSmall:     ; db    "/%u%u00",NULL                  ; IDE Master at COM1/9600:
     49                        ; db     2fh,  25h,  75h,  25h,  75h,  30h,  30h,  00h    ; uncompressed
     50                          db     2ah,  37h,  37h,  34h,  14h                      ; compressed
     51
     52g_szDetectEnd:
     53g_szDetectCOMLarge:     ; db    "/%u.%uK",NULL                  ; IDE Master at COM1/19.2K:
     54                        ; db     2fh,  25h,  75h,  2eh,  25h,  75h,  4bh,  00h    ; uncompressed
     55                          db     2ah,  37h,  29h,  37h,  91h                      ; compressed
     56
     57
     58%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
     59%if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
     60%error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
     61%endif
     62%endif
     63
     64; Boot Menu menuitem strings
     65;
     66; The following strings are used by BootMenuPrint_* routines.
     67; To support optimizations in that code, these strings must start on the same 256 byte page,
     68; which is checked at assembly time below.
     69;       
     70g_szBootMenuPrintStart:
     71g_szDriveNum:           ; db    "%x %s",NULL
     72                        ; db     25h,  78h,  20h,  25h,  73h,  00h    ; uncompressed
     73                          db     39h,  20h,  1eh                      ; compressed
     74
     75g_szDriveNumBOOTNFO:    ; db    "%x %z",NULL
     76                        ; db     25h,  78h,  20h,  25h,  7ah,  00h    ; uncompressed
     77                          db     39h,  20h,  1fh                      ; compressed
     78
     79g_szFloppyDrv:          ; db    "Floppy Drive %c",NULL
     80                        ; db     46h,  6ch,  6fh,  70h,  70h,  79h,  20h,  44h,  72h,  69h,  76h,  65h,  20h,  25h,  63h,  00h    ; uncompressed
     81                          db     4ch,  72h,  75h,  76h,  76h, 0ffh,  4ah,  78h,  6fh,  7ch, 0ebh,  15h                            ; compressed
     82
     83g_szBootMenuPrintEnd:   
     84g_szForeignHD:          ; db    "Foreign Hard Disk",NULL
     85                        ; db     46h,  6fh,  72h,  65h,  69h,  67h,  6eh,  20h,  48h,  61h,  72h,  64h,  20h,  44h,  69h,  73h,  6bh,  00h    ; uncompressed
     86                          db     4ch,  75h,  78h,  6bh,  6fh,  6dh, 0f4h,  4eh,  67h,  78h, 0eah,  4ah,  6fh,  79h, 0b1h                      ; compressed
     87
     88
     89%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
     90%if ((g_szBootMenuPrintStart-$$) & 0xff00) <> ((g_szBootMenuPrintEnd-$$) & 0xff00)
     91%error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines.  Please move this block up or down within strings.asm"
     92%endif
     93%endif
     94
    1995; POST drive detection strings
    2096g_szRomAt:      ; db    "%s @ %x",LF,CR,NULL
     
    2399
    24100
    25 ; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
    26 ; To support an optimization in that code, these strings must start on the same 256 byte page,
    27 ; which is checked at assembly time below.
    28 ;
    29 g_szDetectStart:       
    30 g_szDetectMaster:       ; db    "Master",NULL
    31                         ; db     4dh,  61h,  73h,  74h,  65h,  72h,  00h    ; uncompressed
    32                           db     53h,  67h,  79h,  7ah,  6bh, 0b8h          ; compressed
    33 
    34 g_szDetectSlave:        ; db    "Slave ",NULL
    35                         ; db     53h,  6ch,  61h,  76h,  65h,  20h,  00h    ; uncompressed
    36                           db     59h,  72h,  67h,  7ch,  6bh,  00h          ; compressed
    37 
    38 g_szDetectOuter:        ; db    "IDE %s at %s: ",NULL
    39                         ; db     49h,  44h,  45h,  20h,  25h,  73h,  20h,  61h,  74h,  20h,  25h,  73h,  3ah,  20h,  00h    ; uncompressed
    40                           db     4fh,  4ah, 0cbh,  3eh,  20h,  67h, 0fah,  3eh,  40h,  00h                                  ; compressed
    41 
    42 g_szDetectPort:         ; db    "%x",NULL                       ; IDE Master at 1F0h:
    43                         ; db     25h,  78h,  00h    ; uncompressed
    44                           db     19h                ; compressed
    45 
    46 g_szDetectCOM:          ; db  "COM%c%s",NULL           
    47                         ; db   43h,  4fh,  4dh,  25h,  63h,  25h,  73h,  00h    ; uncompressed
    48                           db   49h,  55h,  53h,  35h,  1eh                      ; compressed
    49 
    50 g_szDetectCOMAuto:      ; db    " Auto",NULL
    51                         ; db     20h,  41h,  75h,  74h,  6fh,  00h    ; uncompressed
    52                           db     20h,  47h,  7bh,  7ah, 0b5h          ; compressed
    53 
    54 g_szDetectCOMSmall:     ; db    "/%u%u00",NULL                  ; IDE Master at COM1/9600:
    55                         ; db     2fh,  25h,  75h,  25h,  75h,  30h,  30h,  00h    ; uncompressed
    56                           db     2ah,  37h,  37h,  34h,  14h                      ; compressed
    57 
    58 g_szDetectEnd:
    59 g_szDetectCOMLarge:     ; db    "/%u.%uK",NULL                  ; IDE Master at COM1/19.2K:
    60                         ; db     2fh,  25h,  75h,  2eh,  25h,  75h,  4bh,  00h    ; uncompressed
    61                           db     2ah,  37h,  29h,  37h,  91h                      ; compressed
    62 
    63 
    64 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
    65 %if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
    66 %error "g_szDetect* strings must be on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
    67 %endif
    68 %endif             
    69 
    70101; Boot loader strings
    71102g_szTryToBoot:          ; db    "Booting from %s %x",ANGLE_QUOTE_RIGHT,"%x",LF,CR,NULL
     
    104135
    105136
    106 
    107 ; Boot Menu menuitem strings
    108 g_szDriveNum:   ; db    "%x ",NULL
    109                 ; db     25h,  78h,  20h,  00h    ; uncompressed
    110                   db     39h,  00h                ; compressed
    111 
    112 g_szFDLetter:   ; db    "%s %c",NULL
    113                 ; db     25h,  73h,  20h,  25h,  63h,  00h    ; uncompressed
    114                   db     3eh,  20h,  15h                      ; compressed
    115 
    116 g_szFloppyDrv:  ; db    "Floppy Drive",NULL
    117                 ; db     46h,  6ch,  6fh,  70h,  70h,  79h,  20h,  44h,  72h,  69h,  76h,  65h,  00h    ; uncompressed
    118                   db     4ch,  72h,  75h,  76h,  76h, 0ffh,  4ah,  78h,  6fh,  7ch, 0abh                ; compressed
    119 
    120 g_szforeignHD:  ; db    "Foreign Hard Disk",NULL
    121                 ; db     46h,  6fh,  72h,  65h,  69h,  67h,  6eh,  20h,  48h,  61h,  72h,  64h,  20h,  44h,  69h,  73h,  6bh,  00h    ; uncompressed
    122                   db     4ch,  75h,  78h,  6bh,  6fh,  6dh, 0f4h,  4eh,  67h,  78h, 0eah,  4ah,  6fh,  79h, 0b1h                      ; compressed
    123 
    124 
    125137; Boot Menu information strings
    126 g_szCapacity:   ; db    "Capacity : ",NULL
    127                 ; db     43h,  61h,  70h,  61h,  63h,  69h,  74h,  79h,  20h,  3ah,  20h,  00h    ; uncompressed
    128                   db     49h,  67h,  76h,  67h,  69h,  6fh,  7ah, 0ffh,  40h,  00h                ; compressed
    129 
    130 g_szSizeSingle: ; db    "%s%u.%u %ciB",NULL
    131                 ; db     25h,  73h,  25h,  75h,  2eh,  25h,  75h,  20h,  25h,  63h,  69h,  42h,  00h    ; uncompressed
    132                   db     3eh,  37h,  29h,  37h,  20h,  35h,  6fh,  88h                                  ; compressed
    133 
    134 g_szSizeDual:   ; db    "%s%5-u.%u %ciB /%5-u.%u %ciB",LF,CR,NULL
    135                 ; db     25h,  73h,  25h,  35h,  2dh,  75h,  2eh,  25h,  75h,  20h,  25h,  63h,  69h,  42h,  20h,  2fh,  25h,  35h,  2dh,  75h,  2eh,  25h,  75h,  20h,  25h,  63h,  69h,  42h,  0ah,  0dh,  00h    ; uncompressed
    136                   db     3eh,  38h,  29h,  37h,  20h,  35h,  6fh, 0c8h,  2ah,  38h,  29h,  37h,  20h,  35h,  6fh,  48h,  1bh                                                                                        ; compressed
    137 
    138 g_szCfgHeader:  ; db    "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",  SINGLE_VERTICAL,"IRQ",  SINGLE_VERTICAL,"Reset",LF,CR,NULL
    139                 ; db     41h,  64h,  64h,  72h,  2eh, 0b3h,  42h,  6ch,  6fh,  63h,  6bh, 0b3h,  42h,  75h,  73h, 0b3h,  49h,  52h,  51h, 0b3h,  52h,  65h,  73h,  65h,  74h,  0ah,  0dh,  00h    ; uncompressed
    140                   db     47h,  6ah,  6ah,  78h,  29h,  23h,  48h,  72h,  75h,  69h,  71h,  23h,  48h,  7bh,  79h,  23h,  4fh,  58h,  57h,  23h,  58h,  6bh,  79h,  6bh,  7ah,  1bh                ; compressed
    141 
    142 g_szCfgFormat:  ; db    "%s"   ,SINGLE_VERTICAL,"%5-u", SINGLE_VERTICAL,"%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x",  NULL
    143                 ; db     25h,  73h, 0b3h,  25h,  35h,  2dh,  75h, 0b3h,  25h,  73h, 0b3h,  20h,  25h,  32h,  2dh,  49h, 0b3h,  25h,  35h,  2dh,  78h,  00h    ; uncompressed
    144                   db     3eh,  23h,  38h,  23h,  3eh,  23h,  20h,  36h,  23h,  1ah                                                                            ; compressed
    145 
     138g_szCapacity:           ; db    "Capacity : %s",NULL
     139                        ; db     43h,  61h,  70h,  61h,  63h,  69h,  74h,  79h,  20h,  3ah,  20h,  25h,  73h,  00h    ; uncompressed
     140                          db     49h,  67h,  76h,  67h,  69h,  6fh,  7ah, 0ffh, 0c0h,  1eh                            ; compressed
     141
     142g_szCapacityNum:        ; db    "%5-u.%u %ciB",NULL     
     143                        ; db     25h,  35h,  2dh,  75h,  2eh,  25h,  75h,  20h,  25h,  63h,  69h,  42h,  00h    ; uncompressed
     144                          db     38h,  29h,  37h,  20h,  35h,  6fh,  88h                                        ; compressed
     145
     146g_szSizeDual:           ; db    "%s /%s",LF,CR
     147                        ; db     25h,  73h,  20h,  2fh,  25h,  73h,  0ah,  0dh    ; uncompressed
     148                          db     3eh,  20h,  2ah,  3eh,  3bh                      ; compressed
     149
     150    ; db    "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,  "IRQ",SINGLE_VERTICAL,"Reset",LF,CR
     151    ; db     41h,  64h,  64h,  72h,  2eh, 0b3h,  42h,  6ch,  6fh,  63h,  6bh, 0b3h,  42h,  75h,  73h, 0b3h,  49h,  52h,  51h, 0b3h,  52h,  65h,  73h,  65h,  74h,  0ah,  0dh    ; uncompressed
     152      db     47h,  6ah,  6ah,  78h,  29h,  23h,  48h,  72h,  75h,  69h,  71h,  23h,  48h,  7bh,  79h,  23h,  4fh,  58h,  57h,  23h,  58h,  6bh,  79h,  6bh,  7ah,  3bh          ; compressed
     153
     154    ; db       "%s",SINGLE_VERTICAL, "%5-u",SINGLE_VERTICAL, "%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x" ,NULL
     155    ; db        25h,  73h, 0b3h,  25h,  35h,  2dh,  75h, 0b3h,  25h,  73h, 0b3h,  20h,  25h,  32h,  2dh,  49h, 0b3h,  25h,  35h,  2dh,  78h,  00h    ; uncompressed
     156      db        3eh,  23h,  38h,  23h,  3eh,  23h,  20h,  36h,  23h,  1ah                                                                            ; compressed
     157
     158
     159; Boot Menu Floppy Disk strings
     160;
     161; The following strings are used by BootMenuPrint_RefreshInformation
     162; To support optimizations in that code, these strings must start on the same 256 byte page,
     163; which is checked at assembly time below.
     164;               
     165g_szFddStart:   
     166g_szFddUnknown: ; db    "Unknown",NULL
     167                ; db     55h,  6eh,  6bh,  6eh,  6fh,  77h,  6eh,  00h    ; uncompressed
     168                  db     5bh,  74h,  71h,  74h,  75h,  7dh, 0b4h          ; compressed
     169
     170g_szFddSizeOr:  ; db    "5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
     171                ; db     35h, 0ach,  22h,  20h,  6fh,  72h,  20h,  33h, 0abh,  22h,  20h,  44h,  44h,  00h    ; uncompressed
     172                  db     2fh,  21h,  26h,  20h,  75h, 0f8h,  2dh,  22h,  26h,  20h,  4ah,  8ah                ; compressed
     173
     174g_szFddSize:    ; db    "%s",QUOTATION_MARK,", %u kiB",NULL ; 3½", 1440 kiB
     175                ; db     25h,  73h,  22h,  2ch,  20h,  25h,  75h,  20h,  6bh,  69h,  42h,  00h    ; uncompressed
     176                  db     3eh,  26h,  27h,  20h,  37h,  20h,  71h,  6fh,  88h                      ; compressed
     177
     178g_szFddThreeHalf:       ; db  "3",ONE_HALF,NULL
     179                        ; db   33h, 0abh,  00h    ; uncompressed
     180                          db   2dh,  02h          ; compressed
     181
     182g_szFddEnd:     
     183g_szFddFiveQuarter:     ; db  "5",ONE_QUARTER,NULL
     184                        ; db   35h, 0ach,  00h    ; uncompressed
     185                          db   2fh,  01h          ; compressed
     186
     187
     188%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
     189%if ((g_szFddStart-$$) & 0xff00) <> ((g_szFddEnd-$$) & 0xff00)
     190%error "g_szFdd* strings must start on the same 256 byte page, required by the BootMenuPrint_RefreshInformation routines for floppy drives.  Please move this block up or down within strings.asm"
     191%endif
     192%endif                     
    146193
    147194g_szAddressingModes:                   
     
    180227%endif
    181228%endif     
    182 
    183 g_szFddUnknown: ; db    "%sUnknown",NULL
    184                 ; db     25h,  73h,  55h,  6eh,  6bh,  6eh,  6fh,  77h,  6eh,  00h    ; uncompressed
    185                   db     3eh,  5bh,  74h,  71h,  74h,  75h,  7dh, 0b4h                ; compressed
    186 
    187 g_szFddSizeOr:  ; db    "%s5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
    188                 ; db     25h,  73h,  35h, 0ach,  22h,  20h,  6fh,  72h,  20h,  33h, 0abh,  22h,  20h,  44h,  44h,  00h    ; uncompressed
    189                   db     3eh,  2fh,  21h,  26h,  20h,  75h, 0f8h,  2dh,  22h,  26h,  20h,  4ah,  8ah                      ; compressed
    190 
    191 g_szFddSize:    ; db    "%s%s",QUOTATION_MARK,", %u kiB",NULL   ; 3½", 1440 kiB
    192                 ; db     25h,  73h,  25h,  73h,  22h,  2ch,  20h,  25h,  75h,  20h,  6bh,  69h,  42h,  00h    ; uncompressed
    193                   db     3eh,  3eh,  26h,  27h,  20h,  37h,  20h,  71h,  6fh,  88h                            ; compressed
    194 
    195 
    196 g_szFddThreeHalf:       ; db  "3",ONE_HALF,NULL
    197                         ; db   33h, 0abh,  00h    ; uncompressed
    198                           db   2dh,  02h          ; compressed
    199 
    200 g_szFddFiveQuarter:     ; db  "5",ONE_QUARTER,NULL     
    201                         ; db   35h, 0ach,  00h    ; uncompressed
    202                           db   2fh,  01h          ; compressed
    203 
    204 g_szFddThreeFive_Displacement equ (g_szFddFiveQuarter - g_szFddThreeHalf)
    205229
    206230g_szBusTypeValues:     
     
    289313;$translate{200}      = 18;    # DOUBLE_BOTTOM_LEFT_CORNER    [StringsCompress Processed]
    290314;$translate{181}      = 19;    # DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL    [StringsCompress Processed]
    291 ;$translate{ord('0')} = 20;    # DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL          [StringsCompress Processed]
     315;$translate{ord('0')} = 20;    [StringsCompress Processed]
    292316;
    293317; Formats begin immediately after the last Translated character (they are in the same table)
     
    304328;$format{"2-u"} = 28;        # must be even    [StringsCompress Processed]
    305329;$format{"A"}   = 29;        # n/a    [StringsCompress Processed]
    306 ;$format{"s"}   = 30;        # n/a          [StringsCompress Processed]
     330;$format{"s"}   = 30;        # n/a, normal string from DS    [StringsCompress Processed]
     331;$format{"z"}   = 31;        # n/a, boot string from BDA    [StringsCompress Processed]
    307332;
    308333; NOTE: The last $format cannot exceed 31 (stored in a 5-bit quantity).
     
    358383        db     (DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_A)    ; 29
    359384        db     (DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_s)    ; 30
     385        db     (DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_z)    ; 31
    360386
    361387%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     
    390416%error "DisplayFormatCompressed_Format_s is out of range of DisplayFormatCompressed_BaseFormatOffset"
    391417%endif
     418%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_z || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_z > 255
     419%error "DisplayFormatCompressed_Format_z is out of range of DisplayFormatCompressed_BaseFormatOffset"
     420%endif
    392421%endif
    393422
    394423;; translated usage stats
    395 ;; total translated:
     424;; 33:1
     425;; 32:31
     426;; 181:1
     427;; 53:2
     428;; 48:2
     429;; 200:1
     430;; 46:3
     431;; 179:8
     432;; 44:1
     433;; 50:2
     434;; 51:3
     435;; 47:3
     436;; 52:1
     437;; 172:2
     438;; 34:3
     439;; 49:1
     440;; 56:5
     441;; 45:3
     442;; 175:1
     443;; 171:2
     444;; 54:1
     445;; total translated: 21
    396446
    397447;; format usage stats
    398448;; A:4
    399449;; 2-u:1
    400 ;; 5-u:3
    401 ;; x:6
    402 ;; s:15
     450;; 5-u:2
     451;; x:7
     452;; s:13
    403453;; 5-x:1
    404454;; nl:6
    405455;; 2-I:1
    406 ;; c:7
    407 ;; u:9
    408 ;; total format: 10
     456;; c:5
     457;; u:6
     458;; z:1
     459;; total format: 11
    409460
    410461;; alphabet usage stats
     
    417468;; 64,@:1
    418469;; 65,A:4
    419 ;; 66,B:11
     470;; 66,B:9
    420471;; 67,C:4
    421472;; 68,D:10
     
    456507;; 103,g:2
    457508;; 104,h:
    458 ;; 105,i:11
     509;; 105,i:9
    459510;; 106,j:
    460511;; 107,k:4
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm

    r181 r241  
    3131;--------------------------------------------------------------------
    3232.StealMemoryForRAMVARS:
     33    mov     ax, LITE_MODE_RAMVARS_SEGMENT
    3334    test    BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE
    3435    jz      SHORT .InitializeRamvars    ; No need to steal RAM
     
    3940    mov     ax, [BDA.wBaseMem]
    4041    eSHL_IM ax, 6                       ; Segment to first stolen kB (*=40h)
     42    ; Fall to .InitializeRamvars
     43
     44;--------------------------------------------------------------------
     45; .InitializeRamvars
     46;   Parameters:
     47;       AX:     RAMVARS segment
     48;   Returns:
     49;       DS:     RAMVARS segment
     50;   Corrupts registers:
     51;       AX, CX, DI, ES
     52;--------------------------------------------------------------------
     53.InitializeRamvars:
    4154    mov     ds, ax
    42     mov     WORD [RAMVARS.wSignature], RAMVARS_SIGNATURE
    43     ; Fall to .InitializeRamvars
    44 
    45 ;--------------------------------------------------------------------
    46 ; .InitializeRamvars
    47 ;   Parameters:
    48 ;       Nothing
    49 ;   Returns:
    50 ;       DS:     RAMVARS segment
    51 ;   Corrupts registers:
    52 ;       AX, CX, DI, ES
    53 ;--------------------------------------------------------------------
    54 .InitializeRamvars:
    55     call    RamVars_GetSegmentToDS
     55    mov     es, ax
    5656    mov     cx, RAMVARS_size
    5757    xor     di, di
    58     push    ds
    59     pop     es
    6058    call    Memory_ZeroESDIwithSizeInCX
    6159    mov     WORD [RAMVARS.wSignature], RAMVARS_SIGNATURE
Note: See TracChangeset for help on using the changeset viewer.