All Projects → totalspectrum → spin2cpp

totalspectrum / spin2cpp

Licence: Unknown, Unknown licenses found Licenses found Unknown COPYING Unknown COPYING.LIB
Tool to convert Parallax Propeller Spin code to PASM, C++ or C

Programming Languages

c
50402 projects - #5 most used programming language
Propeller Spin
14 projects
Yacc
648 projects
C++
36643 projects - #6 most used programming language
Parrot
15 projects
FreeBasic
24 projects

Projects that are alternatives of or similar to spin2cpp

crudlfap
MIRROR of yourlabs.io/oss/crudlfap
Stars: ✭ 20 (-51.22%)
Mutual labels:  propeller
Spin-Hexagon
Port of Super Hexagon to the Parallax Propeller
Stars: ✭ 13 (-68.29%)
Mutual labels:  propeller

Spin2cpp is a program for converting Spin, BASIC, or C code to binary, PASM (Parallax Propeller 1 assembly), P2ASM (Parallax P2 assembly), Spin1 bytecode, C, or C++.

flexspin is a slightly different front end to the same functionality, designed to be compatible with other spin compilers.

flexcc is a third front end designed to accept the arguments normally given to C compilers (cc). Like the others, it can actually accept Spin and BASIC input as well as C.

The command line options for spin2cpp and flexspin are documented in Spin2cpp.md and Flexspin.md respectively.

Documentation for the various front ends (languages accepted as input) are in doc. The BASIC language is the best documented. The C and Spin documentation just cover extensions and deviations from the standard (C99 in the case of C, and the original Propeller compiler in the case of Spin).

BUILDING

On most Linux installations you should be able to build with "make", which will place binaries in the "build" folder.

On macOS the procedure is similar, but you'll probably have to manually install a newer version of bison (the one that comes with macOS is too old). You'll need at least bison 3.0.

On Windows it should be possible to build using msys or a similar gcc based build environment, but you'll need to install bison 3.0 or later, flex, gcc, and make.

Tips and Tricks

Executable Name

If you name your executable "bstc.exe", it will try to act like the BSTC compiler (so it can be used in build scripts and IDEs that use bstc style command lines). For example, flexspin will work this way as the back-end assembler for PropBasic.

If you name your executable something that ends in "spin2" (like "flexspin2.exe") it will compile for P2 by default.

Credits

Most of spin2cpp was written by Eric R. Smith. The bytecode back end and many other improvements and bug fixes were contributed by Ada Gottensträter. The C preprocessor was written by Kiyoshi Matsui. Many people have contributed bug fixes, suggestions, and library files; see the COPYING and COPYING.LIB files for the full list of contributors.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].