gazlan / tiny-basic-interpreter Goto Github PK
View Code? Open in Web Editor NEWTiny Basic Interpreter
Tiny Basic Interpreter
////////////////////////////////////////////////////////////////////////// // Tiny Basic Interpreter recompiled with MSVC 6.0 // http://www.noniandjim.com/Jim/uproc/tinymsdos.zip // (c) [email protected], 2018 ////////////////////////////////////////////////////////////////////////// // Tiny Basic Interpreter // Copyright (c) 1995 Jim Patchell // Requires the use of Parsifal Software's Anagram LALR compiler. // http://www.parsifalsoft.com/ ////////////////////////////////////////////////////////////////////////// Tiny Basic http://www.noniandjim.com/Jim/uproc/uproc.html Well, this tiny basic is not really all that tiny, in that the amount of memory it occupies is pretty large. But, this is because it is implemented in a way that it is easy to change, rather than compactness. This Tiny Basic is implemented using Anagram from Parsifal Software. Anagram is a LALR(1) parser generator. Of all the parser generators I have used (yacc, bison) or have tried to use, Anagram is the one I have had the most success with. Heck, I don't know my terminal production from a hole in the ground, and yet I have written successfully a number of parsers using this tool. Tiny Basic is the most complicated one I have ever done. I probably could not do anything more complicated. This one was hard enough. Now, just how Basic is my Tiny Basic...well, all I can say is that it has the look and feel of basic, but it does differ in many ways. What I was really after was a scripting language for a project I did that could be run as a thread under the multi tasking kernel I wrote (see above). How it runs as a thread is mostly due to how I compiled the module. Tiny Basic is compiled such that all globals within that module are referenced via address register A5. This means several things. First, the Tiny Basic module cannot reference any external globals. Also, any external module cannot reference any of the globals in Tiny Basic. When the thread is created, a chunk of memory is allocated that will be used to store the global variables for Tiny Basic. In this way, I can have as many Tiny Basic threads running as I need, as long as I have plenty of memory. Also, this means that there is only one copy of Tiny Basic (code section) in memory at any time. Here you will find two copies. A version that is written to be used in an embedded 68000 environment, and a test version, that runs under MS-DOS. Tiny Basic Demo for MS-DOS http://www.noniandjim.com/Jim/uproc/tinymsdos.zip Tiny Basic Version for 68000 RTOS http://www.noniandjim.com/Jim/uproc/tinyembedded.zip If you go to the Parsifal web site, you can download a 30 day free trial version of Anagram. You should note that the code generated by Anagram requires no other external libraries. Anagram is one of the few parser generators that is suitable for embedded systems (yacc and bison will work also). This Tiny Basic code is free. You may use it in your projects freely. I would like to receive credit...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.