Changeset 621 in xtideuniversalbios for trunk/Assembly_Library


Ignore:
Timestamp:
Nov 21, 2021, 2:15:32 PM (3 years ago)
Author:
Krister Nordvall
Message:

Changes:

  • Fixed three different bugs all causing the boot menu to show drives using IRQs even though the BIOS had been built without MODULE_IRQ.
  • Fixed two bugs in XTIDECFG where loading a BIOS from file and then loading the old settings from EEPROM would
    • overwrite ROMVARS.wFlags in the loaded BIOS file (in RAM). The possibly resulting mismatch of module flags could make it impossible to change settings for modules included in the BIOS or allow changing settings for modules not included in the BIOS.
    • not copy the color theme over to the loaded BIOS.
  • Also fixed two very minor bugs in XTIDECFG in BiosFile_LoadFileFromDSSItoRamBuffer and BiosFile_SaveRamBufferToFileInDSSI where the error handling in these routines would close whatever file handle that happened to match the error code returned by DOS in AX.
  • Made significant changes to the new flash ROM programming routines to reduce the size. Also fixed a minor bug that would cause the second verification to be skipped and return success when programming a 64 KB block of data.
  • Changed the custom BIOS build file names to the 8.3 format.
  • Changed some help strings in XTIDECFG to clarify things.
  • Other minor optimizations and fixes.
Location:
trunk/Assembly_Library/Src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/File/FileIO.asm

    r592 r621  
    6666
    6767;--------------------------------------------------------------------
    68 ; FileIO_ReadDXCXbytesToDSSIusingHandleFromBX
    69 ;   Parameters:
    70 ;       BX:     File handle
    71 ;       DX:CX:  Number of bytes to read
    72 ;       DS:SI:  Ptr to destination buffer
    73 ;   Returns:
    74 ;       AX:     DOS error code if CF set
    75 ;       CF:     Clear if successful
    76 ;               Set if error
    77 ;   Corrupts registers:
    78 ;       AX
    79 ;--------------------------------------------------------------------
    80 ALIGN JUMP_ALIGN
    81 FileIO_ReadDXCXbytesToDSSIusingHandleFromBX:
    82     push    bp
    83     mov     bp, FileIO_ReadCXbytesToDSSIusingHandleFromBX
    84     call    SplitLargeReadOrWritesToSmallerBlocks
    85     pop     bp
    86     ret
    87 
    88 
    89 ;--------------------------------------------------------------------
    90 ; FileIO_WriteDXCXbytesFromDSSIusingHandleFromBX
    91 ;   Parameters:
    92 ;       BX:     File handle
    93 ;       DX:CX:  Number of bytes to write
    94 ;       DS:SI:  Ptr to source buffer
    95 ;   Returns:
    96 ;       AX:     DOS error code if CF set
    97 ;       CF:     Clear if successful
    98 ;               Set if error
    99 ;   Corrupts registers:
    100 ;       AX
    101 ;--------------------------------------------------------------------
    102 ALIGN JUMP_ALIGN
    103 FileIO_WriteDXCXbytesFromDSSIusingHandleFromBX:
    104     push    bp
    105     mov     bp, FileIO_WriteCXbytesFromDSSIusingHandleFromBX
    106     call    SplitLargeReadOrWritesToSmallerBlocks
    107     pop     bp
    108     ret
    109 
    110 
    111 ;--------------------------------------------------------------------
    11268; File position is updated so next read will start where
    11369; previous read stopped.
     
    158114
    159115;--------------------------------------------------------------------
    160 ; SplitLargeReadOrWritesToSmallerBlocks
    161 ;   Parameters:
     116; FileIO_ReadDXCXbytesToDSSIusingHandleFromBX
     117;   Parameters:
     118;       BX:     File handle
     119;       DX:CX:  Number of bytes to read
     120;       DS:SI:  Ptr to destination buffer
     121;   Returns:
     122;       AX:     DOS error code if CF set
     123;       CF:     Clear if successful
     124;               Set if error
     125;   Corrupts registers:
     126;       AX
     127;--------------------------------------------------------------------
     128ALIGN JUMP_ALIGN
     129FileIO_ReadDXCXbytesToDSSIusingHandleFromBX:
     130    push    bp
     131    mov     bp, FileIO_ReadCXbytesToDSSIusingHandleFromBX
     132    jmp     SHORT SplitLargeReadOrWriteToSmallerBlocks
     133
     134
     135;--------------------------------------------------------------------
     136; FileIO_WriteDXCXbytesFromDSSIusingHandleFromBX
     137;   Parameters:
     138;       BX:     File handle
     139;       DX:CX:  Number of bytes to write
     140;       DS:SI:  Ptr to source buffer
     141;   Returns:
     142;       AX:     DOS error code if CF set
     143;       CF:     Clear if successful
     144;               Set if error
     145;   Corrupts registers:
     146;       AX
     147;--------------------------------------------------------------------
     148ALIGN JUMP_ALIGN
     149FileIO_WriteDXCXbytesFromDSSIusingHandleFromBX:
     150    push    bp
     151    mov     bp, FileIO_WriteCXbytesFromDSSIusingHandleFromBX
     152    ; Fall to SplitLargeReadOrWriteToSmallerBlocks
     153
     154;--------------------------------------------------------------------
     155; SplitLargeReadOrWriteToSmallerBlocks
     156;   Parameters:
     157;       [SP]:   Saved BP (restored on return)
    162158;       BX:     File handle
    163159;       BP:     Ptr to transfer function
     
    171167;       AX
    172168;--------------------------------------------------------------------
    173 ALIGN JUMP_ALIGN
    174 SplitLargeReadOrWritesToSmallerBlocks:
     169SplitLargeReadOrWriteToSmallerBlocks:
    175170    push    ds
    176171    push    si
     
    199194    call    NormalizeDSSI
    200195    call    bp
     196    SKIP1B  dl
     197.ErrorOccurredDuringTransfer:
     198    pop     cx                      ; Remove bytes for last transfer
    201199.ReturnErrorCodeInAX:
    202200    pop     cx
     
    204202    pop     si
    205203    pop     ds
    206     ret
    207 .ErrorOccurredDuringTransfer:
    208     pop     cx                      ; Remove bytes for last transfer
    209     jmp     SHORT .ReturnErrorCodeInAX
     204    pop     bp                      ; Restore BP saved to stack by "caller"
     205    ret
     206
    210207
    211208;--------------------------------------------------------------------
     
    279276FileIO_CloseUsingHandleFromBX:
    280277    mov     ah, CLOSE_FILE
    281     SKIP2B  f   ; cmp ax, <next instruction>
     278    SKIP2B  f
    282279    ; Fall to FileIO_SeekFromOriginInALtoOffsetInDXAXusingHandleFromBX
    283 
    284280
    285281;--------------------------------------------------------------------
  • trunk/Assembly_Library/Src/String/String.asm

    r619 r621  
    7979;       CX:     Number of characters copied
    8080;       SI,DI:  Updated by CX characters
     81;       CF:     Cleared
    8182;   Corrupts registers:
    8283;       Nothing
     
    9091.CopyNextCharacter:
    9192    lodsb                       ; Load from DS:SI to AL
    92     test    al, al              ; NULL to end string?
    93     jz      SHORT .EndOfString
     93    test    al, al              ; NULL to end string? (Clears CF)
     94    jz      SHORT PopAXandReturn
    9495    stosb                       ; Store from AL to ES:DI
    9596    inc     cx                  ; Increment number of characters written
    9697    jmp     SHORT .CopyNextCharacter
    97 
    98 ALIGN STRING_JUMP_ALIGN
    99 .EndOfString:
    100     pop     ax
    101     ret
    10298
    10399
     
    126122    stc
    127123    sbb     cx, si      ; Subtract NULL
     124PopAXandReturn:
    128125    pop     ax
    129126    ret
  • trunk/Assembly_Library/Src/Util/Memory.asm

    r602 r621  
    160160ALIGN JUMP_ALIGN
    161161Memory_SumCXbytesFromESSItoAL:
    162     push    si
    163     dec     si
     162    add     si, cx
    164163    xor     al, al
    165164ALIGN JUMP_ALIGN
    166165.AddNextByteToAL:
    167     inc     si
     166    dec     si
    168167    add     al, [es:si]
    169168    loop    .AddNextByteToAL
    170     pop     si
    171169    ret
    172170%endif
Note: See TracChangeset for help on using the changeset viewer.