A final project for CS130: Computer Organization, American University of Armenia, Fall 2022
Author: Gevorg Nersesian, gevorg_nersesian@edu.aua.am
Supervisor: Norayr Chilingaryan, nchilingaryan@aua.am
In a terminal window of a directory with your Forth file, type
python3 main.py [inputFileName].fsIn your directory you will find an executable of the inputted Forth script and a folder with the raw files (object and assembly files)
Integers are just being pushed to the top of the stack
+, -, *, /: does the given operation on elements and pushes the result to the the top of the stack
mod: calculates the reminder of division of two elements and pushes the result to the the top of the stack
dup: duplicates an element at the top of the stack
swap: swaps elements at the top of the stack
drop: drops one element from the top of the stack
.: prints out an element from the top of the stack
\[comment]: this is a comment, it is ignored by the compiler, not transfered to the .s (assembly) file