?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. <html>
  2.   <head>
  3.     <meta content="text/html; charset=ISO-8859-2" http-equiv="content-type">
  4.     <title>&mu;Csim: Code Analyzer</title>
  5.   </head>
  6.   <body bgcolor="white">
  7.     <h1>Code analyser</h1>
  8.     Code
  9.     analyser analyses the code of the simulated program and tries to
  10.     figure out which address contains valid instruction. <br>
  11.     <br>
  12.     Analyser starts
  13.     analysing of the code with address 0 which always must contain an
  14.     instruction because reset of the device sets zero into program
  15.     counter. So, analyser marks address 0 that it contains an
  16.     instruction. Then it marks the address of the next instruction and so
  17.     on. If the analyser finds a <i>jump</i> instruction it continues with
  18.     destination address of the <i>jump</i> instruction. If it finds a
  19.     <i>call</i> instruction, it recursively analyses destination address
  20.     as well as next instruction follows the <i>call</i> one.<br>
  21.     <br>
  22.     Analysator
  23.     stops if it finds an address which is already marked or if it finds a
  24.     <i>return</i> instruction or an indirect <i>jump</i> which is
  25.     impossible to follow. All these mean that it is impossible to discover
  26.     all instructions of the program.
  27.     <p>This problem is solved in very simple way. If the
  28.       execution reaches an unmarked address, the analyser is called to
  29.       analyse the code starting at actual address pointed by the PC.</p>
  30.     <hr>
  31.   </body>
  32. </html>
  33.