Skip to content

Repository files navigation

Welcome to SimpleLanguage!

CLI INSTRUCTIONS:
Use $ to write a command
Available commands:
Global commands:
  $project add project_name project_directory(use & at the start to mark the path as relative to the SimpleLanguage.exe file) : adds a project
  $project delete project_name : deletes a project
  $quit : quits the current app
  $app info : prints the current app info such as its full name

Interpreter commands:
  $print stack : prints the last stack

PROGRAMMING:
Instructions:
  Stack managment:
   PUSH - pushes the specified values to the top of the main stack
   POP - pops the top most value from the main stack
   PUT - moves the top most element of the main stack to the storage stack
   GET - moves the top most element of the storage stack to the main stack
   COPY - duplicates the top most element of the main stack
   SWAP - swaps the main stack and the storage stack
   CLEARMAIN, CLEARSTOR - clears the designated stacks

  Input-Output:
   PRINT - prints the top most element of the main stack to the console
   PRINTC - prints the top most element of the main stack as a character (using UNICODE encoding) to the console
   INPUT - asks the user for input and pushes it onto the main stack

  Math:
   ADD - adds the two top most elements of the main stack and pushes the result
   SUB - subtracts the two top most elements of the main stack and pushes the result
   MUL - multiplies the two top most elements of the main stack and pushes the result
   DIV - divides the two top most elements of the main stack and pushes the result

  Flow control:
   HALT - halts the program
   JMP - jumps to the selected line
   JMPEQ0 - jumps to the selected line if the value on top of the main stack is equal 0
   JMPGT0 - jumps to the selected line if the value on top of the main stack is greater than 0
   JMPMAIN, JMPSTOR - jumps to the selected line if the designated stack is not empty
   JMPNOMAIN, JMPNOSTOR - jumps to the selected line if the designated stack is empty

About

A simple, stack based programming language

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages