LZ: mathmatical routines


[Prev][Next][Index][Thread]

LZ: mathmatical routines



A few questions. How can I take the square root of numbers in assembler? I
need a routine but I can't find one anywhere.


Second. If you want see if something is less then or greater then do you
use C and NC like Z and NZ right? I.E.,   CALL_C(routine)


Third, is this an okay wya to take the abs value of a number?








.............................


abs:
	ld a, number
	cp 0
	CALL_NC(fix)
	ret


fix:


	neg a
	ld (fix), a
	ret




.......................










			Any help appreciated,
			Will Stokes
 
**************************************************************************
*                   Will Stokes		         *                 *     *
*        wstokes@vertex.ucls.uchicago.edu      	 *  Comment of the * : ) *
*      						 *  times:         *     *
*              My Personal Homepage		 *                 * : ( *
*     http://www.uic.edu/~hhstokes/will.htm 	 *******************     *
*						 *                 * . | *
*           The TI-85 Calculator Center		 *  Vote Dole and  *     *
* (the website I maintain and update very often) *  Kemp in 1996!  * : o *
*          http://www.uic.edu/~hhstokes/	 *                 *     *
*						 *                 *     *
**************************************************************************
*									 *
*  Happy, Sad, missing and eye and supprised. ------------------------^  *
*									 *
**************************************************************************