source:
trunk/minix/lib/i86/int64/cv64u.s@
9
Last change on this file since 9 was 9, checked in by , 14 years ago | |
---|---|
File size: 400 bytes |
Line | |
---|---|
1 | ! cv64u() - 64 bit converted to unsigned Author: Kees J. Bot |
2 | ! 24 Dec 1995 |
3 | .sect .text |
4 | .define _cv64u, _cv64ul |
5 | |
6 | _cv64u: ! unsigned cv64u(u64_t i); |
7 | mov bx, sp |
8 | mov cx, 4(bx) |
9 | jmp 0f |
10 | |
11 | _cv64ul: ! unsigned long cv64ul(u64_t i); |
12 | mov bx, sp |
13 | xor cx, cx |
14 | 0: mov ax, 2(bx) |
15 | mov dx, 4(bx) |
16 | or cx, 6(bx) |
17 | or cx, 8(bx) ! return UINT/ULONG_MAX if really big |
18 | jz 0f |
19 | mov ax, #-1 |
20 | mov dx, ax |
21 | 0: ret |
Note:
See TracBrowser
for help on using the repository browser.