mirror of
https://github.com/inexorabletash/jsbasic.git
synced 2024-11-30 01:49:29 +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; });
|
||||
|
||||
var i, len = dimensions.reduce(function(a, b) { return a * b; }),
|
||||
defval = (type === 'string') ? '' : 0;
|
||||
defval = (type === 'string') ? '' : 0;
|
||||
|
||||
array = [];
|
||||
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.
|
||||
state, // Program state - initialized at runtime
|
||||
lib, // Statement Library (closure over state and env)
|
||||
funlib, // Function Library (closure over state and env)
|
||||
peek_table, // Native memory access shims (PEEK, POKE, CALL)
|
||||
poke_table,
|
||||
call_table;
|
||||
state, // Program state - initialized at runtime
|
||||
lib, // Statement Library (closure over state and env)
|
||||
funlib, // Function Library (closure over state and env)
|
||||
peek_table, // Native memory access shims (PEEK, POKE, CALL)
|
||||
poke_table,
|
||||
call_table;
|
||||
|
||||
//
|
||||
// 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
|
||||
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.
|
||||
<li id="hex">
|
||||
Hexadecimal number literals are permitted, with <code>$</code> as a prefix, e.g. <code>POKE $C010, 0</code>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user