home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
rettig.zip
/
TRSOURCE.EXE
/
_TR_DTOI.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-22
|
696b
|
40 lines
/*********
* _TR_DTOI.C
*
* by Ralph Davis
*
* Placed in the public domain by Tom Rettig Associates, 10/22/1990.
*
* Syntax: _tr_dtoi(<expN>) <expN> = double precision number
* Return: <expN> as a 16-bit integer
*
* C Syntax:
* _tr_dtoi(n)
* double n;
*
* Assembler Usage:
*
* MOV AX,<high byte>
* MOV BX,<next byte>
* MOV CX,<next byte>
* MOV DX,<low byte>
* PUSH AX
* PUSH BX
* PUSH CX
* PUSH DX
* CALL _TR_DTOI
* ADD SP,8
*
* Returns 16-bit integer in AX
*
*********/
#include "trlib.h"
_tr_dtoi(n)
double n;
{
return ((int) n);
}