├── .gitignore ├── LICENSE.md ├── README.md ├── basic.js ├── bell.js ├── bs.html ├── cm ├── basic.css └── basic.js ├── display.css ├── dos.js ├── favicon.ico ├── hires.js ├── index.html ├── index.js ├── lores.js ├── printer.js ├── reference.html ├── res ├── bell.wav ├── font-40col.png ├── font-80col.png ├── font.png └── lpt.jpg ├── samples ├── TRADER C.txt ├── index.txt ├── sample.10print.txt ├── sample.3dhat.txt ├── sample.3drectangle.txt ├── sample.adventure.txt ├── sample.aritm.txt ├── sample.artillery.txt ├── sample.basic.txt ├── sample.bite.txt ├── sample.bitmaps.txt ├── sample.blackhole.txt ├── sample.bodymass.txt ├── sample.boys_surface.txt ├── sample.building.txt ├── sample.calculatedimage.txt ├── sample.charset.txt ├── sample.chase.txt ├── sample.codabar.txt ├── sample.coloredserpinski.txt ├── sample.colorrings.txt ├── sample.columns.txt ├── sample.connections.txt ├── sample.dbconverge.txt ├── sample.dbpendulum.txt ├── sample.dbvectorship.txt ├── sample.dbvectortext.txt ├── sample.default.txt ├── sample.dicegame.txt ├── sample.doordetector.txt ├── sample.dragon.txt ├── sample.dragonsmaze.txt ├── sample.dye.txt ├── sample.enterprise.txt ├── sample.enterprise2.txt ├── sample.factors.txt ├── sample.february.txt ├── sample.fsim.txt ├── sample.functiongraphing.txt ├── sample.gaussian.txt ├── sample.hacker.txt ├── sample.hangman.txt ├── sample.hellosine.txt ├── sample.hgrblends.txt ├── sample.hireswalk.txt ├── sample.jobs.txt ├── sample.jot.txt ├── sample.keyboard.txt ├── sample.logo.txt ├── sample.loresdrawing.txt ├── sample.loreswalk.txt ├── sample.mandelbrot.txt ├── sample.mandelbrot2.txt ├── sample.miniindy.txt ├── sample.moire.txt ├── sample.ninjaturtle.txt ├── sample.nuclear.txt ├── sample.onelinetrain.txt ├── sample.pacman.txt ├── sample.paint.txt ├── sample.piglatin.txt ├── sample.platformer.txt ├── sample.pretzel.txt ├── sample.primecheck.txt ├── sample.primes.txt ├── sample.protonelectron.txt ├── sample.puzzler.txt ├── sample.quine.txt ├── sample.radar.txt ├── sample.raindrops.txt ├── sample.randommaze.txt ├── sample.readsector.txt ├── sample.rodscolorpattern.txt ├── sample.scribble.txt ├── sample.sectorgen.txt ├── sample.sierpinski.txt ├── sample.sierpinski2.txt ├── sample.snowflakes.txt ├── sample.spaceattack.txt ├── sample.squiggle.txt ├── sample.stellar7.txt ├── sample.steve.txt ├── sample.stringart.txt ├── sample.stringfns.txt ├── sample.tetris.txt ├── sample.thunderclock.txt ├── sample.unfinishedmaze.txt ├── sample.unittests.txt ├── sample.vdt.txt ├── sample.wizardscastle.txt ├── sample.xmastree.txt ├── sample.zhorelay.txt └── simple.pong.txt ├── script.js ├── script.md ├── styles.css ├── tools └── make_styles.js ├── tty.js └── vfs ├── DATAFILE.txt ├── JABBERWOCKY.txt ├── OD JUMP.txt ├── SHIPS.txt ├── SHIPS@.txt ├── SOLOMANI.txt ├── SOLOMANI@.txt ├── SOLOMANI_MAP.txt ├── SPINWARD.txt ├── SPINWARD@.txt └── SPINWARD_MAP.txt /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Applesoft BASIC in Javascript 2 | 3 | Source Code Copyright (C) 2009-2013 Joshua Bell 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | https://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | 18 | Sample files are Copyright (C) the original submitters 19 | 20 | 21 | The following files are Copyright (C) 1977-2013 Far Future Enterprises: 22 | * samples/sample.sectorgen.txt 23 | * samples/sample.zhorelay.txt 24 | * samples/sample.readsector.txt 25 | * samples/TRADER C.txt 26 | * vfs/OD JUMP.txt 27 | * vfs/SHIPS.txt 28 | * vfs/SHIPS@.txt 29 | * vfs/SOLOMANI.txt 30 | * vfs/SOLOMANI@.txt 31 | * vfs/SOLOMANI_MAP.txt 32 | * vfs/SPINWARD.txt 33 | * vfs/SPINWARD@.txt 34 | * vfs/SPINWARD_MAP.txt 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | jsbasic - Applesoft BASIC in JavaScript 2 | ======================================= 3 | 4 | This is hosted for playing with at https://inexorabletash.github.io/jsbasic/ 5 | 6 | Notes & Known Issues 7 | -------------------- 8 | * 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. `10 END : CHR$(PRINT)` 9 | * Handling of BASIC code that does not match the canonical `LIST` output format may not behave as on an Apple: 10 | * Keyword parsing differs from Applesoft command line. For example `FOR I = S TO P` doesn't collapse into `FOR I = STOP`. 11 | * Limitations: 12 | * Floating point overflow is only detected on variable assignment. 13 | * Only a subset of DOS 3.3 and ProDOS useful for basic file I/O are implemented. 14 | * Only a small number of common `PEEK`, `POKE` and `CALL` locations are supported. 15 | * Commands that refer to assembly routines (`&`, `USR()` etc.), shape tables, and tape I/O are not implemented. 16 | * Commands that operate on the program itself (`LIST`, `RUN`, `DEL`, etc.) are not implemented. 17 | * A handful of extensions are made beyond Applesoft BASIC: 18 | * To improve readability, lines may start with `:` and continue the previously numbered line. 19 | * `DEF FN` can define string functions 20 | * `==` can be used as `=` 21 | * `CHR$()` values > 255 do interesting things 22 | * `HSCRN(x, y)` allows probing the hi-res screen 23 | * hexadecimal literals e.g. `$C010` can be used as numbers 24 | -------------------------------------------------------------------------------- /bs.html: -------------------------------------------------------------------------------- 1 | 2 |
27 | By Joshua Bell 28 | | Source 29 | | README 30 | — Applesoft BASIC Quick Reference 31 | 32 |
Related projects: 33 | Logo in Javascript 34 | | Streaming video to an Apple II - vnIIc 35 |
36 | 37 |