Changeset 223 in xtideuniversalbios for trunk/Assembly_Library/Inc


Ignore:
Timestamp:
Jan 25, 2012, 8:20:06 PM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Fixed what appears to be a mistake in EBIOS.inc
  • Added a 'release' option to the makefile of the Serial Server (invokes UPX)
  • Some very minor optimizations
  • Removed the eSEG macro and did some other cleanups (fixed typos etc)
File:
1 edited

Legend:

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

    r181 r223  
    370370
    371371;--------------------------------------------------------------------
    372 ; Segment override prefix instruction.
    373 ;
    374 ; eSEG
    375 ;   Parameters:
    376 ;       %1:     Name of the segment (ES, CS, SS, DS, FS or GS)
    377 ;   Returns:
    378 ;       Nothing
    379 ;   Corrupts registers:
    380 ;       Nothing
    381 ;--------------------------------------------------------------------
    382 %macro eSEG 1
    383     %ifidni %1, es
    384         db  00100110b
    385     %elifidni %1, cs
    386         db  00101110b
    387     %elifidni %1, ss
    388         db  00110110b
    389     %elifidni %1, ds
    390         db  00111110b
    391     %elifidni %1, fs
    392         db  01100100b
    393     %elifidni %1, gs
    394         db  01100101b
    395     %else
    396         %error "Invalid segment override passed to eSEG!"
    397     %endif
    398 %endmacro
    399 
    400 
    401 ;--------------------------------------------------------------------
    402372; Repeats string instruction with segment override.
    403373; This macro prevents 8088/8086 restart bug.
     
    416386%macro eSEG_STR 3
    417387%ifndef USE_186 ; 8088/8086 has string instruction restart bug when more than one prefix
    418      %%Loop:
    419         %1                      ; REP is the prefix that can be lost
    420         eSEG    %2              ; SEG is the prefix that won't be lost
    421         %3                      ; String instruction
    422         jcxz    %%End           ; Jump to end if no repeats left (preserves FLAGS)
    423         jmp     SHORT %%Loop    ; Loop while repeats left
    424      %%End:
     388    %%Loop:
     389        %1                      ; REP is the prefix that can be lost
     390        %2                      ; SEG is the prefix that won't be lost
     391        %3                      ; String instruction
     392        jcxz    %%End           ; Jump to end if no repeats left (preserves FLAGS)
     393        jmp     SHORT %%Loop    ; Loop while repeats left
     394    %%End:
    425395%else   ; No bug on V20/V30 and later, don't know about 188/186
    426     eSEG    %2
    427     %1      %3
     396    %2
     397    %1 %3
    428398%endif
    429399%endmacro
Note: See TracChangeset for help on using the changeset viewer.