($commandshelp) .sysdict ($commandshelp) .known (.pop) .cvx (200 .dict .def) .cvx .ifelse

(puthelp)($commandshelp 3 1 .roll .put).cvx .def



(.add)(.add
: <n><m> .add => <n+m>) puthelp

(.sub)(.sub
: <n><m> .sub => <n-m>) puthelp

(.mul)(.mul
: <n><m> .mul => <n*m>) puthelp

(.div)(.div
: <n><m> .div => <n/m>) puthelp

(.neg)(.neg: <n> .neg => <-n>) puthelp

(.cos)(.cos
: <n> .cos => <cos(n)>) puthelp

(.sin)(.sin
: <n> .sin => <sin(n)>) puthelp

(.atan)(.atan
: <y><x> .atan => <atan(y/x)>) puthelp

(.exp)(.exp
: <b><e> .exp => <be>) puthelp

(.log)(.log
: <b><v> .log => <logbv>) puthelp



(.true)(.true
: .true => <.true>) puthelp

(.false)(.false
: .false => <.false>) puthelp

(.eq)(.eq
: <n><m> .eq => <.true> if n = m
<.false> if n # m) puthelp

(.gt)(.gt
: <n><m> .gt => <.true> if n > m
<.false> if n <= m) puthelp

(.lt)(.lt
: <n><m> .lt => <.true> if n < m
<.false> if n >= m) puthelp

(.not)(.not
: <b> .not => <~b>) puthelp

(.and)(.and: <b1><b2> .and => <b1 AND b2>) puthelp

(.or)(.or
: <b1><b2> .or => <b1 OR b2>) puthelp

(.xor)(.xor
: <b1><b2> .xor => <b1 XOR b2>) puthelp


(.pop)(.pop
: <x> .pop => --) puthelp

(.copy)(.copy
: <x1><x2> ... <xi><i> .copy => <x1><x2> ... <xi><x1><x2> ... <xi>) puthelp

(.cntstk)(.cntstk
: | <x1><x2> ... <xi> .cntstk => <i>) puthelp

(.roll)(.roll
: <x1><x2> ... <xi><i><j> .roll => <x(j+1) mod i> ... <xi><x1>...<xj mod i>) puthelp

(.dup)(.dup
: <x> .dup => <x><x>) puthelp

(.clrstk)(.clrstk
: | <x1><x2> ... <xi> .clrstk => |) puthelp

(.exch)(.exch
: <x><y> .exch => <y><x>) puthelp

(.mark)(.mark: .mark => <mark> (this command puts a Mark type object on the operand stack.)) puthelp

(.cntomrk)(.cnttomrk
: <mark><x1><x2> ... <xi> .cnttomrk => <mark><x1><x2> ... <xi><i>) puthelp

(.clrtomrk)(.clrtomrk
: <mark><x1><x2> ... <xi> .clrtomrk => <mark>) puthelp


(.dict)(.dict
: <i> .dict => <d>
(dictionary with capacity of i entries)) puthelp

(.def)(.def
: <k><v> .def => --
(associates the value v with the key k in the current dictionary)) puthelp

(.del)(.del
: <d><k> .del => --
(deletes the key k from the dictionary d)) puthelp

(.load)(.load
: <k> .load => <v>
(loads the value associated with k in the current dictionary)) puthelp

(.store)(.store
: <k><v> .store => --
(finds a definition of k in the current context and replaces that
definition with value v. If no definition of k exists then the
definition is placed in the current dictionary.)) puthelp

(.put)(.put
: <d><k><v> .put => --
(associates value v with key k in dictionary d.)) puthelp

(.get)(.get
: <d><k> .get => <v>
(retrieves the value associated with k in dictionary d.)) puthelp

(.known)(.known
: <d><k> .known => <.true> if key k is in dictionary d.
<.false> if key k is not in dictionary d.) puthelp

(.where)(.where
: <k> .where => <.true><d> if k is found in some dictionary d.
<.false> if k is not found in any dictionary.) puthelp

(.clrdict)(.clrdict
: <d> .clrdict => -- (clears all entries from dictionary d.)) puthelp

(.dictforall)(.dictforall: <d><x>.dictforall => --
(puts <k><v> on the stack, and then executes <x>. This is done
for every k,v pair in dictionary d)) puthelp

(.begin)(.begin
: <d> .begin => --
(makes d the current dictionary on the dictionary stack.)) puthelp

(.end)(.end
: .end => --
(pops the current dictionary from the dictionary stack.)) puthelp

(.sysdict)(.sysdict
: .sysdict => <systemdictionary>) puthelp



(.exec)(.exec
: <x> .exec => --
(executes object x)) puthelp

(.if)(.if
: <b><x> .if => --
(if b = .true then execute x)) puthelp

(.ifelse)(.ifelse
: <b><x><y> .ifelse => --
(if b = .true then execute x else execute y)) puthelp

(.rept)(.rept
: <i><x> .rept => --
(execute x -- i times)) puthelp

(.loop)(.loop
: <x> .loop => --
(execute x until a .exit command is executed)) puthelp

(.exit)(.exit
: .exit => --
(exit from the current .rept, .loop, .dictforall, .arrayforall commands)) puthelp

(.stop)(.stop
: .stop
(clear the execution stack.))puthelp

(.singlestep)(.singlestep: .singlestep => --
(put execution control into singlestep mode.)) puthelp

(.runfree)(.runfree
: .runfree => --
(take execution control out of singlestep mode.)) puthelp

(.quit)(.quit
: .quit => --
(save virtual memory and exit to the operating system.)) puthelp



(.array)(.array
: <i> .array => <a>
(new array of length i.)) puthelp

(.subarray)(.subarray
: <a><i><j> .subarray => <a’>
(a’ is the subarray of a starting at position i and with
length j.)) puthelp

(.aput)(.aput
: <a><i><v> .aput => --
(store v in the i
th position of a.)) puthelp

(.aget)(.aget
: <a><i> .aget => <v>
(get v from the i
th position of a.)) puthelp

(.aload)(.aload
: <a> .aload =><x1><x2> ... <xi><a> ) puthelp

(.astore)(.astore
: <x1><x2> ... <xi><a> .astore => <a>
(store x
1 ... xi into array a of length i.)) puthelp

(.arrayforall)(.arrayforall: <a><x>.dictforall => --
(puts the contents of a
i on the stack, and then executes <x>.
This is done for every a
i pair in array a)) puthelp



(.print)(.print
: <s> .print => --(.prints the string s on the current output stream.)) puthelp

(.bytestream)(.bytestream: <filename> <access> .bytestream => <bs>
(this command creates a bytestream with the
access characteristics represented by <access>. Here
<access> = 1 for read, 2 for write, 4 for append -- or
the sum of any of these. The created stream type object
is left on the operand stack.)) puthelp

(.keystream)(.keystream : .keystream => <ks>
(this command creates a keystream and leaves it on the operand
stack.)) puthelp

(.killstream)(.killstream: <t> .killstream => --
(this command kills the given stream.)) puthelp

(.writebytes)(.writebytes: <t><s> .writebytes => --
(write bytes in string s appended to stream t.)) puthelp

(.loadbcd)(.loadbcd
: <filename> .loadbcd => --
(load mesa bcd and start.)) puthelp



(.type)(.type
: <x> .type => <NameOfType>
(deliver the name of the type on top of operand stack.
Current types include. .nulltype, .intergertype,
.longintegertype, .realtype, .booleantype, .stringtype,
.streamtype, .arraytype,
.dicttype, .commandtype, .stacktype,
.frametype, .marktype.)) puthelp

(.itype)(.itype
: <x> .itype => <typenumber> (deliver the number of the type on top of the operand
stack.)
Current number assignments are:
nulltype = 0
integertype = 1
longintegertype = 2
realtype = 3
booleantype = 4
stringtype = 5
streamtype = 6
commandtype = 7
dicttype = 8
arraytype = 9
stacktype = 10
frametype = 11
marktype = 12
) puthelp

(.length)(.length
: <x> .length => <i>
(length of: string (in characters); array (in elements); dictionary
(in entries).)) puthelp

(.cvs)(.cvs
: <x> .cvs => <s>
(convert to string equivalent.)) puthelp

(.cvis)(.cvis
: <x><s> .cvis => <s>
(convert into given string space. This command will use s for all
number and boolean conversions.)) puthelp

(.cvlit)(.cvlit
: <x> .cvlit => <xl>
(convert into noun form.)) puthelp

(.cvx)(.cvx
: <x> .cvx => <x’>
(convert into verb form.)) puthelp

(.litchk)(.litchk: <x> .litchk => <.true> if a noun otherwise <.false>) puthelp

(.token)(.token
: <s> .token => <sr><t>
(strip first token from given stream or string. Return remainder
and token on the stack. If no token, then return only a NullType
Object.)) puthelp

(.string)(.string: <i> .string => <s> (<s> is a string of length i).) puthelp
(.substring)(.substring
: <s><i><j> .substring => <s’> (<s’> is a substring of s starting at position i for j
characters.)) puthelp
(.putstring)(.putstring
: <t><i><s> .putstring => <t’> (<t’> is the same as <t> except for the substring s starting
at position i.)) puthelp
(.search)(.search
: <t><s> .search =><tend><tmatch><tbegin><.true>(if there is a substring of t matching s)
<t><.false>(if no substring of t matches s).) puthelp


(.undefkey)(.undefkey: A dictionary lookup failed. when this identifier is executed the offending name is on the
operand stack.) puthelp

(.longname)(.longname
: A file name passed to .run or .bytestream is too long (256 chars). The contents of the stack
contains the offending command plus its input parameters.) puthelp

(.badname)(.badname
: is generated from an attempt to create a stream with the given name. This error can come
from either the .run command or the .bytestream command.) puthelp

(.typechk)(.typechk
: a command is executed which has been passed objects of the wrong type on the stack. Both
the command and the original arguments are on the operand stack when .typechk is executed.) puthelp
(.dictfull)(.dictfull
: an attempt to define a new entry into a full dictionary has occurred. The offending command
and the argument prior to the call are on the stack.) puthelp

(.stkundflw)(.stkundflw
: an attempt to retrieve an argument from an empty stack has occured.) puthelp

(.syntaxerr)(.syntaxerr
: an isolated right paren has been found by the scanner.) puthelp

(.overflow)(.overflow
: numeric overflow has occurred in scanning a number.) puthelp

(.stkovrflw)(.stkovrflw
: a stack has overflowed. This error may come from various parts of the JaM machine. When
the error occurs, all stacks are stored into arrays and put on the operand stack in the order:
opstack, dictstack, execstk.) puthelp

(.rangechk)(.rangechk
: some string or array operation is attempting to store out of bounds.) puthelp