I wondering if there is already a barebones example of creating a BASIC/C type console type interpreter and basic memory management
like you find in your basic 8-bit machine.
For example at the prompt:
:>int A=1 creates a variable A & B
:>int B=2
Call PRINT type command
:>print A + B
3
Wonder if also to build routines:
def foo = print A + B;
Then define a program:
:>edit add_numbers()
{
input A
input B
foo
}
Prompt:
:>run add_numbers()
Of course the option to delete them from memory
Creating a generic interpreter and memory management
-
- Member
- Posts: 30
- Joined: Fri Feb 10, 2017 3:36 pm
Re: Creating a generic interpreter and memory management
I don't think there's a C example. But from looking around at various home-brew hardware, the de-facto standard seems to be a variant of the Nascom flavour of Microsoft BASIC, eg here: https://github.com/feilipu/NASCOM_BASIC_4.7
It's easy to port to a new machine and add commands to allow interfacing with the serial ports etc
It's easy to port to a new machine and add commands to allow interfacing with the serial ports etc