Changeset 172 in xtideuniversalbios


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.
Location:
trunk/Assembly_Library
Files:
1 added
2 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
  • trunk/Assembly_Library/Src/AssemblyLibrary.asm

    r162 r172  
    7575        %include "Bit.asm"
    7676    %endif
     77    %include "Math.asm"
    7778    %include "Registers.asm"
    7879    %include "Memory.asm"
Note: See TracChangeset for help on using the changeset viewer.