Recently I wrote a TI Basic (not Extended Basic) simulator as a proof of concept to determine whether or not such a simulator would be feasable in Javascript. Why TI Basic? Because it was the first programming language I ever learned. Yes, I still have a working TI-99/4A to this day.
PRINT is implemented enough to print simple values, and expressions. the ";" modifier isn't implemented. However, statements such as
LET,
IF-THEN-ELSE,
FOR-NEXT,
GOSUB-RETURN,
DIM, most math functions,
RANDOMIZE/RND, the
CHAR subroutines, and most other commands have been implemented.
Timing in Javascript is often inexact. This is the primary problem when developing any sort of simulation in Javascript. I can't wait until HTML 5 becomes fully adopted and a worker thread can be utilized to separate the UI from the rest of the simulation. A concept like this (and even more complex concepts) would be much easier to implement.
Below, you can try it out for yourself. I've only tested this in Firefox 3.5, and lightly in Opera 10.01 (
Note: It actually seems to execute faster in Opera, which is no surprise, but the cursor display is a little quirky at the end of a line.), so I'm uncertain whether it will work in other browsers at the moment. I just wanted to put this out there, and share it with the world. Perhaps I'll optimize this eventually, and implement the other pieces. It'd be interesting to see some of those old programs running right in the browser.
As far as I know, I'm the first to ever create such a thing...