- Only works on architectures x86 and x86-64
- Must be installed before continuing
- NodeJS
- If on MacOS
- LimaVM (must install
debian) - XQuartz (only if you are planning to use the graphics library)
- LimaVM (must install
- gcc multilib (
sudo apt-get install gcc-multilib) - Optional
- gmp (for bignum demos) (
sudo apt-get install libgmp3-dev) - 32bit x11 (for graphics demos)
dpkg --add-architecture i386; sudo apt-get update; sudo apt-get install libx11-dev:i386
- gmp (for bignum demos) (
- Note: if on mac, these should be installed in Lima. otherwise just install these normally
- MUST BE USING BASH
- Clone this repository
- cd
./installer - run
./install.sh(runs BUILD.sh, moves compiler to path, and lets you use any file)
- Compiling can be done with
ham <file> -o <out> -l <link>- Example 1:
ham file.x -o a - Example 2:
ham file2.x -o bob -l gmp(links with gmp. Can do pthread, x11, etc)- make sure to have a space between the flag and the data (like in the example above)
- Example 1:
- The binary can then be run normally (via Lima if on Mac)
- Assembly file is stored in
HAMPRIMEC2/compiled/out.s - You can still use method-2 for compiling and running if you installed using method-1
- Clone this repository
- run
./compiler/scripts/BUILD.sh
- Cd into
compiler - Run
node main.js <file name relative to test/working directory>- For example:
node main.js arrays-2d.x - This creates an assembly file in
../compiled/out.s
- For example:
- if MacOS, enter Lima shell
- Cd into
compiler - Run
./scripts/assemble.sh
- Cd to
compiler - MacOS
- Run
./scripts/lima_x11.sh
- Run
- Linux
- Run
./scripts/internal/assemble_x11.sh
- Run