[ library(asm) | Reference Manual | Alphabetic Index ]

asm(+PredSpec, +WAMCode)

Assemble the WAM instructions WAMCode into ECLiPSe as predicate PredSpec.
A list of WAM instructions in the right format.


Assembles the WAM instruction WAMCode into the current ECLiPSe session as the predicate PredSpec. The WAM code is in the form of a list, with each element representing one WAM instruction. The format of the WAMCode is the same as that generated by disasm/2,3. Thus the predicate can be used to load a predicate previously dissasembled by disasm/2,3 without having to compile the source Prolog form of the predicate.

If PredSpec is an existing defined predicate, the older definition will be replaced. If WAMCode is not in the correct format, an exception will be generated and the predicate PredSpec would not be redefined.

Fail Conditions





(5) type error
PredSpec is not in correct form.
(6) out of range
WAMCode is not in correct form.

See Also

asm / 3, disasm / 2, disasm / 3, pasm / 4