Changed BRZ behavior to chomp a test word from stack instead of checking PSW_Z bit.
[ned1] / docs / architecture_manual.md
index 262c179..e2a7de3 100644 (file)
@@ -14,7 +14,7 @@ Overview
 * Explicitly no MMU, just a flat, shared memory space. Think threads, not
   processes.
 
 * Explicitly no MMU, just a flat, shared memory space. Think threads, not
   processes.
 
-Version: 1
+Version: 2
 
 Instruction Word Formats
 ------------------------
 
 Instruction Word Formats
 ------------------------
@@ -64,7 +64,7 @@ Syllables are defined as follows.
 | 000100 | SHIFT  | Pop TOS & NOS. Shift NOS by TOS bits to the left/right.    |
 | 000101 | CMPSWP | Compare-and-swap with ptr, old_val & new_val on stack.     |
 | 000110 | TEST   | Pop TOS and set PSW according to value.                    |
 | 000100 | SHIFT  | Pop TOS & NOS. Shift NOS by TOS bits to the left/right.    |
 | 000101 | CMPSWP | Compare-and-swap with ptr, old_val & new_val on stack.     |
 | 000110 | TEST   | Pop TOS and set PSW according to value.                    |
-| 000111 | BRZ    | Pop TOS. If PSW_Z==1, then set PC to popped value.         |
+| 000111 | BRZ    | Pop TOS & NOS. If NOS==0, then set PC to TOS value.        |
 | 000010 | LOAD   | Pop address from TOS, dereference and store to TOS.        |
 | 000011 | STORE  | Pop address from TOS, pop data from NOS, deref and store.  |
 | 000001 | NOP    | Do nothing.                                                |
 | 000010 | LOAD   | Pop address from TOS, dereference and store to TOS.        |
 | 000011 | STORE  | Pop address from TOS, pop data from NOS, deref and store.  |
 | 000001 | NOP    | Do nothing.                                                |