title: Converting a cpp code to an appropriate assembly language for the 8085 simulator
body: <p>I wrote a cpp code for applying Newton Raphson method for a polynomical function (ax^6 + bx^5 + cx^4 + dx^3 + ex^3 + fx^2 + gx + h) (I assumed all variables were 1, so I just defined a) and I want to convert it for 8085 simulator, could you help me? Here is my code: </p>
  
  <pre><code>#include &lt;iostream&gt;
  #define EPSILON 0.001
  using namespace std;
  
  double func(double x)
  {
      int a=1;
      return a*x*x*x*x*x*x+a*x*x*x*x*x+a*x*x*x*x+a*x*x*x+a*x*x*x+a*x*x+a*x+a;
  }
  
  double derivFunc(double x)
  {
      int a=1;
      return 6*a*x*x*x*x*x+5*a*x*x*x*x+4*a*x*x*x+3*a*x*x+3*a*x*x+2*a*x+a;
  }
  
  void newtonRaphson(double x)
  {
      double h = func(x) / derivFunc(x);
      while (abs(h) &gt;= EPSILON)
      {
          h = func(x)/derivFunc(x);
  
          x = x - h;
      }
      cout &lt;&lt; "The value of the root is : " &lt;&lt; x;
  }
  
  int main()
  {
      double x0 = 10;
      newtonRaphson(x0);
      return 0;
  } 
  </code></pre>