/* **********Usqrt.c***************** Unsigned 16 bit squareroot This example accompanies the book "Embedded Microcomputer Systems: Real Time Interfacing", Brooks-Cole, copyright (c) 2000, Jonathan W. Valvano 7/6/99 Interface between the TExaS simulator running a MC68HC11 EVB with ICC11 freeware compiler TExaS Copyright 1999 by Jonathan W. Valvano for more information about ICC11 see http://www.imagecraft.com You may use this file without restrictions */ #include "HC11.h" unsigned int usqrt(unsigned int u) { /* unsigned 16 bit x=sqrt(u) no overflow is possible Notice, this implementation is not very efficient, but it does demonstrate data-dependent execution speed. */ unsigned int x; x=0; while(x*x