Changeset 537 in xtideuniversalbios


Ignore:
Timestamp:
Apr 11, 2013, 8:03:45 PM (8 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to Assembly Library:

  • Commented that NORMALIZE_FAR_POINTER returns with CF set if segment overflow.
File:
1 edited

Legend:

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

    r322 r537  
    141141;   Returns:
    142142;       %1:%2:      Normalized far pointer
     143;       CF:         Set if overflow in (segment) normalization
     144;                   Clear if normalized successfully
    143145;   Corrupts registers:
    144146;       %3, %4
    145147;--------------------------------------------------------------------
    146148%macro NORMALIZE_FAR_POINTER 4
    147     mov     %4, %2              ; Copy offset to scratch reg
    148     and     %2, BYTE 0Fh        ; Clear offset bits 15...4
    149     eSHR_IM %4, 4               ; Divide offset by 16
    150     mov     %3, %1              ; Copy segment to scratch reg
    151     add     %3, %4              ; Add shifted offset to segment
    152     mov     %1, %3              ; Set normalized segment
     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
    153155%endmacro
    154156
Note: See TracChangeset for help on using the changeset viewer.