Changeset 537 in xtideuniversalbios for trunk/Assembly_Library/Inc
- Timestamp:
- Apr 11, 2013, 8:03:45 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/Registers.inc
r322 r537 141 141 ; Returns: 142 142 ; %1:%2: Normalized far pointer 143 ; CF: Set if overflow in (segment) normalization 144 ; Clear if normalized successfully 143 145 ; Corrupts registers: 144 146 ; %3, %4 145 147 ;-------------------------------------------------------------------- 146 148 %macro NORMALIZE_FAR_POINTER 4 147 mov %4, %2 148 and %2, BYTE 0Fh 149 eSHR_IM %4, 4 150 mov %3, %1 151 add %3, %4 ; Add shifted offset to segment152 mov %1, %3 149 mov %4, %2 ; Copy offset to scratch reg 150 and %2, BYTE 0Fh ; Clear offset bits 15...4 151 eSHR_IM %4, 4 ; Divide offset by 16 152 mov %3, %1 ; Copy segment to scratch reg 153 add %3, %4 ; Add shifted offset to segment (sets or clears CF) 154 mov %1, %3 ; Set normalized segment 153 155 %endmacro 154 156
Note:
See TracChangeset
for help on using the changeset viewer.