Ignore:
Timestamp:
Feb 22, 2012, 7:01:53 PM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Added floppy drive emulation over the serial connection (MODULE_SERIAL_FLOPPY). Along the way, various optimizations were made to stay within the 8K ROM size target. Also, serial code now returns the number of sectors transferred.

File:
1 edited

Legend:

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

    r241 r258  
    22; Description   :   Functions for printing drive configuration
    33;                   information on Boot Menu.
    4 
     4;
     5; Included by BootMenuPrint.asm, this routine is to be inserted into
     6; BootMenuPrint_HardDiskRefreshInformation.
     7;
    58; Section containing code
    69SECTION .text
     10
     11;;; fall-into from BootMenuPrint_HardDiskRefreshInformation.
    712
    813;--------------------------------------------------------------------
     
    1621;       Nothing
    1722;   Corrupts registers:
    18 ;       AX, BX, CX, DX, SI, DI
     23;       AX, BX, CX, DX
    1924;--------------------------------------------------------------------
    20 ALIGN JUMP_ALIGN
    21 BootMenuPrintCfg_ForOurDrive:
     25.BootMenuPrintCfg_ForOurDrive:
    2226    eMOVZX  ax, BYTE [di+DPT.bIdevarsOffset]
    23     xchg    si, ax                      ; CS:SI now points to IDEVARS
     27    xchg    bx, ax                      ; CS:BX now points to IDEVARS
    2428    ; Fall to .PushAndFormatCfgString
    2529
     
    2832;   Parameters:
    2933;       DS:DI:  Ptr to DPT
    30 ;       CS:SI:  Ptr to IDEVARS
     34;       CS:BX:  Ptr to IDEVARS
    3135;   Returns:
    3236;       Nothing (jumps to next push below)
    3337;   Corrupts registers:
    34 ;       AX, BX
     38;       AX, CX
    3539;--------------------------------------------------------------------
    3640.PushAddressingMode:
     
    4145    ;; with AL clear, and so we exchange AL and AH after the multiply for the final result.
    4246    ;;
    43     mov     bl,(1<<(8-ADDRESSING_MODE_FIELD_POSITION)) * g_szAddressingModes_Displacement
    44     mul     bl
     47    mov     cl,(1<<(8-ADDRESSING_MODE_FIELD_POSITION)) * g_szAddressingModes_Displacement
     48    mul     cl
    4549    xchg    al,ah
    4650    add     ax,g_szAddressingModes
     
    5155;   Parameters:
    5256;       DS:DI:  Ptr to DPT
    53 ;       CS:SI:  Ptr to IDEVARS
     57;       CS:BX:  Ptr to IDEVARS
    5458;   Returns:
    5559;       Nothing (falls to next push below)
     
    6973;   Parameters:
    7074;       DS:DI:  Ptr to DPT
    71 ;       CS:SI:  Ptr to IDEVARS
     75;       CS:BX:  Ptr to IDEVARS
    7276;   Returns:
    7377;       Nothing (jumps to next push below)
     
    7781.PushBusType:
    7882    mov     al,g_szBusTypeValues_Displacement
    79     mul     BYTE [cs:si+IDEVARS.bDevice]
     83    mul     BYTE [cs:bx+IDEVARS.bDevice]
    8084       
    8185    shr     ax,1            ; divide by 2 since IDEVARS.bDevice is multiplied by 2
     
    8892;   Parameters:
    8993;       DS:DI:  Ptr to DPT
    90 ;       CS:SI:  Ptr to IDEVARS
     94;       CS:BX:  Ptr to IDEVARS
    9195;   Returns:
    9296;       Nothing (falls to next push below)
     
    9599;--------------------------------------------------------------------
    96100.PushIRQ:
    97     mov     al, BYTE [cs:si+IDEVARS.bIRQ]
     101    mov     al, BYTE [cs:bx+IDEVARS.bIRQ]
    98102    cbw
    99103    push    ax
     
    103107;   Parameters:
    104108;       DS:DI:  Ptr to DPT
    105 ;       CS:SI:  Ptr to IDEVARS
     109;       CS:BX:  Ptr to IDEVARS
    106110;   Returns:
    107111;       Nothing (falls to next push below)
     
    114118    push    ax
    115119
    116 ;--------------------------------------------------------------------
    117 ; PrintValuesFromStack
    118 ;   Parameters:
    119 ;       Stack:  All formatting parameters
    120 ;   Returns:
    121 ;       Nothing
    122 ;   Corrupts registers:
    123 ;       AX, SI, DI
    124 ;--------------------------------------------------------------------
    125 .PrintValuesFromStack:
    126     jmp     BootMenuPrint_HardDiskRefreshInformation.output
    127 
     120;;; fall-out to BootMenuPrint_HardDiskRefreshInformation.
Note: See TracChangeset for help on using the changeset viewer.