This file is a textual log of changes by date prior to tracking the files in a public version control repository. This is for historical purposes only, and will no longer be updated. -------------------------------------------------------------------- 2011-12-06 Added PEEK and POKE shim for 230 (Hi-Res plotting page), to enable drawing on the back buffer for animations. 2011-04-20 Re-added support for running under Windows Scripting Host and added Mozilla Rhino support too. 2011-04-16 Total internal revamp: Now a compiler rather than interpreter. Source errors are reported by BASIC line number as well as source line/column. Display defaults to 40 columns, emulates 80-column firmware more accurately. Character output (CHR$(), INVERSE, etc) tweaked to match Apple behavior. Files written via DOS now persist in your browser via Web Storage. Floating point and integer overflows are caught rather than propagating infinities and NaNs. DATA statements and INPUT entries parse more accurately as comma delimited, optionally-quoted strings. RE-ENTER? is shown on invalid INPUT (and can be trapped via ONERR) Added HGR2 and page-flipping POKE shims, plus a few CALL shims for graphics. Hires graphics are now to a 280x192 bitmap, rather than trying to be sneaky with a 140x192 bitmap. Error codes can be distinguished in ONERR via PEEK(222). Out-of-memory and stack-overflow conditions reported where possible (this is non-standard across browsers). Tweaked samples that were dependent on language/environment quirks. Updated code editor to (the much improved) CodeMirror 2.0. On parse errors, the cursor is moved to the offending line/character. 2011-01-29 Fixed error handling issues, e.g. DOS errors w/ ONERR and syntax errors e.g. 10 INPUT PRINT Added HSCRN(x,y) extension function. Fix mouse-as-joystick to hit full range of 0...255. 2011-01-26 No longer show paddles/joysticks automatically; rely on mouse-as-joystick primarily. Use FlashCanvas for older IE versions, instead of excanvas, and switch to plotting hires pixels/lines directly rather than relying on canvas scaling and line drawing. Added Gaussian Distribution 2D plot sample, by John Russ 2011-01-25 Added compatibility shims for PEEK(78) and PEEK(79) for seeding the random number generator. On a real Apple these are incremented during the input polling loop and are a good source of entropy for seeding a random number generator. In this interpreter, they are simply generated by the JavaScript Math.random() function. 2010-11-21 Added lexical highlighting in code editor via CodeMirror. Note that this only highlights tokens, it does not check statement or expression syntax. It will highlight invalid tokens and unsupported statements. Mousing over the screen now updates paddle position - try the lo-res painting demo for an example. Lots of internal code cleanup with hopefully no behavior changes. 2010-11-18 Fix RETURN and POP from inside a FOR ... NEXT loop. Fix TRACE and NOTRACE 2010-11-13 Added SPEED= shim (does nothing) Fixed SPC() and TAB() Work around Chrome bug to show full error alert text. 2010-08-29 Added "Echo to Printer" option to allow copy/paste of output Big refactor of internals. Statement parsing and execution now separated. A library of statement functions are used for execution. Hopefully nothing broke - all unit tests still pass. 2010-05-04 When run under cscript.exe, the program still blocks until the user presses Enter when a GET statement executes, but the entered characters are returned by subsequent GET statements. Added Hello World Sine Wave sample by Jamie Beu. 2009-11-01 Changes are now recorded in an Atom Feed. 2009-10-24 Now licensed under the Apache 2.0 license 2009-10-15 Fixed bug with POKE and negative addresses (introduced 2009-05-15, bleah) 2009-06-10 Added Boy's Surface sample by Lukas Innig 2009-05-08 Fixed running with cscript Slight performance tweaks for IE c/o explicit sizing 2009-05-08 Tracked down source of IE perf issues when drawing with paddles; when the thumb/stick moves, IE does a relayout/repaint of any content above the paddle in the HTML flow. If I delete the page header it's silky-smooth. Unfortunately, any text above the screen seems to make it fall off the deep end - so no fix yet without gutting the page. Undid "Line breaks from PRINT now clear to the right edge" - doesn't repro on Apple. What was I thinking? 2009-05-06 A bunch of performance tweaks based on IE8's JavaScript profiler. While they look good on paper, they mean diddly-squat to perceived performance. Don't precalc default variable values, avoid DOM changes that are no-ops, and (sigh) don't scan the whole screen looking for FLASH-styled cells - maintain a list instead so perf isn't impacted if there are none. 2009-05-01 Expressions are now just-in-time compiled to JavaScript. Screen updates are the real bottleneck, though, so this isn't a big performance boost. Performance comparison (on my 1.73GHz machine) of the lores Mandelbrot set demo: Google Chrome (V8 JavaScript compiler): 25% faster (21s vs. 27s) Firefox 3: 14% faster (64s vs. 73s) Internet Explorer 8: <1% faster (249s vs. 251s) So not a huge win except on faster execution engines. But this is just the first step... Fixed POKE 216,x shim to disable ONERR handler 2009-04-30 Rejiggered internal value storage/passing system to use fundamental JavaScript types instead of {number: value} or {string: value}. I didn't trust JavaScript's type system when I first wrote this code. 2009-04-26 Performance - made GOTO/GOSUB not do a linear scan to find the line (d'oh). Significant perf boost for IE. Added Unit Tests sample. Coverage is not complete but it's getting there. RND() with negative now consistently reseeds (added custom pseudoranom number generator) FOR I = 10 TO 1 : PRINT I : NEXT now correctly prints 10 then finishes (was previously incorrectly inferring STEP -1) 2009-04-25 Line breaks from PRINT now clear to the right edge of the text window Automatically show input devices if PDL() called Added Zhodani Relay Station Placement example (run after generating a sector with Traveller Sector Generator) 2009-04-24 Fixed a bug where changing text mode (e.g. PR#3) after calling HGR would break split-screen mode. 2009-04-14 Updated to an IE8-compatible version of excanvas. Updated my excanvas patch to support scaling. 2009-04-05 Allow DEF FN to be invalid (errors occur in FN, per Applesoft) Fixed PR#0 in Safari Added RENAME old,new to DOS Fixed LIST for assignment statements with no LET Fixed operator spacing for LIST Fixed parsing of empty REM statements Program would execute after a tokenization error was encountered - fixed. Added Traveller Sector Generator sample 2009-03-07 Fixed cursor blinking Added Connections, Puzzler, and Squiggle by Gregg Buntin 2009-03-06 Addressed IE performance issues: sped up Text and LoRes screen initialization, don't use classes for characters (sigh). Fixed PRINT SPC() 2009-03-05 PRINT CHR$(7) now rings a BELL (if your browser has an audio/wav WAV handler configured) Reimplemented the text display (TTY) using bitmap font, to mimic the look of 40/80 column text (no more copy/paste, alas) Added MouseText support. INVERSE:PRINT CHR$(27);"XY";CHR$(24):NORMAL The ASCII Pac-Man sample was really Unicode Pac-Man, which the bitmap font doesn't support, so it broke. So I cheated. 2009-03-01 Added Scribble sample, by William Simms 2009-02-12 Added February Surprise sample by Antti Pirskanen 2008-11-08 Ignore whitespace-only lines, as a convenience Added ASCII PAC-MAN(ish) sample by Michael Kemp 2008-10-19 Added TEXT ADVENTURE sample by Floyd McWilliams. Allow string literals to be terminated by end-of-line (suggested by Mike Kienenberger for compatibility) 2008-09-18 Fixed a case where syntax errors were ignored 2008-09-17 Fixed input focus to work in Google Chrome Fixed READ to support multiple variables, e.g. READ I,J,S$ 2008-08-23 Added Save/Load buttons that let you save your work to a cookie Added DRAWING PROGRAM sample by Brian Broker Fixed power operator (^) which wasn't being parsed correctly Fixed subtle bug with string comparisons (result was double-typed as number and string) 2008-05-01 Fixed NEXT I,J,... to terminate multiple loops - thanks to Scott Alfter for pointing this out Bowing to popular demand, it now supports ? as an alias for PRINT 2008-03-15 Implemented ONERR GOTO line and RESUME, including POKE 216,0 Added demo for ONERR, added ONERR support to sequential file access demo Fix hires graphics on Safari - not sure when it broke 2008-03-14 Code cleanup c/o jslint.com Bug fix: INPUT A,B,C no longer worked. Probably mis-re-factored at some point. 2007-12-08 Implement file writing (to client-side VFS only), including APPEND operations Added DOS DELETE command GR does implicit HTAB 1 : VTAB 24 PEEK(49168) has the same effect as POKE 49168,N As a convenience, PEEK and POKE at 49200/-16336 (speaker toggle) now accepted, but a no-op As a convenience, spaces now accepted before = forCOLOR= and HCOLOR= 2007-11-22 Added button to submit your sample (via email) for inclusion Added SIMPLE.PONG sample c/o USENET post by mad.scientist.jr Improved comment handling (doesn't tokenize) 2007-10-22 Make GET support keyboard flag, so IF PEEK(-16384) > 127 THEN GET A$ works 2007-10-20 Bug fix: User could type after hitting Stop. Now TTY state is reset. Added missing statement: ON expr GOSUB ... RND(0) returns last, negative reseeds 2007-10-14 Fixed location of paddle button 3 (C060) 2007-09-22 Implemented scaling in ExplorerCanvas (source); hires now scaled somewhat correctly in IE Bug fixes: HOME would force full-screen text; HPLOT can now plot a single pixel 2007-09-20 Added hires support via canvas tag Display switches (POKE 49232...49239, not counting page 2) supported. Added text window support: POKE 32,left : POKE 33,width : POKE 34,top : POKE 35,bottom 2007-09-16 Added full screen lores support via POKE 29234,0 Fixed keyboard input on Safari - hacky, but logical 2007-09-15 Added Mandelbrot set demo to DEMOS Added PEEK and POKE shims Added paddle buttons: Home = 0 = Open Apple, End = 1 = Solid Apple, Page Up = 2, Page Down = 3 Added Caps Lock (defaults to on; real Caps Lock key toggles it; this means it usually ends up in an inverted state) Round numerical results to 8 decimal places (hacky) 2007-09-10 Added demo file links, cleaned up UI a bit. Added hacky PR#0/PR#3 support (to set 40 columns) 2007-09-09 Execute multiple steps before yielding. Increases perceived performance by about 10x. Adjust lores colors per Linards Ticmanis on comp.sys.apple2. Added Joystick, reorganized web pages 2007-09-04 Added MON/NOMON support. Fixed bugs with: READ into arrays, two argument MID$, e-format number parsing, DOS null command 2007-09-03 Bugfixes: SPC() and TAB() followed by ; in PRINT statements. DOS parameter lists can include spaces. 2007-09-02 Oops - FRE is a function not a statement. Fixed! 2007-09-01 Implemented DATA/READ/RESTORE 2007-08-31 Implemented DEF FN 2007-08-30 Implemented DIM. File reads complete. 2007-08-27 Added preliminary DOS implementation. Sequential access read only; there's a file called "JABBERWOCKY" to try. 2007-08-24 Fixed bugs with string variables, key presses in IE, and HTML tweaks for better layout and lo-res sizing 2007-06-05 Added paddle support (PDL) 2007-06-03 Added lores graphics support (GR, PLOT, HLIN, VLIN, COLOR=, SCRN) 2007-05-01 Extracted step mechanism from interpreter, so web page can introduce delays; no longer case-sensitive to keywords 2007-04-29 Fixed command-line mode again 2007-04-27 Added screen emulation (e.g. HOME, HTAB, VTAB) and input (e.g. GET) 2007-04-24 Integrated into browser (display and event model) 2007-04-21 Project started; interpreter functional via WSH on Windows