Menu

Tree [645e9f] master /
 History

HTTPS access


File Date Author Commit
 web 2009-08-27 Martin Kopta Martin Kopta [ff2add] git sf move
 .gitignore 2009-07-08 Martin Kopta Martin Kopta [645aa4] todo added
 AUTHORS 2009-07-31 Martin Kopta Martin Kopta [23e6d9] release
 COPIYNG 2009-07-31 Martin Kopta Martin Kopta [23e6d9] release
 Makefile 2009-07-31 Martin Kopta Martin Kopta [3719f6] some move
 README 2009-07-31 Martin Kopta Martin Kopta [23e6d9] release
 TODO 2009-07-08 Martin Kopta Martin Kopta [e4dd57] todo update
 pdcalc.cc 2009-12-12 Martin Kopta Martin Kopta [645e9f] some improvements

Read Me

pdcalc - simple pushdown calculator

Compiling

  cd src
  make build

Running

  cd src
  make run

Installing

  cd src
  make install

Uninstalling

  cd src
  make uninstall


Availible commands:

  push 10.3            push 10.3 to stack (atof)
  pi                   push 3.14159265 to stack
  lda                  store top of stack to register "a"
  ldb                  store top of stack to register "b"
  ldc                  store top of stack to register "c"
  ldd                  store top of stack to register "d"
  sta                  push content of register "a" to stack
  stb                  push content of register "b" to stack
  stc                  push content of register "c" to stack
  std                  push content of register "d" to stack
  pop                  remove top of the stack
  swap                 swap (top) and (top-1)
  dup                  push (top) to stack
  over                 push (top-1) to stack
  top                  print top of the stack
  .                    print top of the stack
  neg                  negate top of the stack
  add                  (top-1) + (top) -> (top)
  sub                  (top-1) - (top) -> (top)
  mul                  (top-1) * (top) -> (top)
  div                  (top-1) / (top) -> (top)
  sqrt                 square root of top -> (top)
  pow                  (top-1) ^ (top) -> (top)
  ln                   ln(top)   -> (top) (e  logarithm)
  log                  log(top)  -> (top) (10 logarithm)
  log2                 log2(top) -> (top) (2  logarithm)
  sin                  sin(top)  -> (top)
  cos                  cos(top)  -> (top)
  tan                  tan(top)  -> (top)
  abs                  absolute value (top) -> (top)
  dump                 print whole stack
  sum                  sum whole stack
  new                  flush stack

"null" means no element (end of stack)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.