Skip to content

piedpiper358/forth-compiler-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Forth compiler and interpreter

Implemented commands:

  • .S - print stack
  • Arithmetic operators ( + - * /, = < )
  • Logical operators (and, not)
  • rot (a b c --> b c a)
  • swap (a b --> b a)
  • dup (a --> a a)
  • drop (a --> )
  • . ( a -- ) pop number from stack and print it
  • Input/Output
    • key ( -- c) – read one symbol from stdin
    • emit ( c -- ) – write one symbol to stdout.
    • number ( -- n ) – read signed number from stdin
  • Memory Commands:
    • mem - load on the stack a constant - the address of the start of the user memory.
    • ! (data address -- ) – writes data to address;
    • @ (address -- value) – reads the contents of memory at address;

About

Forth compiler and interpreter

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published