Kryptostack
|
The definitions for the operator list use OTCodes with
n can be I or R
X can be any object
And 00 represents the empty operand stack
Non Standard for debugging, development purposes but with entries in the systemdict dictionary.
____tick__
Prints **TICK** to stdout. nothing else.
____nl__
Prints a new line to stdout. nothing else.
X ____print__ X
Prints a readable presentation based on operator '=' of the top stack object. The stack will not be altered. No new line will be printed.
Intenionally dissenting from the PostScript implementation. Operators with entries in the systemdict dictionary.
A bind A
Does no binding
X(1) ... X(I) I copy X(1) ... X(I) X(1) ... X(I)
Copies duplicates of the top I stack objects onto the stack.
The operations on arrays, dictionaries and strings isn't implemented.
I dict -dict-
The implementation ignores the given size I.
I I I a for
The PostScript for loop implemented for integers only.
quit
stops the interpreter
Intenionally cloned PostScript implementations with entries in the systemdict dictionary.
X __==__
pops, prints a human readable output of the top stack object
X __=__
pops, writes string representation to stdout, writes nl, relies on "cvs"
-mark- X(1) X(n) __]__ -array-
__{__ -mark-
-mark- X .. X __}__ -procedure-
PostScript
n abs n
n n add n
B B and B
I I and I
I array -array-
D begin
I I bitshift I X ... X clear 00
countdictstack I
-mark- X(1) .. X(n) counttomark -mark- X(1) .. X(n) I
currentdict D
X X def
dictstack
PostScript
X dup X X
end
X(1) X(2) exch X(2) X(1)
X(1) X(2) eq B
exec
exit
A a forall
a a forall
D a forall
S a forall
PostScript
ge
A I get X
D X get X
S I get X
gt
I I idiv I
X(I) ... X(0) I index X(I) ... X(0) X(I) if
ifelse
le
X length I
lt
X(key) load X(value)
mark -mark-
[__ -mark-
__matrix A PostScript
n n mul n
PostScript mul without implicit number conversion
n neg n
B not B
I not I
B1 B2 or B
I I or I
X pop
pstack
A I X put
D X X put
S I I put
I a repeat
stack
n n sub n
B(1) B(2) xor B
I(1) I(2) xor I
PostScript
Additional Operators with entries in the kryptodict dictionary.
I I gcd I
I I ggT I
the greatest common divisor
I I lcm I
I I kgV I
the least common multiple
I(a) I(b) xgcd I(ggT) I(s) I(t)
I(a) I(b) xggT I(ggT) I(s) I(t)
extended Euclidean algorithm gcd(a,b)=sa+tb
without effects but mostly with correct stack handing
n n S ashow
dummy
Operators without any entry in the dictionaries. Can't be called explicitely. Are used internally by other operators.