Skip to content

Instantly share code, notes, and snippets.

@JeremyLikness
Created March 19, 2016 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeremyLikness/de99ff99f0933f535f94 to your computer and use it in GitHub Desktop.
Save JeremyLikness/de99ff99f0933f535f94 to your computer and use it in GitHub Desktop.
<div class="column">
<table>
<tr><th>PC</th><th>SP</th><th>A</th><th>X</th><th>Y</th><td>NV-BDIZC</td><th>Runtime</th><th>IPS</th></tr>
<tr>
<td>{{cpu.rPC | hexadecimal}}</td>
<td>{{cpu.rSP | hexadecimal}}</td>
<td>{{cpu.rA | hexadecimal}}</td>
<td>{{cpu.rX | hexadecimal}}</td>
<td>{{cpu.rY | hexadecimal}}</td>
<td>{{cpu.rP | eightbits}}</td>
<td>{{cpu.elapsedMilliseconds / 1000}}</td>
<td>{{cpu.instructionsPerSecond}}</td>
</tr>
</table>
<div>&nbsp;</div>
<button (click)="cpu.reset()">Reset</button>&nbsp;
<button (click)="cpu.halt()" [disabled]="cpu.errorState || !cpu.runningState">Halt</button>
<button (click)="cpu.stop()" [disabled]="cpu.errorState || !cpu.runningState">Pause</button>
<button (click)="cpu.run()" [disabled]="cpu.runningState || cpu.errorState">Run</button>
<input type="checkbox" [(ngModel)]="cpu.debug"/>Debug
<button (click)="cpu.step()" [disabled]="cpu.runningState || cpu.errorState || !cpu.debug">Step</button>
<div>&nbsp;</div>
<div>
<ol>
<li>Click "Load" to load a source</li>
<li>Click "Compile" to compile it to memory</li>
<li>Click "Run" to execute it</li>
<li>Check "Debug" and "Step" a line at a time</li>
<li>"Reset" to get out of jail free</li>
</ol>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment