blob: 4549b2f7a7ebc9c47e1ef31f6e7675a60bcd6495 [file] [log] [blame]
swissChilie392aeb2020-08-10 15:52:10 -07001<html>
2 <head>
3 <meta name="viewport" content="width=device-width">
4 <link rel="stylesheet"
5 href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/styles/default.min.css">
6 <link rel="stylesheet" href="styles.css">
7 <title>Usage</title>
8 </head>
9 <body>
10 <main class="split container">
11 <div class="sidebar">
12 <h2><a href="/">6502</a></h2>
13
14 <p>
15 6502 Toolchain written by <a href="https://github.com/swissChili">swissChili</a>
16 </p>
17
18 <ul>
19 <li><a href="https://github.com/swissChili/6502">Git</a></li>
20 <li><a href="/usage.html">Basic usage</a></li>
21 <li><a href="/examples.html">Example programs</a></li>
22 <li><a href="/building.html">Building from source</a></li>
23 </ul>
24 </div>
25 <div class="body">
26 <h1> Basic Usage</h1>
27The <code>6502</code> command takes some arguments that control how it functions. Each flag is documented
28here. Note that only UNIX style flags are supported, not GNU style. This uses the standard
29<code>getopt()</code> function, so flags work the same as any UNIX command.
30<h4> <code>-g</code></h4>
31Opens a GUI debugger window.
32<h4> <code>-s</code></h4>
33Opens a window that shows the emulators screen. Cannot be used in conjunction with <code>-g</code>.
34<h4> <code>-H</code></h4>
35Keep the emulator running after the CPU halts (after an interrupt is triggered). Useful
36for debugging short programs. Does nothing when used with <code>-D</code>.
37<h4> <code>-d</code></h4>
38Disassemble the input file, printing the whole disassembly to <code>stdout</code>. You probably want
39to use this with <code>-n</code>
40<h4> <code>-r</code></h4>
41Run the input file. Can be used in conjunction with <code>-s</code> to run and display the output.
42<h4> <code>-D</code></h4>
43Open CLI debugger. Can be used with <code>-s</code> to view screen while debugging.
44<h4> <code>-i input</code></h4>
45Read <code>input</code> into the CPUs memory.
46<h4> <code>-n number_of_instructions</code></h4>
47Disassemble only <code>number_of_instructions</code> instructions.
48<h4> <code>-h, -?</code></h4>
49Print a help message.
50 </div>
51 </main>
52
53 <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
54 <script>
55 document.addEventListener('DOMContentLoaded', (event) => {
56 document.querySelectorAll('pre code').forEach((block) => {
57 hljs.highlightBlock(block);
58 });
59 });
60 </script>
61 </body>
62</html>