Changeset 242 in xtideuniversalbios


Ignore:
Timestamp:
Feb 10, 2012, 3:12:40 AM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Optimizations (both for size and speed) in IdeTransfer.asm and MemIdeTransfer.asm
  • Fixed a bug where the SingleByteRead/Write functions in IdeTransfer.asm would fail on 128 sector transfers.
  • Fixed some typos and errors in general, comments etc.
Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/StringsCompress.pl

    r241 r242  
    66#                   gregli@hotmail.com
    77#
    8 # Description   :   Script for compiling and compressing strings for 
     8# Description   :   Script for compiling and compressing strings for
    99#                   use by DisplayFormatCompressed.asm.  See the header of that file
    1010#                   for a description of the compression scheme.
    1111#
    12 # Usage         :   stdin:  Listing of strings.asm, 
     12# Usage         :   stdin:  Listing of strings.asm,
    1313#                           assembled with MODULE_STRINGS_COMPRESSED_PRECOMPRESS.
    1414#                           We used the listing so that the assembler can take care of
     
    2828#  1. Those in the Translate associative array
    2929#  2. Those in the Format associative array
    30 #  3. Characters between $normal_base and $normal_base+0x40 
    31 #     (typically covers upper and lowe case alphabets)
     30#  3. Characters between $normal_base and $normal_base+0x40
     31#     (typically covers upper and lower case alphabets)
    3232#  4. Null characters (marking the end of strings)
    3333#  5. The special string LF,CR
    3434#
    35 # If a character or format read at the input cannot be found in one of the above categories, 
    36 # it must be added here before this script will accept it (and DisplayFormatCompressed can 
     35# If a character or format read at the input cannot be found in one of the above categories,
     36# it must be added here before this script will accept it (and DisplayFormatCompressed can
    3737# display it).
    3838#
    3939# Tables for the above categories are expected in the input stream, before string to be
    40 # compressed are provided.  Note that these tables are not present in DisplayFormatCompressed, 
    41 # and do not need to updated there.  Needed information is put in the compression output
     40# compressed are provided.  Note that these tables are not present in DisplayFormatCompressed,
     41# and do not need to be updated there.  Needed information is put in the compression output
    4242# that it reads.
    4343#
     
    6161print ";;;\n";
    6262print ";;; This file is generated by StringsCompress.pl from source in Strings.asm\n";
    63 print ";;; DO NOT EDIT DIRECTLY - See the maekfile for how to rebuild this file.\n";
     63print ";;; DO NOT EDIT DIRECTLY - See the makefile for how to rebuild this file.\n";
    6464print ";;; This file only needs to be rebuilt if Strings.asm is changed.\n";
    6565print ";;;\n";
     
    6868
    6969#
    70 # On a first pass, look for our table directives.  $translate{...}, $format{...}, etc. 
    71 # are expectd in the input stream.
     70# On a first pass, look for our table directives.  $translate{...}, $format{...}, etc.
     71# are expected in the input stream.
    7272#
    7373$processed = "    [StringsCompress Processed]";
     
    115115
    116116#
    117 # On the second pass, loop through lines of the listing, looking for 'db' lines 
     117# On the second pass, loop through lines of the listing, looking for 'db' lines
    118118# (and dealing with continuations) and compressing each line as it is encountered.
    119119#
     
    157157        &processString( $bytes, $label.$spacing, $db );
    158158    }
    159    
    160     # 
     159
     160    #
    161161    # everything else, copy to the output as is
    162162    #
     
    208208print "\n";
    209209
    210 # 
     210#
    211211# Ensure that branch targets are within reach
    212212#
     
    280280        $orig .= sprintf( ($v[$i] > 0x9f ? ", %03xh" : ",  %02xh"), $v[$i] );
    281281    }
    282     $v[length($chars)/2] = 0xff;      # guard byte to avoid thinking going past the end of 
     282    $v[length($chars)/2] = 0xff;      # guard byte to avoid thinking going past the end of
    283283                                      # the string is a null
    284284
     
    336336            $used{$v[$g]}++;
    337337        }
    338        
     338
    339339        #
    340340        # "normal" characters (alphabet, and ASCII characters around the alphabet)
     
    350350        #
    351351        # Not found
    352         # 
     352        #
    353353        else
    354354        {
     
    378378            if( $v[$g+1] == 0x20 && $v[$g+2] != 0 )
    379379            {
    380                 # can't take this optimization if the next byte is a null, 
     380                # can't take this optimization if the next byte is a null,
    381381                # since we can't have both a postfix space and null
    382382                $g++;
  • trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc

    r238 r242  
    7171endstruc
    7272
    73 %if IDEVARS.bSerialCOMPortChar+1 != IDEVARS.bDevice 
    74 %erorr "IDEVARS.bSerialCOMPortChar needs to come immediately before IDEVARS.bDevice so that both bytes can be fetched at the same time inside DetectPrint.asm"
     73%if IDEVARS.bSerialCOMPortChar+1 != IDEVARS.bDevice
     74    %error "IDEVARS.bSerialCOMPortChar needs to come immediately before IDEVARS.bDevice so that both bytes can be fetched at the same time inside DetectPrint.asm"
    7575%endif
    7676
     
    111111; COM Number to I/O Port Address Mapping
    112112;
    113 ; COM Number:                               1,    2,    3,    4,    5,    6,    7,    8,    9,   10,   11,   12     
     113; COM Number:                               1,    2,    3,    4,    5,    6,    7,    8,    9,   10,   11,   12
    114114; Corresponds to I/O port:                3f8,  2f8,  3e8,  2e8,  2f0,  3e0,  2e0,  260,  368,  268,  360,  270
    115115; Corresponds to Packed I/O port (hex):    37,   17,   35,   15,   16,   34,   14,    4,   25,    5,   24,    6
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDPT.asm

    r160 r242  
    1414;       Nothing
    1515;   Corrupts registers:
    16 ;       AX, BX, CX, DX
     16;       AX
    1717;--------------------------------------------------------------------
    1818IdeDPT_Finalize:
     
    2828;       Nothing
    2929;   Corrupts registers:
    30 ;       Nothing
     30;       AX
    3131;--------------------------------------------------------------------
    3232.StoreBlockMode:
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm

    r238 r242  
    3535ALIGN JUMP_ALIGN
    3636IdeTransfer_StartWithCommandInAL:
    37     mov     ah, [bp+IDEPACK.bSectorCount]
    38 
    3937    ; Are we reading or writing?
    4038    test    al, 16  ; Bit 4 is cleared on all the read commands but set on 3 of the 4 write commands
    41     jnz     SHORT .PrepareToWriteDataFromESSI
     39    mov     ah, [bp+IDEPACK.bSectorCount]
     40    jnz     SHORT WriteToDrive
    4241    cmp     al, COMMAND_WRITE_MULTIPLE
    43     je      SHORT .PrepareToWriteDataFromESSI
    44 
    45     ; Prepare to read data to ESSI
    46     mov     bx, g_rgfnPioRead
    47     call    InitializePiovarsInSSBPwithSectorCountInAH
    48     xchg    si, di
    49     jmp     SHORT ReadFromDrive
    50 
    51 ALIGN JUMP_ALIGN
    52 .PrepareToWriteDataFromESSI:
    53     mov     bx, g_rgfnPioWrite
    54     call    InitializePiovarsInSSBPwithSectorCountInAH
    55     ; Fall to WriteToDrive
    56 
    57 
    58 ;--------------------------------------------------------------------
    59 ; WriteToDrive
    60 ;   Parameters:
     42    je      SHORT WriteToDrive
     43    ; Fall to ReadFromDrive
     44
     45;--------------------------------------------------------------------
     46; ReadFromDrive
     47;   Parameters:
     48;       AH:     Number of sectors to transfer (1...128)
     49;       ES:SI:  Normalized ptr to buffer to receive data
    6150;       DS:DI:  Ptr to DPT (in RAMVARS segment)
    62 ;       ES:SI:  Normalized ptr to buffer containing data
    6351;       SS:BP:  Ptr to PIOVARS
    6452;   Returns:
     53;       DS:DI:  Ptr to DPT (in RAMVARS segment)
    6554;       AH:     BIOS Error code
    6655;       CX:     Number of successfully transferred sectors
     
    7059;       AL, BX, DX, SI, ES
    7160;--------------------------------------------------------------------
     61ReadFromDrive:
     62    ; Prepare to read data to ESSI
     63    mov     bx, g_rgfnPioRead
     64    call    InitializePiovarsInSSBPwithSectorCountInAH
     65
     66    ; Wait until drive is ready to transfer
     67    call    IdeWait_IRQorDRQ                    ; Wait until ready to transfer
     68    jc      SHORT ReturnWithTransferErrorInAH
     69    xchg    si, di                              ; ES:DI now points buffer
     70
     71    mov     cx, [bp+PIOVARS.wWordsInBlock]
     72
     73ALIGN JUMP_ALIGN
     74.ReadNextBlockFromDrive:
     75    mov     dx, [bp+PIOVARS.wDataPort]
     76    cmp     [bp+PIOVARS.wWordsLeft], cx
     77    jbe     SHORT .ReadLastBlockFromDrive
     78    call    [bp+PIOVARS.fnXfer]
     79
     80    ; Wait until ready for next block and check for errors
     81    xchg    di, si                              ; DS:DI now points DPT
     82    call    IdeWait_IRQorDRQ                    ; Wait until ready to transfer
     83    jc      SHORT ReturnWithTransferErrorInAH
     84    xchg    si, di                              ; ES:DI now points buffer
     85
     86    ; Increment number of successfully read WORDs
     87    mov     cx, [bp+PIOVARS.wWordsInBlock]
     88    sub     [bp+PIOVARS.wWordsLeft], cx
     89    add     [bp+PIOVARS.wWordsDone], cx
     90    jmp     SHORT .ReadNextBlockFromDrive
     91
     92ALIGN JUMP_ALIGN
     93.ReadLastBlockFromDrive:
     94    mov     cx, [bp+PIOVARS.wWordsLeft]
     95    call    [bp+PIOVARS.fnXfer]                 ; Transfer possibly partial block
     96
     97    ; Check for errors in last block
     98    mov     di, si                              ; DS:DI now points DPT
     99CheckErrorsAfterTransferringLastBlock:
     100    mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRDY)
     101    call    IdeWait_PollStatusFlagInBLwithTimeoutInBH
     102
     103    ; Return number of successfully read sectors
     104ReturnWithTransferErrorInAH:
     105    mov     cx, [bp+PIOVARS.wWordsDone]
     106    jc      SHORT .ConvertTransferredWordsInCXtoSectors
     107    add     cx, [bp+PIOVARS.wWordsLeft]         ; Never sets CF
     108.ConvertTransferredWordsInCXtoSectors:
     109    xchg    cl, ch
     110    ret
     111
     112
     113;--------------------------------------------------------------------
     114; WriteToDrive
     115;   Parameters:
     116;       AH:     Number of sectors to transfer (1...128)
     117;       DS:DI:  Ptr to DPT (in RAMVARS segment)
     118;       ES:SI:  Normalized ptr to buffer containing data
     119;       SS:BP:  Ptr to PIOVARS
     120;   Returns:
     121;       AH:     BIOS Error code
     122;       CX:     Number of successfully transferred sectors
     123;       CF:     0 if transfer succesfull
     124;               1 if any error
     125;   Corrupts registers:
     126;       AL, BX, DX, SI, ES
     127;--------------------------------------------------------------------
     128ALIGN JUMP_ALIGN
    72129WriteToDrive:
     130    ; Prepare to write data from ESSI
     131    mov     bx, g_rgfnPioWrite
     132    call    InitializePiovarsInSSBPwithSectorCountInAH
     133
    73134    ; Always poll when writing first block (IRQs are generated for following blocks)
    74135    mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ)
     
    76137    jc      SHORT ReturnWithTransferErrorInAH
    77138
     139    mov     cx, [bp+PIOVARS.wWordsInBlock]
     140
    78141ALIGN JUMP_ALIGN
    79142.WriteNextBlockToDrive:
    80     mov     cx, [bp+PIOVARS.wWordsInBlock]
    81143    mov     dx, [bp+PIOVARS.wDataPort]
    82144    cmp     [bp+PIOVARS.wWordsLeft], cx
     
    89151
    90152    ; Increment number of successfully written WORDs
    91     mov     ax, [bp+PIOVARS.wWordsInBlock]
    92     sub     [bp+PIOVARS.wWordsLeft], ax
    93     add     [bp+PIOVARS.wWordsDone], ax
     153    mov     cx, [bp+PIOVARS.wWordsInBlock]
     154    sub     [bp+PIOVARS.wWordsLeft], cx
     155    add     [bp+PIOVARS.wWordsDone], cx
    94156    jmp     SHORT .WriteNextBlockToDrive
    95157
     
    107169
    108170;--------------------------------------------------------------------
    109 ; ReadFromDrive
    110 ;   Parameters:
    111 ;       ES:DI:  Normalized ptr to buffer to recieve data
    112 ;       DS:SI:  Ptr to DPT (in RAMVARS segment)
    113 ;       SS:BP:  Ptr to PIOVARS
    114 ;   Returns:
    115 ;       DS:DI:  Ptr to DPT (in RAMVARS segment)
    116 ;       AH:     BIOS Error code
    117 ;       CX:     Number of successfully transferred sectors
    118 ;       CF:     0 if transfer succesfull
    119 ;               1 if any error
    120 ;   Corrupts registers:
    121 ;       AL, BX, DX, SI, ES
    122 ;--------------------------------------------------------------------
    123 ALIGN JUMP_ALIGN
    124 ReadFromDrive:
    125     ; Wait until drive is ready to transfer
    126     xchg    di, si                              ; DS:DI now points DPT
    127     call    IdeWait_IRQorDRQ                    ; Wait until ready to transfer
    128     jc      SHORT ReturnWithTransferErrorInAH
    129     xchg    si, di                              ; ES:DI now points buffer
    130 
    131 ALIGN JUMP_ALIGN
    132 .ReadNextBlockFromDrive:
    133     mov     cx, [bp+PIOVARS.wWordsInBlock]
    134     mov     dx, [bp+PIOVARS.wDataPort]
    135     cmp     [bp+PIOVARS.wWordsLeft], cx
    136     jbe     SHORT .ReadLastBlockFromDrive
    137     call    [bp+PIOVARS.fnXfer]
    138 
    139     ; Wait until ready for next block and check for errors
    140     xchg    di, si                              ; DS:DI now points DPT
    141     call    IdeWait_IRQorDRQ                    ; Wait until ready to transfer
    142     jc      SHORT ReturnWithTransferErrorInAH
    143     xchg    si, di                              ; ES:DI now points buffer
    144 
    145     ; Increment number of successfully read WORDs
    146     mov     ax, [bp+PIOVARS.wWordsInBlock]
    147     sub     [bp+PIOVARS.wWordsLeft], ax
    148     add     [bp+PIOVARS.wWordsDone], ax
    149     jmp     SHORT .ReadNextBlockFromDrive
    150 
    151 ALIGN JUMP_ALIGN
    152 .ReadLastBlockFromDrive:
    153     mov     cx, [bp+PIOVARS.wWordsLeft]
    154     call    [bp+PIOVARS.fnXfer]                 ; Transfer possibly partial block
    155 
    156     ; Check for errors in last block
    157     mov     di, si                              ; DS:DI now points DPT
    158 CheckErrorsAfterTransferringLastBlock:
    159     mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRDY)
    160     call    IdeWait_PollStatusFlagInBLwithTimeoutInBH
    161 
    162     ; Return number of successfully read sectors
    163 ReturnWithTransferErrorInAH:
    164     mov     cx, [bp+PIOVARS.wWordsDone]
    165     jc      SHORT .ConvertTransferredWordsInCXtoSectors
    166     add     cx, [bp+PIOVARS.wWordsLeft]         ; Never sets CF
    167 .ConvertTransferredWordsInCXtoSectors:
    168     xchg    cl, ch
    169     ret
    170 
    171 
    172 ;--------------------------------------------------------------------
    173171; InitializePiovarsInSSBPwithSectorCountInAH
    174172;   Parameters:
     
    180178;       Nothing
    181179;   Corrupts registers:
    182 ;       AX, BX, CX, DX
     180;       AX, BX, DX
    183181;--------------------------------------------------------------------
    184182ALIGN JUMP_ALIGN
     
    187185    xor     al, al
    188186    mov     [bp+PIOVARS.wWordsLeft], ax
     187    mov     ah, [di+DPT_ATA.bSetBlock]
     188    mov     [bp+PIOVARS.wWordsInBlock], ax
    189189    cbw
    190190    mov     [bp+PIOVARS.wWordsDone], ax         ; Zero
    191     mov     ah, [di+DPT_ATA.bSetBlock]
    192     mov     [bp+PIOVARS.wWordsInBlock], ax
    193191
    194192    ; Get transfer function based on bus type
    195193    xchg    ax, bx                              ; Lookup table offset to AX
    196     eMOVZX  bx, BYTE [di+DPT.bIdevarsOffset]    ; CS:BX now points to IDEVARS
     194    mov     bl, [di+DPT.bIdevarsOffset]         ; CS:BX now points to IDEVARS
    197195    mov     dx, [cs:bx+IDEVARS.wPort]           ; Load IDE Data port address
    198196    mov     bl, [cs:bx+IDEVARS.bDevice]         ; Load device type to BX
    199197    add     bx, ax
     198    mov     [bp+PIOVARS.wDataPort], dx
    200199    mov     ax, [cs:bx]                         ; Load offset to transfer function
    201     mov     [bp+PIOVARS.wDataPort], dx
    202200    mov     [bp+PIOVARS.fnXfer], ax
    203201    ret
     
    213211;       CX:     Block size in WORDs
    214212;       DX:     IDE Data port address
    215 ;       ES:DI:  Normalized ptr to buffer to recieve data
     213;       ES:DI:  Normalized ptr to buffer to receive data
    216214;   Returns:
    217215;       Nothing
     
    236234SingleByteRead:
    237235%ifdef USE_186  ; INS instruction available
     236    dec     cx          ; Avoid overflowing CX on a 128 sector transfer
    238237    shl     cx, 1       ; WORD count to BYTE count
     238    inc     cx
    239239    rep insb
     240    insb
    240241%else           ; If 8088/8086
    241242    shr     cx, 1       ; WORD count to DWORD count
     
    328329SingleByteWrite:
    329330%ifdef USE_186  ; OUTS instruction available
     331    dec     cx          ; Avoid overflowing CX on a 128 sector transfer
    330332    shl     cx, 1       ; WORD count to BYTE count
     333    inc     cx
    331334    es                  ; Source is ES segment
    332335    rep outsb
     336    es outsb
    333337%else           ; If 8088/8086
    334338    shr     cx, 1       ; WORD count to DWORD count
     
    386390
    387391
    388 
    389392; Lookup tables to get transfer function based on bus type
    390393ALIGN WORD_ALIGN
  • trunk/XTIDE_Universal_BIOS/Src/Device/MemoryMappedIDE/MemIdeTransfer.asm

    r238 r242  
    88    .wWordsLeft             resb    2   ; 2, WORDs left to transfer
    99    .wWordsDone             resb    2   ; 4, Number of sectors xferred
    10                             resb    1   ; 6,
     10    ; TODO: The above word vars could just as well be byte vars?
     11                            resb    1   ; 6,
    1112                            resb    1   ; 7, IDEPACK.bDeviceControl
    1213    .fpDPT                  resb    4   ; 8, Far pointer to DPT
     
    3435ALIGN JUMP_ALIGN
    3536MemIdeTransfer_StartWithCommandInAL:
     37    push    cs  ; We push CS here (segment of SAW) and later pop it to DS (reads) or ES (writes)
     38
    3639    ; Initialize MEMPIOVARS
    37     xchg    cx, ax                              ; IDE command to CL
    38     xor     al, al
    39     mov     ah, [bp+IDEPACK.bSectorCount]
    40     mov     [bp+MEMPIOVARS.wWordsLeft], ax
    41     cbw
    42     mov     [bp+MEMPIOVARS.wWordsDone], ax      ; Zero
    43     mov     ah, [di+DPT_ATA.bSetBlock]
    44     mov     [bp+MEMPIOVARS.wWordsInBlock], ax
     40    xor     cx, cx
     41    mov     [bp+MEMPIOVARS.wWordsDone], cx
     42    mov     ch, [bp+IDEPACK.bSectorCount]
     43    mov     [bp+MEMPIOVARS.wWordsLeft], cx
     44    mov     ch, [di+DPT_ATA.bSetBlock]
     45    mov     [bp+MEMPIOVARS.wWordsInBlock], cx
    4546    mov     [bp+MEMPIOVARS.fpDPT], di
    4647    mov     [bp+MEMPIOVARS.fpDPT+2], ds
    4748
    4849    ; Are we reading or writing?
    49     test    cl, 16  ; Bit 4 is cleared on all the read commands but set on 3 of the 4 write commands
    50     jnz     SHORT .PrepareToWriteDataFromESSI
    51     cmp     cl, COMMAND_WRITE_MULTIPLE
    52     je      SHORT .PrepareToWriteDataFromESSI
    53 
    54     ; Prepare to read data to ES:DI
    55     mov     di, si
    56     push    cs
    57     pop     ds
    58     mov     si, JRIDE_SECTOR_ACCESS_WINDOW_OFFSET
    59     jmp     SHORT ReadFromSectorAccessWindowInDSSItoESDI
    60 
    61 ALIGN JUMP_ALIGN
    62 .PrepareToWriteDataFromESSI:
    63     push    es
    64     pop     ds
    65     push    cs
    66     pop     es
    67     mov     di, JRIDE_SECTOR_ACCESS_WINDOW_OFFSET
    68     ; Fall to WriteToSectorAccessWindowInESDIfromDSSI
    69 
    70 
    71 ;--------------------------------------------------------------------
    72 ; WriteToSectorAccessWindowInESDIfromDSSI
    73 ;   Parameters:
    74 ;       DS:SI:  Normalized ptr to buffer containing data
    75 ;       ES:DI:  Ptr to Sector Access Window
     50    test    al, 16  ; Bit 4 is cleared on all the read commands but set on 3 of the 4 write commands
     51    jnz     SHORT WriteToSectorAccessWindow
     52    cmp     al, COMMAND_WRITE_MULTIPLE
     53    je      SHORT WriteToSectorAccessWindow
     54    ; Fall to ReadFromSectorAccessWindow
     55
     56;--------------------------------------------------------------------
     57; ReadFromSectorAccessWindow
     58;   Parameters:
     59;       Stack:  Segment part of ptr to Sector Access Window
     60;       ES:SI:  Normalized ptr to buffer to receive data
    7661;       SS:BP:  Ptr to MEMPIOVARS
    7762;   Returns:
     
    8469;       AL, BX, DX, SI, ES
    8570;--------------------------------------------------------------------
    86 WriteToSectorAccessWindowInESDIfromDSSI:
    87     ; Always poll when writing first block (IRQs are generated for following blocks)
    88     call    WaitUntilReadyToTransferNextBlock
    89     jc      SHORT ReturnWithMemoryIOtransferErrorInAH
    90 
    91 ALIGN JUMP_ALIGN
    92 .WriteNextBlockToDrive:
    93     mov     cx, [bp+PIOVARS.wWordsInBlock]
    94     cmp     [bp+PIOVARS.wWordsLeft], cx
    95     jbe     SHORT .WriteLastBlockToDrive
    96     eMOVZX  dx, ch                              ; DX = Sectors in block
    97     call    WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
    98     call    WaitUntilReadyToTransferNextBlock
    99     jc      SHORT ReturnWithMemoryIOtransferErrorInAH
    100 
    101     ; Increment number of successfully written WORDs
    102     mov     ax, [bp+PIOVARS.wWordsInBlock]
    103     sub     [bp+PIOVARS.wWordsLeft], ax
    104     add     [bp+PIOVARS.wWordsDone], ax
    105     jmp     SHORT .WriteNextBlockToDrive
    106 
    107 ALIGN JUMP_ALIGN
    108 .WriteLastBlockToDrive:
    109     eMOVZX  dx, BYTE [bp+PIOVARS.wWordsLeft+1]  ; Sectors left
    110 %ifdef USE_186
    111     push    CheckErrorsAfterTransferringLastMemoryMappedBlock
    112     jmp     WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
    113 %else
    114     call    WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
    115     jmp     SHORT CheckErrorsAfterTransferringLastMemoryMappedBlock
    116 %endif
    117 
    118 
    119 ;--------------------------------------------------------------------
    120 ; WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
    121 ;   Parameters:
    122 ;       DX:     Number of sectors in block
    123 ;       DS:SI:  Normalized ptr to source buffer
    124 ;       ES:DI:  Ptr to Sector Access Window
    125 ;   Returns:
    126 ;       CX, DX: Zero
    127 ;       SI:     Updated
    128 ;   Corrupts registers:
    129 ;       Nothing
    130 ;--------------------------------------------------------------------
    131 ALIGN JUMP_ALIGN
    132 WriteSingleBlockFromDSSIToSectorAccessWindowInESDI:
    133     mov     cx, JRIDE_SECTOR_ACCESS_WINDOW_SIZE / 2
    134     rep movsw
    135     sub     di, JRIDE_SECTOR_ACCESS_WINDOW_SIZE ; Reset for next sector
    136     dec     dx
    137     jnz     SHORT WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
    138     ret
    139 
    140 
    141 ;--------------------------------------------------------------------
    142 ; ReadFromSectorAccessWindowInDSSItoESDI
    143 ;   Parameters:
    144 ;       ES:DI:  Normalized ptr to buffer to recieve data
    145 ;       DS:SI:  Ptr to Sector Access Window
    146 ;       SS:BP:  Ptr to MEMPIOVARS
    147 ;   Returns:
    148 ;       DS:DI:  Ptr to DPT (in RAMVARS segment)
    149 ;       AH:     BIOS Error code
    150 ;       CX:     Number of successfully transferred sectors
    151 ;       CF:     0 if transfer succesfull
    152 ;               1 if any error
    153 ;   Corrupts registers:
    154 ;       AL, BX, DX, SI, ES
    155 ;--------------------------------------------------------------------
    156 ALIGN JUMP_ALIGN
    157 ReadFromSectorAccessWindowInDSSItoESDI:
    158     call    WaitUntilReadyToTransferNextBlock
    159     jc      SHORT ReturnWithMemoryIOtransferErrorInAH
     71ReadFromSectorAccessWindow:
     72    pop     ds  ; CS -> DS
     73    mov     di, si
     74    mov     si, JRIDE_SECTOR_ACCESS_WINDOW_OFFSET
     75
     76    call    WaitUntilReadyToTransferNextBlock
     77    jc      SHORT ReturnWithMemoryIOtransferErrorInAH
     78
     79    mov     cx, [bp+PIOVARS.wWordsInBlock]
    16080
    16181ALIGN JUMP_ALIGN
    16282.ReadNextBlockFromDrive:
    163     mov     cx, [bp+PIOVARS.wWordsInBlock]
    16483    cmp     [bp+PIOVARS.wWordsLeft], cx
    16584    jbe     SHORT .ReadLastBlockFromDrive
    166     eMOVZX  dx, ch                              ; DX = Sectors in block
    16785    call    ReadSingleBlockFromSectorAccessWindowInDSSItoESDI
    16886    call    WaitUntilReadyToTransferNextBlock
     
    17088
    17189    ; Increment number of successfully read WORDs
    172     mov     ax, [bp+PIOVARS.wWordsInBlock]
    173     sub     [bp+PIOVARS.wWordsLeft], ax
    174     add     [bp+PIOVARS.wWordsDone], ax
     90    mov     cx, [bp+PIOVARS.wWordsInBlock]
     91    sub     [bp+PIOVARS.wWordsLeft], cx
     92    add     [bp+PIOVARS.wWordsDone], cx
    17593    jmp     SHORT .ReadNextBlockFromDrive
    17694
    17795ALIGN JUMP_ALIGN
    17896.ReadLastBlockFromDrive:
    179     eMOVZX  dx, BYTE [bp+PIOVARS.wWordsLeft+1]  ; Sectors left
     97    mov     ch, [bp+PIOVARS.wWordsLeft+1]       ; Sectors left
    18098    call    ReadSingleBlockFromSectorAccessWindowInDSSItoESDI
    18199
     
    186104    call    IDEDEVICE%+Wait_PollStatusFlagInBLwithTimeoutInBH
    187105
    188     ; Return number of successfully read sectors
     106    ; Return number of successfully transferred sectors
    189107ReturnWithMemoryIOtransferErrorInAH:
    190108    lds     di, [bp+MEMPIOVARS.fpDPT]           ; DPT now in DS:DI
     
    198116
    199117;--------------------------------------------------------------------
     118; WriteToSectorAccessWindow
     119;   Parameters:
     120;       Stack:  Segment part of ptr to Sector Access Window
     121;       ES:SI:  Normalized ptr to buffer containing data
     122;       SS:BP:  Ptr to MEMPIOVARS
     123;   Returns:
     124;       DS:DI:  Ptr to DPT (in RAMVARS segment)
     125;       AH:     BIOS Error code
     126;       CX:     Number of successfully transferred sectors
     127;       CF:     0 if transfer succesfull
     128;               1 if any error
     129;   Corrupts registers:
     130;       AL, BX, DX, SI, ES
     131;--------------------------------------------------------------------
     132ALIGN JUMP_ALIGN
     133WriteToSectorAccessWindow:
     134    push    es
     135    pop     ds
     136    pop     es  ; CS -> ES
     137    mov     di, JRIDE_SECTOR_ACCESS_WINDOW_OFFSET
     138
     139    ; Always poll when writing first block (IRQs are generated for following blocks)
     140    call    WaitUntilReadyToTransferNextBlock
     141    jc      SHORT ReturnWithMemoryIOtransferErrorInAH
     142
     143    mov     cx, [bp+PIOVARS.wWordsInBlock]
     144
     145ALIGN JUMP_ALIGN
     146.WriteNextBlockToDrive:
     147    cmp     [bp+PIOVARS.wWordsLeft], cx
     148    jbe     SHORT .WriteLastBlockToDrive
     149    call    WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
     150    call    WaitUntilReadyToTransferNextBlock
     151    jc      SHORT ReturnWithMemoryIOtransferErrorInAH
     152
     153    ; Increment number of successfully written WORDs
     154    mov     cx, [bp+PIOVARS.wWordsInBlock]
     155    sub     [bp+PIOVARS.wWordsLeft], cx
     156    add     [bp+PIOVARS.wWordsDone], cx
     157    jmp     SHORT .WriteNextBlockToDrive
     158
     159ALIGN JUMP_ALIGN
     160.WriteLastBlockToDrive:
     161    mov     ch, [bp+PIOVARS.wWordsLeft+1]       ; Sectors left
     162%ifndef USE_186
     163    mov     bx, CheckErrorsAfterTransferringLastMemoryMappedBlock
     164    push    bx
     165%else
     166    push    CheckErrorsAfterTransferringLastMemoryMappedBlock
     167%endif
     168    ; Fall to WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
     169
     170;--------------------------------------------------------------------
     171; WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
     172;   Parameters:
     173;       CH:     Number of sectors in block
     174;       DS:SI:  Normalized ptr to source buffer
     175;       ES:DI:  Ptr to Sector Access Window
     176;   Returns:
     177;       CX, DX: Zero
     178;       SI:     Updated
     179;   Corrupts registers:
     180;       BX
     181;--------------------------------------------------------------------
     182ALIGN JUMP_ALIGN
     183WriteSingleBlockFromDSSIToSectorAccessWindowInESDI:
     184    mov     bx, di
     185    eMOVZX  dx, ch
     186    xor     cl, cl
     187ALIGN JUMP_ALIGN
     188.WriteBlock:
     189    mov     ch, JRIDE_SECTOR_ACCESS_WINDOW_SIZE >> 9
     190    rep movsw
     191    mov     di, bx  ; Reset for next sector
     192    dec     dx
     193    jnz     SHORT .WriteBlock
     194    ret
     195
     196
     197;--------------------------------------------------------------------
    200198; ReadSingleBlockFromSectorAccessWindowInDSSItoESDI
    201199;   Parameters:
    202 ;       DX:     Number of sectors in block
    203 ;       ES:DI:  Normalized ptr to buffer to recieve data (destination)
     200;       CH:     Number of sectors in block
     201;       ES:DI:  Normalized ptr to buffer to receive data (destination)
    204202;       DS:SI:  Ptr to Sector Access Window (source)
    205203;   Returns:
     
    207205;       DI:     Updated
    208206;   Corrupts registers:
    209 ;       Nothing
     207;       BX
    210208;--------------------------------------------------------------------
    211209ALIGN JUMP_ALIGN
    212210ReadSingleBlockFromSectorAccessWindowInDSSItoESDI:
    213     mov     cx, JRIDE_SECTOR_ACCESS_WINDOW_SIZE / 2
     211    mov     bx, si
     212    eMOVZX  dx, ch
     213    xor     cl, cl
     214ALIGN JUMP_ALIGN
     215.ReadBlock:
     216    mov     ch, JRIDE_SECTOR_ACCESS_WINDOW_SIZE >> 9
    214217    rep movsw
    215     sub     si, JRIDE_SECTOR_ACCESS_WINDOW_SIZE ; Reset for next sector
     218    mov     si, bx  ; Reset for next sector
    216219    dec     dx
    217     jnz     SHORT ReadSingleBlockFromSectorAccessWindowInDSSItoESDI
     220    jnz     SHORT .ReadBlock
    218221    ret
    219222
     
    238241    pop     ds
    239242    ret
     243
     244
     245%if JRIDE_SECTOR_ACCESS_WINDOW_SIZE <> 512
     246    %error "JRIDE_SECTOR_ACCESS_WINDOW_SIZE is no longer equal to 512. MemIdeTransfer.asm needs changes."
     247%endif
     248
  • trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialCommand.asm

    r234 r242  
    112112        mov     ch,dh
    113113        xor     dh,dh
    114         eSHL_IM dx, 2           ; shift from one byte to two       
    115        
     114        eSHL_IM dx, 2           ; shift from one byte to two
     115
    116116        mov     al,[bp+IDEPACK.bSectorCount]
    117117
     
    599599;          wSerialPortAndBaud Non-Zero:
    600600;              previous serial drive not found:   -> Error - Not Found (4)
    601 ;              previosu serial drive found:       -> Continue with wSerialPackedAndBaud (5)
     601;              previous serial drive found:       -> Continue with wSerialPackedAndBaud (5)
    602602;          wSerialPortAndBaud Zero:
    603603;              previous serial drive not found:   -> Error - Not Found (4)
     
    608608;     And as with the int13h/25h case, we just go off and get the needed information using the user's setting.
    609609; (2) We are using the special .ideVarsSerialAuto structure.  During drive detection, we would only be here
    610 ;     if we hand't already seen a serial drive (since we only scan if no explicit drives are set),
     610;     if we hadn't already seen a serial drive (since we only scan if no explicit drives are set),
    611611;     so we go off to scan.
    612612; (3) We are using the special .ideVarsSerialAuto structure.  We won't get here during drive detection, but
     
    633633        pop     si
    634634        jnc     .notfounddpt
    635         mov     ax,[ds:di+DPT_SERIAL.wSerialPortAndBaud]
    636 .notfounddpt:   
     635        mov     ax, [di+DPT_SERIAL.wSerialPortAndBaud]
     636.notfounddpt:
    637637
    638638        test    bh, FLG_DRVNHEAD_DRV
     
    647647        jnz     .identifyDeviceInDX
    648648
    649         or      dx,ax           ; Since DX is zero, this effectively moves the previously found serial drive 
     649        or      dx,ax           ; Since DX is zero, this effectively moves the previously found serial drive
    650650                                ; information to dx, as well as test for zero
    651651        jz      .scanSerial
     
    672672        pop     cx
    673673        pop     dx
    674        
     674
    675675        pop     bp
    676676;
    677 ; place port and baud word in to the return sector, in a vendor specific area, 
     677; place port and baud word in to the return sector, in a vendor specific area,
    678678; which is read by FinalizeDPT and DetectDrives
    679679;
     
    732732; Begin baud rate scan on this port...
    733733;
    734 ; On a scan, we support 6 baud rates, starting here and going higher by a factor of two each step, with a 
     734; On a scan, we support 6 baud rates, starting here and going higher by a factor of two each step, with a
    735735; small jump between 9600 and 38800.  These 6 were selected since we wanted to support 9600 baud and 115200,
    736 ; *on the server side* if the client side had a 4x clock multiplier, a 2x clock multiplier, or no clock multiplier. 
     736; *on the server side* if the client side had a 4x clock multiplier, a 2x clock multiplier, or no clock multiplier.
    737737;
    738738; Starting with 30h, that means 30h (2400 baud), 18h (4800 baud), 0ch (9600 baud), and
     
    747747        shr     dh,1
    748748        jz      .nextPort
    749         cmp     dh,6            ; skip from 6 to 4, to move from the top of the 9600 baud range 
     749        cmp     dh,6            ; skip from 6 to 4, to move from the top of the 9600 baud range
    750750        jnz     .testBaud       ; to the bottom of the 115200 baud range
    751751        mov     dh,4
  • trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialDPT.asm

    r233 r242  
    1313;       Nothing
    1414;   Corrupts registers:
    15 ;       AX, BX, CX, DX
     15;       AX
    1616;--------------------------------------------------------------------
    1717SerialDPT_Finalize:
    1818        or      byte [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE
    1919        mov     ax, [es:si+ATA6.wVendor]
    20         mov     word [di+DPT_SERIAL.wSerialPortAndBaud], ax
     20        mov     [di+DPT_SERIAL.wSerialPortAndBaud], ax
    2121        ret
    2222
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm

    r233 r242  
    2929
    3030    mov     cx, g_szDetectSlave
    31     mov     bh, MASK_DRVNHEAD_SET | FLG_DRVNHEAD_DRV 
     31    mov     bh, MASK_DRVNHEAD_SET | FLG_DRVNHEAD_DRV
    3232    call    StartDetectionWithDriveSelectByteInBHandStringInAX
    33        
     33
    3434    pop     cx
    3535
    3636    add     bp, BYTE IDEVARS_size           ; Point to next IDEVARS
    3737
    38 %ifdef MODULE_SERIAL       
     38%ifdef MODULE_SERIAL
    3939    jcxz    .done                           ; Set to zero on .ideVarsSerialAuto iteration (if any)
    4040%endif
    41        
     41
    4242    loop    .DriveDetectLoop
    4343
    44 %ifdef MODULE_SERIAL       
     44%ifdef MODULE_SERIAL
    4545;
    4646; if serial drive detected, do not scan (avoids duplicate drives and isn't needed - we already have a connection)
     
    4949    jc      .done
    5050
    51     mov     bp, ROMVARS.ideVarsSerialAuto   ; Point to our special IDEVARS sructure, just for serial scans     
    52                
     51    mov     bp, ROMVARS.ideVarsSerialAuto   ; Point to our special IDEVARS structure, just for serial scans
     52
    5353    mov     al,[cs:ROMVARS.wFlags]          ; Configurator set to always scan?
    5454    or      al,[es:BDA.bKBFlgs1]            ; Or, did the user hold down the ALT key?
    5555    and     al,8                            ; 8 = alt key depressed, same as FLG_ROMVARS_SERIAL_ALWAYSDETECT
    56     jnz     .DriveDetectLoop                           
     56    jnz     .DriveDetectLoop
    5757%endif
    5858
     
    6161
    6262%if FLG_ROMVARS_SERIAL_SCANDETECT != 8
    63 %error "DetectDrives is currently coded to assume that FLG_ROMVARS_SERIAL_SCANDETECT is the same bit as the ALT key code in the BDA.  Changes in the code will be needed if these values are no longer the same."
     63    %error "DetectDrives is currently coded to assume that FLG_ROMVARS_SERIAL_SCANDETECT is the same bit as the ALT key code in the BDA.  Changes in the code will be needed if these values are no longer the same."
    6464%endif
    6565
    66        
     66
    6767;--------------------------------------------------------------------
    6868; StartDetectionWithDriveSelectByteInBHandStringInAX
     
    110110    ;call   ReadAtapiInfoFromDrive      ; Assume CD-ROM
    111111    ;jnc    SHORT _CreateBiosTablesForCDROM
    112    
     112
    113113    ;jmp    short DetectDrives_DriveNotFound
    114114;;; fall-through instead of previous jmp instruction
     
    122122;       AX, SI
    123123;--------------------------------------------------------------------
    124 DetectDrives_DriveNotFound:     
     124DetectDrives_DriveNotFound:
    125125    mov     si, g_szNotFound
    126     jmp     BootMenuPrint_NullTerminatedStringFromCSSIandSetCF     
     126    jmp     BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
    127127
    128128
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm

    r235 r242  
    2222    ePUSH_T ax, ROMVARS.szTitle         ; Bios title string
    2323    push    cs                          ; BIOS segment
    24        
    25 DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay:     
     24
     25DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay:
    2626    jmp     BootMenuPrint_FormatCSSIfromParamsInSSBP
    2727
     
    3232;       CS:CX:  Ptr to "Master" or "Slave" string
    3333;       CS:BP:  Ptr to IDEVARS
    34 ;       SI:     Ptr to template string 
     34;       SI:     Ptr to template string
    3535;   Returns:
    3636;       Nothing
     
    4444                                            ;             DL=COM number character, DH=.bDevice
    4545
    46     push    bp                              ; setup stack for call to 
     46    push    bp                              ; setup stack for call to
    4747    mov     bp, sp                          ; BootMenuPrint_FormatCSSIfromParamsInSSBP
    4848
    4949    push    cx                              ; Push "Master" or "Slave"
    50        
     50
    5151    mov     cl, (g_szDetectPort-$$) & 0xff  ; Setup print string for standard IDE
    5252                                            ; Note that we modify only the low order bits of CX a lot here,
     
    5555                                            ; on the same 256 byte page, which is checked in strings.asm.
    5656
    57     cmp     dx, DEVICE_SERIAL_PORT << 8     ; Check if this is a serial device, 
     57    cmp     dx, DEVICE_SERIAL_PORT << 8     ; Check if this is a serial device,
    5858                                            ; And also check if DL is zero, check with the jz below
    59                                             ; This optimization requires that DEVICE_SERIAL_PORT be 
     59                                            ; This optimization requires that DEVICE_SERIAL_PORT be
    6060                                            ; the highest value in the DEVICE_* series, ensuring that
    6161                                            ; anything less in the high order bits is a different device.
    6262
    63     jl      .pushAndPrint                   ; CX = string to print, AX = port address, DX won't be used
     63    jb      .pushAndPrint                   ; CX = string to print, AX = port address, DX won't be used
    6464
    6565    mov     cl, (g_szDetectCOM-$$) & 0xff   ; Setup print string for COM ports
     
    6868
    6969    push    dx                              ; Push COM number character
    70                                             ; If the strnig is going to be "Auto", we will push a NULL (zero)
    71                                             ; here for the COM port number, which will be eaten by the 
    72                                             ; print routine (DisplayPrint_CharacterFromAL), resulting in 
     70                                            ; If the string is going to be "Auto", we will push a NULL (zero)
     71                                            ; here for the COM port number, which will be eaten by the
     72                                            ; print routine (DisplayPrint_CharacterFromAL), resulting in
    7373                                            ; just "COM" being printed without a character after it.
    74                
     74
    7575    mov     cl, (g_szDetectCOMAuto-$$) & 0xff   ; Setup secondary print string for "Auto"
    76        
     76
    7777    jz      .pushAndPrint                   ; CX = string to print, AX and DX won't be used
    78        
     78
    7979    mov     cl, (g_szDetectCOMLarge-$$) & 0xff  ; Setup secondary print string for "COMn/xx.yK"
    8080
     
    8282    cbw                                     ; clear AH, AL will always be less than 128
    8383    xchg    si,ax                           ; move AX to SI for divide
    84     mov     ax,1152                         ; baud rate to displa is 115200/divisor, the "00" is handled
     84    mov     ax,1152                         ; baud rate to display is 115200/divisor, the "00" is handled
    8585                                            ; in the print strings
    86     xor     dx,dx                           ; clear top 16-bits of dividend
     86    cwd                                     ; clear top 16-bits of dividend
    8787    div     si                              ; and divide...  Now AX = baud rate/100, DX = 0 (always a clean divide)
    88        
     88
    8989    mov     si,10                           ; Now separate the whole portion from the fractional for "K" display
    9090    div     si                              ; and divide...  Now AX = baud rate/1000, DX = low order digit
    91        
    92     cmp     ax,si                           ; <= 10: "2400", "9600", etc.; >10: "19.2K", "38.4K", etc.
     91
     92    cmp     ax,si                           ; < 10: "2400", "9600", etc.; >= 10: "19.2K", "38.4K", etc.
    9393    jae     .pushAndPrint
    9494
    9595    mov     cl, (g_szDetectCOMSmall-$$) & 0xff  ; Setup secondary print string for "COMn/XXy00"
    96        
    97 .pushAndPrint: 
     96
     97.pushAndPrint:
    9898    push    cx                              ; Push print string
    9999    push    ax                              ; Push high order digits, or port address, or N/A
     
    102102    mov     si, g_szDetectOuter             ; Finally load SI with wrapper string "IDE %s at %s: "
    103103
    104     jmp     short DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay   
     104    jmp     short DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay
    105105
    106106
     
    127127    ret
    128128
    129 
    130 
    131 
  • trunk/XTIDE_Universal_BIOS/Src/Strings.asm

    r241 r242  
    33
    44%ifdef MODULE_STRINGS_COMPRESSED_PRECOMPRESS
    5 %include "Display.inc"
     5    %include "Display.inc"
    66%endif
    77
     
    1010
    1111; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
    12 ; To support an optimization in that code, these strings must start on the same 256 byte page, 
     12; To support an optimization in that code, these strings must start on the same 256 byte page,
    1313; which is checked at assembly time below.
    1414;
    15 g_szDetectStart:       
    16 g_szDetectMaster:       db  "Master",NULL 
     15g_szDetectStart:
     16g_szDetectMaster:       db  "Master",NULL
    1717g_szDetectSlave:        db  "Slave ",NULL
    1818g_szDetectOuter:        db  "IDE %s at %s: ",NULL
    1919g_szDetectPort:         db  "%x",NULL                       ; IDE Master at 1F0h:
    20 g_szDetectCOM:          db  "COM%c%s",NULL           
     20g_szDetectCOM:          db  "COM%c%s",NULL
    2121g_szDetectCOMAuto:      db  " Auto",NULL
    2222g_szDetectCOMSmall:     db  "/%u%u00",NULL                  ; IDE Master at COM1/9600:
    2323g_szDetectEnd:
    2424g_szDetectCOMLarge:     db  "/%u.%uK",NULL                  ; IDE Master at COM1/19.2K:
    25        
    26 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
    27 %if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
    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
     25
     26%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     27    %if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
     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
    3030%endif
    3131
    3232; Boot Menu menuitem strings
    33 ; 
     33;
    3434; 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, 
     35; To support optimizations in that code, these strings must start on the same 256 byte page,
    3636; which is checked at assembly time below.
    37 ;       
    38 g_szBootMenuPrintStart: 
     37;
     38g_szBootMenuPrintStart:
    3939g_szDriveNum:           db  "%x %s",NULL
    4040g_szDriveNumBOOTNFO:    db  "%x %z",NULL
    4141g_szFloppyDrv:          db  "Floppy Drive %c",NULL
    42 g_szBootMenuPrintEnd:   
     42g_szBootMenuPrintEnd:
    4343g_szForeignHD:          db  "Foreign Hard Disk",NULL
    4444
    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
     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
    4949%endif
    5050
    5151; POST drive detection strings
    5252g_szRomAt:      db  "%s @ %x",LF,CR,NULL
    53                
     53
    5454; Boot loader strings
    5555g_szTryToBoot:          db  "Booting from %s %x",ANGLE_QUOTE_RIGHT,"%x",LF,CR,NULL
     
    6363g_szRomBoot:    db  "ROM Boot",NULL
    6464g_szHotkey:     db  "%A%c%c%A%s%A ",NULL
    65                
     65
    6666; Boot Menu information strings
    6767g_szCapacity:           db  "Capacity : %s",NULL
    68 g_szCapacityNum:        db  "%5-u.%u %ciB",NULL     
     68g_szCapacityNum:        db  "%5-u.%u %ciB",NULL
    6969g_szSizeDual:           db  "%s /%s",LF,CR
    7070    db  "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,  "IRQ",SINGLE_VERTICAL,"Reset",LF,CR
     
    7272
    7373; Boot Menu Floppy Disk strings
    74 ; 
     74;
    7575; 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, 
     76; To support optimizations in that code, these strings must start on the same 256 byte page,
    7777; which is checked at assembly time below.
    78 ;               
    79 g_szFddStart:   
     78;
     79g_szFddStart:
    8080g_szFddUnknown: db  "Unknown",NULL
    8181g_szFddSizeOr:  db  "5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
    8282g_szFddSize:    db  "%s",QUOTATION_MARK,", %u kiB",NULL ; 3½", 1440 kiB
    8383g_szFddThreeHalf:       db  "3",ONE_HALF,NULL
    84 g_szFddEnd:     
     84g_szFddEnd:
    8585g_szFddFiveQuarter:     db  "5",ONE_QUARTER,NULL
    8686
    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 
    93 g_szAddressingModes:                   
     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
     93g_szAddressingModes:
    9494g_szLCHS:       db  "L-CHS",NULL
    9595g_szPCHS:       db  "P-CHS",NULL
     
    100100; Ensure that addressing modes are correctly spaced in memory
    101101;
    102 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS       
    103 %if g_szLCHS <> g_szAddressingModes
    104 %error "g_szAddressingModes Displacement Incorrect 1"
    105 %endif
    106 %if g_szPCHS <> g_szLCHS + g_szAddressingModes_Displacement
    107 %error "g_szAddressingModes Displacement Incorrect 2"
    108 %endif
    109 %if g_szLBA28 <> g_szPCHS + g_szAddressingModes_Displacement       
    110 %error "g_szAddressingModes Displacement Incorrect 3"
    111 %endif
    112 %if g_szLBA48 <> g_szLBA28 + g_szAddressingModes_Displacement       
    113 %error "g_szAddressingModes Displacement Incorrect 4"
    114 %endif
    115 %endif     
    116        
    117 g_szBusTypeValues:     
     102%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     103    %if g_szLCHS <> g_szAddressingModes
     104        %error "g_szAddressingModes Displacement Incorrect 1"
     105    %endif
     106    %if g_szPCHS <> g_szLCHS + g_szAddressingModes_Displacement
     107        %error "g_szAddressingModes Displacement Incorrect 2"
     108    %endif
     109    %if g_szLBA28 <> g_szPCHS + g_szAddressingModes_Displacement
     110        %error "g_szAddressingModes Displacement Incorrect 3"
     111    %endif
     112    %if g_szLBA48 <> g_szLBA28 + g_szAddressingModes_Displacement
     113        %error "g_szAddressingModes Displacement Incorrect 4"
     114    %endif
     115%endif
     116
     117g_szBusTypeValues:
    118118g_szBusTypeValues_8Dual:        db      "D8 ",NULL
    119119g_szBusTypeValues_8Reversed:    db      "X8 ",NULL
     
    126126; Ensure that bus type strings are correctly spaced in memory
    127127;
    128 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
    129 %if g_szBusTypeValues_8Dual <> g_szBusTypeValues
    130 %error "g_szBusTypeValues Displacement Incorrect 1"
    131 %endif
    132 %if g_szBusTypeValues_8Reversed <> g_szBusTypeValues + g_szBusTypeValues_Displacement
    133 %error "g_szBusTypeValues Displacement Incorrect 2"     
    134 %endif
    135 %if g_szBusTypeValues_8Single <> g_szBusTypeValues_8Reversed + g_szBusTypeValues_Displacement
    136 %error "g_szBusTypeValues Displacement Incorrect 3"             
    137 %endif
    138 %if g_szBusTypeValues_16 <> g_szBusTypeValues_8Single + g_szBusTypeValues_Displacement     
    139 %error "g_szBusTypeValues Displacement Incorrect 4"             
    140 %endif
    141 %if g_szBusTypeValues_32 <> g_szBusTypeValues_16 + g_szBusTypeValues_Displacement
    142 %error "g_szBusTypeValues Displacement Incorrect 5"             
    143 %endif
    144 %if g_szBusTypeValues_Serial <> g_szBusTypeValues_32 + g_szBusTypeValues_Displacement
    145 %error "g_szBusTypeValues Displacement Incorrect 6"             
    146 %endif
    147 %endif
    148        
     128%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     129    %if g_szBusTypeValues_8Dual <> g_szBusTypeValues
     130        %error "g_szBusTypeValues Displacement Incorrect 1"
     131    %endif
     132    %if g_szBusTypeValues_8Reversed <> g_szBusTypeValues + g_szBusTypeValues_Displacement
     133        %error "g_szBusTypeValues Displacement Incorrect 2"
     134    %endif
     135    %if g_szBusTypeValues_8Single <> g_szBusTypeValues_8Reversed + g_szBusTypeValues_Displacement
     136        %error "g_szBusTypeValues Displacement Incorrect 3"
     137    %endif
     138    %if g_szBusTypeValues_16 <> g_szBusTypeValues_8Single + g_szBusTypeValues_Displacement
     139        %error "g_szBusTypeValues Displacement Incorrect 4"
     140    %endif
     141    %if g_szBusTypeValues_32 <> g_szBusTypeValues_16 + g_szBusTypeValues_Displacement
     142        %error "g_szBusTypeValues Displacement Incorrect 5"
     143    %endif
     144    %if g_szBusTypeValues_Serial <> g_szBusTypeValues_32 + g_szBusTypeValues_Displacement
     145        %error "g_szBusTypeValues Displacement Incorrect 6"
     146    %endif
     147%endif
     148
    149149g_szSelectionTimeout:   db      DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
    150150
     
    153153
    154154;------------------------------------------------------------------------------------------
    155 ; 
     155;
    156156; Tables for StringsCompress.pl
    157157;
     
    167167;$translate{ord('.')} = 9;
    168168;$translate{ord('/')} = 10;
    169 ;$translate{ord('1')} = 11;   
     169;$translate{ord('1')} = 11;
    170170;$translate{ord('2')} = 12;
    171171;$translate{ord('3')} = 13;
     
    197197;
    198198; Starting point for the "normal" range, typically around 0x40 to cover upper and lower case
    199 ; letters.  If lower case 'z' is not used, 0x3a can be a good choice as it adds ':' to the 
     199; letters.  If lower case 'z' is not used, 0x3a can be a good choice as it adds ':' to the
    200200; front end.
    201201;
     
    207207
    208208
    209 
    210 
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/MenuStructs.inc

    r233 r242  
    3030FLG_MENUITEM_BYTEVALUE      EQU (1<<3)  ; Item value is single byte
    3131FLG_MENUITEM_PROGRAMVAR     EQU (1<<4)  ; Item is for configuring program, not BIOS
    32 FLG_MENUITEM_CHOICESTRINGS  EQU (1<<5)  ; ChoiceToStringLookup table is 1-1 with ChoiceToValueLookup table, 
    33                                         ; ChoiceToStringLookup table must also NULL terminated
     32FLG_MENUITEM_CHOICESTRINGS  EQU (1<<5)  ; ChoiceToStringLookup table is 1-1 with ChoiceToValueLookup table,
     33                                        ; ChoiceToStringLookup table must also be NULL terminated
    3434
    3535; Values for MENUITEM.bType
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm

    r233 r242  
    9898    at  MENUITEM.szHelp,            dw  g_szHelpIdeSerialCOM
    9999    at  MENUITEM.bFlags,            db  FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_BYTEVALUE | FLG_MENUITEM_CHOICESTRINGS
    100     at  MENUITEM.bType,             db  TYPE_MENUITEM_MULTICHOICE 
     100    at  MENUITEM.bType,             db  TYPE_MENUITEM_MULTICHOICE
    101101    at  MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,        dw  NULL
    102102    at  MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,              dw  g_szDlgDevice
     
    122122    at  MENUITEM.itemValue + ITEM_VALUE.fnValueReader,              dw  IdeControllerMenu_SerialReadPort
    123123    at  MENUITEM.itemValue + ITEM_VALUE.fnValueWriter,              dw  IdeControllerMenu_SerialWritePort
    124 iend       
    125 
    126 g_MenuitemIdeControllerSerialBaud:     
     124iend
     125
     126g_MenuitemIdeControllerSerialBaud:
    127127istruc MENUITEM
    128128    at  MENUITEM.fnActivate,        dw  Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI
     
    139139    at  MENUITEM.itemValue + ITEM_VALUE.rgszChoiceToStringLookup,   dw  g_rgszChoiceToStringLookupForBaud
    140140iend
    141        
     141
    142142g_MenuitemIdeControllerEnableInterrupt:
    143143istruc MENUITEM
     
    200200    dw  'C'
    201201    dw  'x'             ; must be last entry (see reader/write routines)
    202 g_rgszChoiceToStringLookupForCOM:       
     202g_rgszChoiceToStringLookupForCOM:
    203203    dw  g_szValueCfgCOM1
    204204    dw  g_szValueCfgCOM2
     
    220220PackedCOMPortAddresses:             ; COM1 - COMC (or COM12)
    221221    db      DEVICE_SERIAL_COM1 >> 2
    222     db      DEVICE_SERIAL_COM2 >> 2 
    223     db      DEVICE_SERIAL_COM3 >> 2 
    224     db      DEVICE_SERIAL_COM4 >> 2 
    225     db      DEVICE_SERIAL_COM5 >> 2 
    226     db      DEVICE_SERIAL_COM6 >> 2 
    227     db      DEVICE_SERIAL_COM7 >> 2 
    228     db      DEVICE_SERIAL_COM8 >> 2 
    229     db      DEVICE_SERIAL_COM9 >> 2 
    230     db      DEVICE_SERIAL_COMA >> 2 
    231     db      DEVICE_SERIAL_COMB >> 2 
     222    db      DEVICE_SERIAL_COM2 >> 2
     223    db      DEVICE_SERIAL_COM3 >> 2
     224    db      DEVICE_SERIAL_COM4 >> 2
     225    db      DEVICE_SERIAL_COM5 >> 2
     226    db      DEVICE_SERIAL_COM6 >> 2
     227    db      DEVICE_SERIAL_COM7 >> 2
     228    db      DEVICE_SERIAL_COM8 >> 2
     229    db      DEVICE_SERIAL_COM9 >> 2
     230    db      DEVICE_SERIAL_COMA >> 2
     231    db      DEVICE_SERIAL_COMB >> 2
    232232    db      DEVICE_SERIAL_COMC >> 2
    233233    db      DEVICE_SERIAL_DEFAULT_CUSTOM_PORT >> 2          ; must be last entry (see reader/writer routines)
    234234DEVICE_SERIAL_DEFAULT_COM           EQU     '1'
    235        
     235
    236236g_rgbChoiceToValueLookupForBaud:
    237237    dw      (115200 / 115200) & 0xff
     
    280280    lea     ax, [bx+IDEVARS.wPort]
    281281    mov     [cs:g_MenuitemIdeControllerCommandBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    282        
    283     lea     ax, [bx+IDEVARS.bSerialPort]       
     282
     283    lea     ax, [bx+IDEVARS.bSerialPort]
    284284    mov     [cs:g_MenuitemIdeControllerSerialPort+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    285285
    286286    lea     ax, [bx+IDEVARS.bSerialBaud]
    287287    mov     [cs:g_MenuitemIdeControllerSerialBaud+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    288        
     288
    289289    lea     ax, [bx+IDEVARS.wPortCtrl]
    290290    mov     [cs:g_MenuitemIdeControllerControlBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    291        
     291
    292292    lea     ax, [bx+IDEVARS.bSerialCOMPortChar]
    293     mov     [cs:g_MenuitemIdeControllerSerialCOM+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax             
     293    mov     [cs:g_MenuitemIdeControllerSerialCOM+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    294294
    295295    lea     ax, [bx+IDEVARS.bIRQ]
     
    374374    mov     bx, g_MenuitemIdeControllerSerialPort
    375375    call    .DisableMenuitemFromCSBX
    376                
    377     mov     bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]       
     376
     377    mov     bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
    378378    call    Buffers_GetRomvarsValueToAXfromOffsetInBX
    379379    cmp     al,DEVICE_SERIAL_PORT
     
    386386    call    .EnableMenuitemFromCSBX
    387387
    388     mov     bx, [cs:g_MenuitemIdeControllerSerialCOM+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]         
     388    mov     bx, [cs:g_MenuitemIdeControllerSerialCOM+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
    389389    call    Buffers_GetRomvarsValueToAXfromOffsetInBX
    390390    mov     bx, g_MenuitemIdeControllerSerialPort
     
    402402
    403403    mov     bx, g_MenuitemIdeControllerEnableInterrupt
    404     call    .EnableMenuitemFromCSBX             
     404    call    .EnableMenuitemFromCSBX
    405405
    406406    ret
    407        
     407
    408408;--------------------------------------------------------------------
    409409; MENUITEM activation functions (.fnActivate)
     
    431431;
    432432    push    bx
    433     mov     bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]       
     433    mov     bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
    434434    call    Buffers_GetRomvarsValueToAXfromOffsetInBX
    435435    mov     bx, g_MenuitemMasterSlaveBlockModeTransfers
     
    438438    or      BYTE [cs:bx+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE
    439439    jmp     .isDone
    440 .isSerial:     
     440.isSerial:
    441441    and     BYTE [cs:bx+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE
    442442.isDone:
    443443    pop     bx
    444            
     444
    445445    call    MasterSlaveMenu_InitializeToDrvparamsOffsetInBX
    446446    jmp     MasterSlaveMenu_EnterMenuOrModifyItemVisibility
     
    453453; we need to take care to properly read/write just the bits we need.  In addition, since
    454454; we use the Port/PortCtrl bytes in a special way for serial drives, we need to properly
    455 ; default the values stored in both these words  when switching in and out of the Serial
     455; default the values stored in both these words when switching in and out of the Serial
    456456; device choice.
    457457;
     
    479479;
    480480; No change to Device byte, but use this opportunity to change defaults stored in wPort and wPortCtrl if we are
    481 ; changing in/out of a Serial device (since we use these bytes in radically different ways).  Also clear the
    482 ; interrupt informtion is we are moving into Serial (since the serial device does not use interrupts).
     481; changing in/out of a Serial device (since we use these bytes in radically different ways).
    483482;
    484483ALIGN JUMP_ALIGN
     
    489488
    490489        mov     bl,[es:di]                          ; what is the current Device?
    491        
     490
    492491        add     di,IDEVARS.wPort - IDEVARS.bDevice  ; Get ready to set the Port addresses
    493        
     492
    494493        cmp     al,DEVICE_SERIAL_PORT
    495494        jz      .changingToSerial
     
    500499.changingFromSerial:
    501500        cmp     al,DEVICE_16BIT_ATA
    502         jl      .xtide
     501
     502        mov     ax,DEVICE_XTIDE_DEFAULT_PORT        ; Defaults for 8-bit XTIDE devices
     503        mov     bx,DEVICE_XTIDE_DEFAULT_PORTCTRL
     504
     505        jb      .writeNonSerial
    503506
    504507        mov     ax,DEVICE_ATA_DEFAULT_PORT          ; Defaults for 16-bit and better ATA devices
    505508        mov     bx,DEVICE_ATA_DEFAULT_PORTCTRL
    506         jmp     .writeNonSerial
    507 
    508 .xtide:
    509         mov     ax,DEVICE_XTIDE_DEFAULT_PORT        ; Defaults for 8-bit XTIDE devices
    510         mov     bx,DEVICE_XTIDE_DEFAULT_PORTCTRL       
    511 
    512 .writeNonSerial:       
    513         mov     [es:di],ax                          ; Store defaults in IDEVARS.wPort and IDEVARS.wPortCtrl
    514         mov     [es:di+2],bx
     509
     510.writeNonSerial:
     511        stosw                                       ; Store defaults in IDEVARS.wPort and IDEVARS.wPortCtrl
     512        xchg    bx, ax
     513        stosw
    515514
    516515        jmp     .done
    517516
    518 .changingToSerial:     
     517.changingToSerial:
    519518        cmp     bl,DEVICE_SERIAL_PORT
    520519        jz      .done                               ; if we were already serial, nothing to do
     
    525524        add     di,IDEVARS.bSerialCOMPortChar-IDEVARS.wPort
    526525        call    IdeControllerMenu_SerialWriteCOM
    527         mov     [es:di],al
    528                
    529 .done: 
     526        stosb
     527
     528.done:
    530529        pop     di
    531530        pop     bx
     
    536535;
    537536; Doesn't modify COM character (unless it is not recognized, which would be an error case),
    538 ; But does update the port address based on COM port selection 
    539 ;               
     537; But does update the port address based on COM port selection
     538;
    540539ALIGN JUMP_ALIGN
    541540IdeControllerMenu_SerialWriteCOM:
     
    543542        push    bx
    544543        push    si
    545        
     544
    546545        mov     si,g_rgbChoiceToValueLookupForCOM
    547546        mov     bx,PackedCOMPortAddresses
     
    552551        cmp     ah,(DEVICE_SERIAL_DEFAULT_CUSTOM_PORT >> 2)
    553552        jz      .notFound
    554        
     553
    555554        cmp     al,[si]
    556555        jz      .found
    557        
     556
    558557        inc     si
    559558        inc     si
    560559        inc     bx
    561        
     560
    562561        jmp     .loop
    563562
    564563.notFound:
    565564        mov     al, 'x'
    566        
    567 .found:         
     565
     566.found:
    568567        mov     [es:di+IDEVARS.bSerialPort-IDEVARS.bSerialCOMPortChar], ah
    569568
     
    571570        pop     bx
    572571        pop     ax
    573        
     572
    574573        ret
    575        
     574
    576575
    577576;
    578577; Packed Port (byte) -> Numeric Port (word)
    579 ;               
     578;
    580579ALIGN JUMP_ALIGN
    581580IdeControllerMenu_SerialReadPort:
    582581        xor     ah,ah
    583         shl     ax,1
    584         shl     ax,1
     582        eSHL_IM ax, 2
    585583        ret
    586584
     
    590588;
    591589ALIGN JUMP_ALIGN
    592 IdeControllerMenu_SerialWritePort:     
     590IdeControllerMenu_SerialWritePort:
    593591        push    bx
    594592        push    si
    595593
    596         shr     ax,1
    597         shr     ax,1
     594        eSHR_IM ax, 2
    598595        and     al,0feh         ; force 8-byte boundary
    599596
    600         mov     si,g_rgbChoiceToValueLookupForCOM                       
     597        mov     si,g_rgbChoiceToValueLookupForCOM
    601598        mov     bx,PackedCOMPortAddresses           ; loop, looking for port address in known COM address list
    602599
     
    605602        cmp     ah,'x'
    606603        jz      .found
    607                
     604
    608605        cmp     al,[bx]
    609606        jz      .found
    610        
     607
    611608        inc     si
    612609        inc     si
    613610        inc     bx
    614        
     611
    615612        jmp     .loop
    616613
    617 .found: 
     614.found:
    618615        mov     [es:di+IDEVARS.bSerialCOMPortChar-IDEVARS.bSerialPort], ah
    619616
     
    623620        ret
    624621
    625 
    626 
    627 
    628 
    629 
    630 
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm

    r233 r242  
    1414g_szUnidentified:                   db  "Unidentified",NULL
    1515g_szUnsaved:                        db  " ",SINGLE_LEFT_HORIZONTAL_TO_VERTICAL,
    16                                     db  "Unsaved",SINGLE_RIGHT_HORIZONTAL_TO_VERTICAL, NULL
     16                                    db  "Unsaved",SINGLE_RIGHT_HORIZONTAL_TO_VERTICAL,NULL
    1717
    1818; Item formatting
     
    124124g_szDlgIdeEnIRQ:        db  "Enable interrupt?",NULL
    125125g_szDlgIdeIRQ:          db  "Enter IRQ channel (2...7 for 8-bit controllers, 2...15 for any other controller).",NULL
    126        
     126
    127127g_szNfoIdeBackToCfgMenu:db  "Back to XTIDE Universal BIOS Configuration Menu.",NULL
    128128g_szNfoIdeMaster:       db  "Settings for Master Drive.",NULL
     
    135135g_szNfoIdeSerialCOM:    db  "Select a COM port by number.",NULL
    136136g_szNfoIdeSerialBaud:   db  "Select the COM port's Baud Rate. The server must match this speed. Note that UART clock multipliers may impact the actual speed.",NULL
    137 g_szNfoIdeSerialPort:   db  "Select a COM port by custom I/O port address. Any address is valud up to 3f8h, but must be on an 8-byte boundary.", NULL
     137g_szNfoIdeSerialPort:   db  "Select a COM port by custom I/O port address. Any address is valid up to 3f8h, but must be on an 8-byte boundary.",NULL
    138138
    139139g_szHelpIdeCmdPort:     incbin  "IDE_CommandPort.txt"
     
    188188g_szValueCfgCOMC:       db      "COMC",NULL
    189189g_szValueCfgCOMx:       db      "Custom",NULL
    190        
     190
    191191g_szSerialBaudChoice:
    192192                        db  "115.2K baud",LF
     
    196196                        db  "19.2K baud",LF
    197197                        db  "9600 baud",LF
    198                         db  "4800 baud",LF     
     198                        db  "4800 baud",LF
    199199                        db  "2400 baud",NULL
    200200
     
    205205g_szValueCfgBaud19_2:   db      "19.2K",NULL
    206206g_szValueCfgBaud9600:   db      "9600",NULL
    207 g_szValueCfgBaud4800:   db      "4800",NULL     
     207g_szValueCfgBaud4800:   db      "4800",NULL
    208208g_szValueCfgBaud2400:   db      "2400",NULL
    209209
    210        
     210
    211211g_szValueCfgDeviceDual8b:   db  "XTIDE",NULL
    212212g_szValueCfgDeviceMod:      db  "Chuck(G)",NULL
     
    257257g_szDlgBootSwap:        db  "Enable drive number translation?",NULL
    258258g_szDlgSerialDetect:    db  "Scan for serial drives?",NULL
    259        
     259
    260260g_szNfoBootTimeout:     db  "Menu item selection timeout in BIOS timer ticks.",NULL
    261261g_szNfoBootDrive:       db  "Default drive on boot menu.",NULL
     
    375375g_szValueUnknownError:  db  "Error!",NULL
    376376
    377 
    378 
Note: See TracChangeset for help on using the changeset viewer.