oncalc.html 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
  2. <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
  3. <head>
  4. <title>On-calc usage - GTC documentation</title>
  5. <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
  6. <link rel='stylesheet' type='text/css' href='layout/default.css' />
  7. </head>
  8. <body>
  9. <p><a href='index.html'>◄ Back to index</a></p>
  10. <div class='c0'>
  11. <h1>On-calc usage</h1>
  12. <div class='toc'><div class='toctop'><div class='tocbot'><div class='toc-content'>
  13. <b>Contents:</b><ul>
  14. <li><a href='#On-calc.IDE'>On-calc IDE</a>
  15. <ul>
  16. <li><a href='#Installation'>Installation</a></li>
  17. <li><a href='#Key.commands'>Key commands</a></li>
  18. <li><a href='#Tips.and.tricks'>Tips and tricks</a></li>
  19. </ul></li>
  20. </ul>
  21. </div></div></div></div>
  22. <div class='c1'>
  23. <hr class='hr1' /><h1 class='heading'><a name='On-calc.IDE'></a>On-calc IDE</h1><div class='c1in'><hr class='hr1in' /><div class='c2'>
  24. <hr class='hr2' /><h2 class='heading'><a name='Installation'></a>Installation</h2><div class='c2in'><hr class='hr2in' />
  25. <p>You must first install FlashAppy on your calculator. Note that like all ROM
  26. patches, you will not be able to send your modified calculator ROM image to
  27. other calculators. Neither the authors of GTC nor the author of FlashAppy can
  28. be held responsible for any damage that could occur during or after this
  29. process. However, we are not aware of any case where a calculator was damaged
  30. by FlashAppy.</p>
  31. <p>You only need to install FlashAppy once: you won't need to reinstall it after a
  32. reset or after upgrading to a newer version of GTC. On the other hand if you
  33. install an <a href='glossary.html#AMS'>AMS</a> update you will need to reinstall FlashAppy afterwards.</p>
  34. <p><em>Legal notice: the<span class='widespace'>&#32;</span><code>.89t/.9xt/.v2t</code><span class='widespace'>&#32;</span>and<span class='widespace'>&#32;</span><code>.89y/.9xy/.v2y</code><span class='widespace'>&#32;</span>files in the<span class='widespace'>&#32;</span><code>bin-89/92p/v200</code><span class='widespace'>&#32;</span>directories are subject to the <a href='license-gpl2.html#GNU.General.Public.License'>GNU General Public License</a>, which grants you a number of rights. You may choose not to install them, but this will prevent you from using the TIGCC Library.</em></p>
  35. <p>Once FlashAppy is installed, send all the files in the<span class='widespace'>&#32;</span><code>bin-89</code>,<span class='widespace'>&#32;</span><code>bin-92p</code><span class='widespace'>&#32;</span>or<span class='widespace'>&#32;</span><code>bin-v200</code><span class='widespace'>&#32;</span>directory (depending on the model) to your calculator, and archive
  36. them all.</p>
  37. <p>Check that the GTC flashapp was properly transferred by entering the Var-Link
  38. screen and pressing F7: you should see GTC appear in the list. Otherwise, the
  39. transfer failed: make sure that FlashAppy is installed and that you have enough
  40. Archive memory.</p>
  41. <p>To create a test source file, create a directory named<span class='widespace'>&#32;</span><code>source</code>, create an
  42. empty text file inside that directory named<span class='widespace'>&#32;</span><code>hello</code><span class='widespace'>&#32;</span>with the TI text editor,
  43. and archive it with the Var-Link screen.</p>
  44. <p>Now you can run the IDE by typing<span class='widespace'>&#32;</span><code>gtc\gtc_ide()</code><span class='widespace'>&#32;</span>and open the file named<span class='widespace'>&#32;</span><code>hello</code>.</p>
  45. <p>Type in the following code:</p>
  46. <pre>
  47. #include &lt;tigcclib.h&gt;
  48. void _main() {
  49. ST_helpMsg("Hello world!");
  50. }
  51. </pre>
  52. <p>Now press the F5 key. This should bring up a compilation dialog, which should
  53. close after a few seconds (if not, you may not have installed GTC properly:
  54. make sure FlashAppy is correctly installed, that everything is archived, and
  55. that you have enough RAM).</p>
  56. <p>Once the compilation is over you can exit the IDE and run your program by
  57. typing</p>
  58. <pre>
  59. outbin()
  60. </pre>
  61. <p>It should display the text<span class='widespace'>&#32;</span><code>Hello world!</code><span class='widespace'>&#32;</span>in the status line. If it worked,
  62. congratulations! You now have a working C compiler on your calculator.</p>
  63. </div></div>
  64. <div class='c2'>
  65. <hr class='hr2' /><h2 class='heading'><a name='Key.commands'></a>Key commands</h2><div class='c2in'><hr class='hr2in' />
  66. <p>Here is a small subset of the key commands supported by GTC IDE:</p>
  67. <ul><li> <b>CLEAR</b>: indent the cursor by two columns (equivalent to the TAB key on a
  68. PC)
  69. </li><li> <b>Catalog</b>: lists all functions available in the standard library
  70. </li><li> <b>F5</b>: compile the current file
  71. </li><li> <b>2nd-F3</b>: search for a string in the current file
  72. </li><li> <b>Diamond-F3</b>: replace a string in the current file
  73. </li><li> <b>F3</b>: search for the next occurrence of the string
  74. </li></ul>
  75. <p>Also, GTC IDE supports keyboard shortcuts that the standard text editor
  76. doesn't: for example, you can press <b>Shift-2nd-Right</b> (press Shift and 2nd,
  77. then press Right while still holding Shift and 2nd) to highlight the text from
  78. the cursor to the end of the line. Likewise you can press <b>Shift-2nd-Down</b> to
  79. highlight a whole screen of text, or <b>Shift-Diamond-Down</b> to select until the
  80. end of the file. These shortcuts come in particularly handy when selecting
  81. large amounts of text.</p>
  82. </div></div>
  83. <div class='c2'>
  84. <hr class='hr2' /><h2 class='heading'><a name='Tips.and.tricks'></a>Tips and tricks</h2><div class='c2in'><hr class='hr2in' /><ul><li> You should map<span class='widespace'>&#32;</span><code>main\outbin()</code><span class='widespace'>&#32;</span>to a<span class='widespace'>&#32;</span><code>kbdprgm</code><span class='widespace'>&#32;</span>like<span class='widespace'>&#32;</span><code>kbdprgm9</code><span class='widespace'>&#32;</span>so that you can
  85. quickly run a freshly compiled program by typing <b>Diamond-9</b> in the Home
  86. screen.
  87. </li><li> You can save memory by deleting header files you don't use in the folder<span class='widespace'>&#32;</span><code>zheader</code>. You should not delete<span class='widespace'>&#32;</span><code>stdhead</code><span class='widespace'>&#32;</span>or<span class='widespace'>&#32;</span><code>keywords</code><span class='widespace'>&#32;</span>if you want to
  88. compile programs designed for the TIGCC library.
  89. </li></ul></div></div>
  90. </div></div></div>
  91. </body>
  92. </html>