|
|
|
@ -62,30 +62,39 @@ Arithmetic and other operations set status flags that can be used for conditiona |
|
|
|
|
- Negative … Value is negative |
|
|
|
|
- Overflow … Arithmetic overflow or underflow, buffer underflow, etc. |
|
|
|
|
- Invalid … Invalid arguments for an instruction |
|
|
|
|
- Carry … Arithmetic carry *this is currently unused* |
|
|
|
|
- Carry … Arithmetic carry; used by extensions (currently unused, planned for the byte/halfword/word versions of the arith module) |
|
|
|
|
- Full … full condition; used by extensions |
|
|
|
|
- Empty … empty condition; used by extensions |
|
|
|
|
- EOF … end of a stream, file, etc; used by extensions |
|
|
|
|
|
|
|
|
|
### Status tests (conditions) |
|
|
|
|
|
|
|
|
|
These keywords (among others) are used in conditional branches to specify flag tests: |
|
|
|
|
|
|
|
|
|
- `eq` … Equal, |
|
|
|
|
- `ne` … NotEqual, |
|
|
|
|
- `z` … Zero, |
|
|
|
|
- `nz` … NotZero, |
|
|
|
|
- `lt` … Lower, |
|
|
|
|
- `le` … LowerOrEqual, |
|
|
|
|
- `gt` … Greater, |
|
|
|
|
- `ge` … GreaterOrEqual, |
|
|
|
|
- `pos` … Positive, |
|
|
|
|
- `neg` … Negative, |
|
|
|
|
- `npos` … NonPositive, |
|
|
|
|
- `nneg` … NonNegative, |
|
|
|
|
- `c` … Carry, |
|
|
|
|
- `nc` … NotCarry, |
|
|
|
|
- `val`, `valid`, `ok` … Valid, |
|
|
|
|
- `inval`, `nok` … Invalid, |
|
|
|
|
- `ov` … Overflow, |
|
|
|
|
- `nov` … NotOverflow, |
|
|
|
|
- `eq` … Equal |
|
|
|
|
- `ne` … NotEqual |
|
|
|
|
- `z` … Zero |
|
|
|
|
- `nz` … NotZero |
|
|
|
|
- `lt` … Lower |
|
|
|
|
- `le` … LowerOrEqual |
|
|
|
|
- `gt` … Greater |
|
|
|
|
- `ge` … GreaterOrEqual |
|
|
|
|
- `pos` … Positive |
|
|
|
|
- `neg` … Negative |
|
|
|
|
- `npos` … NonPositive |
|
|
|
|
- `nneg` … NonNegative |
|
|
|
|
- `c` … Carry |
|
|
|
|
- `nc` … NotCarry |
|
|
|
|
- `val`, `valid`, `ok` … Valid |
|
|
|
|
- `inval`, `nok` … Invalid |
|
|
|
|
- `ov` … Overflow |
|
|
|
|
- `nov` … NotOverflow |
|
|
|
|
- `f`, `full` … Full |
|
|
|
|
- `nf`, `nfull` … Not full |
|
|
|
|
- `em`, `empty` … Empty |
|
|
|
|
- `nem`, `nempty` … Not empty |
|
|
|
|
- `eof` … EOF |
|
|
|
|
- `neof` … Not EOF |
|
|
|
|
|
|
|
|
|
# Syntax |
|
|
|
|
|
|
|
|
@ -561,6 +570,8 @@ such as animations. |
|
|
|
|
- They operate over unicode code points, which are a superset of ASCII. |
|
|
|
|
- The "_r" variants work with raw bytes. Do not combine them, or you may get problems with multi-byte characters. |
|
|
|
|
|
|
|
|
|
End of stream is reported by the 'eof' status flag when a stream is read or written. |
|
|
|
|
|
|
|
|
|
You can use these special handles in almost all instructions: |
|
|
|
|
|
|
|
|
|
```lisp |
|
|
|
|