SQUAREROOT--A APPROACH BY BINARY SEARCH(2)
1。Improved edition.
It improved in several ways. It expand input limit to up to 65535. It uses a general "divide" function to generalize the call, deleting all those jump for 8bit and 16bit div. A modest improvement after all.
2. Main function
All other function remains the same as before except some simplicity by using "divide" function call.
A. divide
input: by stack dividant, divisor
output: by stack remainder, quotient
3. Problems & Doubts
It took me almost half painful day to debug a simple dividing problem: when the divisor i