From 90e42a57735e5f704d28646f7eceed5407bf40e7 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Fri, 16 Aug 2013 19:58:09 -0700 Subject: [PATCH] Document hex literals --- basic.js | 14 +++++++------- reference.htm | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/basic.js b/basic.js index 55ff34c..aa8112c 100644 --- a/basic.js +++ b/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, diff --git a/reference.htm b/reference.htm index 889d032..6cb1615 100644 --- a/reference.htm +++ b/reference.htm @@ -583,6 +583,8 @@ function which implements the logic for walking over the array.

HSCRN(x,y) is added to allow reading the hires screen. On a real Apple II this required a machine-language routine (or a shape table and XDRAW) and extensive knowledge of the Apple II's color generation scheme. +

  • + Hexadecimal number literals are permitted, with $ as a prefix, e.g. POKE $C010, 0