From acc36b195914887ed64799c203512c38d9f2a82f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sat, 10 Oct 2020 18:56:35 +0200 Subject: [PATCH] document the eof, empty and full flags --- README.md | 49 ++++++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 7bf9d54..2b4163a 100644 --- a/README.md +++ b/README.md @@ -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