home *** CD-ROM | disk | FTP | other *** search
- ; Negate 64-bit number
- ;
- ; Tim Victor, January 5, 1993
- ;
- ; Callable from C as follows:
- ; int ExtNeg(val);
- ; always return 0
- ;
- .model small
- .code
- public _ExtNeg
- _ExtNeg proc near
-
- push si
- mov si,sp
- mov si,[si+4] ; source address
-
- sub ax,ax
- neg word ptr [si]
-
- mov bx,ax
- sbb bx,[si+2]
- mov [si+2],bx
-
- mov bx,ax
- sbb bx,[si+4]
- mov [si+4],bx
-
- mov bx,ax
- sbb bx,[si+6]
- mov [si+6],bx
-
- pop si
- ret
-
- _ExtNeg endp
- end
-
-