mirror of
https://github.com/inexorabletash/jsbasic.git
synced 2024-12-02 14:49:27 +00:00
Document hex literals
This commit is contained in:
parent
e2891cfcef
commit
90e42a5773
14
basic.js
14
basic.js
@ -287,7 +287,7 @@ var basic = (function() {
|
|||||||
dimensions = dims.map(function(n) { return (Number(n) >> 0) + 1; });
|
dimensions = dims.map(function(n) { return (Number(n) >> 0) + 1; });
|
||||||
|
|
||||||
var i, len = dimensions.reduce(function(a, b) { return a * b; }),
|
var i, len = dimensions.reduce(function(a, b) { return a * b; }),
|
||||||
defval = (type === 'string') ? '' : 0;
|
defval = (type === 'string') ? '' : 0;
|
||||||
|
|
||||||
array = [];
|
array = [];
|
||||||
for (i = 0; i < len; i += 1) {
|
for (i = 0; i < len; i += 1) {
|
||||||
@ -392,12 +392,12 @@ var basic = (function() {
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
var env, // Environment - passed in to program, contains tty, graphics, etc.
|
var env, // Environment - passed in to program, contains tty, graphics, etc.
|
||||||
state, // Program state - initialized at runtime
|
state, // Program state - initialized at runtime
|
||||||
lib, // Statement Library (closure over state and env)
|
lib, // Statement Library (closure over state and env)
|
||||||
funlib, // Function Library (closure over state and env)
|
funlib, // Function Library (closure over state and env)
|
||||||
peek_table, // Native memory access shims (PEEK, POKE, CALL)
|
peek_table, // Native memory access shims (PEEK, POKE, CALL)
|
||||||
poke_table,
|
poke_table,
|
||||||
call_table;
|
call_table;
|
||||||
|
|
||||||
//
|
//
|
||||||
// NOTE: tempting to make these part of env but some access/modify program state,
|
// NOTE: tempting to make these part of env but some access/modify program state,
|
||||||
|
@ -583,6 +583,8 @@ function which implements the logic for walking over the array.<p>
|
|||||||
<code>HSCRN(<var>x</var>,<var>y</var>)</code> is added to allow reading the
|
<code>HSCRN(<var>x</var>,<var>y</var>)</code> is added to allow reading the
|
||||||
hires screen. On a real Apple II this required a machine-language routine (or a shape table and <code>XDRAW</code>) and
|
hires screen. On a real Apple II this required a machine-language routine (or a shape table and <code>XDRAW</code>) and
|
||||||
extensive knowledge of the Apple II's color generation scheme.
|
extensive knowledge of the Apple II's color generation scheme.
|
||||||
|
<li id="hex">
|
||||||
|
Hexadecimal number literals are permitted, with <code>$</code> as a prefix, e.g. <code>POKE $C010, 0</code>
|
||||||
</ol>
|
</ol>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user