Add some style

This commit is contained in:
Joshua Bell 2013-08-15 21:30:51 -07:00
parent 74ca008c37
commit 95567053d5
3 changed files with 40 additions and 65 deletions

View File

@ -19,19 +19,17 @@
<h1>Applesoft BASIC in Javascript</h1>
<p>
By <a href="mailto:inexorabletash@hotmail.com">Joshua Bell</a>
| <a target="_blank" href="reference.htm">Applesoft BASIC Quick Reference</a>
| <a href="#notes">Notes &amp; Known Issues</a>
| <a href="#todo">To Do</a>
| <a href="#links">Links</a>
| <a href="#changes">Changes</a>
By <a href="mailto:inexorabletash@gmail.com">Joshua Bell</a>
| <a target="_blank" href="https://github.com/inexorabletash/jsbasic/">Source</a>
| <a target="_blank" href="https://github.com/inexorabletash/jsbasic/blob/master/README.md">README</a>
&mdash; <a target="_blank" href="reference.htm">Applesoft BASIC Quick Reference</a>
<p>Related projects:
<a href="/Logo">Logo in Javascript</a>
| <a href="/vnIIc">Streaming video to an Apple II - vnIIc</a>
</p>
<br clear=left>
<br clear="left">
<!-- Screen -->
<div id="frame" class="frame" style="float: left; margin: 5px;">
@ -119,36 +117,6 @@ By <a href="mailto:inexorabletash@hotmail.com">Joshua Bell</a>
<br clear=left>
<h3 id="notes">Notes &amp; Known Issues</h3>
<ul>
<li>The BASIC program is compiled to JavaScript before execution. Syntax errors are therefore detected at compile-time
rather than at run-time as on a traditional interpreter. For example, the following program would run without errors
on an Apple since the erroneous second statement is never reached. <code>10 END : CHR$(PRINT)</code>
<li>Handling of BASIC code that does not match the canonical <code>LIST</code> output format may not behave as on an Apple:
<ul>
<li>Keyword parsing differs from Applesoft command line. For example <code>FOR I = S TO P</code> doesn't collapse into <code>FOR I = STOP</code>.
<li>The interpreter doesn't actually care about line numbers for statement ordering (just for <code>GOTO</code>/<code>GOSUB</code> targets and <code>IF</code> statements). So <code>20 PRINT "A"</code>, <code>10 PRINT "B"</code> will just print A, then B
</ul>
<li>To improve readability, lines may start with <code>:</code> and continue the previously numbered line.
<li>Floating point overflow is only detected on variable assignment.
<li>The DOS operating system implements only a subset of DOS 3.3 and ProDOS useful for basic file I/O.
<li>Except for a small number of compatibility shims for common operations (e.g. keyboard strobe), commands that refer to assembly routines (<code>PEEK</code>, <code>POKE</code>, <code>CALL</code>, <code>USR</code> etc.), shape tables, or tape I/O are not implemented.
<li>Commands that operate on the program itself (<code>LIST</code>, <code>RUN</code>, <code>DEL</code>, etc.) are not implemented.
<li>You can run your basic programs from the command line (with only basic text input and output, and no graphics or DOS commands):
<ul>
<li>On Windows, download <a href="basic.js">basic.js</a> and run from a command prompt via:
<code>cscript.exe basic.js your_basic_program.txt</code>
<li>On Mac/Linux, install <a href="http://www.mozilla.org/rhino/">Mozilla Rhino</a>,
download <a href="basic.js">basic.js</a> and run from the command prompt via:
<code>java -jar PATH_TO/js.jar basic.js your_program.txt</code>
</ul>
</ul>
<h3 id="todo">To Do</h3>
<ul>
<li>Implement DOS functionality for consoles
</ul>
<h3 id="links">Links</h3>
<ul>
<li><a href="http://www.6502asm.com/">6502asm.com</a> - a 6502 assembler/emulator in JavaScript
@ -158,10 +126,6 @@ By <a href="mailto:inexorabletash@hotmail.com">Joshua Bell</a>
<li><a href="http://www.scullinsteel.com/apple2/">Apple II emulator in JavaScript</a>
</ul>
<h3 id="changes">Changes</h3>
<p>The source is tracked on <a href="http://github.com">GitHub</a> at <a href="https://github.com/inexorabletash/jsbasic/">https://github.com/inexorabletash/jsbasic/</a>.
<p>Older changes are documented in the <a href="https://github.com/inexorabletash/jsbasic/blob/master/CHANGELOG">CHANGELOG</a>
<!-- CodeMirror syntax highlighting - this is optional -->
<script src="../CodeMirror/lib/codemirror.js"></script>
<link rel="stylesheet" href="../CodeMirror/lib/codemirror.css">

View File

@ -1,10 +1,16 @@
<!DOCTYPE html>
<title>Applesoft BASIC Reference</title>
<style type="text/css">
@import url(http://fonts.googleapis.com/css?family=Coustard);
body { font-family: "Coustard"; }
body { background-color: #EEEACD; color: black; }
a { color: #803010; text-decoration: none; }
a:hover { text-decoration: underline; }
#toc { float: right; background-color: #DDDABD; font-size: 80%;}
code, dt { font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-weight: bold; font-size: 80%; }
h1 { margin-top: 0; }
h2 { border-top: solid 1px black; border-bottom: solid 1px black; }
</style>
@ -13,7 +19,7 @@ h2 { border-top: solid 1px black; border-bottom: solid 1px black; }
<h1>Applesoft BASIC Quick Reference</h1>
<p>
This is intended as a quick reference for the <a href="index.htm">Applesoft BASIC in JavaScript</a> by <a href="mailto:inexorabletash@hotmail.com">Joshua Bell</a>.
This is intended as a quick reference for the <a href="index.htm">Applesoft BASIC in JavaScript</a> by <a href="mailto:inexorabletash@gmail.com">Joshua Bell</a>.
</p>
<p>
@ -22,10 +28,10 @@ This is intended as a quick reference for the <a href="index.htm">Applesoft BASI
<p>See also:</p>
<ul>
<li><a href="http://www.landsnail.com/a2ref.htm">Apple II Programmer's Reference: Applesoft Commands</a>
<li><a href="http://www.apple2.org/faq/FAQ.applesoft.html">Applesoft BASIC Frequently Asked Questions (FAQ)</a>
<li><a href="http://www.lazilong.com/apple_II/bbros/">Beagle Bros. Peeks, Pokes & Pointers Chart (Colors, ASCII values, etc)</a>
<li><a href="http://beagle.applearchives.com/posters.htm">More Beagle Bros. Posters - including Apple Commands Chart, in PDF format</a>
<li><a href="http://www.landsnail.com/a2ref.htm">Apple II Programmer's Reference: Applesoft Commands</a>
<li><a href="http://www.apple2.org/faq/FAQ.applesoft.html">Applesoft BASIC Frequently Asked Questions (FAQ)</a>
<li><a href="http://www.lazilong.com/apple_II/bbros/">Beagle Bros. Peeks, Pokes & Pointers Chart (Colors, ASCII values, etc)</a>
<li><a href="http://beagle.applearchives.com/posters.htm">More Beagle Bros. Posters - including Apple Commands Chart, in PDF format</a>
</ul>
@ -279,19 +285,19 @@ This is intended as a quick reference for the <a href="index.htm">Applesoft BASI
<dl>
<dt>0<dd>Next without for
<dt>16<dd>Syntax error <em>- Not generated</em>
<dt>16<dd>Syntax error - <em>Not generated</em>
<dt>22<dd>Return without gosub
<dt>42<dd>Out of data
<dt>53<dd>Illegal quantity
<dt>69<dd>Overflow
<dt>77<dd>Out of memory <em>- Not generated by all browsers</em>
<dt>77<dd>Out of memory - <em>Not generated by all browsers</em>
<dt>90<dd>Undefined statement
<dt>107<dd>Bad subscript
<dt>120<dd>Redimensioned array
<dt>133<dd>Division by zero
<dt>163<dd>Type mismatch
<dt>176<dd>String too long <em>- Not generated</em>
<dt>191<dd>Formula too complex <em>- Not generated by all browsers</em>
<dt>176<dd>String too long - <em>Not generated</em>
<dt>191<dd>Formula too complex - <em>Not generated by all browsers</em>
<dt>224<dd>Undefined function
<dt>254<dd>Re-enter
<dt>255<dd>Break
@ -333,20 +339,20 @@ This is intended as a quick reference for the <a href="index.htm">Applesoft BASI
<code>PEEK(222)</code> in an ONERR handler.</p>
<dl>
<dt>1<dd>Language not available <em>- Not generated</em>
<dt>2<dd>Range error <em>- Not generated</em>
<dt>4<dd>Write protected <em>- Not generated</em>
<dt>1<dd>Language not available - <em>Not generated</em>
<dt>2<dd>Range error - <em>Not generated</em>
<dt>4<dd>Write protected - <em>Not generated</em>
<dt>5<dd>End of data
<dt>6<dd>File not found
<dt>7<dd>Volume mismatch <em>- Not generated</em>
<dt>8<dd>I/O error <em>- Not generated</em>
<dt>9<dd>Disk full <em>- Not generated</em>
<dt>10<dd>File locked <em>- Not generated</em>
<dt>7<dd>Volume mismatch - <em>Not generated</em>
<dt>8<dd>I/O error - <em>Not generated</em>
<dt>9<dd>Disk full - <em>Not generated</em>
<dt>10<dd>File locked - <em>Not generated</em>
<dt>11<dd>Invalid option
<dt>12<dd>No buffers available <em>- Not generated</em>
<dt>13<dd>File type mismatch <em>- Not generated</em>
<dt>14<dd>Program too large <em>- Not generated</em>
<dt>15<dd>Not direct command <em>- Not generated</em>
<dt>12<dd>No buffers available - <em>Not generated</em>
<dt>13<dd>File type mismatch - <em>Not generated</em>
<dt>14<dd>Program too large - <em>Not generated</em>
<dt>15<dd>Not direct command - <em>Not generated</em>
</dl>
<!-- ================================================== -->

View File

@ -1,6 +1,11 @@
body { background-color: #EEEACD; }
h1, h2, h3, p { margin-bottom: 6pt; margin-top: 6pt; }
td { vertical-align: top; }
@import url(http://fonts.googleapis.com/css?family=Coustard);
body { font-family: "Coustard"; }
a { color: #803010; text-decoration: none; }
a:hover { text-decoration: underline; }
body { background-color: #EEEACD; color: black; }
h1, h2, h3, p, ul { margin-bottom: 0; margin-top: 0; }
/* Apple II Screen */