Changeset 491 in xtideuniversalbios for trunk/Assembly_Library/Inc/Emulate.inc


Ignore:
Timestamp:
Dec 15, 2012, 2:46:29 PM (11 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Added a new define (USE_UNDOC_INTEL) that enables optimizations possible by using undocumented instructions available on all Intel processors and truly compatible clones. AFAIK the only exceptions are the NEC V-series and the Sony CXQ70108 processors so this option should be safe for use on the AT builds.
  • Building BIOSDRVS or the BIOS without MODULE_STRINGS_COMPRESSED would fail due to the recent code exclusions so I changed them a bit. Also fixed the mistaken change to Main.asm
  • Changed the Tandy specific info in Configuration_FullMode.txt so it matches the info in the Wiki.
  • Optimizations and fixes in general.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Inc/Emulate.inc

    r489 r491  
    5757
    5858;==========================================================================
     59
     60;--------------------------------------------------------------------
     61; The undocumented instruction SALC (Set AL According to CF).
     62; Available on all Intel processors and truly compatible clones.
     63; Does not work on the NEC V20/V30 or Sony CXQ70108 processors.
     64;
     65; eSALC
     66;   Parameters:
     67;       Nothing
     68;   Returns:
     69;       AL:     FFh if CF=1
     70;               00h if CF=0
     71;   Corrupts registers:
     72;       Nothing
     73;--------------------------------------------------------------------
     74%macro eSALC 0
     75    db      0D6h
     76%endmacro
     77
     78
     79;--------------------------------------------------------------------
     80; The AAD instruction (ASCII Adjust before Division).
     81; Available on all Intel processors and truly compatible clones.
     82; Does not work on the NEC V20/V30 or Sony CXQ70108 processors
     83; unless %1 is 10 (0Ah).
     84;
     85; eAAD
     86;   Parameters:
     87;       %1:     Any 8 bit number (0...255)
     88;   Returns:
     89;       AL:     AH * %1 + AL
     90;       AH:     0
     91;       Flags:  Set according to result
     92;   Corrupts registers:
     93;       Nothing
     94;--------------------------------------------------------------------
     95%macro eAAD 1
     96%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     97    %if %1 > 255
     98        %error Invalid parameter passed to eAAD (%1 > 255)
     99    %else
     100        db      0D5h, %1
     101    %endif
     102%endif
     103%endmacro
     104
     105
     106;--------------------------------------------------------------------
     107; The AAM instruction (ASCII Adjust after Multiplication).
     108; Available on all Intel processors and truly compatible clones.
     109; Does not work on the NEC V20/V30 or Sony CXQ70108 processors
     110; unless %1 is 10 (0Ah).
     111;
     112; eAAM
     113;   Parameters:
     114;       %1:     Any 8 bit number except 0 (1...255)
     115;   Returns:
     116;       AL:     AL MOD %1
     117;       AH:     AL / %1
     118;       Flags:  Set according to result
     119;   Corrupts registers:
     120;       Nothing
     121;--------------------------------------------------------------------
     122%macro eAAM 1
     123%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     124    %if %1 > 255
     125        %error Invalid parameter passed to eAAM (%1 > 255)
     126    %elif %1 = 0
     127        %error Invalid parameter passed to eAAM (%1 = 0). This would cause a divide-by-zero exception!
     128    %else
     129        db      0D4h, %1
     130    %endif
     131%endif
     132%endmacro
     133
    59134
    60135;--------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.