Changeset 602 in xtideuniversalbios for trunk/Assembly_Library/Inc
- Timestamp:
- May 9, 2019, 8:11:46 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/Macros.inc
r596 r602 4 4 %ifndef MACROS_INC 5 5 %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 6 45 7 46 ;--------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.