?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>Memory manipulation commands of &mu;Csim</title>
  5.   </head>
  6.   <body bgcolor="white">
  7.     <h2>Memory manipulation commands of &mu;Csim</h2>
  8.     Every command which changes content of ROM area such as <b><a href="#dl">dl</a></b>
  9.     or <b><a href="cmd_general#set_memory">set
  10.         memory</a></b> deletes result of <a href="analyzer.html">code
  11.       analyser</a> and causes to re-analyse the code.
  12.     <hr>
  13.     <a name="file">
  14.       <h3>file,load <i>"FILE"</i></h3>
  15.     </a>
  16.     Loads file named FILE into the simulated code memory. File must
  17.     contain data in Intel HEX format.
  18.     <pre>&gt; <font color="#118811">file "../../remo.hex"</font>
  19. 55470 words read from ../../remo.hex
  20. &gt;
  21. </pre>
  22.     Don't forget to enclose file name in quotes to make the parameter to
  23.    be a string.
  24.    <hr>
  25.    <a name="dl">
  26.      <h3>download,dl</h3>
  27.    </a>
  28.    Download command. It is same as <a href="#l">load</a> above but it
  29.    reads information from command console which is standard input by
  30.    default. This command stops read records when it detects an "END"
  31.    record which is normally the last record. This command has two
  32.    equivalent forms <b>download</b> and <b>dl</b>.
  33.    <pre>$ <font color="#118811">s51 -V</font>
  34. ucsim 0.2.24, Copyright (C) 1997 Daniel Drotos, Talker Bt.
  35. ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  36. This is free software, and you are welcome to redistribute it
  37. under certain conditions; type `show c' for details.
  38. &gt; <font color="#118811">do
  39. :03000000020003F8
  40. :1000030075812078207600D8FC900000AE83AF8203
  41. :100013009000001200416005E4F0A380F690009F79
  42. :1000230012004A9000A312004A9000A712006890A1
  43. :1000330000AD12006875D0001200B50200B3EF6581
  44. :10004300827003EE658322E493F8740193F97402DA
  45. :1000530093FE740393F5828E83E869700122E4931F
  46. :10006300F6A30880F4E493FC740193FD740293FEF9
  47. :10007300740393FF740493F8740593F582888312D1
  48. :100083000041700122E493A3A883A9828C838D820B
  49. :10009300F0A3AC83AD828883898280E3212100B5FC
  50. :1000A300212100B5000000B500B5000000B500B582
  51. :0200B30080FECD
  52. :1000B5007520117501AA850120750102850120228F
  53. :00000001FF</font>
  54. 197 bytes loaded
  55. &gt; </pre>
  56.    <hr>
  57.    <a name="fill">
  58.      <h3>fill <i>memory_type start end data</i></h3>
  59.    </a>
  60.    Fill memory region with specified data. First parameter specifies
  61.    memory. Name of the memory must be used, it can be checked using <a href="cmd_general.html#info_memory">info
  62.      memory</a> command which
  63.    lists size and name of all available memories.
  64.    <p><b>start</b> and <b>end</b> parameters specify first and last
  65.      address of the memory region to be filled.
  66.    </p>
  67.    <p><b>data</b> parameter specifies the data which is used to fill the
  68.      memory region.
  69.    </p>
  70.    <pre>$ <font color="#118811">s51</font>
  71. ucsim 0.2.38-pre2, Copyright (C) 1997 Daniel Drotos, Talker Bt.
  72. ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  73. This is free software, and you are welcome to redistribute it
  74. under certain conditions; type `show c' for details.
  75. &gt; <font color="#118811">fill xram 12 0x12 0x56</font>
  76. &gt; <font color="#118811">dump xram 0 0x20</font>
  77. 0x0000 00 00 00 00 00 00 00 00 ........
  78. 0x0008 00 00 00 00 56 56 56 56 ....VVVV
  79. 0x0010 56 56 56 00 00 00 00 00 VVV.....
  80. 0x0018 00 00 00 00 00 00 00 00 ........
  81. 0x0020 00                      .
  82. &gt; </pre>
  83.    <hr>
  84.    <a name="where">
  85.      <h3>where,Where <i>memory_type data...</i></h3>
  86.    </a>
  87.    Searching for some data in memory. First parameter specifies
  88.    memory. Name of the memory must be used, it can be checked using <a href="cmd_general.html#info_memory">info
  89.      memory</a> command which
  90.    lists size and name of all available memories.
  91.    <p>Other parameters can be mixed list of strings (characters between "
  92.      and ") and numbers. Strings can contain escape sequencies. &mu;Csim
  93.      merges all parameters together and will search for merged list of
  94.      values in specified memory.
  95.    </p>
  96.    <p><b>where</b> command do case unsensitive search while <b>Where</b>
  97.      command is for case sensitive search.
  98.    </p>
  99.    <p>Search is done in whole memory and all matches are dumped out.
  100.    </p>
  101.    <pre>$ <font color="#118811">/s51</font>
  102. ucsim 0.2.38-pre2, Copyright (C) 1997 Daniel Drotos, Talker Bt.
  103. ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  104. This is free software, and you are welcome to redistribute it
  105. under certain conditions; type `show c' for details.
  106. &gt; <font color="#118811">set mem xram 20 "Dani d ani D ani dani Dani"</font>
  107. 0x0014 44 61 6e 69 20 64 20 61 Dani d a
  108. 0x001c 6e 69 20 44 20 61 6e 69 ni D ani
  109. 0x0024 20 64 61 6e 69 20 44 61  dani Da
  110. 0x002c 6e 69                   ni
  111. &gt; <font color="#118811">where xram "dani"</font>
  112. 0x0014 44 61 6e 69             Dani
  113. 0x0025 64 61 6e 69             dani
  114. 0x002a 44 61 6e 69             Dani
  115. &gt; <font color="#118811">Where xram "d ani"</font>
  116. 0x0019 64 20 61 6e 69          d ani
  117. &gt; </pre>
  118.    <hr>
  119.    <a name="memory">
  120.      <h3>memory</h3>
  121.    </a>
  122.    This set of commands can be used to manipulate <a href="memory.html">memory
  123.      system</a> including <a href="memory.html#chip">chips</a>, <a href="memory.html#address_space">address
  124.      spaces</a> and <a href="memory.html#address_decoder">address decoders</a>.
  125.    <p>Subcommands are:
  126.    </p>
  127.    <p>memory <a href="#memory_createchip">createchip</a>
  128.      <br>
  129.      memory <a href="#memory_createaddressspace">createaddressspace</a>
  130.      <br>
  131.      memory <a href="#memory_createaddressdecoder">createaddressdecoder</a>
  132.      <br>
  133.      memory <a href="#memory_info">info</a>
  134.    </p>
  135.    <blockquote>
  136.      <a name="memory_createchip">
  137.        <h4>memory createchip|cchip <i>id size
  138.            cellsize</i></h4>
  139.      </a>
  140.      This command creates a chip (array of storage elements). <b>id</b>
  141.      must be a unique name which will be used to identify the chip in other
  142.      commands. <b>size</b> is number of storage elements, <b>cellsize</b>
  143.      is number of bits stored in one element.
  144.      <hr>
  145.      <a name="memory_createaddressspace">
  146.        <h4>memory
  147. createaddressspace|caddressspace|caddrspace|caspace|createaddrspace|createaspace
  148.          <i>id startaddr size</i></h4>
  149.      </a>
  150.      This command should never be used. It defines an address space, names
  151.      it as <b>id</b> sets its starting address and size. Simulator programs
  152.      (<b>s51</b>, <b>savr</b>, etc.) define necessary address spaces for
  153.      themself, so this command is not needed.
  154.      <hr>
  155.      <a name="memory_createaddressdecoder">
  156.        <h4>memory
  157. createaddressdecoder|caddrdecoder|caddressdecoder|cadecoder|createaddrdecoder|createadecoder
  158.          <i>addressspace begin end chip begin</i></h4>
  159.      </a>
  160.      Address decoder maps a part of the address space to a chip
  161.      area. <b>addressspace</b> parameter is name of the address space,
  162.      <b>begin</b> and <b>end</b> specify address range of the address space
  163.      to be mapped. <b>chip</b> parameter is name of the memory chip and
  164.      the second <b>begin</b> parameter is the (start of the) chip address
  165.      where the area is mapped to.
  166.      <p>Address space will be split if a "middle" are is mapped:
  167.      </p>
  168.      <pre>$ <font color="#118811">s51</font>
  169. uCsim 0.5.0-pre3, Copyright (C) 1997 Daniel Drotos, Talker Bt.
  170. uCsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  171. This is free software, and you are welcome to redistribute it
  172. under certain conditions; type `show c' for details.
  173. 0&gt; <font color="#118811">i m</font>
  174. Memory chips:
  175.  0x000000-0x00ffff    65536 rom_chip (8,%02x,0x%04x)
  176.  0x000000-0x00007f      128 iram_chip (8,%02x,0x%02x)
  177.  0x000000-0x00ffff    65536 xram_chip (8,%02x,0x%04x)
  178.  0x000000-0x00007f      128 sfr_chip (8,%02x,0x%02x)
  179. Address spaces:
  180.  0x000000-0x00ffff    65536 rom (8,%02x,0x%04x)
  181.  0x000000-0x00007f      128 iram (8,%02x,0x%02x)
  182.  0x000080-0x0000ff      128 sfr (8,%02x,0x%02x)
  183.  0x000000-0x00ffff    65536 xram (8,%02x,0x%04x)
  184. Address decoders:
  185. 0 rom 0x0000 0xffff -&gt; rom_chip 0x0000 activated
  186. 0 iram 0x00 0x7f -&gt; iram_chip 0x00 activated
  187. 0 sfr 0x80 0xff -&gt; sfr_chip 0x00 activated
  188. 0 xram 0x0000 0xffff -&gt; xram_chip 0x0000 activated
  189. 0&gt; <font color="#118811">mem cchip myram 0x1000 8</font>
  190. 0&gt; <font color="#118811">mem createaddressdecoder xram 1234 2000 myram 15</font>
  191. 0&gt; <font color="#118811">i m</font>
  192. Memory chips:
  193.  0x000000-0x00ffff    65536 rom_chip (8,%02x,0x%04x)
  194.  0x000000-0x00007f      128 iram_chip (8,%02x,0x%02x)
  195.  0x000000-0x00ffff    65536 xram_chip (8,%02x,0x%04x)
  196.  0x000000-0x00007f      128 sfr_chip (8,%02x,0x%02x)
  197.  0x000000-0x000fff     4096 myram (8,%02x,0x%03x)
  198. Address spaces:
  199.  0x000000-0x00ffff    65536 rom (8,%02x,0x%04x)
  200.  0x000000-0x00007f      128 iram (8,%02x,0x%02x)
  201.  0x000080-0x0000ff      128 sfr (8,%02x,0x%02x)
  202.  0x000000-0x00ffff    65536 xram (8,%02x,0x%04x)
  203. Address decoders:
  204. 0 rom 0x0000 0xffff -&gt; rom_chip 0x0000 activated
  205. 0 iram 0x00 0x7f -&gt; iram_chip 0x00 activated
  206. 0 sfr 0x80 0xff -&gt; sfr_chip 0x00 activated
  207. 0 xram 0x0000 0x04d1 -&gt; xram_chip 0x0000 activated
  208. 1 xram 0x04d2 0x07d0 -&gt; myram 0x00f activated
  209. 2 xram 0x07d1 0xffff -&gt; xram_chip 0x07d1 activated
  210. 0&gt;
  211. </pre>
  212.      It is easy to share chip area between address spaces:
  213.      <pre>$ <font color="#118811">s51</font>
  214. uCsim 0.5.0-pre3, Copyright (C) 1997 Daniel Drotos, Talker Bt.
  215. uCsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  216. This is free software, and you are welcome to redistribute it
  217. under certain conditions; type `show c' for details.
  218. 0&gt; <font color="#118811">mem createaddressdecoder rom 0 0xfff xram_chip 0xf000</font>
  219. 0&gt; <font color="#118811">i m</font>
  220. Memory chips:
  221.  0x000000-0x00ffff    65536 rom_chip (8,%02x,0x%04x)
  222.  0x000000-0x00007f      128 iram_chip (8,%02x,0x%02x)
  223.  0x000000-0x00ffff    65536 xram_chip (8,%02x,0x%04x)
  224.  0x000000-0x00007f      128 sfr_chip (8,%02x,0x%02x)
  225. Address spaces:
  226.  0x000000-0x00ffff    65536 rom (8,%02x,0x%04x)
  227.  0x000000-0x00007f      128 iram (8,%02x,0x%02x)
  228.  0x000080-0x0000ff      128 sfr (8,%02x,0x%02x)
  229.  0x000000-0x00ffff    65536 xram (8,%02x,0x%04x)
  230. Address decoders:
  231. 0 rom 0x0000 0x0fff -&gt; xram_chip 0xf000 activated
  232. 1 rom 0x1000 0xffff -&gt; rom_chip 0x1000 activated
  233. 0 iram 0x00 0x7f -&gt; iram_chip 0x00 activated
  234. 0 sfr 0x80 0xff -&gt; sfr_chip 0x00 activated
  235. 0 xram 0x0000 0xffff -&gt; xram_chip 0x0000 activated
  236. 0&gt; <font color="#118811">rom[0]=0xab</font>
  237. 171
  238. 0&gt; <font color="#118811">xram[0xf000]</font>
  239. 171
  240. 0&gt;
  241. </pre>
  242.      <hr>
  243.    </blockquote>
  244.    <a name="memory_info">
  245.      <h4>memory info</h4>
  246.    </a>
  247.    This command is same as <a href="cmd_general.html#info_memory">info
  248.      memory</a>.
  249.    <hr>
  250.  </body>
  251. </html>
  252.