Changeset 522 in xtideuniversalbios for trunk


Ignore:
Timestamp:
Mar 11, 2013, 3:22:21 PM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • INT 13h stack is now at the beginning of RAMVARS.
  • RELOCATE_INT13H_STACK is now allowed only for AT builds. This saves few bytes from interrupt table when lite mode is used.
Location:
trunk/XTIDE_Universal_BIOS
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc

    r493 r522  
    1717; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    1818;
     19
     20; Allow RELOCATE_INT13H_STACK only for AT builds
     21%ifndef USE_AT
     22    %undef RELOCATE_INT13H_STACK
     23%endif
     24
    1925
    2026%ifdef MODULE_SERIAL_FLOPPY
  • trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc

    r505 r522  
    3737struc RAMVARS
    3838%ifdef RELOCATE_INT13H_STACK
     39                        resb    256 ; Size of our stack
     40    .rgbTopOfStack:
    3941    .fpInt13hEntryStack resb    4
    4042    .dwStackChangeDSDI:
    4143    .wStackChangeDI     resb    2
    4244    .wStackChangeDS     resb    2
    43     .wNewStackOffset    resb    2
    4445%endif
    4546    .wDrvDetectSignature:           ; Signature when BIOS is in drive detection mode
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm

    r507 r522  
    5050    mov     di, ds      ; We do not want to overwrite DS and DI in stack
    5151    mov     ss, di
    52     mov     sp, [RAMVARS.wNewStackOffset]
     52    mov     sp, RAMVARS.rgbTopOfStack
    5353    lds     di, [RAMVARS.dwStackChangeDSDI]
    5454
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm

    r501 r522  
    8080
    8181    mov     al, BIOS_DISK_INTERRUPT_13h         ; INT 13h interrupt vector offset
     82%ifdef RELOCATE_INT13H_STACK
     83    mov     si, Int13h_DiskFunctionsHandlerWithStackChange
     84%else
    8285    mov     si, Int13h_DiskFunctionsHandler
    83 %ifdef RELOCATE_INT13H_STACK
    84     test    BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE
    85     eCMOVNZ si, Int13h_DiskFunctionsHandlerWithStackChange
    8686%endif
    8787
  • trunk/XTIDE_Universal_BIOS/Src/Main.asm

    r507 r522  
    4646    ; Included .inc files
    4747    %include "AssemblyLibrary.inc"  ; Assembly Library. Must be included first!
    48     %include "ModuleDependency.inc" ; Dependency checks for optional modules
     48    %include "ModuleDependency.inc" ; Dependency checks for optional modules. Must be included second!
    4949    %include "Version.inc"
    5050    %include "ATA_ID.inc"           ; For ATA Drive Information structs
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/FindDPT.asm

    r521 r522  
    116116
    117117    mul     dl
    118     add     ax, BYTE RAMVARS_size       ; Clears CF (will not overflow)
     118    add     ax, RAMVARS_size            ; Clears CF (will not overflow)
    119119
    120120    pop     dx
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm

    r505 r522  
    7777    mov     WORD [RAMVARS.wDrvDetectSignature], RAMVARS_DRV_DETECT_SIGNATURE
    7878    mov     WORD [RAMVARS.wSignature], RAMVARS_RAM_SIGNATURE
    79     ; Fall to .InitializeInt13hStackChangeVariables
    80 
    81 ;--------------------------------------------------------------------
    82 ; .InitializeInt13hStackChangeVariables
    83 ;   Parameters:
    84 ;       DS:     RAMVARS segment
    85 ;   Returns:
    86 ;       Nothing
    87 ;   Corrupts registers:
    88 ;       AX
    89 ;--------------------------------------------------------------------
    90 %ifdef RELOCATE_INT13H_STACK
    91 .InitializeInt13hStackChangeVariables:
    92     eMOVZX  ax, BYTE [cs:ROMVARS.bStealSize]
    93     eSHL_IM ax, 10          ; kiB to Bytes = Top of stack offset
    94     mov     [RAMVARS.wNewStackOffset], ax
    95 %endif
    96 
    9779;; There used to be a DriveXlate_Reset call here.  It isn't necessary, as we reset
    9880;; when entering the boot menu and also before transferring control at boot time and
  • trunk/XTIDE_Universal_BIOS/makefile

    r511 r522  
    3030# Not modules but these affect the assembly:                                                       #
    3131# ELIMINATE_CGA_SNOW          Prevents CGA snowing at the cost of a few bytes                      #
    32 # RELOCATE_INT13H_STACK       Relocates INT 13h stack to top of stolen conventional memory         #
     32# RELOCATE_INT13H_STACK **    Relocates INT 13h stack to beginning of stolen conventional memory   #
    3333# RESERVE_DIAGNOSTIC_CYLINDER Reserve one L-CHS cylinder for compatibility with old BIOSes         #
    3434# USE_186                     Use instructions supported by 80188/80186 and V20/V30 and later      #
     
    3838# USE_UNDOC_INTEL             Optimizations for Intel CPU:s - do NOT use on NEC V20/V30/Sony CPU:s #
    3939#                                                                                                  #
     40# ** AT Builds only (when USE_AT is defined)                                                       #
    4041####################################################################################################
    4142
Note: See TracChangeset for help on using the changeset viewer.