Changeset 77 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Libraries/math.asm
- Timestamp:
- Jan 4, 2011, 10:53:15 PM (14 years ago)
- google:author:
- krille_n_@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Libraries/math.asm
r3 r77 2 2 ; Project name : Math library 3 3 ; Created date : 7.10.2009 4 ; Last update : 1.1.2010 5 ; Author : Tomi Tilli 4 ; Last update : 4.1.2011 5 ; Author : Tomi Tilli, 6 ; : Krister Nordvall (optimizations) 6 7 ; Description : ASM library to for math related functions. 7 8 … … 122 123 .RetZero: ; Return 0 in DX:AX 123 124 xor ax, ax 124 xor dx, dx125 cwd 125 126 ret 126 127 %endif … … 143 144 ALIGN JUMP_ALIGN 144 145 Math_DivDWbyW: 145 mov bx, ax146 mov ax, dx147 x or dx, dx146 xor bx, bx 147 xchg bx, ax 148 xchg dx, ax 148 149 div cx 149 150 xchg ax, bx … … 171 172 push cx 172 173 push ax 173 mov a x, cx ; Copy divisor to AX174 mov cl, 10 ; Load 10 to CL174 mov al, 10 ; Load 10 to AL 175 xchg cx, ax ; AX = Divisor CL = 10 175 176 div cl ; AL = Divisor divided by 10 176 177 inc ax ; Increment to compensate new remainder
Note:
See TracChangeset
for help on using the changeset viewer.