Changeset 491 in xtideuniversalbios for trunk/Assembly_Library/Inc
- Timestamp:
- Dec 15, 2012, 2:46:29 PM (12 years ago)
- google:author:
- krille_n_@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/Emulate.inc
r489 r491 57 57 58 58 ;========================================================================== 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 59 134 60 135 ;--------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.