Skip to main content

Posts

Showing posts with the label Compiler

Tiny Basic for Arduino

The primary objective of the Tiny Basic for Arduino project is to replicate that nostalgic C64 style programming environment utilizing modern, low-power MCU platforms. Present-day microcontrollers offer significantly higher processing power and memory capacity than the vintage systems of yesteryear, whilst being available at a fraction of the cost. I envisioned an environment where students and hobbyists alike could experience retro-style computing without the need to source rare, expensive vintage hardware, and completely avoiding any assembly or soldering hassles. By simply connecting a standard, off-the-shelf development board to a PC and launching a serial terminal, one can immediately commence coding in BASIC . Arduino Due: The primary development and testing board. To maintain an authentic and lightweight footprint, the interpreter is built upon the original Tiny Basic language grammar. It accurately parses and executes standard Tiny Basic syntax, making it highly famili...

8-bit assembler compiler project

This project is an assembler compiler to generate a binary executable for 8-bit x86 like CPU systems. This compiler can parse NASM style assembler code and it compatibles with Marco Schweighauser's javascript 8-bit virtual CPU . Compare with Marco Schweighauser's javascript compiler this compiler parse almost same assembler code and generate almost identical executable code. The only difference in this parser is that all the operands are separated by white space(s), and not with the comma ( , ). jmp start hello: db "Hello World!" db 0 start: mov c hello mov d 232 call print hlt print: push a push b mov b 0 loop: mov a [c] mov [d] a inc c inc d cmp b [c] jnz loop pop b pop a ret The output generated by this compiler for " Hello World " sample is listed in below and it can execute directly with Marco Schweighauser's 8-bit virtual CPU . 0000 1F0F 4865 6C6C 6F20 576F 726C 6421 0006 0010 0202 0603 E838 1800 3200 320...

ParseGen - parser generator for FPC

ParseGen is rule driven, parser generator for FPC / Lazarus . ParseGen is design using FPC, FCL and Lazarus and it mainly supports for Windows and Linux operating systems. ParserGen scanner is slight DFA (deterministic finite automaton) state machine. This scanner can operate on case sensitive or case-insensitive modes and it can easily configure/extend through given class structure. The parser of the ParseGen is recursive descent parser. ParseGen generate this parser using high-level source language and this language is logically similar to EBNF grammar. For example, in ParseGen, definition for "term" and "expression" can be written like this: define: expression   optional: "-","+"   end          term          loop: "-","+"     term   end   end define: term   factor   loop: "*","/"     factor   end   end This parser generator...

LiteASM - Light Weight & Customizable Assembly Compiler & Virtual Machine

LiteASM is a Light weight and reconfigurable Assembly language compiler and Virtual Machine. It is design to fulfill the following core requirements: As a scripting interface for embedded systems. As a cross platform scripting interface. As a experimental tool for compiler construction. LiteASM compiler is design with minimum static instruction set. Its dynamic instruction set can be easily extend using compilers configuration files. LiteASM compiler generate fixed length binary output file and it can execute on LiteASM Virtual Machine Simulator ( litevm ) or on top of platform specific virtual machine. Virtually LiteASM Virtual Machines can execute on any 8bit to 64bit CPU/MCU/DSP platform. 8bit version of Fibonacci series demo on LiteASM Virtual Machine Simulator LiteASM compiler and Virtual Machine simulator are distribute as a free and open source software (under the terms of GNU GPL version 3.0 ) and available for both Windows and Linux operating systems. This Lite...

An open scriptable USB interface for host driven electronic experiments

SigLab is a combination of open hardware and FOSS ( free and open source software ) projects to provide easy to use and full featured scriptable USB interface for digital electronic experiments. SigLab USB interface consisted with Microchip's PIC18F2550 microcontroller unit and it provides 14 bidirectional (digital) I/O ports for external interfacing. Scriptable language of SigLab had some resemblance to Pascal programming language and this system provides complete IDE for script editing and debugging. Current version of SigLab offers following core features to its users: Provide easy to use USB controller for digital electronic projects Avoid complexities of USB peripheral programming by providing full featured, easy to use scriptable interface Introduce DIY - USB controller with standard electronic components Provide live workspace to debug/watch hardware and firmware operations All the SigLab source codes, design files and other reference documents are available to download at ...