Changeset 293 in xtideuniversalbios for trunk/Assembly_Library/Inc


Ignore:
Timestamp:
Mar 4, 2012, 1:33:52 AM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Commit 1/2 (Library, Configurators and Serial Server):

  • Changed Emulate.inc so that making 286 and 386 versions now works. Additionally, only one processor type define is needed in the makefile.
  • Minor optimizations.
  • Fixed spelling and did some cleaning.
File:
1 edited

Legend:

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

    r223 r293  
    11; Project name  :   Emulation library
    2 ; Description   :   Macros for emulating later x86 instruction with older
     2; Description   :   Macros for emulating later x86 instructions with older
    33;                   processors.
    4 ;                   Macros are used so optimized builds could be done
     4;                   Macros are used so optimized builds can be done
    55;                   easily for different processors.
    66;
     
    1010%define EMULATE_INC
    1111
    12 ; Defines for processor support. Unsupported instructions will be
    13 ; emulated using macros.
    14 ; If using 286, define USE_186 and USE_286
    15 ; If using 386, define USE_186, USE_286 and USE_386
     12; Defines for processor support (should be set in makefile).
     13; Unsupported instructions will be emulated using macros.
    1614; If AT class PC is used (instead of XT), define USE_AT
     15
    1716;%define USE_186                ; Define to use 18x/V20/V30 instructions
    1817;%define USE_286                ; Define to use 286 instructions
    1918;%define USE_386                ; Define to use 386 instructions
    2019;%define USE_AT                 ; Define for AT class machine
    21 ; Above defines should be set on makefile!
    22 
    23 CPU 8086                        ; Allow 8088/8086 instructions only
    24 %ifdef USE_186
    25 CPU 186                         ; Allow instructions up to 188/186/V20/V30
     20
     21%ifdef USE_386
     22    %define USE_286             ; Define to use 286 instructions
     23%endif
     24%ifdef USE_286
     25    %define USE_186             ; Define to use 18x/V20/V30 instructions
     26%endif
     27
     28%ifdef USE_386
     29    CPU 386                     ; Allow instructions up to 386
    2630%elifdef USE_286
    27 CPU 286                         ; Allow instructions up to 286
    28 %elifdef USE_386
    29 CPU 386                         ; Allow instructions up to 386
    30 %endif
     31    CPU 286                     ; Allow instructions up to 286
     32%elifdef USE_186
     33    CPU 186                     ; Allow instructions up to 188/186/V20/V30
     34%else
     35    CPU 8086                    ; Allow 8088/8086 instructions only
     36%endif
     37
    3138BITS 16                         ; Set 16 bit code generation
    3239
Note: See TracChangeset for help on using the changeset viewer.