Rev | Line | |
---|
[9] | 1 | ! sub64u() - unsigned from 64 bit subtraction Author: Kees J. Bot
|
---|
| 2 | ! 24 Dec 1995
|
---|
| 3 | .sect .text
|
---|
| 4 | .define _sub64u, _sub64ul
|
---|
| 5 |
|
---|
| 6 | _sub64u: ! u64_t sub64u(u64_t i, unsigned j);
|
---|
| 7 | push bp
|
---|
| 8 | mov bp, sp
|
---|
| 9 | xor cx, cx
|
---|
| 10 | jmp 0f
|
---|
| 11 | _sub64ul: ! u64_t sub64ul(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 | sub ax, 14(bp)
|
---|
| 18 | mov (bx), ax
|
---|
| 19 | mov ax, 8(bp)
|
---|
| 20 | sbb ax, cx
|
---|
| 21 | mov 2(bx), ax
|
---|
| 22 | mov ax, 10(bp)
|
---|
| 23 | sbb ax, #0
|
---|
| 24 | mov 4(bx), ax
|
---|
| 25 | mov ax, 12(bp)
|
---|
| 26 | sbb 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.