Changeset 172 in xtideuniversalbios for trunk/Assembly_Library/Inc


Ignore:
Timestamp:
Sep 18, 2011, 11:38:58 AM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to Assembly Library:

  • Added 32/16bit and 64/16bit division functions.
File:
1 edited

Legend:

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

    r41 r172  
    1 ; File name     :   Math.inc
    21; Project name  :   Assembly Library
    3 ; Created date  :   12.8.2010
    4 ; Last update   :   12.8.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   Math related macros.
    73%ifndef MATH_INC
     
    6864
    6965
     66;--------------------------------------------------------------------
     67; SHR_DXAX
     68;   Parameters:
     69;       %1:     Number of bits to shift
     70;   Returns:
     71;       DX:AX   Shifted value
     72;   Corrupts registers:
     73;       CX
     74;--------------------------------------------------------------------
     75%macro SHR_DXAX 1
     76    %ifnidni %1, cx
     77        mov     cx, %1
     78    %endif
     79ALIGN JUMP_ALIGN
     80.ShiftNextBit:
     81    shr     dx, 1
     82    rcr     ax, 1
     83    loop    .ShiftNextBit
     84%endmacro
     85
     86
    7087%endif ; MATH_INC
Note: See TracChangeset for help on using the changeset viewer.