Line | |
---|
1 | ! add64u() - unsigned to 64 bit addition Author: Kees J. Bot
|
---|
2 | ! 24 Dec 1995
|
---|
3 | .sect .text
|
---|
4 | .define _add64u, _add64ul
|
---|
5 |
|
---|
6 | _add64u: ! u64_t add64u(u64_t i, unsigned j);
|
---|
7 | push bp
|
---|
8 | mov bp, sp
|
---|
9 | xor cx, cx
|
---|
10 | jmp 0f
|
---|
11 | _add64ul: ! u64_t add64ul(u64_t i, unsigned long j);
|
---|
12 | push bp
|
---|
13 | mov bp, sp
|
---|
14 | mov cx, 16(bp)
|
---|
15 | 0: mov bx, 4(bp)
|
---|
16 | mov ax, 6(bp)
|
---|
17 | add ax, 14(bp)
|
---|
18 | mov (bx), ax
|
---|
19 | mov ax, 8(bp)
|
---|
20 | adc ax, cx
|
---|
21 | mov 2(bx), ax
|
---|
22 | mov ax, 10(bp)
|
---|
23 | adc ax, #0
|
---|
24 | mov 4(bx), ax
|
---|
25 | mov ax, 12(bp)
|
---|
26 | adc ax, #0
|
---|
27 | mov 6(bx), ax
|
---|
28 | mov ax, bx
|
---|
29 | pop bp
|
---|
30 | ret
|
---|
Note:
See
TracBrowser
for help on using the repository browser.