; (C) Copyright International Business Machines Corporation 23 January 
; 1990.  All Rights Reserved. 
;  
; See the file USERAGREEMENT distributed with this software for full 
; terms and conditions of use. 
; File: greencard
; Author: David F. Bacon
; SCCS Info: @(#)greencard	1.6 3/14/90

; N.B.  No leading or embedded spaces are allowed in any field other
; than comment

                         HERMES ASSEMBLER REFERENCE CARD

Operator        Operands                Qualifier               Comments
========        ======================  ======================  ===============

UBIQUITOUS

move           |dst,src                |                   |
copy           |dst,src                |                   |
discard        |dst                    |                   |   
equal          |dst,src1,src2          |                   |   
notequal       |dst,src1,src2          |                   |   

NOMINAL

unique         |dst                    |                   |

BOOLEAN

boolean        |dst                    |boolean            |
and            |dst,src1,src2          |                   |
or             |dst,src1,src2          |                   |
not            |dst,src                |                   |


INTEGER

ilit           |dst                    |integer            |
iadd           |dst,src1,src2          |                   |
isubtract      |dst,src1,src2          |                   |dst=src1-src2
imultiply      |dst,src1,src2          |                   |
idivide        |dst,src1,src2          |                   |divisor=src2
irem           |dst,src1,src2          |                   |divisor=src2
imod           |dst,src1,src2          |                   |divisor=src2
igt            |dst,src1,src2          |                   |src1 > src2 ?
ilt            |dst,src1,src2          |                   |src1 < src2 ?
ige            |dst,src1,src2          |                   |src1 >= src2 ?
ile            |dst,src1,src2          |                   |src1 <= src2 ?
inegate        |dst                    |                   |
icvt_enum      |dst,src                |integer            |q=enumsize
icvt_real      |dst,src                |                   |


REAL

rlit           |dst                    |real               |
radd           |dst,src1,src2          |                   |
rsubtract      |dst,src1,src2          |                   |dst=src1-src2
rmultiply      |dst,src1,src2          |                   |
rdivide        |dst,src1,src2          |                   |divisor=src2
rgt            |dst,src1,src2          |                   |
rlt            |dst,src1,src2          |                   |
rge            |dst,src1,src2          |                   |
rle            |dst,src1,src2          |                   |
rnegate        |dst                    |                   |
rcvt_int       |dst,src                |                   |
rcvt_enum      |dst,src                |integer            |q=enumsize


ENUMERATION

enum_lit       |dst                    |integer            |



ORDERED ENUMERATION

ordenum_lit    |dst                    |integer            |
oegt           |dst,src1,src2          |                   |
oelt           |dst,src1,src2          |                   |
oege           |dst,src1,src2          |                   |
oele           |dst,src1,src2          |                   |
oecvt_int      |dst,src                |                   |
oecvt_real     |dst,src                |                   |
oeinitloop     |dst                    |                   |
oeloop         |dst                    |integer_pair       |q=(label, enumsize)


RECORD

new_record     |dst                    |integer            |qual=size


VARIANT

unite          |dst,src                |integer            |q=enum case
dissolve       |dst,src                |                   |variant=src
reveal         |variant                |integer            |q=enum case
hide           |dst                    |                   |
case           |dst,src                |                   |variant=src


TABLE

size           |dst,src                |                   |table=src
new_table      |dst                    |table_initializer  |
insert         |dst,src                |                   |
merge          |dst,src                |                   |
initget        |dst,table              |integer_pair       |i1=repnum; i2=pos
endget         |dst,table              |                   |
get_or_err     |dst,table              |                   |
get_or_goto    |dst,table              |label              |
remove         |dst,src,table          |                   |
privatize      |dst                    |                   |

ORDERED TABLE

insert_at      |dst,src,pos            |                   |
merge_at       |dst,src,pos            |                   |
concat         |dst,src1,src2          |                   |
position       |dst,src                |                   |
scan_position  |dst,src,table          |                   |
remove_at      |dst,src,pos            |                   |
lookup_at      |dst,src,pos            |                   |
lookup_at_or_goto|dst,src,pos          |label              |

KEYED OR INDEXED TABLE

find           |dst,table,src1,src2,...|integer            |q=repnum
find_or_goto   |dst,table,src1,src2,...|integer_pair       |i1=repnum;i2=label
fremove        |dst,src,table          |integer            |q=repnum

INDEXED TABLE

initidxfind    |dst,table,src1,src2,...|integer            |q=repnum
idxfind_or_err |dst,table              |                   |
idxfind_or_goto|dst,table              |integer            |q=label
endidxfind     |dst,table              |                   |

CHARACTER STRING TABLE

chs_lit        |dst                    |string             |


POLYMORPHS

wrap           |dst,src                |polymorph_info     |
unwrap         |dst,src                |polymorph_info     |
inspect_poly   |dst,src                |polymorph_info     |src is the poly
endinspect_poly|dst                    |                   |
type_of        |dst,src                |                   |
typestate_of   |dst,src                |                   |

PORTS

new_inport     |ip                     |                   |
connect        |op,ip                  |                   |
send           |op,msg                 |                   |
receive        |msg,ip                 |                   |
empty          |dst,ip                 |                   |
call           |op,src1,src2,...       |typename           |
return         |dst                    |                   | 
return_exception|dst                   |user_exception     | 


PROCESSES

create         |dst,src                |typename           |
procedure      |dst,src                |typename           |
endprocess     |                       |                   |

PROGRAMS

new_program    |dst                    |                   |
link           |dst                    |integer            |i=link table index
currentprogram |dst                    |                   |
prog_lit       |dst                    |program            |
checkdefinitions|dst                   |                   |
typename       |dst                    |typename           |
attributename  |dst                    |attributename      |


CONSTRAINTS

assert         |dst1,dst,...           |constraint         |
drop           |dst1,dst2,...          |constraint         |


CONTROL CONSTRUCTS

block          |                       |handler_list       |
endblock       |                       |                   |
exit           |                       |exitid             |
select         |e1,g1,e2,g2,...        |label_list         |en =? NO_OBJECT
jumpselect     |index                  |label_list         |
branch         |                       |label              |
branch_false   |guard                  |label              |
branch_true    |guard                  |label              |
raise          |                       |builtin_exception  |

NONCONTROL CONSTRUCTS

noop           |                       |                   |

DEBUGGING

print          |dst                    |                   |
write          |dst,src                |                   |src=filename
read           |dst,src                |                   |src=filename


NEW

trace          |                       |integer            |trace-level

   This file is parsed with awk scripts.  Lines that begin with a lower case
   letter in column 1 are significant; all others are comments.  Currently only
   the first three tokens are significant and of those three, the second (the
   operands column) is ignored.  The first token (the operator name) is used to
   build the name of the function implementing the equivalent NIL primitive.
   The third token is the name of the function parsing any qualifiers for the
   primitive (if appropriate).

   N.B.  Keep tabs out of this file.  You have been warned.
