Changeset 602 in xtideuniversalbios for trunk/Assembly_Library/Inc/Macros.inc


Ignore:
Timestamp:
May 9, 2019, 8:11:46 PM (5 years ago)
Author:
krille_n_
Message:

Changes:

  • SerDrive: Fixed a bug that prevented use of 3.5" 720 KB floppy disk images.
  • Also added support for Microsoft DMF (Distribution Media Format) floppy disk images.
  • XTIDECFG / Library: Minor size optimizations. Added a new macro (SKIP1B) as part of that.
  • BIOS: A small size optimization (2 bytes) to MODULE_8BIT_IDE_ADVANCED that is enabled only when USE_NEC_V is defined.
File:
1 edited

Legend:

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

    r596 r602  
    44%ifndef MACROS_INC
    55%define MACROS_INC
     6
     7
     8;--------------------------------------------------------------------
     9; Skips the immediately following 1 byte instruction by using it
     10; as an immediate value to a dummy instruction.
     11; Destroys the contents of %1.
     12;
     13; SKIP1B
     14;   Parameters:
     15;       %1:     Any 8 bit general purpose register or F for flags.
     16;   Returns:
     17;       Nothing
     18;   Corrupts registers:
     19;       %1
     20;--------------------------------------------------------------------
     21%macro SKIP1B 1.nolist
     22    %ifidni     %1, f
     23        db  03Ch                    ; Opcode byte for CMP AL, <immed>
     24        ;db 0A8h                    ; Alt. version TEST AL, <immed>
     25    %elifidni   %1, al
     26        db  0B0h                    ; Opcode byte for MOV AL, <immed>
     27    %elifidni   %1, ah
     28        db  0B4h                    ; Opcode byte for MOV AH, <immed>
     29    %elifidni   %1, bl
     30        db  0B3h                    ; Opcode byte for MOV BL, <immed>
     31    %elifidni   %1, bh
     32        db  0B7h                    ; Opcode byte for MOV BH, <immed>
     33    %elifidni   %1, cl
     34        db  0B1h                    ; Opcode byte for MOV CL, <immed>
     35    %elifidni   %1, ch
     36        db  0B5h                    ; Opcode byte for MOV CH, <immed>
     37    %elifidni   %1, dl
     38        db  0B2h                    ; Opcode byte for MOV DL, <immed>
     39    %elifidni   %1, dh
     40        db  0B6h                    ; Opcode byte for MOV DH, <immed>
     41    %else
     42        %error "Invalid parameter passed to SKIP1B"
     43    %endif
     44%endmacro
    645
    746;--------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.