diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9254b6b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "polyfill"] + path = polyfill + url = https://github.com/inexorabletash/polyfill.git diff --git a/README.md b/README.md index b685267..e0c5b9d 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,9 @@ jsbasic - Applesoft BASIC in JavaScript ======================================= -This is hosted for playing with at http://calormen.com/applesoft/ +This is hosted for playing with at http://calormen.com/applesoft/ -For older browsers, the code depends on various [polyfills](http://github.com/inexorabletash/polyfill). -For syntax highlighting, the editor optionally uses [CodeMirror](http://codemirror.net) and custom BASIC parser/styles. -Clone these into sibling directories, so you end up with a structure like: - - jsbasic/ - polyfill/ - CodeMirror/ +Use `git clone --recursive` to get [polyfill](http://github.com/inexorabletash/polyfill) for older browsers. Notes & Known Issues -------------------- @@ -35,4 +29,3 @@ You can run your basic programs from the command line (with only basic text inpu * Clone the repository locally * On Windows, run from a command prompt via: `cscript.exe cbasic.js your_program.txt` * On Mac/Linux, install Mozilla Rhino, run from the command prompt via: `java -jar PATH_TO/js.jar cbasic.js your_program.txt` - diff --git a/index.htm b/index.htm index d1cb702..3965d45 100644 --- a/index.htm +++ b/index.htm @@ -6,16 +6,16 @@ - - + - +

Applesoft BASIC in Javascript

@@ -130,8 +130,8 @@ By Joshua Bell

- - + + - - - - - - - - + + + + + + + + - + '); } - load(baseURL + '../polyfill/polyfill.js'); - load(baseURL + '../polyfill/keyboard.js'); - load(baseURL + 'tty.js'); - load(baseURL + 'lores.js'); - load(baseURL + 'hires.js'); - load(baseURL + 'bell.js'); - load(baseURL + 'dos.js'); - load(baseURL + 'basic.js'); + function load(url) { document.write(''); } + load('polyfill/polyfill.js'); + load('polyfill/keyboard.js'); + load('tty.js'); + load('lores.js'); + load('hires.js'); + load('bell.js'); + load('dos.js'); + load('basic.js'); function createInstance(src) { function ce(element, attributes, children) {