Overview TFORTH is my custom version of FORTH. It started as a programming exercise that grew into a somewhat usable language. This version of FORTH is a bit odd in that it has no compiling mode at all . Not even bytecode compiling. Everything is 100% interpreted. So, it's essentially a fancy text parser. It also doesn't try to be ANSI compliant at all. That being said, it does support a lot of common FORTH things like you would expect, including: custom function definitions, calling external functions via function pointers, full access to the system's memory map, input/output, etc. Variables There are some big differences, under-the-hood, with this version of FORTH. For one, there are no variables. Instead, I define variables as functions with a index to the "variable page," a page in memory dedicated to temporary storage. So, for example, 5 0 ! would assign the literal value 5 to index 0 in the variable page. So, to declare a "variable," I would d...
One feature/limitation of my computer design is that it uses an Arduino to replace a lot of extra logic and interface components. Specifically, the Arduino performs the following functions: Serial I/O The computer piggy-backs off of the Arduino's built-in serial to USB interface chips to communicate with the host laptop. Power-up reset circuitry The 6502 needs to run for 50 or so full clock cycles with the RESET line held low, and then RESET is sent high for normal operation. System clock Because the computer uses the Arduino's USB interface, the Arduino must be kept synchronous to the computer. If the computer runs too quickly, it could outpace the Arduino's ability to read and send data. The last point is the most important of all. The Arduino must be kept in lock-step with the computer at any given time in order to ensure that I/O data isn't missed. Thus, the the clock output is just a digital output from the Arduino. This means that the computer's maximum spee...