menu.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <html>
  2. <head>
  3. <title>Pop-up menus and files</title>
  4. </head>
  5. <body bgcolor="FFFFFF">
  6. <h1>Pop-up menus and files</h1>
  7. <p>The pop-up menu for memory includes four options in addition
  8. to the options common to all components:</p>
  9. <ul>
  10. <li>Edit Contents: Bring up a hex editor for editing the contents
  11. of memory.</li>
  12. <li>Clear Contents: Resets all values in memory to 0.</li>
  13. <li>Load Image...: Resets all values in memory based on the values
  14. found in a file using the format described below.</li>
  15. <li>Save Image...: Stores all values in memory into a file using
  16. the format described below.</li>
  17. </ul>
  18. <p>The file format used for image files is intentionally simple;
  19. this permits you to write a program, such as an assembler, that
  20. generates memory images that can then be loaded into memory.
  21. As an example of this file format, if we had a 256-byte memory whose
  22. first five bytes were 2, 3, 0, 20, and -1, and all subsequent values
  23. were 0, then the image would be the following text file.</p>
  24. <blockquote><pre>
  25. v2.0 raw
  26. 02
  27. 03
  28. 00
  29. 14
  30. ff
  31. </pre></blockquote>
  32. <p>The first line identifies the file format used (currently, there is only
  33. one file format recognized). Subsequent values list the values in
  34. hexadecimal, starting from address 0; you can place several such
  35. values on the same line. If there are more memory locations than are identified
  36. in the file, Logisim will load 0 into the other memory locations.</p>
  37. <p>The image file can use run-length encoding; for example, rather than
  38. list the value <tt>00</tt> sixteen times in a row, the file can include
  39. <tt>16*00</tt>. Notice
  40. than the number of repetitions is written in base 10.
  41. Files produced by Logisim will use run-length encoding for runs of
  42. at least four values.</p>
  43. <p>You can place comments into the file by using the '#' symbol: All characters
  44. in the line starting from the '#' symbol will be ignored by Logisim.</p>
  45. <p><strong>Next:</strong> <a href="hex.html">Hex editor</a>.</p>
  46. </body>
  47. </html>