Skip to content

amukh1/Ritchie-Plus-Plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub version

Ritchie ++

A Non- Statically-Typed compiled programming language that compiles to x86.


Contact me for help, because I will respond. Discord: amukh1#9613

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Installation


BEFORE YOU INSTALL: please read the prerequisites


To install and set up the library, run:

From Github:

$ git clone https://github.com/amukh1/Ritchie-Plus-Plus
$ cd Ritchie-Plus-Plus
$ g++ *.cpp -o rpp
$ sudo cp ./rpp /usr/bin

From APT:

$ sudo apt install rpp

Usage


For x86 (Intel-AMD Linux):

$ rpp ./name.rpp -o name
$ nasm -f elf name.asm
$ ld -m elf_i386 -o -s name.o -o name
$ ./name

For C (Deprecated):

$ rpp ./name.rpp -c name
$ gcc name.c -o name
$ ./name

ASM compiles to bytecode with NASM on Linux (if your on Windows/OSX use an online assembler).

Alternatively, if you are not on an Intel Machine, you can use QEMU to emulate an x86 machine.

Install QEMU:

$ sudo apt install qemu

Run QEMU:

$ rpp ./name.rpp -o name
$ nasm -f elf name.asm
$ ld -m elf_i386 -o -s name.o -o name
$ qemu-i386 ./name

Example program:


import "stdio"; /* Imports the standard input/output library */
import "stdlib"; /* Imports the standard library */

func main(argc, argv) {
   println("Hello World!", 12); /* Prints "Hello World!" */
   var v = 0; /* Declares a variable */
   var v = "hi"; /* Re-Declares a variable */
   println(v, 2); /* Prints the value of v */
   var& a = v; /* Declares a reference to v */
   var* b = a; /* De-Reference a */
   println(b, 2); /* Prints the value of b */

   return 0; /* Returns 0 */
};
Hello World!
hi
hi

Note: If you choose to try out the examples in the example folder, you will need to compile them using r++ on your system


Contributing

You can contribute to the project by making a pull request on GitHub.

Credits

Amukh1.

Built With

Authors

  • Amukh1 - Github / amukh1#9613

See also the list of contributors who participated in this project.

License

MIT License © Amukh1

About

A Non- Statically-Typed compiled programming language that compiles to x86

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages