|
|
|
@ -187,7 +187,8 @@ The different ways to specify a value can be grouped as "reads" and "writes": |
|
|
|
|
- `RW` - intersection of the two sets, capable of reading and writing: `REG`, `SYM`, `@REG`, `@SYM` |
|
|
|
|
|
|
|
|
|
Objects (`@reg`, `@sym`) can be read or written as if they were a register, but only if the referenced object supports it. |
|
|
|
|
Other objects may produce a runtime fault or set the INVALID flag. |
|
|
|
|
Other objects may produce a runtime fault or set the INVALID flag. |
|
|
|
|
The object syntax is also used to read values yielded by a generator-like coroutine. |
|
|
|
|
|
|
|
|
|
In the instruction lists below, I will use the symbols `Rd` for reads, `Wr` for writes, `RW` for read-writes, and `@Obj` for object handles, |
|
|
|
|
with optional description after an apostrophe, such as: `(add Wr'dst Rd'a Rd'b)`. |
|
|
|
@ -473,9 +474,15 @@ Jumping to a label is always safer than a manual skip. |
|
|
|
|
; The arguments are passed as argX. Return values are stored in resX registers. |
|
|
|
|
(call PROC Rd...) |
|
|
|
|
|
|
|
|
|
; Exit the current routine with return values |
|
|
|
|
; Spawn a coroutine. The handle is stored in the output register. |
|
|
|
|
(spawn Wr'handle PROC Rd...) |
|
|
|
|
|
|
|
|
|
; Exit the current routine (or coroutine) with return values |
|
|
|
|
(ret Rd...) |
|
|
|
|
|
|
|
|
|
; Wait for a coroutine to complete, read its return values and delete it. |
|
|
|
|
(join @Obj) |
|
|
|
|
|
|
|
|
|
; Generate a run-time fault with a debugger message |
|
|
|
|
(fault) |
|
|
|
|
(fault message) |
|
|
|
|