Changeset 116 in xtideuniversalbios for trunk/Configurator


Ignore:
Timestamp:
Feb 26, 2011, 11:55:06 PM (14 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes to all parts of the project:

  • Removed a redundant macro (HPIO_NORMALIZE_PTR)
  • Deleted XTIDE_Universal_BIOS/Inc/BiosData.inc since that was also redundant.
  • Size optimization: Changed the LOAD_BDA_SEGMENT_TO macro to use the stack on 186+ processors (the old behaviour can still be used where needed).
  • Made other minor size optimizations and cleanups to various functions, mostly in the Int13h handler.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Configurator/Inc/BiosData.inc

    r2 r116  
    1 ; File name     :   BiosData.inc
    2 ; Project name  :   IDE BIOS
    3 ; Created date  :   28.7.2007
    4 ; Last update   :   23.3.2010
    5 ; Author        :   Tomi Tilli
     1; Project name  :   XTIDE Universal BIOS
    62; Description   :   Equates for BIOS Data Area.
    73%ifndef BIOSDATA_INC
     
    2117    .wLPT1          resb    2       ; 0:408h, Parallel I/O Address, Port 1
    2218    .wLPT2          resb    2       ; 0:40Ah, Parallel I/O Address, Port 2
    23     .wLPT3          resb    2       ; 0:40Ch, Parallel I/O Address, Port 3                 
     19    .wLPT3          resb    2       ; 0:40Ch, Parallel I/O Address, Port 3
    2420    .wLPT4:                         ; 0:40Eh, Parallel I/O Address, Port 4 (PC/XT)
    2521    .wSegEBDA       resb    2       ; 0:40Eh, Extended BIOS Data Area segment (AT+)
    26    
     22
    2723    .wEquipment     resb    2       ; 0:410h, Equipment Word
    2824    .bTest          resb    1       ; 0:412h, Manufacturing test
     
    3632    .wKBTail        resb    2       ; 0:41Ch, Keyboard, Tail of buffer pointer
    3733    .rgwKBBuff      resb    32      ; 0:41Eh, Keyboard, 16-word buffer
    38    
     34
    3935    .bFDRecal       resb    1       ; 0:43Eh, Diskette, Recalibrate status
    4036    .bFDMotor       resb    1       ; 0:43Fh, Diskette, Motor status
    41    
     37
    4238    .bFDMotTime     resb    1       ; 0:440h, Diskette, Motor timeout counter
    4339    .bFDRetST       resb    1       ; 0:441h, Diskette, Controller status return code
     
    4743    .wVidBpP        resb    2       ; 0:44Ch, Video, Total number of bytes per page
    4844    .wVidPageOff    resb    2       ; 0:44Eh, Video, Current page offset
    49    
     45
    5046    .rgwVidCurPos   resb    16      ; 0:450h, Video, Cursor position, pages 0...7
    51    
     47
    5248    .wVidCurShape   resb    2       ; 0:460h, Video, Cursor shape
    5349    .bVidPageIdx    resb    1       ; 0:462h, Video, Active display page
     
    6258    .bLastIRQ       resb    1       ; 0:46Bh, Last interrupt that occurred (XT+)
    6359    .dwTimerTicks   resb    4       ; 0:46Ch, Timer ticks count
    64    
     60
    6561    .bTimer24h      resb    1       ; 0:470h, Timer ticks rollover flag
    6662    .bKBCtrlBrk     resb    1       ; 0:471h, Keyboard, Ctrl+Break flag
     
    6864    .bHDLastSt      resb    1       ; 0:474h, Hard Disk, Status of Last Operation (XT+)
    6965    .bHDCount       resb    1       ; 0:475h, Hard Disk, Number of HDs Attached (XT+)
    70     .bHDCtrl        resb    1       ; 0:476h, Hard Disk, Control Byte (temp, XT+) 
     66    .bHDCtrl        resb    1       ; 0:476h, Hard Disk, Control Byte (temp, XT+)
    7167    .bHDPortOff     resb    1       ; 0:477h, Hard Disk, Port Offset (XT)
    7268    .bLPT1Timeout   resb    1       ; 0:478h, Parallel Printer 1, Timeout (XT+)
     
    7874    .bCOM3Timeout   resb    1       ; 0:47Eh, Serial 3, Timeout (XT+)
    7975    .bCOM4Timeout   resb    1       ; 0:47Fh, Serial 4, Timeout (XT+)
    80    
     76
    8177    .wKBPtrStart    resb    2       ; 0:480h, Keyboard, Pointer to start of buffer (XT+)
    8278    .wKBPtrEnd      resb    2       ; 0:482h, Keyboard, Pointer to end of buffer (XT+)
     
    9288    .bHDTaskFlg     resb    1       ; 0:48Eh, Hard Disk, Task Complete Flag (AT+)
    9389    .bFDCtrlInfo    resb    1       ; 0:48Fh, Diskette, Controller information (AT+)
    94    
     90
    9591    .bFDMedia0      resb    1       ; 0:490h, Diskette 0, Media state (AT+)
    9692    .bFDMedia1      resb    1       ; 0:491h, Diskette 1, Media state (AT+)
     
    10399    .dwWaitPtr      resb    4       ; 0:498h, User's wait flag pointer (AT+)
    104100    .dwWaitCnt      resb    4       ; 0:49Ch, User's wait count (AT+)
    105    
     101
    106102    .bWaitFlg       resb    1       ; 0:4A0h, Wait flag (AT+)
    107103    .rgbLAN         resb    7       ; 0:4A1h, Local Area Network (AT+)
     
    133129; Load BDA (Bios Data Area) segment to wanted segment register.
    134130;
     131; Use an exclamation point (!) as the third parameter when you want
     132; to force the use of the register in the second parameter. This is
     133; useful when that register needs to be zeroed in subsequent code or
     134; when stack usage is undesirable (ie speed is critical).
     135;
    135136; LOAD_BDA_SEGMENT_TO
    136137;   Parameters:
    137138;       %1:     Destination Segment Register
    138139;       %2:     Temporary WORD Register
     140;       %3:     Can be ! or empty
    139141;   Returns:
    140142;       %1:     BDA segment (zero)
     
    142144;       %2
    143145;--------------------------------------------------------------------
    144 %macro LOAD_BDA_SEGMENT_TO 2
     146%macro LOAD_BDA_SEGMENT_TO 2-3
     147%ifndef USE_186
    145148    xor     %2, %2
    146149    mov     %1, %2
     150%elifidn %3, !
     151    xor     %2, %2
     152    mov     %1, %2
     153%else
     154    push    BYTE 0
     155    pop     %1
     156%endif
    147157%endmacro
    148158
Note: See TracChangeset for help on using the changeset viewer.